From 8e3efec40fed65daa48bfd5290b552928e76d6f1 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Wed, 15 Jun 2022 00:41:52 -0400 Subject: [PATCH 1/2] Unselect shortcut installation by default if PolyMC is already installed This is the same behavior as the `/NoShortcuts` switch. --- program_info/win_install.nsi.in | 1 + 1 file changed, 1 insertion(+) diff --git a/program_info/win_install.nsi.in b/program_info/win_install.nsi.in index e5687de7..98a87880 100644 --- a/program_info/win_install.nsi.in +++ b/program_info/win_install.nsi.in @@ -245,6 +245,7 @@ Function .onInit ${GetParameters} $R0 ${GetOptions} $R0 "/NoShortcuts" $R1 ${IfNot} ${Errors} +${OrIf} ${FileExists} "$InstDir\@Launcher_APP_BINARY_NAME@.exe" !insertmacro UnselectSection ${SM_SHORTCUTS} !insertmacro UnselectSection ${DESKTOP_SHORTCUTS} ${EndIf} From 251942323e53913112bf807cedf54c98ddc5a2a4 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Wed, 15 Jun 2022 00:46:34 -0400 Subject: [PATCH 2/2] Deselect desktop shortcut by default Follows the guidelines at https://docs.microsoft.com/en-us/windows/win32/uxguide/winenv-desktop --- program_info/win_install.nsi.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program_info/win_install.nsi.in b/program_info/win_install.nsi.in index 98a87880..1997d6b6 100644 --- a/program_info/win_install.nsi.in +++ b/program_info/win_install.nsi.in @@ -157,7 +157,7 @@ Section "Start Menu Shortcut" SM_SHORTCUTS SectionEnd -Section "Desktop Shortcut" DESKTOP_SHORTCUTS +Section /o "Desktop Shortcut" DESKTOP_SHORTCUTS CreateShortcut "$DESKTOP\@Launcher_CommonName@.lnk" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" "" "$INSTDIR\@Launcher_APP_BINARY_NAME@.exe" 0