Hi,
I'm packaging an application with [email protected] on OS X El Capitan with the following command:
electron-packager . Herostratus \
--platform=win32 \
--arch=x64 \
--version=0.34.2 \
--icon="assets/icon.ico" \
--overwrite \
--out=release/
The icon is added to the top left corner of the window and appears in the bottom bar on Windows 10, however I still see the default Electron icon when opening the directory with the file explorer.
Is there anything else I have to add to get the icon on the .exe file?
I also tested generating the package directly on Windows 10 in case the issue was wine-related but the results were the same.
Perhaps it's because you don't have the appropriate icon size for the file explorer in your icon file?
@malept Sounds like that's the problem. Turns out my icon size is 16x16. What's the expected size? I can't find any documentation on the README.
I don't know offhand, I would look in the MSDN documentation. Personally, I just generate a whole bunch of common icon sizes in order to create the ICO and ICNS files for my app.
I have a multi-layered ico with the following sizes that still doesn't work:
I did two things and one of them solved the issue, but not sure which one:
BrowserWindow. I resized to 256x256.--asar to electron-packager.i tried with --icon="./assets/icon.ico"
this works for me
I did two things and one of them solved the issue, but not sure which one:
- I had a 1024x1024 *.png icon that I passed to
BrowserWindow. I resized to256x256.- Pass
--asartoelectron-packager.
The second
Passing --asar has zero impact on the icon embedded in the Windows executable.
first one turned out to be the solution for me
Most helpful comment
I did two things and one of them solved the issue, but not sure which one:
BrowserWindow. I resized to256x256.--asartoelectron-packager.