Im setting up my icon to my electron-packager cli, but its not working. I think theres some type of cache being saved somewhere. The icon is definitely working though. Whe I goto properties the icon is correct, but the main icon on the exe is showing the original electron app icon.
How can I change it heres the code im using for icon:
--icon=src/assets/icons/win/icon.ico
My guess is that it's probably a caching issue. Try copying the already built EXE to a different machine.
Yeah, thats what I am thinking also. Okay I will try that
I also can't get it to work, it's always electron app icon.
Just so I'm clear, when I say "caching issue", I mean some sort of built-in Windows icon cache.
My inclination is that this problem does not originate with Electron Packager. This is because Electron Packager passes all of the win32 target icon information verbatim to the node-rcedit module. If it doesn't have to do with the Windows icon cache, then it's a bug either there or in rcedit.
@AhadCove
use .ico not .png for windows
app.on("ready", function () {
// create the window
mainWindow = new BrowserWindow({
width : 844,
height : 640,
icon : "favicon.ico",
title : "My app"
});`
If you launch electron ./index.js higher when www folder
and iindex.js says to launch
mainWindow.loadURL("file://" + __dirname + "/www/index.html");
you should have two same .ico:
./favicon.ico
./www/favicon.ico
on windows for nwjs use .png icon, not .ico
That's for development
@englishextra I'm not sure that's what the problem is.
@malept It's not clear
Also clear C:\Users...\AppData\Local\IconCache.db
And drag compiled exe to desktop to see if default electron icon changes to that of yours
using .ico when instantiating a BrowserWindow works for me. Thanks, @englishextra
Most helpful comment
@malept It's not clear
Also clear C:\Users...\AppData\Local\IconCache.db
And drag compiled exe to desktop to see if default electron icon changes to that of yours