Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Build uses mac.icon+.icns over linux.icon #2632

Closed
stefanocrosta opened this issue Feb 23, 2018 · 2 comments
Closed

Linux Build uses mac.icon+.icns over linux.icon #2632

stefanocrosta opened this issue Feb 23, 2018 · 2 comments
Labels

Comments

@stefanocrosta
Copy link

  • Version: 19.56.2
  • Target: linux (any - AppImage, deb...)

I have a simple package.json with multiple targets (win, mac, linux).
It looks like the build.mac.icon+.icns rule have priority over the build.linux.icon one, which is - to say the least - surprising.

"build": {
    "appId": "com.fooapp",
    "files": [
      "!log${/*}",
      "!screenshots${/*}",
      "!README.md"
    ],
    "win": {
      "icon": "build/icon.ico",
      "target": "nsis"
    },
    "mac": {
      "icon": "build/icon.512x512.png",
      "target": "dmg"
    },
    "linux": {
      "icon": "build/icon.256x256.png",
      "target": ["AppImage", "deb"]
    }
  },
  "scripts": {
    "start": "blah blah",
    "clean": "rm -rf dist",
    "lint": "eslint src --color",
    "build:win": "build --win",
    "build:mac": "build --mac",
    "build:linux": "build --linux"
  },

But when I run the linux build, it tries to look for the mac icns icon!

stat /home/marss/nidar-electron/build/icon.512x512.png.icns: no such file or directory

And I see no reason to be using icns format - my mac build works very well with the png.

But!

If I remove the mac build config instead the linux build works fine.
Also, if I use icon.512x512.png instead in linux.icon it works!

I've found several other icon-related issues for the repo but none really addresses this specific point, though this ones is very related: #1399 (comment)

and the doc https://www.electron.build/icons does not explicitly list these small inconsistencies.

Even if you don't think it's worth changing the doc or the behaviour, I hope this issue description might help somebody troubleshooting!

thanks

Stefano

@develar
Copy link
Member

develar commented Feb 23, 2018

Could you please try electron-builder 20.1.0?

@stefanocrosta
Copy link
Author

Hello devlar,

thanks a lot, that is indeed fixed in >=20.1 !

(Very sorry I hadn't realized npm would not upgrade to the 20.x version without explicitly modifying the package.json version condition from the ^19 - i was convinced I was running the latest, but obviously I wasn't! )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants