From 5a2cb48b89d84690a21b6addfe78632151066b0d Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 18 Feb 2026 19:21:14 -0800 Subject: [PATCH] Fix NSIS shortcut backslash escaping in CPack config CMake processes escape sequences twice: once reading CMakeLists.txt and once loading the generated CPackConfig.cmake. Backslashes need four levels of escaping (\\) to survive both passes and land as a single backslash in the injected NSIS script. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e5dcaf4..a3a8c7cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -558,9 +558,9 @@ if(WIN32) # Run wowee from bin/ so that ./assets/ resolves correctly. # SetOutPath sets the shortcut's working directory in NSIS. set(CPACK_NSIS_CREATE_ICONS_EXTRA - "SetOutPath '$INSTDIR\\bin'\nCreateShortCut '$SMPROGRAMS\\$STARTMENU_FOLDER\\Wowee.lnk' '$INSTDIR\\bin\\wowee.exe'") + "SetOutPath '$INSTDIR\\\\bin'\nCreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Wowee.lnk' '$INSTDIR\\\\bin\\\\wowee.exe'") set(CPACK_NSIS_DELETE_ICONS_EXTRA - "Delete '$SMPROGRAMS\\$STARTMENU_FOLDER\\Wowee.lnk'") + "Delete '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Wowee.lnk'") elseif(APPLE) set(CPACK_GENERATOR "DragNDrop") else()