diff options
author | Brad King <brad.king@kitware.com> | 2022-03-21 18:54:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-03-21 18:54:53 (GMT) |
commit | 01a4be3c60d02b91ff602cc20c648d881549bc3c (patch) | |
tree | 5986cc96c0b3fe5e0355c91bb93051e462a02a38 | |
parent | 0abd49ebb94d73cd975efeaa2e23a41f6f1a0e8c (diff) | |
parent | 5d2ceaada8b84990d828e3c98ea4f6418cac9893 (diff) | |
download | CMake-01a4be3c60d02b91ff602cc20c648d881549bc3c.zip CMake-01a4be3c60d02b91ff602cc20c648d881549bc3c.tar.gz CMake-01a4be3c60d02b91ff602cc20c648d881549bc3c.tar.bz2 |
Merge branch 'cpack-nsis-fix-uninstall-quoting' into release-3.22
Merge-request: !7096
-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 8a0c972..f16eaf6 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -932,9 +932,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: |