Open onmyway133 opened 7 years ago
Did you end up finding a better way to do this? It seems the icon
argument to BrowserWindow is ignored on macOS. The workaround (drag/drop) works for me, but I wish I could automate this so all developer on my team see a dev icon!
Is there any update on this issue? I am breaking my head because when I build and run the app (on Windows) with cli I see my icon in the taskbar. But when I install the app over an installer (icon of installer is also mine) and run it, it shows the default icon. The weird thing is, even in the OS settings where I can remove programs, my icon is shown...
I set the icon like this:
mainWindow = new BrowserWindow({ width: 1280, height: 720, autoHideMenuBar: true, useContentSize: true, icon: 'src/client/assets/icons/logo.png'. });
@drewjosh You should use it like this icon:__dirname +'/src/client/assets/icons/logo.png',
Generate icns
.iconset
iconutil -c icns "Icon.iconset"
. Note that icon names must be first letter lowsercased, and use_
instead of-
Use icns
main.js
, specifyicon
You can also use helper url methods
If app icon is not updated
png
,NativeImage
, different icon sizes but still the problem. When I useelectron-packager
to make release build, the icon shows correctly, so it must be because of Electron caching or somehow 😠node_modules -> electron -> dist
, right click onElectron
, chooseView Info
icns
into the icon on the top leftRelease with
electron-packager
icon
must be specified with__dirname
(we already did) forelectron-packager
to pick up correct icons