It is impossible to add an icon to a standalone .exe file.

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

I followed the instructions.
The exported exe has the image, but it will not run anywhere outside of the project folder. If you attempt to run it anywhere outside the project folder windows will show this error

Error: Could not load game data at path '.'. Is the .pck file missing?

Yes, “Embed Pck” is enabled in the export settings.

Removing rcedit from godot makes .exes run anywhere again. So you can’t add an image to the program that way.

Well, if that wasn’t enough, even resourcehacker doesn’t work. Any other executable? Perfectly fine. It’s just the one that godot exports that it fails on.

nope

Is it even possible? Has any human attempted this yet, adding an icon to their executable?

I doubt this is possible, given that this issue is documented here: Changing application icon for Windows — Godot Engine (stable) documentation in English

Nisovin | 2021-03-01 05:25

:bust_in_silhouette: Reply From: voice-of-texnoforge

It’s not possible at the moment

Issue #33466 tracks this in detail, there’s also a duplicate #45345.

tl;dr

using rcedit to set resulting .exe’s icon breakes standalone export.

The exporter needs to be fixed/rewritten.

If you insist on having standalone .exe with custom icon, I think you need to

a) fix the Godot exporter ¯\_(ツ)_/¯
b) disable rcedit in Godot and modify the .exe post-export yourself