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
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.
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.
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.
Where do you expect changed name?
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
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.
That was very helpful! Thanks a lot
@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?
Most helpful comment
productNameis 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=newNamePlease clarify expectation.