CPack/NSIS: Fix uninstall on Windows using "Apps & Features"

According to NSIS documentation [1], uninstaller executable path in
UninstallString must always be quoted.  Quote the uninstall executable
in `NSIS.template.in` so that it works when the path has spaces.

[1] https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
This commit is contained in:
Andras Lasso
2021-09-13 19:45:46 -04:00
committed by Brad King
parent 253f31f5ef
commit eb3b3bacdc

View File

@@ -674,7 +674,7 @@ Section "-Core installation"
Push "@CPACK_PACKAGE_VENDOR@"
Call ConditionalAddToRegisty
Push "UninstallString"
Push "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe"
Push "$\"$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe$\""
Call ConditionalAddToRegisty
Push "NoRepair"
Push "1"