Open mathias-berg opened 11 months ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Not stale, still a problem.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
I am seeing similar issues with the toolbar icon. When I build my app and run the exe in the win-upacked folder, the icon is larger than the icon that appears when running the appx build.
electron\dist.icon-ico\icon.ico filesize is 256x256. electron\appx\icon.png is 512x512. electron-builder version 24.6.3
electron-build.config.json: ... "win": { "target": [ { "target": "appx", "arch": ["x64"] } ], "icon": "build/appx/StoreLogo.png", "electronLanguages": "en-US" }, ...
Hi,
This issue is kind of strange, but very easy to reproduce. I have found a few people having this issue when searching, but not any solution that works.
The platforms that works for me as it should is MacOS and Windows (nsis build). The one that I am struggling with is the
appx
build.According to the documentation you should put your app icon in the
build
folder or the one that you assign as such inpackage.json
atbuildResources
. I use the defaultbuild
.My app icon is
icon.ico
for Windows andicon.icns
for Mac (could as well beicon.png
).When building a
nsis
build, I get my expected icon, but when building forappx
, I get the default Electron icon. The only thing I could get some other icon than the default Electron one is if I also add an logo namedStoreLogo.png
inbuild/appx
.Look at the attached images. The one to the left is a
nsis
build and the one to the right is anappx
build. They are built right after each other, nothing is changed.When hovering the app icons, I get these results. Here you can actually see the wanted icon in the
appx
build in the top left preview (coming fromicon.ico
).nsis:
appx:
One more thing. When I added the
StoreLogo.png
image on theappx
build, you will see a blue background on the image, that is a bit hard to see on this image. I have tried to use thebackgroundColor
property set totransparent
(in package.json), or any other color, but that doesn't seem to affect it all.One last image from recent used apps.
Why does
nsis
work as expected and why doesn'tappx
?So either is the documentation needs an update or the implementation has some flaws.
Thanks in advance!