mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 14:53:01 +02:00
constantize the uninstaller name
This commit is contained in:
parent
24ef51c40b
commit
2619c351e8
1 changed files with 9 additions and 8 deletions
|
@ -6,6 +6,7 @@
|
||||||
!define VERSION "@CPACK_PACKAGE_VERSION@"
|
!define VERSION "@CPACK_PACKAGE_VERSION@"
|
||||||
!define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
|
!define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
|
||||||
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
|
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
|
||||||
|
!define UNINSTALLER_NAME "Uninstall.exe"
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Variables
|
;Variables
|
||||||
|
@ -67,7 +68,7 @@
|
||||||
; The Inner invocation has written an uninstaller binary for us.
|
; The Inner invocation has written an uninstaller binary for us.
|
||||||
; We need to sign it if it's a production or PR build.
|
; We need to sign it if it's a production or PR build.
|
||||||
!if @PRODUCTION_BUILD@ == 1
|
!if @PRODUCTION_BUILD@ == 1
|
||||||
!system '"@SIGNTOOL_EXECUTABLE@" sign /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://tsa.starfieldtech.com /td SHA256 $%TEMP%\Uninstall.exe' = 0
|
!system '"@SIGNTOOL_EXECUTABLE@" sign /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://tsa.starfieldtech.com /td SHA256 $%TEMP%\$UNINSTALLER_NAME' = 0
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
; Good. Now we can carry on writing the real installer.
|
; Good. Now we can carry on writing the real installer.
|
||||||
|
@ -689,7 +690,7 @@ Section "-Core installation"
|
||||||
;Package the signed uninstaller produced by the inner loop
|
;Package the signed uninstaller produced by the inner loop
|
||||||
!ifndef INNER
|
!ifndef INNER
|
||||||
; this packages the signed uninstaller
|
; this packages the signed uninstaller
|
||||||
File $%TEMP%\Uninstall.exe
|
File $%TEMP%\$UNINSTALLER_NAME
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
Push "DisplayName"
|
Push "DisplayName"
|
||||||
|
@ -702,7 +703,7 @@ Section "-Core installation"
|
||||||
Push "@CPACK_PACKAGE_VENDOR@"
|
Push "@CPACK_PACKAGE_VENDOR@"
|
||||||
Call ConditionalAddToRegisty
|
Call ConditionalAddToRegisty
|
||||||
Push "UninstallString"
|
Push "UninstallString"
|
||||||
Push "$INSTDIR\Uninstall.exe"
|
Push "$INSTDIR\$UNINSTALLER_NAME"
|
||||||
Call ConditionalAddToRegisty
|
Call ConditionalAddToRegisty
|
||||||
Push "NoRepair"
|
Push "NoRepair"
|
||||||
Push "1"
|
Push "1"
|
||||||
|
@ -761,7 +762,7 @@ Section "-Core installation"
|
||||||
"$INSTDIR\@CONSOLE_WIN_EXEC_NAME@"
|
"$INSTDIR\@CONSOLE_WIN_EXEC_NAME@"
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\$UNINSTALLER_NAME"
|
||||||
|
|
||||||
;Read a value from an InstallOptions INI file
|
;Read a value from an InstallOptions INI file
|
||||||
!insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
|
!insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
|
||||||
|
@ -937,8 +938,8 @@ Function un.onInit
|
||||||
; so we move it to the $TEMP dir and then execute the copied uninstaller.
|
; so we move it to the $TEMP dir and then execute the copied uninstaller.
|
||||||
|
|
||||||
${If} $EXEDIR != $TEMP
|
${If} $EXEDIR != $TEMP
|
||||||
CopyFiles /SILENT $EXEPATH $TEMP\Uninstall.exe
|
CopyFiles /SILENT $EXEPATH $TEMP\$UNINSTALLER_NAME
|
||||||
ExecWait '"$Temp\Uninstall.exe" _?=$INSTDIR' $0
|
ExecWait '"$Temp\$UNINSTALLER_NAME" _?=$INSTDIR' $0
|
||||||
SetErrorLevel $0
|
SetErrorLevel $0
|
||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
@ -1060,7 +1061,7 @@ Section "Uninstall"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
;Remove the uninstaller itself.
|
;Remove the uninstaller itself.
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
Delete "$INSTDIR\$UNINSTALLER_NAME"
|
||||||
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
||||||
|
|
||||||
;Remove the installation directory if it is empty.
|
;Remove the installation directory if it is empty.
|
||||||
|
@ -1146,7 +1147,7 @@ Function .onInit
|
||||||
; the installer. This is better than processing a command line option as it means
|
; the installer. This is better than processing a command line option as it means
|
||||||
; this entire code path is not present in the final (real) installer.
|
; this entire code path is not present in the final (real) installer.
|
||||||
|
|
||||||
WriteUninstaller "$%TEMP%\Uninstall.exe"
|
WriteUninstaller "$%TEMP%\$UNINSTALLER_NAME"
|
||||||
|
|
||||||
; just bail out quickly when running the "inner" installer
|
; just bail out quickly when running the "inner" installer
|
||||||
Quit
|
Quit
|
||||||
|
|
Loading…
Reference in a new issue