How to change .exe icon

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RudyTheNinja

I downloaded rcedit and set the path in the editor settings

I’ve set the icon in both project settings and export settings

I’ve tried .png and I’ve converted them into .ico with GIMP

I’ve tried deleting the default ress://icon that comes with a new project just to see if it would at least error out
But it’s still the godot default icon every damn time

The taskbar icon changed, the window icon changed
Now I just need the .exe to change ;-:

EDIT: I am NOT taking about the taskbar or window icon
I AM talking about the .exe icon

:bust_in_silhouette: Reply From: Magso

If you’re talking about the games icon, that setting is in project settings > config > icon. As for Godot’s icon, because Godot is just an .exe file the only way to change it would be to download the source code and change it there.

As for Godot’s icon, because Godot is just an .exe file the only way to change it would be to download the source code and change it there.

You don’t need to do that to change the application icon. This is what rcedit can be used for in Godot; see Changing application icon for Windows in the documentation.

Calinou | 2019-12-09 18:03

That guide is outdated
I already went over it step by step dozens of times
Had someone even question every step on discord

I did some further research and think its because I have no idea how to create a .ico file correctly
And the tutorial featured in that link to learn how to do so is no longer valid, it just gives a link to this:

RudyTheNinja | 2019-12-09 21:14

And as for project set>config>icon
that only changes the taskbar and window icon

RudyTheNinja | 2019-12-09 21:16

:bust_in_silhouette: Reply From: AiTechEye

1: make sure you added it in the exporter

2: make sure you have the common layer/sizes in the icon file (256,128,64,48,32,16)

if it still doesn’t work this can depends on your system cache that loads the other one.
sometimes it’s enough to rename the exe file or move it to another folder

Moving the .exe file to another folder did the trick for me, thanks.

haimat | 2020-12-11 16:12

:bust_in_silhouette: Reply From: SdSaati

Hi, You can completely change the icon, yes you need the rcedit for sure, then you need to set the project settings and export settings to use your final .ico file, but how you can make a standard icon file? answer is using my script for windows :wink: :

@echo off 
setlocal enableDelayedExpansion
set sizes[5]=16x16
set sizes[4]=32x32
set sizes[3]=48x48
set sizes[2]=64x64
set sizes[1]=128x128
set sizes[0]=256x256
set newnames[0]="zero"

(for /L %%i in (0,1,5) do (
    set newnames[%%i]="%1_!sizes[%%i]!.png"
    magick convert "%1" -resize !sizes[%%i]! PNG24:!newnames[%%i]!

magick convert !newnames[0]! !newnames[1]! !newnames[2]! !newnames[3]! !newnames[4]! !newnames[5]! icon.ico

del !newnames[0]! !newnames[1]! !newnames[2]! !newnames[3]! !newnames[4]! !newnames[5]!

save this script as img2icon.bat and then download this ImageMagick and put its path to environment path variable, (also it’s better to save your script inside imagemagick folder).
that’s it :slight_smile:

img2icon YOUR_IMAGE_FILE.png

now this icon is completely standard and has the all sizes inside itself. I tested it.

:bust_in_silhouette: Reply From: AlbGD

Sorry to revive this old thread.

I experienced the same problem until I realized it’s something related to the size of the icon.

To test this, if you Ctrl + Scroll Mouse Wheel on the folder the .exe file is located, the size of the icon will change, and when it’s big enough it will change the Godot icon to your custom icon.

If you read the Warning on the documentation, it’s clear that you need to create an ico file with sizes ranging from 256 to 16 px, otherwise the Godot icon will be shown instead of the custom icon. Either use ImageMagick or ensure you are including all ico sizes.

:bust_in_silhouette: Reply From: exocolony

Also be sure to check “Modify Resources” in the export window just above where you pick the icon. All icons and file metadata will be ignored otherwise. Note that the docs never mention this flag.