Skip to content

Commit

Permalink
fix(nsis): allow use dot in the productName
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Jan 30, 2018
1 parent 879975e commit 4f7fc57
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class NsisTarget extends Target {
APP_GUID: guid,
PRODUCT_NAME: appInfo.productName,
PRODUCT_FILENAME: appInfo.productFilename,
APP_FILENAME: (!oneClick || options.perMachine === true) && /^[-_+0-9a-zA-Z ]+$/.test(appInfo.productFilename) ? appInfo.productFilename : appInfo.sanitizedName,
APP_FILENAME: (!oneClick || options.perMachine === true) && /^[-_+0-9a-zA-Z .]+$/.test(appInfo.productFilename) ? appInfo.productFilename : appInfo.sanitizedName,
APP_DESCRIPTION: appInfo.description,
VERSION: appInfo.version,

Expand Down
15 changes: 1 addition & 14 deletions packages/electron-builder-lib/templates/nsis/common.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,4 @@ Name "${PRODUCT_NAME}"
${endif}

${StdUtils.ExecShellAsUser} $0 "$launchLink" "open" "$startAppArgs"
!macroend

!ifndef BUILD_UNINSTALLER
Var isTryToKeepShortcuts

!macro setIsTryToKeepShortcuts
StrCpy $isTryToKeepShortcuts "true"
!ifdef allowToChangeInstallationDirectory
${ifNot} ${isUpdated}
StrCpy $isTryToKeepShortcuts "false"
${endIf}
!endif
!macroend
!endif
!macroend
11 changes: 11 additions & 0 deletions packages/electron-builder-lib/templates/nsis/include/installer.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,14 @@
${endIf}
!endif
!macroend

Var /GLOBAL isTryToKeepShortcuts

!macro setIsTryToKeepShortcuts
StrCpy $isTryToKeepShortcuts "true"
!ifdef allowToChangeInstallationDirectory
${ifNot} ${isUpdated}
StrCpy $isTryToKeepShortcuts "false"
${endIf}
!endif
!macroend

0 comments on commit 4f7fc57

Please sign in to comment.