Unable to set icon on Linux target
See original GitHub issue- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project follows, as appropriate.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Please describe your issue:
I’m building on Ubuntu 16.04 for x64, and while simply running the app will show the icon just fine, the icon once packaged is always the electron icon. I have verified that the icon path is a valid one.
Console output when you run electron-packager with the environment variable DEBUG=electron-packager
. Please include the stack trace if one exists.
electron-packager Electron Packager 8.6.0 +0ms
electron-packager Node v7.7.3 +2ms
electron-packager Host Operating system: linux (x64) +0ms
electron-packager Packager Options: {"name":"pman","appname":"pman","arch":"x64","platform":"linux","icon":null,"version":"1.6.5","dir":"/home/ryan/Documents/Development/bplayer4/dist","sourcedir":"/home/ryan/Documents/Development/bplayer4/dist","out":"/home/ryan/Documents/Development/bplayer4/dist/releases","overwrite":true,"asar":false,"prune":true,"app_version":null,"afterCopy":[null],"afterExtract":[]} +0ms
electron-packager Target Platforms: linux +0ms
electron-packager Target Architectures: x64 +1ms
WARNING: The version parameter is deprecated, use electronVersion (or --electron-version in the CLI) instead
electron-packager Inferring appVersion from version in /home/ryan/Documents/Development/bplayer4/dist/package.json +9ms
electron-packager Application name: pman +0ms
electron-packager Target Electron version: 1.6.5 +0ms
electron-packager Downloading Electron with options {"platform":"linux","arch":"x64","version":"1.6.5"} +4ms
Packaging app for platform linux x64 using electron v1.6.5
electron-packager Creating /tmp/electron-packager/linux-x64-template +319ms
electron-packager Extracting /home/ryan/.electron/electron-v1.6.5-linux-x64.zip to /tmp/electron-packager/linux-x64-template +1ms
electron-packager Initializing app in /tmp/electron-packager/linux-x64/pman-linux-x64 from /tmp/electron-packager/linux-x64-template template +1s
electron-packager Ignored paths based on the out param: +1ms [ '/home/ryan/Documents/Development/bplayer4/dist/releases' ]
electron-packager Running npm prune --production +3s
electron-packager Renaming electron to pman in /tmp/electron-packager/linux-x64/pman-linux-x64 +5s
electron-packager Moving /tmp/electron-packager/linux-x64/pman-linux-x64 to /home/ryan/Documents/Development/bplayer4/dist/releases/pman-linux-x64 +0ms
What command line arguments are you passing? Alternatively, if you are using the API, what
parameters are you passing to the packager()
function?
I’m using the API, but my options argument is generated programmatically and is thus pretty tricky to post here. I’ve resorted to simply not setting the ‘icon’ property. The only reason I’m posting the issue here is that the icon works fine before I package the app, so I’m pretty sure it must be an issue with electron-packager and not with electron. Is there any way I could fix this, or is there some magical way to set the icon post-packaging that will work? The icon works everywhere else.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
same issue, solved with
--icon
option,and I have set the icon option too, but without the
--icon
option will not work.I would see what the path returned with
app.getAppPath
is and then see if the path you created for the icon actually exists.