diff options
author | Markus Israelsson <markus.israelsson@surgicalscience.com> | 2021-04-26 14:21:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-04-27 18:06:42 (GMT) |
commit | 79f48da5c23dd8335cc36f3f7d7b3b7d36c82dd2 (patch) | |
tree | b4c1bfc3c791a41053381326a77137311602b13f /Modules | |
parent | eeb771e4d6b9a1127a0818a211cafb722a2dc387 (diff) | |
download | CMake-79f48da5c23dd8335cc36f3f7d7b3b7d36c82dd2.zip CMake-79f48da5c23dd8335cc36f3f7d7b3b7d36c82dd2.tar.gz CMake-79f48da5c23dd8335cc36f3f7d7b3b7d36c82dd2.tar.bz2 |
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
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Internal/CPack/NSIS.template.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in index e6439ad..0a9c487 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -919,8 +919,8 @@ Function .onInit ;Run the uninstaller uninst: ClearErrors - StrLen $2 "\Uninstall.exe" - StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path + StrLen $2 "\@CPACK_NSIS_UNINSTALL_NAME@.exe" + 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 IfErrors uninst_failed inst |