Skip to content

Commit e1e3832

Browse files
Nunzio Toccidevelar
authored andcommitted
feat(nsis): add --no-desktop-shortcut argument (#1432)
1 parent 4149031 commit e1e3832

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/electron-builder/templates/nsis/installSection.nsh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ StrCpy $appExe "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
166166
# create shortcuts in the start menu and on the desktop
167167
# shortcut for uninstall is bad cause user can choose this by mistake during search, so, we don't add it
168168
CreateShortCut "$startMenuLink" "$appExe" "" "$appExe" 0 "" "" "${APP_DESCRIPTION}"
169-
CreateShortCut "$desktopLink" "$appExe" "" "$appExe" 0 "" "" "${APP_DESCRIPTION}"
169+
170+
${GetParameters} $R0
171+
${GetOptions} $R0 "--no-desktop-shortcut" $R1
172+
${If} ${Errors}
173+
CreateShortCut "$desktopLink" "$appExe" "" "$appExe" 0 "" "" "${APP_DESCRIPTION}"
174+
${EndIf}
170175

171176
WinShell::SetLnkAUMI "$startMenuLink" "${APP_ID}"
172177
WinShell::SetLnkAUMI "$desktopLink" "${APP_ID}"

0 commit comments

Comments
 (0)