From eb3b3bacdc93e44d942af912ac5a5b16cfa9813a Mon Sep 17 00:00:00 2001 From: Andras Lasso Date: Mon, 13 Sep 2021 19:45:46 -0400 Subject: 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 --- Modules/Internal/CPack/NSIS.template.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in index 1df8a58..8a0c972 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -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" -- cgit v0.12