electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.69k stars 1.74k forks source link

Electron builder failed in pipeline during build when we provide icons #8490

Open szigetib95 opened 2 months ago

szigetib95 commented 2 months ago

Hi there!

I'm facing an issue recently during building and providing installer for windows and linux during running the build command: DEBUG=electron-builder electron-builder -p always -w --x64 -c config.json this means first we build the electron app then the angular app and then we run this command its for -w for windows or with -l for linux and meantime when its running through the pipeline that is a linux based virtual machine, that is capable of publishing for both since for windows it uses underlying wine. And the case here is that when we provide any icons that is not the default the build always fails (locally on windows its working.) { "appId": "com.electron.*", "productName": "*", "copyright": "Copyright © 2007-2024. ${author}. All Rights Reserved.", "publish": { "provider": "generic", "url": "*" }, "directories": { "buildResources": "build" }, "mac": { "category": "public.app-category.business", "target": "dmg" }, "win": { "requestedExecutionLevel": "requireAdministrator", "target": "nsis" }, "nsis": { "include": "./build/installer.nsh", "oneClick": false, "installerSidebar": "./build/images/installerSidebar.bmp", "uninstallDisplayName": "${productName}", "deleteAppDataOnUninstall": true, "allowToChangeInstallationDirectory": true, "createDesktopShortcut": false, "createStartMenuShortcut": false, "menuCategory": false }, "linux": { "target": "AppImage" }, "files": ["build/**/*", "dist-angular", "dist-electron", "node_modules"] } That is the working config where we dont provide any icons although the .bmp file has no error only the .ico, .icns and .png. In case of running the linux command we get: image path/build/128x128.png shas unknown format

And on windows we get: Error while loading icon from "path/build/icon-256x256.ico": unable to read icon from file. Command line defined: "MUI_ICON=/path/build/icon-256x256.ico" Altough the file is there confirmed by devops.

mmaietta commented 1 month ago

Please provide a minimum reproducible repo and I'd be happy to take a deeper look