Commit 79f48da5 authored by Markus Israelsson's avatar Markus Israelsson Committed by Brad King
Browse files

CPack/NSIS: Fix CPACK_NSIS_UNINSTALL_NAME when not Uninstall.exe

If a previous installation was detected by the NSIS script the
uninstaller was not correctly run unless it was still named
`Uninstall.exe`.  This meant that using `CPACK_NSIS_UNINSTALL_NAME`
was simply broken.

Fixes: #22103
parent eeb771e4
...@@ -919,8 +919,8 @@ Function .onInit ...@@ -919,8 +919,8 @@ Function .onInit
;Run the uninstaller ;Run the uninstaller
uninst: uninst:
ClearErrors ClearErrors
StrLen $2 "\Uninstall.exe" StrLen $2 "\@CPACK_NSIS_UNINSTALL_NAME@.exe"
StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path StrCpy $3 $0 -$2 # remove "\@CPACK_NSIS_UNINSTALL_NAME@.exe" from UninstallString to get path
ExecWait '"$0" /S _?=$3' ;Do not copy the uninstaller to a temp file ExecWait '"$0" /S _?=$3' ;Do not copy the uninstaller to a temp file
IfErrors uninst_failed inst IfErrors uninst_failed inst
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment