summaryrefslogtreecommitdiff
path: root/Modules/Internal/CPack
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2022-03-21 19:22:34 +0100
committerBrad King <brad.king@kitware.com>2022-03-21 14:53:44 -0400
commit5d2ceaada8b84990d828e3c98ea4f6418cac9893 (patch)
tree5986cc96c0b3fe5e0355c91bb93051e462a02a38 /Modules/Internal/CPack
parentb795c96727c28982f88fcaf7127bd72067edcf4a (diff)
downloadcmake-5d2ceaada8b84990d828e3c98ea4f6418cac9893.tar.gz
CPack/NSIS: Add support for unquoted (legacy) uninstaller strings
Diffstat (limited to 'Modules/Internal/CPack')
-rw-r--r--Modules/Internal/CPack/NSIS.template.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in
index 18f1ee8d68..f16eaf6597 100644
--- a/Modules/Internal/CPack/NSIS.template.in
+++ b/Modules/Internal/CPack/NSIS.template.in
@@ -932,7 +932,11 @@ Function .onInit
;Run the uninstaller
uninst:
ClearErrors
+ 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: