From e97ccd81953d37fd1d10a7bead5c039cf587607c Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 15 Mar 2025 09:05:22 -0400 Subject: [PATCH] Combine NSIS cmake commands. --- src/CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 70c6edb..a37b11a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -137,24 +137,22 @@ if(WIN32) set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) # https://nsis.sourceforge.io/Reference/CreateShortCut - set( - CPACK_NSIS_CREATE_ICONS_EXTRA - "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Qtk.lnk' '$INSTDIR\\\\bin\\\\qtk_gui.exe'" - ) # TODO: Use 4th parameter to pass icon. set( CPACK_NSIS_CREATE_ICONS_EXTRA - "CreateShortCut '$DESKTOP\\\\Qtk.lnk' '$INSTDIR\\\\bin\\\\qtk_gui.exe'" + "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Qtk.lnk' '$INSTDIR\\\\bin\\\\qtk_gui.exe'\n\ + CreateShortCut '$DESKTOP\\\\Qtk.lnk' '$INSTDIR\\\\bin\\\\qtk_gui.exe'" ) set( CPACK_NSIS_DELETE_ICONS_EXTRA - "Delete '$SMPROGRAMS\\\\$START_MENU\\\\Qtk.lnk'" + "Delete '$SMPROGRAMS\\\\$START_MENU\\\\Qtk.lnk'\n\ + Delete '$DESKTOP\\\\Qtk.lnk'" ) # Set icon for the installer executable. set(CPACK_NSIS_MUI_ICON "${QTK_RESOURCES}/icons/win/kilroy.ico") - # Set icon for uninstaller executable. - set(CPACK_NSIS_MUI_UNIICON "${QTK_RESOURCES}/icons/win/kilroy.ico") + # Set icon for uninstaller executable to be the same as the installer. + set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}") elseif(APPLE) # OSX # Set icon for the splash image used in OSX DMG installers.