Reputation: 169
I'm trying to publish my electron app, And I'm using the following code in the package.json:
"packagerConfig": {
"icon": "./src/icon.ico"
},
But when I use electron forge and look into out/win32-x64 directory, the single executable is the default electron icon, when I run it the icon appears both in the app top right corner, as well as the shortcut icon.
I've scoured the internet and couldn't find a fix for this.
Heres the github with the code: https://github.com/Paxxous/Extremely-minamilistic-text-editor
Upvotes: 4
Views: 3699
Reputation: 12223
If you didn't create your ico right, you will have a problem. Use this command. I had renamed a png to ico and it didn't work. For some reason I thought that you could do that, but apparently they are different formats!
Download imagemagick then run this:
convert icon.png -resize 256x256 icon.ico
Upvotes: 2
Reputation: 737
no need for '.icon' suffix, see https://www.electronforge.io/guides/create-and-add-icons#windows-and-macos
electron-forge will automatically add the correct extension for each platform, thus appending .ico or .icns to the path is not required.
Upvotes: 2
Reputation: 169
Okay so it was just a weird bug that I found, You just have to move the exe out of the directory and then it would show. (Though also make sure to remove the out folder just in case)
Upvotes: 6