Reputation: 2729
I have successfully built an Electron app. Now I'm trying to change the icon of the .exe that is generated by electron-packager
. However, the .exe gets the default Electron icon, not my own icon (see screenshot).
The command I run: npm run build
The corresponding script in package.json
:
"build": "electron-packager --out winx64 --overwrite --platform win32 --appname clientlmcenter . --icon my_logo.ico"
The file my_logo.ico
is present in the root directory.
Upvotes: 3
Views: 10885
Reputation: 21
Another solution that I found is adding the icon in the packaje.json
taking into account that the icon is in the root.
{
"name": "nameAplication",
"version": "1.0.0",
"icon": "favicon.ico",
}
and when creating the executable add this command
electron-packager . --platform=win32 --arch=x64 --icon=favicon.ico
Upvotes: 2
Reputation: 715
You have to put icon argument like this
--icon=./my_logo.ico
Also make sure the logo is in the current directory where you execute npm run build
Upvotes: 3