how i can set icon application in ubuntu with elctron builder

1.3k views Asked by At

* Version: ^10.6.1

* Target: linux

i'm ubuntu user & and i could not set icon for my app. this is the error:

No native production dependencies
Packaging for linux x64 using electron 1.4.1 to dist/linux-unpacked
⚠️  Application icon is not set, default Electron icon will be used
Building AppImage for arch x64

and this is build section of my package.jason:

"build": {

  "appId": "985654798458542",

  "mac": {

  "category": "crm"

},
"win": {

  "iconUrl": "logo.png"

},

"linux": {

  "iconUrl": "logo.png"

}
1

There are 1 answers

0
Jens Habegger On BEST ANSWER

From the electron-builder quick-setup:

Create a directory build in the root of the project and save a background.png (macOS DMG background), icon.icns (macOS app icon) and icon.ico (Windows app icon) into it.

The Linux icon set will be generated automatically based on the macOS icns file (or you can put them into the build/icons directory if you want to specify them yourself. The filename must contain the size (e.g. 32x32.png) of the icon).

You will have to specify your icon via the mac-options, even though it's not a build target in your case.