paxous
paxous

Reputation: 169

Windows 10 electron forge icon isn't working

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

Answers (3)

user3413723
user3413723

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

wklbeta
wklbeta

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

paxous
paxous

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

Related Questions