Open szigetib95 opened 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
DEBUG=electron-builder electron-builder -p always -w --x64 -c config.json
{ "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"] }
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.
Please provide a minimum reproducible repo and I'd be happy to take a deeper look
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 formatAnd 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.