I am using Electron Builder to build an Electron app. I would like the executable to have a product version that is different from the package.json
version.
This is what the build
instruction in package.json
looks like:
"build": {
"appId": "myAppId",
"productName": "My App",
"copyright": "Copyright (C) 2022 My Company",
"artifactName": "My App.exe",
"directories": {
"output": "dist/My App"
},
"buildVersion": "1.0.0.1"
},
I thought that buildVersion
would update the product version, but when I look at the details of the .exe
file, the product version has remained the same as the version number in package.json
(1.0.0
):
How can I solve this?
EDIT: As a workaround, I downloaded this package, called verpatch
, and I used its executable to change the product version of my application's .exe
file:
.\verpatch.exe "My App.exe" /va "1.0.0.1" /pv "1.0.0.1" /s copyright "Copyright (C) 2022 My Company" /s description "My App's Description" /s product "My App"
It would be nice, however, to be able to use Electron Builder for this, instead of an external package.