electron-builder
electron-builder copied to clipboard
Windows build fail since the icon.ico at wrong position.
- Electron-Builder Version: 24.6.3
- Node Version: v16.20.0
- Electron Version: 25.3.2
- Electron Type (current, beta, nightly): current
- Target: win portable
Windows build will fail because the icon.ico will put to ${version}/.icon-ico/
dir, not x.x.x/.icon-ico/
dir.
Error message
Error output: Error while loading icon from "E:...\release\0.0.0.icon-ico\icon.ico": can't open file failedTask=build stackTrace=Error: C:\Users\xxx\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
The config file:
appId: xxx
asar: false
directories:
output: release/${version}
files:
- dist
- electron
icon: public/editor-icon.png
win:
target:
- target: portable
arch:
- x64
artifactName: "${productName}_${version}.${ext}"
NOTE: Building in MacOS works well, only fail in Windows.
I can confirm that I have the same problem.
Yep, I'm also having the same problem.
Same issue 🫤 any workarounds?
I can also reproduce the issue.
Seems to be the follow issue with the
Changing the output directory to remove the ${version}
fixed it for now e.g.
{
"directories": {
"output": "release",
},
}
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.
Is there a proper solution to this other than hardcoding the version in the file?
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.