Skip to content

Commit

Permalink
Add a way to avoid trying to add a custom icon when building nw… (#1576)
Browse files Browse the repository at this point in the history
Add a way to avoid trying to add a custom icon when building nw.js
  • Loading branch information
mikeller authored Aug 15, 2019
2 parents b44f378 + cbc2152 commit e513c27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions assets/windows/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ Section

# create shortcuts in the start menu and on the desktop
CreateDirectory "$SMPROGRAMS\${GROUP_NAME}\${FOLDER_NAME}"
CreateShortCut "$SMPROGRAMS\${GROUP_NAME}\${FOLDER_NAME}\${APP_NAME}.lnk" "$INSTDIR\${FILE_NAME_EXECUTABLE}"
CreateShortCut "$SMPROGRAMS\${GROUP_NAME}\${FOLDER_NAME}\${APP_NAME}.lnk" "$INSTDIR\${FILE_NAME_EXECUTABLE}" "" "$INSTDIR\images\bf_icon.ico" "0" "" "" ""
CreateShortCut "$SMPROGRAMS\${GROUP_NAME}\${FOLDER_NAME}\Uninstall ${APP_NAME}.lnk" "$INSTDIR\${FILE_NAME_UNINSTALLER}"
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${FILE_NAME_EXECUTABLE}"
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${FILE_NAME_EXECUTABLE}" "" "$INSTDIR\images\bf_icon.ico" "0" "" "" ""

# include in add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
Expand Down Expand Up @@ -209,4 +209,4 @@ Section "Uninstall"
DeleteRegKey HKCU "Software\${GROUP_NAME}\${APP_NAME}"
DeleteRegKey /ifempty HKCU "Software\${GROUP_NAME}"

SectionEnd
SectionEnd
9 changes: 6 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ function getInputPlatforms() {
for (var i = 3; i < process.argv.length; i++) {
var arg = process.argv[i].match(regEx)[1];
if (supportedPlatforms.indexOf(arg) > -1) {
platforms.push(arg);
platforms.push(arg);
} else if (arg == 'nowinicon') {
console.log('ignoring winIco')
delete nwBuilderOptions['winIco'];
} else {
console.log('Unknown platform: ' + arg);
process.exit();
console.log('Unknown platform: ' + arg);
process.exit();
}
}

Expand Down

0 comments on commit e513c27

Please sign in to comment.