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

Changing the productName using Configuration options #1250

Closed
abc245 opened this issue Feb 13, 2017 · 8 comments
Closed

Changing the productName using Configuration options #1250

abc245 opened this issue Feb 13, 2017 · 8 comments
Labels

Comments

@abc245
Copy link

abc245 commented Feb 13, 2017

  • Version: 12.3.1
  • Target: Windows

Changing the productName using configuration options doesn't work as expected. I use it the following way --em.productName=newName

Is it the right way to do it? It's also not very well documented.

Thanks

@develar
Copy link
Member

develar commented Feb 13, 2017

productName is supported in the app metadata. So, it should work.

In any case please upgrade to 13.6.0 and use new more correct CLI: --config.productName=newName

doesn't work as expected

Please clarify expectation.

@abc245
Copy link
Author

abc245 commented Feb 13, 2017

Thanks for the prompt reply.

I was expecting the app name to change if I use the --em.productName=newName option.

Let me try the new version. Will get back to you soon.

@abc245
Copy link
Author

abc245 commented Feb 13, 2017

Updating to latest electron builder didn't help. I'm using now --config.productName=newName option, however, the app has a name defined in the package.json. I thought it might be due to asar option to be false, but after enabling asar the app name didn't change.

@develar
Copy link
Member

develar commented Feb 13, 2017

Where do you expect changed name?

@abc245
Copy link
Author

abc245 commented Feb 13, 2017

I'm creating application installers for different environments, so I was expecting not only the installer name to change but also the whole app so that the app installation folder holds the environment name. Alternative solution could be to use different package.json, however it's not really clear how to pass the path to the new package.json. --config=build\new-package.json doesn't seem to work

@develar
Copy link
Member

develar commented Feb 13, 2017

I was expecting not only the installer name to change but also the whole app so that the app installation folder holds the environment name

Well, in this case you must change not only productName, but name as well. And you must use asar (doesn't work otherwise, asar enabled by default).

--em.name=newName

You need to set productName only if you want to use space or other such symbols.

@abc245
Copy link
Author

abc245 commented Feb 13, 2017

That was very helpful! Thanks a lot

@stevenmusumeche
Copy link

stevenmusumeche commented Jan 21, 2018

@develar I am only able to get --em.productName=newName to work if there is not any value for productName in package.json. Is there a way to keep a "default" productName in package.json and be able to change it via --em.productName=newName command line option?

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

No branches or pull requests

3 participants