1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // Simple x264 Launcher
3 ; // Copyright (C) 2004-2013 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 ;--------------------------------
61 !include `StdUtils.nsh`
64 ;--------------------------------
66 ;--------------------------------
68 RequestExecutionLevel admin
70 ShowUninstDetails show
71 Name "Simple x264 Launcher [Build #${X264_BUILD}]"
72 OutFile "${X264_OUTPUT_FILE}"
73 BrandingText "Date created: ${X264_DATE} [Build #${X264_BUILD}]"
74 InstallDir "$PROGRAMFILES\MuldeR\Simple x264 Launcher v2"
75 InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation"
78 ;--------------------------------
80 ;--------------------------------
82 SetCompressor /SOLID LZMA
83 SetCompressorDictSize 64
85 !packhdr "$%TEMP%\exehead.tmp" '"${X264_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"'
88 ;--------------------------------
90 ;--------------------------------
92 ReserveFile "${NSISDIR}\Plugins\Aero.dll"
93 ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
94 ReserveFile "${NSISDIR}\Plugins\LockedList.dll"
95 ReserveFile "${NSISDIR}\Plugins\nsDialogs.dll"
96 ReserveFile "${NSISDIR}\Plugins\nsExec.dll"
97 ReserveFile "${NSISDIR}\Plugins\StartMenu.dll"
98 ReserveFile "${NSISDIR}\Plugins\StdUtils.dll"
99 ReserveFile "${NSISDIR}\Plugins\System.dll"
100 ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
101 ReserveFile "checkproc.exe"
104 ;--------------------------------
106 ;--------------------------------
111 ;--------------------------------
113 ;--------------------------------
115 !searchreplace PRODUCT_VERSION_DATE "${X264_DATE}" "-" "."
116 VIProductVersion "${PRODUCT_VERSION_DATE}.${X264_BUILD}"
118 VIAddVersionKey "Author" "LoRd_MuldeR <mulder2@gmx.de>"
119 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."
120 VIAddVersionKey "CompanyName" "Free Software Foundation"
121 VIAddVersionKey "FileDescription" "Simple x264 Launcher [Build #${X264_BUILD}]"
122 VIAddVersionKey "FileVersion" "${PRODUCT_VERSION_DATE}.${X264_BUILD}"
123 VIAddVersionKey "LegalCopyright" "Copyright 2004-2013 LoRd_MuldeR"
124 VIAddVersionKey "LegalTrademarks" "GNU"
125 VIAddVersionKey "OriginalFilename" "x264_x64.${X264_DATE}.exe"
126 VIAddVersionKey "ProductName" "Simple x264 Launcher"
127 VIAddVersionKey "ProductVersion" "Build #${X264_BUILD} (${X264_DATE})"
128 VIAddVersionKey "Website" "${MyWebSite}"
131 ;--------------------------------
132 ;MUI2 Interface Settings
133 ;--------------------------------
135 !define MUI_INSTFILESPAGE_COLORS "C5DEFB 000000"
136 !define MUI_ABORTWARNING
137 !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
138 !define MUI_STARTMENUPAGE_REGISTRY_KEY "${MyRegPath}"
139 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "StartmenuFolder"
140 !define MUI_LANGDLL_REGISTRY_ROOT HKLM
141 !define MUI_LANGDLL_REGISTRY_KEY "${MyRegPath}"
142 !define MUI_LANGDLL_REGISTRY_VALUENAME "SetupLanguage"
143 !define MUI_STARTMENUPAGE_DEFAULTFOLDER "Simple x264 Launcher v2"
144 !define MUI_FINISHPAGE_NOAUTOCLOSE
145 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
146 !define MUI_FINISHPAGE_RUN
147 !define MUI_FINISHPAGE_RUN_FUNCTION RunAppFunction
148 !define MUI_FINISHPAGE_SHOWREADME
149 !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReadmeFunction
150 !define MUI_FINISHPAGE_LINK ${MyWebSite}
151 !define MUI_FINISHPAGE_LINK_LOCATION ${MyWebSite}
152 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
153 !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
154 !define MUI_WELCOMEFINISHPAGE_BITMAP "wizard.bmp"
155 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "wizard-un.bmp"
156 !define MUI_HEADERIMAGE
157 !define MUI_HEADERIMAGE_BITMAP "header.bmp"
158 !define MUI_HEADERIMAGE_UNBITMAP "header-un.bmp"
159 !define MUI_LANGDLL_ALLLANGUAGES
160 !define MUI_CUSTOMFUNCTION_GUIINIT MyGuiInit
161 !define MUI_CUSTOMFUNCTION_UNGUIINIT un.MyGuiInit
162 !define MUI_LANGDLL_ALWAYSSHOW
164 ;--------------------------------
166 ;--------------------------------
169 !define MUI_WELCOMEPAGE_TITLE_3LINES
170 !define MUI_FINISHPAGE_TITLE_3LINES
171 !insertmacro MUI_PAGE_WELCOME
172 !insertmacro MUI_PAGE_LICENSE "license.rtf"
173 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
174 !insertmacro MUI_PAGE_DIRECTORY
175 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
176 Page Custom LockedListShow
177 !insertmacro MUI_PAGE_INSTFILES
178 !insertmacro MUI_PAGE_FINISH
181 !define MUI_WELCOMEPAGE_TITLE_3LINES
182 !define MUI_FINISHPAGE_TITLE_3LINES
183 !define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
184 !insertmacro MUI_UNPAGE_WELCOME
185 !define MUI_PAGE_CUSTOMFUNCTION_PRE un.CheckForcedUninstall
186 !insertmacro MUI_UNPAGE_CONFIRM
187 UninstPage Custom un.LockedListShow
188 !insertmacro MUI_UNPAGE_INSTFILES
189 !insertmacro MUI_UNPAGE_FINISH
192 ;--------------------------------
194 ;--------------------------------
196 !insertmacro MUI_LANGUAGE "English" ;first language is the default language
197 !insertmacro MUI_LANGUAGE "German"
198 !insertmacro MUI_LANGUAGE "Spanish"
199 !insertmacro MUI_LANGUAGE "Russian"
200 !insertmacro MUI_LANGUAGE "Ukrainian"
201 !insertmacro MUI_LANGUAGE "Polish"
203 ; !insertmacro MUI_LANGUAGE "French"
204 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
205 ; !insertmacro MUI_LANGUAGE "SimpChinese"
206 ; !insertmacro MUI_LANGUAGE "TradChinese"
207 ; !insertmacro MUI_LANGUAGE "Japanese"
208 ; !insertmacro MUI_LANGUAGE "Italian"
209 ; !insertmacro MUI_LANGUAGE "Dutch"
210 ; !insertmacro MUI_LANGUAGE "Greek"
211 ; !insertmacro MUI_LANGUAGE "Hungarian"
212 ; !insertmacro MUI_LANGUAGE "Romanian"
213 ; !insertmacro MUI_LANGUAGE "Serbian"
214 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
215 ; !insertmacro MUI_LANGUAGE "Arabic"
216 ; !insertmacro MUI_LANGUAGE "Portuguese"
217 ; !insertmacro MUI_LANGUAGE "Afrikaans"
218 ; !insertmacro MUI_LANGUAGE "Malay"
219 ; !insertmacro MUI_LANGUAGE "Indonesian"
222 ;--------------------------------
224 ;--------------------------------
227 !include "language\en.nsh"
230 ;--------------------------------
231 ;Installer initialization
232 ;--------------------------------
235 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
238 MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the installer is already running!"
244 # Running on Windows NT family?
246 MessageBox MB_TOPMOST|MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
247 ExecShell "open" "http://windows.microsoft.com/"
251 # Running on Windows XP or later?
252 ${If} ${AtMostWin2000}
253 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)."
254 ExecShell "open" "http://windows.microsoft.com/"
258 # If on Windows XP, is the required Service Pack installed?
260 ${IfNot} ${RunningX64} # Windows XP 32-Bit, requires Service Pack 3
261 ${AndIf} ${AtMostServicePack} 2
262 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!"
263 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 3 for Windows XP now?" IDYES`
264 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=24"
266 ExecShell "open" "http://windowsupdate.microsoft.com/"
270 ${If} ${RunningX64} # Windows XP 64-Bit, requires Service Pack 2
271 ${AndIf} ${AtMostServicePack} 1
272 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!"
273 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 2 for Windows XP x64 Edition now?" IDYES`
274 ExecShell "open" "http://www.microsoft.com/en-us/download/details.aspx?id=17791"
276 ExecShell "open" "http://windowsupdate.microsoft.com/"
284 ${StdUtils.GetParameter} $R0 "Update" "?"
286 !insertmacro MUI_LANGDLL_DISPLAY
291 UserInfo::GetAccountType
294 MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
295 SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
302 File "/oname=$PLUGINSDIR\checkproc.exe" "checkproc.exe"
303 nsExec::Exec /TIMEOUT=5000 '"$PLUGINSDIR\checkproc.exe" Softonic Brothersoft Afreecodec'
308 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
311 MessageBox MB_ICONSTOP|MB_TOPMOST "Sorry, the un-installer is already running!"
315 ${StdUtils.GetParameter} $R0 "Force" "?"
317 !insertmacro MUI_LANGDLL_DISPLAY
322 UserInfo::GetAccountType
325 MessageBox MB_ICONSTOP|MB_TOPMOST "Your system requires administrative permissions in order to install this software."
326 SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
332 ;--------------------------------
334 ;--------------------------------
337 StrCpy $0 $HWNDPARENT
338 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
342 Function un.MyGuiInit
343 StrCpy $0 $HWNDPARENT
344 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
349 ;--------------------------------
350 ;Macros & Auxiliary Functions
351 ;--------------------------------
353 !macro PrintProgress Text
354 SetDetailsPrint textonly
355 DetailPrint '${Text}'
356 SetDetailsPrint listonly
360 !macro CreateWebLink ShortcutFile TargetURL
363 StrCpy $0 "${ShortcutFile}"
364 StrCpy $1 "${TargetURL}"
370 Function _CreateWebLink
372 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
373 DeleteINISec "$0" "DEFAULT"
374 DeleteINISec "$0" "InternetShortcut"
375 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
376 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
377 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
378 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
379 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
381 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
384 !macro GetExecutableName OutVar
385 ${StdUtils.GetParameter} ${OutVar} "Update" ""
386 ${StdUtils.TrimStr} ${OutVar}
387 ${IfThen} "${OutVar}" == "" ${|} StrCpy ${OutVar} "x264_launcher.exe" ${|}
390 !macro DisableNextButton TmpVar
391 GetDlgItem ${TmpVar} $HWNDPARENT 1
392 EnableWindow ${TmpVar} 0
396 ;--------------------------------
398 ;--------------------------------
401 SetShellVarContext all
402 SetOutPath "$INSTDIR"
405 Section "!Install Files"
406 !insertmacro PrintProgress "$(X264_LANG_STATUS_INSTFILES)"
408 Delete `$INSTDIR\*.exe`
409 Delete `$INSTDIR\*.dll`
410 Delete `$INSTDIR\*.txt`
411 Delete `$INSTDIR\toolset\*.exe`
412 Delete `$INSTDIR\toolset\*.dll`
413 Delete `$INSTDIR\toolset\x86\*.exe`
414 Delete `$INSTDIR\toolset\x86\*.dll`
415 Delete `$INSTDIR\toolset\x64\*.exe`
416 Delete `$INSTDIR\toolset\x64\*.dll`
417 Delete `$INSTDIR\toolset\common\*.exe`
418 Delete `$INSTDIR\toolset\common\*.dll`
419 Delete `$INSTDIR\toolset\common\*.gpg`
420 Delete `$INSTDIR\imageformats\*.dll`
422 !insertmacro GetExecutableName $R0
426 Delete "$INSTDIR\$R0"
429 MessageBox MB_TOPMOST|MB_ICONSTOP|MB_RETRYCANCEL 'Could not delete old "$R0" file. Is program still running?' IDRETRY DeleteOldBinary
430 Abort "Could not delete old binary!"
433 SetOutPath "$INSTDIR"
434 File /a `/oname=$R0` `${X264_SOURCE_PATH}\x264_launcher.exe`
435 File /a `${X264_SOURCE_PATH}\*.dll`
436 File /a `${X264_SOURCE_PATH}\*.txt`
438 SetOutPath "$INSTDIR\toolset\x86"
439 File /a `${X264_SOURCE_PATH}\toolset\x86\*.exe`
440 File /a `${X264_SOURCE_PATH}\toolset\x86\*.dll`
442 SetOutPath "$INSTDIR\toolset\x64"
443 File /a `${X264_SOURCE_PATH}\toolset\x64\*.exe`
444 File /a `${X264_SOURCE_PATH}\toolset\x64\*.dll`
446 SetOutPath "$INSTDIR\toolset\common"
447 File /a `${X264_SOURCE_PATH}\toolset\common\*.exe`
448 File /a `${X264_SOURCE_PATH}\toolset\common\*.dll`
449 File /a `${X264_SOURCE_PATH}\toolset\common\*.gpg`
451 SetOutPath "$INSTDIR\imageformats"
452 File /a `${X264_SOURCE_PATH}\imageformats*.exe`
455 Section "-Write Uinstaller"
456 !insertmacro PrintProgress "$(X264_LANG_STATUS_MAKEUNINST)"
457 WriteUninstaller "$INSTDIR\Uninstall.exe"
460 Section "-Create Shortcuts"
461 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
462 !insertmacro PrintProgress "$(X264_LANG_STATUS_SHORTCUTS)"
463 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
465 SetShellVarContext current
467 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
468 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
469 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
471 SetShellVarContext all
473 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
474 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
475 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
477 !insertmacro GetExecutableName $R0
479 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
480 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_LICENSE).lnk" "$INSTDIR\License.txt"
481 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\History.txt"
482 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_MANUAL).lnk" "$INSTDIR\ReadMe.txt"
483 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
485 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\MuldeR's Homepage.url" "${MyWebSite}"
486 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
487 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\x264.com.url" "http://www.x264.com/"
488 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\Avisynth Wiki.url" "http://avisynth.nl/"
489 !insertmacro CreateWebLink "$SMPROGRAMS\$StartMenuFolder\VapourSynth.com.url" "http://www.vapoursynth.com/"
491 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
492 ${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils.Const.ISV_PinToTaskbar}
493 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
495 !insertmacro MUI_STARTMENU_WRITE_END
498 Section "-Update Registry"
499 !insertmacro PrintProgress "$(X264_LANG_STATUS_REGISTRY)"
501 !insertmacro GetExecutableName $R0
502 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
503 WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
504 WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
505 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
506 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "Simple x264 Launcher v2"
507 WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
508 WriteRegStr HKLM "${MyRegPath}" "Simple x264 Launcher [Build #${X264_BUILD}]"
509 WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
510 WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
514 !insertmacro PrintProgress "$(MUI_TEXT_FINISH_TITLE)."
518 ;--------------------------------
520 ;--------------------------------
523 SetOutPath "$INSTDIR"
524 !insertmacro PrintProgress "$(X264_LANG_STATUS_UNINSTALL)"
530 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
531 ${IfNot} "$StartMenuFolder" == ""
532 SetShellVarContext current
533 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
534 ${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils.Const.ISV_UnpinFromTaskbar}
535 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
537 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
538 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
539 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
540 RMDir "$SMPROGRAMS\$StartMenuFolder"
543 SetShellVarContext all
544 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
545 ${StdUtils.InvokeShellVerb} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils.Const.ISV_UnpinFromTaskbar}
546 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
548 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
549 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.lnk"
550 Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\*.url"
551 RMDir "$SMPROGRAMS\$StartMenuFolder"
559 ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
560 ${IfThen} "$R0" == "" ${|} StrCpy $R0 "x264_launcher.exe" ${|}
562 Delete /REBOOTOK `$INSTDIR\$R0`
564 Delete /REBOOTOK `$INSTDIR\*.exe`
565 Delete /REBOOTOK `$INSTDIR\*.dll`
566 Delete /REBOOTOK `$INSTDIR\*.txt`
567 Delete /REBOOTOK `$INSTDIR\toolset\*.exe`
568 Delete /REBOOTOK `$INSTDIR\toolset\*.dll`
569 Delete /REBOOTOK `$INSTDIR\toolset\x86\*.exe`
570 Delete /REBOOTOK `$INSTDIR\toolset\x86\*.dll`
571 Delete /REBOOTOK `$INSTDIR\toolset\x64\*.exe`
572 Delete /REBOOTOK `$INSTDIR\toolset\x64\*.dll`
573 Delete /REBOOTOK `$INSTDIR\toolset\common\*.exe`
574 Delete /REBOOTOK `$INSTDIR\toolset\common\*.dll`
575 Delete /REBOOTOK `$INSTDIR\toolset\common\*.gpg`
576 Delete /REBOOTOK `$INSTDIR\imageformats\*.dll`
578 RMDir /r /REBOOTOK "$INSTDIR"
584 DeleteRegKey HKLM "${MyRegPath}"
585 DeleteRegKey HKCU "${MyRegPath}"
587 DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
588 DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
590 MessageBox MB_YESNO|MB_TOPMOST "$(X264_LANG_UNINST_PERSONAL)" IDNO +3
591 Delete "$LOCALAPPDATA\LoRd_MuldeR\Simple x264 Launcher\*.ini"
592 RMDir "$LOCALAPPDATA\LoRd_MuldeR\Simple x264 Launcher"
594 !insertmacro PrintProgress "$(MUI_UNTEXT_FINISH_TITLE)."
598 ;--------------------------------
599 ;Check For Update Mode
600 ;--------------------------------
602 Function CheckForUpdate
603 ${StdUtils.GetParameter} $R0 "Update" "?"
604 ${IfNotThen} "$R0" == "?" ${|} Goto EnableUpdateMode ${|}
606 ${IfThen} "$INSTDIR" == "" ${|} Return ${|}
607 ${IfThen} "$INSTDIR" == "$EXEDIR" ${|} Return ${|}
608 ${IfNotThen} ${FileExists} "$INSTDIR\x264_launcher.exe" ${|} Return ${|}
612 FindWindow $R0 "#32770" "" $HWNDPARENT
613 GetDlgItem $R1 $R0 1019
616 FindWindow $R0 "#32770" "" $HWNDPARENT
617 GetDlgItem $R1 $R0 1001
621 Function un.CheckForcedUninstall
622 ${StdUtils.GetParameter} $R0 "Force" "?"
623 ${IfNotThen} "$R0" == "?" ${|} Abort ${|}
627 ;--------------------------------
629 ;--------------------------------
631 Function LockedListShow
632 !insertmacro MUI_HEADER_TEXT "$(X264_LANG_LOCKEDLIST_HEADER)" "$(X264_LANG_LOCKEDLIST_TEXT)"
633 !insertmacro GetExecutableName $R0
634 LockedList::AddModule "\$R0"
635 LockedList::AddModule "\Uninstall.exe"
636 LockedList::AddModule "\Au_.exe"
637 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)"
641 Function un.LockedListShow
642 !insertmacro MUI_HEADER_TEXT "$(X264_LANG_LOCKEDLIST_HEADER)" "$(X264_LANG_LOCKEDLIST_TEXT)"
643 LockedList::AddModule "\x264_launcher.exe"
644 LockedList::AddModule "\Uninstall.exe"
645 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)"
650 ;--------------------------------
652 ;--------------------------------
654 Function RunAppFunction
655 !insertmacro DisableNextButton $R0
656 !insertmacro GetExecutableName $R0
657 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR" "explore" ""
658 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\$R0" "open" "--first-run"
661 Function ShowReadmeFunction
662 !insertmacro DisableNextButton $R0
663 ${StdUtils.ExecShellAsUser} $R1 "$INSTDIR\FAQ.html" "open" ""