open-source-labs / OverVue

Prototyping Tool For Vue Devs 适用于Vue的原型工具
https://www.overvue.org
MIT License
2.47k stars 271 forks source link

Windows build error w/ Solution #191

Open sonicviz opened 8 months ago

sonicviz commented 8 months ago

Description

Tried building a new Electron deployment on windows with npm run build but it failed with ⨯ cannot execute cause=exit status 1 errorOut=Reserved header is not 0 or image type is not icon for 'E:\Source Control\Quasar\2024\OverVue\src-electron\icons\icon.ico' Fatal error: Unable to set icon

Reproduction

Clone repo to win 11 Run npm i Run npm run build Cue error above

System information

System: OS: Windows 11 10.0.22631 CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor Memory: 17.84 GB / 31.91 GB Binaries: Node: 18.17.1 - d:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - D:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 9.8.1 - E:\Source Control\Quasar\2024\OverVue\node_modules.bin\npm.CMD pnpm: 8.13.1 - d:\Program Files\nodejs\pnpm.CMD Browsers: Chrome: 123.0.6312.58 Edge: Chromium (122.0.2365.92) Internet Explorer: 11.0.22621.1

Additional information

Solution:

It seems src-electron\icons\icon.ico is in the wrong format for windows. Use https://redketchup.io/icon-converter to convert src-electron\icons\icon.png to a new icon.ico file and rerun npm run build to build the Electron build successfully.

App • SUCCESS • electron-builder built the app

Solution found via https://github.com/electron-userland/electron-builder/issues/3889

Great prototyping tool, ty!

ps: Icons/png's in wrong format seem innocuous but can be deadly, like a virus. A few years back, after weeks of debugging and problem analysis, I finally figured out why my Mac OS would mysteriously CTD/Reboot. It was all due to a png icon file being generated by a Unity build process on windows that looked ok but would cause Mac OSX to randomly CTD.

👨‍👧‍👦 Contributing