mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Merge topic 'cpack-nsis-fix-uninstall-quoting'
5d2ceaada8CPack/NSIS: Add support for unquoted (legacy) uninstaller stringsb795c96727CPack/NSIS: Fix uninstall command when run from installer Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7096
This commit is contained 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:
|
||||
|
||||
Reference in New Issue
Block a user