Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Question) Why productName contains "." is not allowed to be used to NSIS' APP_FILENAME #2291

Closed
JiaHenry opened this issue Nov 10, 2017 · 1 comment · May be fixed by qcif/data-curator#563
Labels

Comments

@JiaHenry
Copy link

  • Version: 19.45.4
  • Target: Windows x64

Hello,
I found the following code in NsisTarget.js line 234
APP_FILENAME: (!oneClick || options.perMachine === true) && /^[-_+0-9a-zA-Z ]+$/.test(appInfo.productFilename) ? appInfo.productFilename : appInfo.sanitizedName,

The RegExp not contains dot (.) used for checking productFilename which comes from config.productName, it caused the name will be used instead.

We provided a NSIS script for custom install location and dot is included in productName. Did there any special reason for this check RegExp pattern? If not can you fixed this issue.

FYI, the following is the output with parameter information for NSIS, I tried to get this by made a mistake in script file:
Error: ...\nsis\nsis-3.0.1.13\Bin\makensis.exe exited with code 1
Output:
Command line defined: "APP_ID=com.sample.study.mytestapp"
Command line defined: "APP_GUID=f30669a8-3694-5a67-a78f-542b4f58062f"
Command line defined: "PRODUCT_NAME=My.Test App"
Command line defined: "PRODUCT_FILENAME=My.Test App"
Command line defined: "APP_FILENAME=test.app"
Command line defined: "APP_DESCRIPTION=An electron app for test use"
Command line defined: "VERSION=1.2.0"

The package.json for app:
{
"name": "test.app",
"productName": "My.Test App",
"version": "1.2.0",
"description": "An electron app for test use",
"main": "main.js",
"author": "Henry Jia",
"license": "MIT",
"private": true
}

The package.json for builder:
{
"name": "testapp",
"version": "1.2.3",
"scripts": {
"start": "electron app",
"dist": "build -w --x64 --c.directories.app=app"
},
"build": {
"appId": "com.sample.study.mytestapp",
"win": {
"target": [
"nsis"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"allowElevation": true,
"perMachine": true
}
},
"devDependencies": {
"electron-prebuilt": "^1.3.4",
"electron-builder": "next"
}
}

Thank you very much :)

develar added a commit to develar/electron-builder that referenced this issue Jan 30, 2018
@develar
Copy link
Member

develar commented Jan 30, 2018

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants