Skip to content

Commit 67305af

Browse files
committed
fix(nsis): allow use dot in the productName
Close #2291
1 parent 5b71f6d commit 67305af

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

packages/electron-builder-lib/src/targets/nsis/NsisTarget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class NsisTarget extends Target {
133133
APP_GUID: guid,
134134
PRODUCT_NAME: appInfo.productName,
135135
PRODUCT_FILENAME: appInfo.productFilename,
136-
APP_FILENAME: (!oneClick || options.perMachine === true) && /^[-_+0-9a-zA-Z ]+$/.test(appInfo.productFilename) ? appInfo.productFilename : appInfo.sanitizedName,
136+
APP_FILENAME: (!oneClick || options.perMachine === true) && /^[-_+0-9a-zA-Z .]+$/.test(appInfo.productFilename) ? appInfo.productFilename : appInfo.sanitizedName,
137137
APP_DESCRIPTION: appInfo.description,
138138
VERSION: appInfo.version,
139139

packages/electron-builder-lib/templates/nsis/common.nsh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,4 @@ Name "${PRODUCT_NAME}"
8585
${endif}
8686

8787
${StdUtils.ExecShellAsUser} $0 "$launchLink" "open" "$startAppArgs"
88-
!macroend
89-
90-
!ifndef BUILD_UNINSTALLER
91-
Var isTryToKeepShortcuts
92-
93-
!macro setIsTryToKeepShortcuts
94-
StrCpy $isTryToKeepShortcuts "true"
95-
!ifdef allowToChangeInstallationDirectory
96-
${ifNot} ${isUpdated}
97-
StrCpy $isTryToKeepShortcuts "false"
98-
${endIf}
99-
!endif
100-
!macroend
101-
!endif
88+
!macroend

packages/electron-builder-lib/templates/nsis/include/installer.nsh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,14 @@
235235
${endIf}
236236
!endif
237237
!macroend
238+
239+
Var /GLOBAL isTryToKeepShortcuts
240+
241+
!macro setIsTryToKeepShortcuts
242+
StrCpy $isTryToKeepShortcuts "true"
243+
!ifdef allowToChangeInstallationDirectory
244+
${ifNot} ${isUpdated}
245+
StrCpy $isTryToKeepShortcuts "false"
246+
${endIf}
247+
!endif
248+
!macroend

0 commit comments

Comments
 (0)