1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // Simple x264 Launcher
3 ; // Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
5 ; // This program is free software; you can redistribute it and/or modify
6 ; // it under the terms of the GNU General Public License as published by
7 ; // the Free Software Foundation; either version 2 of the License, or
8 ; // (at your option) any later version.
10 ; // This program is distributed in the hope that it will be useful,
11 ; // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; // GNU General Public License for more details.
15 ; // You should have received a copy of the GNU General Public License along
16 ; // with this program; if not, write to the Free Software Foundation, Inc.,
17 ; // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ; // http://www.gnu.org/licenses/gpl-2.0.txt
20 ; ///////////////////////////////////////////////////////////////////////////////
23 ;--------------------------------
25 ;--------------------------------
28 !error "NSIS_UNICODE is undefined, please compile with Unicode NSIS !!!"
32 !error "X264_BUILD is not defined !!!"
35 !error "X264_DATE is not defined !!!"
37 !ifndef X264_OUTPUT_FILE
38 !error "X264_OUTPUT_FILE is not defined !!!"
40 !ifndef X264_SOURCE_PATH
41 !error "X264_SOURCE_PATH is not defined !!!"
44 !error "X264_UPX_PATH is not defined !!!"
48 !define MyRegPath
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{986E454F-DACA-4326-A9C7-3E46C0BFFDCE}"
51 !define MyWebSite
"http://muldersoft.com/"
54 ;--------------------------------
56 ;--------------------------------
59 !packhdr "${PACKHDRTEMP}" '"..\mt.exe" -manifest "setup.manifest" -outputresource:"${PACKHDRTEMP};1"'
62 ;--------------------------------
64 ;--------------------------------
69 !include `StdUtils.nsh`
72 ;--------------------------------
74 ;--------------------------------
76 RequestExecutionLevel admin
78 ShowUninstDetails show
79 Name "Simple x264/x265 Launcher [Build #${X264_BUILD}]"
80 OutFile "${X264_OUTPUT_FILE}"
81 BrandingText "Date created: ${X264_DATE} [Build #${X264_BUILD}]"
82 InstallDir "$PROGRAMFILES\MuldeR\Simple x264 Launcher v2"
83 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
86 ;--------------------------------
88 ;--------------------------------
90 SetCompressor
/SOLID LZMA
91 SetCompressorDictSize
64
93 #!packhdr "$%TEMP%\exehead.tmp" '"${X264_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
96 ;--------------------------------
98 ;--------------------------------
100 ReserveFile
"${NSISDIR}\Plugins\Aero.dll"
101 ReserveFile
"${NSISDIR}\Plugins\LangDLL.dll"
102 ReserveFile
"${NSISDIR}\Plugins\LockedList.dll"
103 ReserveFile
"${NSISDIR}\Plugins\nsDialogs.dll"
104 ReserveFile
"${NSISDIR}\Plugins\nsExec.dll"
105 ReserveFile
"${NSISDIR}\Plugins\StartMenu.dll"
106 ReserveFile
"${NSISDIR}\Plugins\StdUtils.dll"
107 ReserveFile
"${NSISDIR}\Plugins\System.dll"
108 ReserveFile
"${NSISDIR}\Plugins\UserInfo.dll"
111 ;--------------------------------
113 ;--------------------------------
118 ;--------------------------------
120 ;--------------------------------
122 !searchreplace PRODUCT_VERSION_DATE
"${X264_DATE}" "-" "."
123 VIProductVersion
"${PRODUCT_VERSION_DATE}.${X264_BUILD}"
125 VIAddVersionKey
"Author" "LoRd_MuldeR <mulder2@gmx.de>"
126 VIAddVersionKey
"Comments" "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."
127 VIAddVersionKey
"CompanyName" "Free Software Foundation"
128 VIAddVersionKey
"FileDescription" "Simple x264 Launcher [Build #${X264_BUILD}]"
129 VIAddVersionKey
"FileVersion" "${PRODUCT_VERSION_DATE}.${X264_BUILD}"
130 VIAddVersionKey
"LegalCopyright" "Copyright 2004-2015 LoRd_MuldeR"
131 VIAddVersionKey
"LegalTrademarks" "GNU"
132 VIAddVersionKey
"OriginalFilename" "x264_x64.${X264_DATE}.exe"
133 VIAddVersionKey
"ProductName" "Simple x264 Launcher"
134 VIAddVersionKey
"ProductVersion" "Build #${X264_BUILD} (${X264_DATE})"
135 VIAddVersionKey
"Website" "${MyWebSite}"
138 ;--------------------------------
139 ;MUI2 Interface Settings
140 ;--------------------------------
142 !define MUI_ABORTWARNING
143 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
HKLM
144 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"${MyRegPath}"
145 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"StartmenuFolder"
146 !define MUI_LANGDLL_REGISTRY_ROOT
HKLM
147 !define MUI_LANGDLL_REGISTRY_KEY
"${MyRegPath}"
148 !define MUI_LANGDLL_REGISTRY_VALUENAME
"SetupLanguage"
149 !define MUI_STARTMENUPAGE_DEFAULTFOLDER
"Simple x264 Launcher v2"
150 !define MUI_FINISHPAGE_NOAUTOCLOSE
151 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
152 !define MUI_FINISHPAGE_RUN
153 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
154 !define MUI_FINISHPAGE_SHOWREADME
155 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
156 !define MUI_FINISHPAGE_LINK
${MyWebSite}
157 !define MUI_FINISHPAGE_LINK_LOCATION
${MyWebSite}
158 !define MUI_ICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
159 !define MUI_UNICON
"${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
160 !define MUI_WELCOMEFINISHPAGE_BITMAP
"wizard.bmp"
161 !define MUI_UNWELCOMEFINISHPAGE_BITMAP
"wizard-un.bmp"
162 !define MUI_HEADERIMAGE
163 !define MUI_HEADERIMAGE_BITMAP
"header.bmp"
164 !define MUI_HEADERIMAGE_UNBITMAP
"header-un.bmp"
165 !define MUI_LANGDLL_ALLLANGUAGES
166 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
167 !define MUI_CUSTOMFUNCTION_UNGUIINIT un
.MyGuiInit
168 !define MUI_LANGDLL_ALWAYSSHOW
171 ;--------------------------------
172 ;MUI2 Pages (Installer)
173 ;--------------------------------
176 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
177 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckForPreRelease
178 !define MUI_WELCOMEPAGE_TITLE_3LINES
179 !define MUI_FINISHPAGE_TITLE_3LINES
180 !insertmacro MUI_PAGE_WELCOME
183 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
184 !insertmacro MUI_PAGE_LICENSE
"license.rtf"
187 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
188 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
189 !insertmacro MUI_PAGE_DIRECTORY
192 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
193 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
196 Page Custom LockedListShow
199 !insertmacro MUI_PAGE_INSTFILES
202 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
203 !insertmacro MUI_PAGE_FINISH
206 ;--------------------------------
207 ;MUI2 Pages (Uninstaller)
208 ;--------------------------------
211 !define MUI_WELCOMEPAGE_TITLE_3LINES
212 !define MUI_FINISHPAGE_TITLE_3LINES
213 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
214 !insertmacro MUI_UNPAGE_WELCOME
217 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
218 !insertmacro MUI_UNPAGE_CONFIRM
221 UninstPage Custom un
.LockedListShow
224 !insertmacro MUI_UNPAGE_INSTFILES
227 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
228 !insertmacro MUI_UNPAGE_FINISH
231 ;--------------------------------
233 ;--------------------------------
235 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
237 ; !insertmacro MUI_LANGUAGE "German"
238 ; !insertmacro MUI_LANGUAGE "Spanish"
239 ; !insertmacro MUI_LANGUAGE "Russian"
240 ; !insertmacro MUI_LANGUAGE "Ukrainian"
241 ; !insertmacro MUI_LANGUAGE "Polish"
243 ; !insertmacro MUI_LANGUAGE "French"
244 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
245 ; !insertmacro MUI_LANGUAGE "SimpChinese"
246 ; !insertmacro MUI_LANGUAGE "TradChinese"
247 ; !insertmacro MUI_LANGUAGE "Japanese"
248 ; !insertmacro MUI_LANGUAGE "Italian"
249 ; !insertmacro MUI_LANGUAGE "Dutch"
250 ; !insertmacro MUI_LANGUAGE "Greek"
251 ; !insertmacro MUI_LANGUAGE "Hungarian"
252 ; !insertmacro MUI_LANGUAGE "Romanian"
253 ; !insertmacro MUI_LANGUAGE "Serbian"
254 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
255 ; !insertmacro MUI_LANGUAGE "Arabic"
256 ; !insertmacro MUI_LANGUAGE "Portuguese"
257 ; !insertmacro MUI_LANGUAGE "Afrikaans"
258 ; !insertmacro MUI_LANGUAGE "Malay"
259 ; !insertmacro MUI_LANGUAGE "Indonesian"
262 ;--------------------------------
264 ;--------------------------------
267 !include "language\en.nsh"
270 ;--------------------------------
272 ;--------------------------------
274 !macro _UnattendedMode _a _b _t _f
275 !insertmacro _LOGICLIB_TEMP
276 ${StdUtils
.TestParameter
} $_LOGICLIB_TEMP "Update"
277 StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
279 !define UnattendedMode
`"" UnattendedMode ""`
281 !macro _ForcedMode _a _b _t _f
282 !insertmacro _LOGICLIB_TEMP
283 ${StdUtils
.TestParameter
} $_LOGICLIB_TEMP "Force"
284 StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
286 !define ForcedMode
`"" ForcedMode ""`
288 !macro _ValidFileName _a _b _t _f
289 !insertmacro _LOGICLIB_TEMP
290 ${StdUtils
.ValidFileName
} $_LOGICLIB_TEMP `${_b}`
291 StrCmp "$_LOGICLIB_TEMP" "ok" `${_t}` `${_f}`
293 !define ValidFileName
`"" ValidFileName`
296 ;--------------------------------
297 ;Installer initialization
298 ;--------------------------------
305 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
308 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the installer is already running!"
314 # Running on Windows NT family?
316 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
317 ExecShell "open" "http://windows.microsoft.com/"
321 # Running on Windows XP or later?
322 ${If} ${AtMostWin2000}
323 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, but your operating system is *not* supported anymore.$\nInstallation will be aborted!$\n$\nThe minimum required platform is Windows XP (Service Pack 3)."
324 ExecShell "open" "http://windows.microsoft.com/"
328 # If on Windows XP, is the required Service Pack installed?
330 ${IfNot} ${RunningX64} # Windows XP 32-Bit, requires Service Pack 3
331 ${AndIf} ${AtMostServicePack} 2
332 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows XP with Service Pack 3 installed.$\nWindows XP *without* Service Pack 3 reached end-of-life on 2010-07-13.$\nCurrent Windows XP (Service Pack 3) will be supported until 2014-04-08.$\n$\nPlease install Service Pack 3 now or just run Windows Update!"
333 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 3 for Windows XP now?" IDYES`
334 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=24"
336 ExecShell "open" "http://windowsupdate.microsoft.com/"
340 ${If} ${RunningX64} # Windows XP 64-Bit, requires Service Pack 2
341 ${AndIf} ${AtMostServicePack} 1
342 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows XP x64 Edition with Service Pack 2 installed.$\nWindows XP x64 Edition *without* Service Pack 2 reached end-of-life on 2009-04-14.$\nCurrent Windows XP x64 Edition (Service Pack 2) will be supported until 2014-04-08.$\n$\nPlease install Service Pack 2 now or just run Windows Update!"
343 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 2 for Windows XP x64 Edition now?" IDYES`
344 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=17791"
346 ExecShell "open" "http://windowsupdate.microsoft.com/"
354 ${IfNot} ${UnattendedMode}
355 !insertmacro MUI_LANGDLL_DISPLAY
360 UserInfo::GetAccountType
363 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
364 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
370 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
373 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the un-installer is already running!"
377 ${IfNot} ${ForcedMode}
378 !insertmacro MUI_LANGDLL_DISPLAY
383 UserInfo::GetAccountType
386 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
387 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
393 ;--------------------------------
395 ;--------------------------------
398 StrCpy $0 $HWNDPARENT
399 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
403 Function un
.MyGuiInit
404 StrCpy $0 $HWNDPARENT
405 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
410 ;--------------------------------
411 ;Macros & Auxiliary Functions
412 ;--------------------------------
414 !macro PrintProgress Text
415 SetDetailsPrint textonly
416 DetailPrint '${Text}'
417 SetDetailsPrint listonly
421 !macro CreateWebLink ShortcutFile TargetURL
424 StrCpy $0 "${ShortcutFile}"
425 StrCpy $1 "${TargetURL}"
431 Function _CreateWebLink
433 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
434 DeleteINISec "$0" "DEFAULT"
435 DeleteINISec "$0" "InternetShortcut"
436 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
437 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
438 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
439 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
440 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
442 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
445 !macro GetExecutableName OutVar
446 ${StdUtils
.GetParameter
} ${OutVar} "Update" ""
447 ${StdUtils
.TrimStr
} ${OutVar}
448 ${If} "${OutVar}" ==
""
449 ${OrIfNot} ${ValidFileName} "${OutVar}"
450 StrCpy ${OutVar} "x264_launcher.exe"
454 !macro DisableNextButton TmpVar
455 GetDlgItem
${TmpVar} $HWNDPARENT 1
456 EnableWindow
${TmpVar} 0
459 !macro CleanUpFiles options
460 Delete ${options} `$INSTDIR\*.exe`
461 Delete ${options} `$INSTDIR\*.dll`
462 Delete ${options} `$INSTDIR\*.txt`
463 Delete ${options} `$INSTDIR\*.html`
465 RMDir /r
${options} `$INSTDIR\toolset`
466 RMDir /r
${options} `$INSTDIR\imageformats`
467 RMDir /r
${options} `$INSTDIR\sources`
471 ;--------------------------------
473 ;--------------------------------
476 SetShellVarContext all
477 SetOutPath "$INSTDIR"
480 Section "-Clean Up Old Cruft"
481 !insertmacro PrintProgress
"$(X264_LANG_STATUS_CLEANUP)"
482 !insertmacro CleanUpFiles
""
485 Section "!Install Files"
486 !insertmacro PrintProgress
"$(X264_LANG_STATUS_INSTFILES)"
489 !insertmacro GetExecutableName
$R0
491 Delete "$INSTDIR\$R0"
494 MessageBox MB_TOPMOST|
MB_ICONSTOP|
MB_RETRYCANCEL 'Could not delete old "$R0" file. Is program still running?' IDRETRY DeleteOldBinary
495 Abort "Could not delete old binary!"
498 SetOutPath "$INSTDIR"
499 File /a
`/oname=$R0` `${X264_SOURCE_PATH}\x264_launcher.exe`
501 SetOutPath "$INSTDIR"
502 File /a
`${X264_SOURCE_PATH}\*.dll`
503 File /a
`${X264_SOURCE_PATH}\*.txt`
504 File /a
`${X264_SOURCE_PATH}\*.html`
506 SetOutPath "$INSTDIR\imageformats"
507 File /a
/r
`${X264_SOURCE_PATH}\imageformats\*.*`
509 SetOutPath "$INSTDIR\toolset"
510 File /a
/r
`${X264_SOURCE_PATH}\toolset\*.*`
512 SetOutPath "$INSTDIR\sources"
513 File /a
/r
`${X264_SOURCE_PATH}\sources\*.*`
516 Section "-Write Uinstaller"
517 !insertmacro PrintProgress
"$(X264_LANG_STATUS_MAKEUNINST)"
518 WriteUninstaller "$INSTDIR\Uninstall.exe"
521 Section "-Create Shortcuts"
522 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
523 !insertmacro PrintProgress
"$(X264_LANG_STATUS_SHORTCUTS)"
524 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
526 SetShellVarContext current
528 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
529 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
530 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
532 SetShellVarContext all
534 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
535 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
536 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
538 !insertmacro GetExecutableName
$R0
540 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
541 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_LICENSE).lnk" "$INSTDIR\LICENSE.html"
542 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_MANUAL).lnk" "$INSTDIR\README.html"
543 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\HISTORY.txt"
544 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
546 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\MuldeR's Homepage.url" "${MyWebSite}"
547 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
548 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\x264.com.url" "http://x264.com/"
549 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\x265.com.url" "http://x265.org/"
550 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Avisynth Wiki.url" "http://avisynth.nl/"
551 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\VapourSynth.com.url" "http://www.vapoursynth.com/"
553 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
554 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils
.Const
.ISV_PinToTaskbar
}
555 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
557 !insertmacro MUI_STARTMENU_WRITE_END
560 Section "-Update Registry"
561 !insertmacro PrintProgress
"$(X264_LANG_STATUS_REGISTRY)"
563 !insertmacro GetExecutableName
$R0
564 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
565 WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
566 WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
567 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
568 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "Simple x264 Launcher v2"
569 WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
570 WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "Build #${X264_BUILD} (${X264_DATE})"
571 WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
572 WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
574 WriteRegStr HKLM "${AppPaths}\x264_launcher.exe" "" "$INSTDIR\$R0"
575 WriteRegStr HKLM "${AppPaths}\x264_launcher.exe" "Path" "$INSTDIR"
579 !insertmacro PrintProgress
"$(MUI_TEXT_FINISH_TITLE)."
583 ;--------------------------------
585 ;--------------------------------
589 !insertmacro PrintProgress
"$(X264_LANG_STATUS_UNINSTALL)"
595 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
596 ${IfNot} "$StartMenuFolder" ==
""
597 SetShellVarContext current
598 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
599 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
600 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
602 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
603 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
604 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
605 RMDir "$SMPROGRAMS\$StartMenuFolder"
608 SetShellVarContext all
609 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
610 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils
.Const
.ISV_UnpinFromTaskbar
}
611 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
613 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
614 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
615 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
616 RMDir "$SMPROGRAMS\$StartMenuFolder"
624 ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
625 ${IfThen} "$R0" ==
"" ${|
} StrCpy $R0 "x264_launcher.exe" ${|
}
627 Delete /REBOOTOK
"$INSTDIR\$R0"
628 !insertmacro CleanUpFiles
/REBOOTOK
635 DeleteRegKey HKLM "${MyRegPath}"
636 DeleteRegKey HKCU "${MyRegPath}"
638 DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
639 DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
641 DeleteRegKey HKLM "${AppPaths}\x264_launcher.exe"
642 DeleteRegKey HKCU "${AppPaths}\x264_launcherexe"
644 MessageBox MB_YESNO|
MB_TOPMOST "$(X264_LANG_UNINST_PERSONAL)" IDNO +3
645 Delete "$LOCALAPPDATA\LoRd_MuldeR\Simple x264 Launcher\*.ini"
646 RMDir "$LOCALAPPDATA\LoRd_MuldeR\Simple x264 Launcher"
648 !insertmacro PrintProgress
"$(MUI_UNTEXT_FINISH_TITLE)."
652 ;--------------------------------
653 ;Check For Update Mode
654 ;--------------------------------
656 Function SkipIfUnattended
657 ${IfThen} ${UnattendedMode} ${|
} Abort ${|
}
660 Function CheckForUpdate
661 ${If} "$INSTDIR" ==
""
662 ${OrIf} "$INSTDIR" ==
"$EXEDIR"
663 ${OrIfNot} ${FileExists} "$INSTDIR\x264_launcher.exe"
667 FindWindow $R0 "#32770" "" $HWNDPARENT
668 GetDlgItem
$R1 $R0 1019
671 FindWindow $R0 "#32770" "" $HWNDPARENT
672 GetDlgItem
$R1 $R0 1001
676 Function un
.CheckForcedUninstall
677 ${IfThen} ${ForcedMode} ${|
} Abort ${|
}
681 ;--------------------------------
683 ;--------------------------------
685 !macro _LockedListShow uinst
686 !insertmacro MUI_HEADER_TEXT
"$(X264_LANG_LOCKEDLIST_HEADER)" "$(X264_LANG_LOCKEDLIST_TEXT)"
687 ${If} ${UnattendedMode}
688 !insertmacro DisableBackButton
$R0
692 File /oname=
$PLUGINSDIR\LockedList64
.dll
`${NSISDIR}\Plugins\LockedList64.dll`
694 !insertmacro GetExecutableName
$R0
695 LockedList::AddModule
"\$R0"
696 ${If} "$R0" !=
"x264_launcher.exe"
697 LockedList::AddModule
"\x264_launcher.exe"
699 LockedList::AddModule
"\Uninstall.exe"
701 LockedList::AddModule
"\Au_.exe"
703 LockedList::AddFolder
"$INSTDIR"
704 LockedList::Dialog
/autonext
/heading
"$(X264_LANG_LOCKEDLIST_HEADING)" /noprograms
"$(X264_LANG_LOCKEDLIST_NOPROG)" /searching
"$(X264_LANG_LOCKEDLIST_SEARCH)" /colheadings
"$(X264_LANG_LOCKEDLIST_COLHDR1)" "$(X264_LANG_LOCKEDLIST_COLHDR2)"
708 Function LockedListShow
709 !insertmacro _LockedListShow
0
712 Function un
.LockedListShow
713 !insertmacro _LockedListShow
1
717 ;--------------------------------
719 ;--------------------------------
721 Function RunAppFunction
722 !insertmacro DisableNextButton
$R0
723 !insertmacro GetExecutableName
$R0
724 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR" "explore" ""
725 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"
728 Function ShowReadmeFunction
729 !insertmacro DisableNextButton
$R0
730 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\README.html" "open" ""