diff options
author | Brad King <brad.king@kitware.com> | 2022-03-22 12:44:56 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-03-22 12:45:03 (GMT) |
commit | 21fa99320f0e39057497ee35a22650b34c1e5679 (patch) | |
tree | cc049daa8d923c20463608bd72cf10f7d1c24cb2 /Modules/Internal | |
parent | 575c87c3594c15b7bb85fbab5a05fdeba4783384 (diff) | |
parent | 5d2ceaada8b84990d828e3c98ea4f6418cac9893 (diff) | |
download | CMake-21fa99320f0e39057497ee35a22650b34c1e5679.zip CMake-21fa99320f0e39057497ee35a22650b34c1e5679.tar.gz CMake-21fa99320f0e39057497ee35a22650b34c1e5679.tar.bz2 |
Merge topic 'cpack-nsis-fix-uninstall-quoting' into release-3.23
5d2ceaada8 CPack/NSIS: Add support for unquoted (legacy) uninstaller strings
b795c96727 CPack/NSIS: Fix uninstall command when run from installer
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7096
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CPack/NSIS.template.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in index e3abf22..23c45c7 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -931,9 +931,11 @@ Function .onInit ;Run the uninstaller uninst: ClearErrors - 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 + StrCpy $2 $0 1 + StrCmp '"' $2 0 +3 ; checks if string is quoted (CPack before v3.20.6 did not quote it) + ExecWait '$0 /S' + Goto +2 + ExecWait '"$0" /S' IfErrors uninst_failed inst uninst_failed: |