Closed james-pre closed 4 months ago
Research:
The error is thrown by appInfo.getVersionInWeirdWindowsForm()
in WinPackager.ts
:
appInfo.shortVersionWindows || appInfo.getVersionInWeirdWindowsForm(),
Since it won't be called if appInfo.shortVersionWindows
is set, it would be beneficial if that could be set by the user. In the AppInfo
constructor, shortVersionWindows
is set like so:
if (info.metadata.shortVersionWindows) {
this.shortVersionWindows = info.metadata.shortVersionWindows
}
This means the user needs to be able to set the metadata.shortVersionWindows
of the Packager
instance passed to the AppInfo
constructor (as info
).
The AppInfo
instance is created by Packager
in its _build
method:
this._appInfo = new AppInfo(this, null)
Packager
assigns to its metadata
like so:
deepAssign(this.metadata, configuration.extraMetadata)
So it should be possible to pass shortVersionWindows
to extraMetadata
.
The build fails with this command:
<user>\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0\rcedit-x64.exe' '\dist\win-unpacked\<app name>-client.exe' --set-version-string FileDescription '<app name> Client' --set-version-string ProductName '<app name> Client' --set-version-string LegalCopyright '<copyright>' --set-file-version <version> --set-product-version <version> --set-version-string InternalName <app name>-client --set-version-string OriginalFilename '' --set-version-string CompanyName 'Dr. Vortex' --set-icon '<project>\dist\.icon-ico\icon.ico
and the error:
Fatal error: Unable to parse version string for FileVersion
Looking at the output, the error is caused by these 2 flags:
--set-file-version <version>
--set-product-version <version>
Which I presume is because <version>
looks like string-1.2.3
. Is it possible to use a version like that?
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.