1 ; ///////////////////////////////////////////////////////////////////////////////
2 ; // Simple x264 Launcher
3 ; // Copyright (C) 2004-2023 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 !!!"
45 !define MyRegPath
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{986E454F-DACA-4326-A9C7-3E46C0BFFDCE}"
48 !define MyWebSite
"http://muldersoft.com/"
51 !define AppPaths
"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
54 ;--------------------------------
56 ;--------------------------------
59 !packhdr "${PACKHDRTEMP}" '"..\..\..\Prerequisites\MSVC\redist\bin\mt.exe" -manifest "setup.manifest" -outputresource:"${PACKHDRTEMP};1" && "..\..\..\Prerequisites\UPX\upx.exe" --brute "${PACKHDRTEMP}"'
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
94 ;--------------------------------
96 ;--------------------------------
98 ReserveFile
"${NSISDIR}\Plugins\Aero.dll"
99 ReserveFile
"${NSISDIR}\Plugins\LangDLL.dll"
100 ReserveFile
"${NSISDIR}\Plugins\LockedList.dll"
101 ReserveFile
"${NSISDIR}\Plugins\LockedList64.dll"
102 ReserveFile
"${NSISDIR}\Plugins\nsDialogs.dll"
103 ReserveFile
"${NSISDIR}\Plugins\nsExec.dll"
104 ReserveFile
"${NSISDIR}\Plugins\StartMenu.dll"
105 ReserveFile
"${NSISDIR}\Plugins\StdUtils.dll"
106 ReserveFile
"${NSISDIR}\Plugins\System.dll"
107 ReserveFile
"${NSISDIR}\Plugins\UserInfo.dll"
110 ;--------------------------------
112 ;--------------------------------
115 Var UpdateNotificationShown
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-2023 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_WELCOMEPAGE_TITLE_3LINES
178 !define MUI_FINISHPAGE_TITLE_3LINES
179 !insertmacro MUI_PAGE_WELCOME
182 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
183 !insertmacro MUI_PAGE_LICENSE
"license.rtf"
186 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
187 !define MUI_PAGE_CUSTOMFUNCTION_SHOW CheckForUpdate
188 !insertmacro MUI_PAGE_DIRECTORY
191 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
192 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
195 Page Custom LockedListShow
198 !insertmacro MUI_PAGE_INSTFILES
201 !define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfUnattended
202 !insertmacro MUI_PAGE_FINISH
205 ;--------------------------------
206 ;MUI2 Pages (Uninstaller)
207 ;--------------------------------
210 !define MUI_WELCOMEPAGE_TITLE_3LINES
211 !define MUI_FINISHPAGE_TITLE_3LINES
212 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
213 !insertmacro MUI_UNPAGE_WELCOME
216 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
217 !insertmacro MUI_UNPAGE_CONFIRM
220 UninstPage Custom un
.LockedListShow
223 !insertmacro MUI_UNPAGE_INSTFILES
226 !define MUI_PAGE_CUSTOMFUNCTION_PRE un
.CheckForcedUninstall
227 !insertmacro MUI_UNPAGE_FINISH
230 ;--------------------------------
232 ;--------------------------------
234 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
236 ; !insertmacro MUI_LANGUAGE "German"
237 ; !insertmacro MUI_LANGUAGE "Spanish"
238 ; !insertmacro MUI_LANGUAGE "Russian"
239 ; !insertmacro MUI_LANGUAGE "Ukrainian"
240 ; !insertmacro MUI_LANGUAGE "Polish"
242 ; !insertmacro MUI_LANGUAGE "French"
243 ; !insertmacro MUI_LANGUAGE "SpanishInternational"
244 ; !insertmacro MUI_LANGUAGE "SimpChinese"
245 ; !insertmacro MUI_LANGUAGE "TradChinese"
246 ; !insertmacro MUI_LANGUAGE "Japanese"
247 ; !insertmacro MUI_LANGUAGE "Italian"
248 ; !insertmacro MUI_LANGUAGE "Dutch"
249 ; !insertmacro MUI_LANGUAGE "Greek"
250 ; !insertmacro MUI_LANGUAGE "Hungarian"
251 ; !insertmacro MUI_LANGUAGE "Romanian"
252 ; !insertmacro MUI_LANGUAGE "Serbian"
253 ; !insertmacro MUI_LANGUAGE "SerbianLatin"
254 ; !insertmacro MUI_LANGUAGE "Arabic"
255 ; !insertmacro MUI_LANGUAGE "Portuguese"
256 ; !insertmacro MUI_LANGUAGE "Afrikaans"
257 ; !insertmacro MUI_LANGUAGE "Malay"
258 ; !insertmacro MUI_LANGUAGE "Indonesian"
261 ;--------------------------------
263 ;--------------------------------
266 !include "language\en.nsh"
269 ;--------------------------------
271 ;--------------------------------
273 !macro _UnattendedMode _a _b _t _f
274 !insertmacro _LOGICLIB_TEMP
275 ${StdUtils
.TestParameter
} $_LOGICLIB_TEMP "Update"
276 StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
278 !define UnattendedMode
`"" UnattendedMode ""`
280 !macro _ForcedMode _a _b _t _f
281 !insertmacro _LOGICLIB_TEMP
282 ${StdUtils
.TestParameter
} $_LOGICLIB_TEMP "Force"
283 StrCmp "$_LOGICLIB_TEMP" "true" `${_t}` `${_f}`
285 !define ForcedMode
`"" ForcedMode ""`
287 !macro _ValidFileName _a _b _t _f
288 !insertmacro _LOGICLIB_TEMP
289 ${StdUtils
.ValidFileName
} $_LOGICLIB_TEMP `${_b}`
290 StrCmp "$_LOGICLIB_TEMP" "ok" `${_t}` `${_f}`
292 !define ValidFileName
`"" ValidFileName`
295 ;--------------------------------
296 ;Installer initialization
297 ;--------------------------------
304 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
307 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the installer is already running!"
313 # Running on Windows NT family?
315 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, this application does *not* support Windows 9x or Windows ME!"
316 ExecShell "open" "http://windows.microsoft.com/"
320 # Running on Windows Vista or later?
322 MessageBox MB_TOPMOST|
MB_ICONSTOP "Sorry, but your operating system is *not* supported anymore.$\nInstallation will be aborted!$\n$\nThe minimum supported platform is Windows Vista (Service Pack 2)."
323 ExecShell "open" "http://windows.microsoft.com/"
327 # If on Windows Vista, is the required Service Pack installed?
329 ${AndIf} ${AtMostServicePack} 1
330 MessageBox MB_TOPMOST|
MB_ICONEXCLAMATION "This application requires Windows Vista with Service Pack 2 installed."
331 ${If} ${Cmd} `MessageBox MB_TOPMOST|MB_ICONQUESTION|MB_YESNO "Do you want to download Service Pack 2 for Windows Vista now?" IDYES`
332 ExecShell "open" "https://www.microsoft.com/en-us/download/details.aspx?id=16468"
339 ${IfNot} ${UnattendedMode}
340 !insertmacro MUI_LANGDLL_DISPLAY
345 UserInfo::GetAccountType
348 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
349 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
355 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "{2B3D1EBF-B3B6-4E93-92B9-6853029A7162}") i .r1 ?e'
358 MessageBox MB_ICONSTOP|
MB_TOPMOST "Sorry, the un-installer is already running!"
362 ${IfNot} ${ForcedMode}
363 !insertmacro MUI_LANGDLL_DISPLAY
368 UserInfo::GetAccountType
371 MessageBox MB_ICONSTOP|
MB_TOPMOST "Your system requires administrative permissions in order to install this software."
372 SetErrorLevel
740 ;ERROR_ELEVATION_REQUIRED
378 ;--------------------------------
380 ;--------------------------------
383 StrCpy $0 $HWNDPARENT
384 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
388 Function un
.MyGuiInit
389 StrCpy $0 $HWNDPARENT
390 System::Call "user32::SetWindowPos(i r0, i -1, i 0, i 0, i 0, i 0, i 3)"
395 ;--------------------------------
396 ;Macros & Auxiliary Functions
397 ;--------------------------------
399 !macro PrintProgress Text
400 SetDetailsPrint textonly
401 DetailPrint '${Text}'
402 SetDetailsPrint listonly
406 !macro CreateWebLink ShortcutFile TargetURL
409 StrCpy $0 "${ShortcutFile}"
410 StrCpy $1 "${TargetURL}"
416 Function _CreateWebLink
418 SetFileAttributes "$0" FILE_ATTRIBUTE_NORMAL
419 DeleteINISec "$0" "DEFAULT"
420 DeleteINISec "$0" "InternetShortcut"
421 WriteINIStr "$0" "DEFAULT" "BASEURL" "$1"
422 WriteINIStr "$0" "InternetShortcut" "ORIGURL" "$1"
423 WriteINIStr "$0" "InternetShortcut" "URL" "$1"
424 WriteINIStr "$0" "InternetShortcut" "IconFile" "$SYSDIR\SHELL32.dll"
425 WriteINIStr "$0" "InternetShortcut" "IconIndex" "150"
427 SetFileAttributes "$0" FILE_ATTRIBUTE_READONLY
430 !macro GetExecutableName OutVar
431 ${StdUtils
.GetParameter
} ${OutVar} "Update" ""
432 ${StdUtils
.TrimStr
} ${OutVar}
433 ${If} "${OutVar}" ==
""
434 ${OrIfNot} ${ValidFileName} "${OutVar}"
435 StrCpy ${OutVar} "x264_launcher.exe"
439 !macro DisableNextButton TmpVar
440 GetDlgItem
${TmpVar} $HWNDPARENT 1
441 EnableWindow
${TmpVar} 0
444 !macro DisableBackButton TmpVar
445 GetDlgItem
${TmpVar} $HWNDPARENT 3
446 EnableWindow
${TmpVar} 0
449 !macro CleanUpFiles options
450 Delete ${options} `$INSTDIR\*.exe`
451 Delete ${options} `$INSTDIR\*.dll`
452 Delete ${options} `$INSTDIR\*.txt`
453 Delete ${options} `$INSTDIR\*.htm`
454 Delete ${options} `$INSTDIR\*.html`
456 RMDir /r
${options} `$INSTDIR\toolset`
457 RMDir /r
${options} `$INSTDIR\imageformats`
458 RMDir /r
${options} `$INSTDIR\sources`
461 !macro SetControlEnabled item_id enable
462 FindWindow $R0 "#32770" "" $HWNDPARENT
464 GetDlgItem
$R1 $R0 ${item_id}
465 EnableWindow
$R1 ${enable}
469 !macro SkipToNextPage
470 GetDlgItem
$R0 $HWNDPARENT 1
471 System::Call "User32::PostMessage(i $HWNDPARENT, i ${WM_COMMAND}, i 1, i $R0)"
475 ;--------------------------------
477 ;--------------------------------
480 SetShellVarContext all
481 SetOutPath "$INSTDIR"
484 Section "-Clean Up Old Cruft"
485 !insertmacro PrintProgress
"$(X264_LANG_STATUS_CLEANUP)"
486 !insertmacro CleanUpFiles
""
489 Section "!Install Files"
490 !insertmacro PrintProgress
"$(X264_LANG_STATUS_INSTFILES)"
493 !insertmacro GetExecutableName
$R0
495 Delete "$INSTDIR\$R0"
498 MessageBox MB_TOPMOST|
MB_ICONSTOP|
MB_RETRYCANCEL 'Could not delete old "$R0" file. Is program still running?' IDRETRY DeleteOldBinary
499 Abort "Could not delete old binary!"
502 File /a
`/oname=$R0` `${X264_SOURCE_PATH}\x264_launcher.exe`
504 File /a
`${X264_SOURCE_PATH}\*.dll`
505 File /a
`${X264_SOURCE_PATH}\*.txt`
506 File /a
`${X264_SOURCE_PATH}\*.html`
508 SetOutPath "$INSTDIR\imageformats"
509 File /a
/r
`${X264_SOURCE_PATH}\imageformats\*.*`
511 SetOutPath "$INSTDIR\toolset"
512 File /a
/r
`${X264_SOURCE_PATH}\toolset\*.*`
514 SetOutPath "$INSTDIR\sources"
515 File /a
/r
`${X264_SOURCE_PATH}\sources\*.*`
518 Section "-Write Uinstaller"
519 !insertmacro PrintProgress
"$(X264_LANG_STATUS_MAKEUNINST)"
520 WriteUninstaller "$INSTDIR\Uninstall.exe"
523 Section "-Create Shortcuts"
524 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
525 !insertmacro PrintProgress
"$(X264_LANG_STATUS_SHORTCUTS)"
526 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
528 SetShellVarContext current
530 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
531 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
532 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
534 SetShellVarContext all
536 Delete "$SMPROGRAMS\$StartMenuFolder\*.lnk"
537 Delete "$SMPROGRAMS\$StartMenuFolder\*.pif"
538 Delete "$SMPROGRAMS\$StartMenuFolder\*.url"
540 !insertmacro GetExecutableName
$R0
542 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" "$INSTDIR\$R0" "" "$INSTDIR\$R0" 0
543 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_LICENSE).lnk" "$INSTDIR\LICENSE.html"
544 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_MANUAL).lnk" "$INSTDIR\README.html"
545 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_CHANGELOG).lnk" "$INSTDIR\HISTORY.txt"
546 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\$(X264_LANG_LINK_UNINSTALL).lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
548 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\MuldeR's Homepage.url" "${MyWebSite}"
549 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Doom9's Forum.url" "http://forum.doom9.org/"
550 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\x264.com.url" "http://x264.com/"
551 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\x265.com.url" "http://x265.org/"
552 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\Avisynth Wiki.url" "http://avisynth.nl/"
553 !insertmacro CreateWebLink
"$SMPROGRAMS\$StartMenuFolder\VapourSynth.com.url" "http://www.vapoursynth.com/"
555 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
556 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils
.Const
.ShellVerb
.PinToTaskbar
}
557 DetailPrint 'Pin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
559 !insertmacro MUI_STARTMENU_WRITE_END
562 Section "-Update Registry"
563 !insertmacro PrintProgress
"$(X264_LANG_STATUS_REGISTRY)"
565 !insertmacro GetExecutableName
$R0
566 WriteRegStr HKLM "${MyRegPath}" "InstallLocation" "$INSTDIR"
567 WriteRegStr HKLM "${MyRegPath}" "ExecutableName" "$R0"
568 WriteRegStr HKLM "${MyRegPath}" "DisplayIcon" "$INSTDIR\$R0,0"
569 WriteRegStr HKLM "${MyRegPath}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
570 WriteRegStr HKLM "${MyRegPath}" "DisplayName" "Simple x264 Launcher v2"
571 WriteRegStr HKLM "${MyRegPath}" "Publisher" "LoRd_MuldeR <mulder2@gmx.de>"
572 WriteRegStr HKLM "${MyRegPath}" "DisplayVersion" "Build #${X264_BUILD} (${X264_DATE})"
573 WriteRegStr HKLM "${MyRegPath}" "URLInfoAbout" "${MyWebSite}"
574 WriteRegStr HKLM "${MyRegPath}" "URLUpdateInfo" "${MyWebSite}"
576 DeleteRegKey HKCU "${AppPaths}\x264_launcher.exe"
577 WriteRegStr HKLM "${AppPaths}\x264_launcher.exe" "" "$INSTDIR\$R0"
578 WriteRegStr HKLM "${AppPaths}\x264_launcher.exe" "Path" "$INSTDIR"
582 !insertmacro PrintProgress
"$(MUI_TEXT_FINISH_TITLE)."
583 ${IfThen} ${UnattendedMode} ${|
} SetAutoClose true
${|
}
587 ;--------------------------------
589 ;--------------------------------
593 !insertmacro PrintProgress
"$(X264_LANG_STATUS_UNINSTALL)"
599 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
600 ${IfNot} "$StartMenuFolder" ==
""
601 SetShellVarContext current
602 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
603 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils
.Const
.ShellVerb
.UnpinFromTaskbar
}
604 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
606 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
607 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
608 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
609 RMDir "$SMPROGRAMS\$StartMenuFolder"
612 SetShellVarContext all
613 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk"
614 ${StdUtils
.InvokeShellVerb
} $R1 "$SMPROGRAMS\$StartMenuFolder" "Simple x264 Launcher.lnk" ${StdUtils
.Const
.ShellVerb
.UnpinFromTaskbar
}
615 DetailPrint 'Unpin: "$SMPROGRAMS\$StartMenuFolder\Simple x264 Launcher.lnk" -> $R1'
617 ${If} ${FileExists} "$SMPROGRAMS\$StartMenuFolder\*.*"
618 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.lnk"
619 Delete /REBOOTOK
"$SMPROGRAMS\$StartMenuFolder\*.url"
620 RMDir "$SMPROGRAMS\$StartMenuFolder"
628 ReadRegStr $R0 HKLM "${MyRegPath}" "ExecutableName"
629 ${IfThen} "$R0" ==
"" ${|
} StrCpy $R0 "x264_launcher.exe" ${|
}
631 Delete /REBOOTOK
"$INSTDIR\$R0"
632 !insertmacro CleanUpFiles
/REBOOTOK
639 DeleteRegKey HKLM "${MyRegPath}"
640 DeleteRegKey HKCU "${MyRegPath}"
642 DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
643 DeleteRegKey HKCU "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{54dcbccb-c905-46dc-b6e6-48563d0e9e55}"
645 DeleteRegKey HKLM "${AppPaths}\x264_launcher.exe"
646 DeleteRegKey HKCU "${AppPaths}\x264_launcher.exe"
648 MessageBox MB_YESNO|
MB_TOPMOST "$(X264_LANG_UNINST_PERSONAL)" IDNO +3
649 Delete "$LOCALAPPDATA\LoRd_MuldeR\Simple x264 Launcher\*.ini"
650 RMDir "$LOCALAPPDATA\LoRd_MuldeR\Simple x264 Launcher"
652 !insertmacro PrintProgress
"$(MUI_UNTEXT_FINISH_TITLE)."
656 ;--------------------------------
657 ;Check For Update Mode
658 ;--------------------------------
660 Function SkipIfUnattended
661 ${IfThen} ${UnattendedMode} ${|
} Abort ${|
}
664 Function CheckForUpdate
665 ${If} "$INSTDIR" ==
""
666 ${OrIf} "$INSTDIR" ==
"$EXEDIR"
667 ${OrIfNot} ${FileExists} "$INSTDIR\x264_launcher.exe"
668 StrCpy $UpdateNotificationShown FALSE
669 !insertmacro SetControlEnabled
1019 1
670 !insertmacro SetControlEnabled
1001 1
673 !insertmacro SetControlEnabled
1019 0
674 !insertmacro SetControlEnabled
1001 0
675 ${If} "$UpdateNotificationShown" != TRUE
676 StrCpy $UpdateNotificationShown TRUE
677 MessageBox MB_ICONINFORMATION|
MB_TOPMOST "$(X264_LANG_UNINST_UPDATE_MODE)"
678 !insertmacro SkipToNextPage
683 Function un
.CheckForcedUninstall
684 ${IfThen} ${ForcedMode} ${|
} Abort ${|
}
688 ;--------------------------------
690 ;--------------------------------
692 !macro _LockedListShow uinst
693 !insertmacro MUI_HEADER_TEXT
"$(X264_LANG_LOCKEDLIST_HEADER)" "$(X264_LANG_LOCKEDLIST_TEXT)"
694 ${If} ${UnattendedMode}
695 !insertmacro DisableBackButton
$R0
699 File /oname=
$PLUGINSDIR\LockedList64
.dll
`${NSISDIR}\Plugins\LockedList64.dll`
701 !insertmacro GetExecutableName
$R0
702 LockedList::AddModule
"\$R0"
703 ${If} "$R0" !=
"x264_launcher.exe"
704 LockedList::AddModule
"\x264_launcher.exe"
706 LockedList::AddModule
"\Uninstall.exe"
708 LockedList::AddModule
"\Au_.exe"
710 #LockedList::AddFolder "$INSTDIR"
711 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)"
715 Function LockedListShow
716 !insertmacro _LockedListShow
0
719 Function un
.LockedListShow
720 !insertmacro _LockedListShow
1
724 ;--------------------------------
726 ;--------------------------------
728 Function RunAppFunction
729 !insertmacro DisableNextButton
$R0
730 !insertmacro GetExecutableName
$R0
731 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR" "explore" ""
732 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"
735 Function ShowReadmeFunction
736 !insertmacro DisableNextButton
$R0
737 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\README.html" "open" ""
740 Function .onInstSuccess
741 ${If} ${UnattendedMode}
742 !insertmacro GetExecutableName
$R0
743 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR" "explore" ""
744 ${StdUtils
.ExecShellAsUser
} $R1 "$INSTDIR\$R0" "open" "--first-run"