Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Manually changing application icon for Windows

Windows applications use a Windows only format called ICO for their file icon and taskbar icon. Since Godot 4.1, Godot can create an ICO file for you based on the icon file defined in the Windows export preset. Supported formats are PNG, WebP, and SVG. If no icon is defined in the Windows export preset, the application/config/icon project setting is used automatically instead.

This means you no longer need to follow the steps in this section to manually create an ICO file, unless you wish to have control over the icon design depending on its displayed size.

Creating a custom ICO file

You can create your application icon in any program but you will have to convert it to an ICO file using a program such as GIMP.

In dieser Video-Anleitung erfahren Sie, wie Sie eine ICO-Datei mit GIMP exportieren können.

Es ist auch möglich, ein PNG-Bild mit diesem ImageMagick Befehl in eine hiDPI-freundliche ICO-Datei zu konvertieren:

magick convert icon.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico

Abhängig davon, welche Version von ImageMagick Sie installiert haben, müssen Sie eventuell das magick weglassen und stattdessen diesen Befehl ausführen:

convert icon.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico

Warnung

Damit die ICO-Datei das Default-Godot-Icon vollständig ersetzen kann, muss sie alle die Größen enthalten, die im Default-Godot-Icon enthalten sind: 16×16, 32×32, 48×48, 64×64, 128×128, 256×256. Wenn die ICO-Datei nicht alle Größen enthält, wird das Default-Godot-Icon für die Größen beibehalten, die nicht überschrieben wurden.

Der obige ImageMagick-Befehl berücksichtigt dies.

Ändern des Taskleisten-Icons

Das Taskleisten-Icon ist das Icon, das in der Taskleiste angezeigt wird, wenn Ihr Projekt ausgeführt wird.

../../_images/icon_taskbar_icon.png

To change the taskbar icon, go to Project > Project Settings > Application > Config, make sure Advanced Settings are enabled to see the setting, then go to Windows Native Icon. Click on the folder icon and select your ICO file.

../../_images/icon_project_settings.webp

Diese Einstellung ändert nur das Icon für Ihr exportiertes Spiel unter Windows. Um das Icon für MacOS einzustellen, verwenden Sie Natives Macos-Icon. Und für jede andere Plattform verwenden Sie die Einstellung Icon.

Ändern des Datei-Icons

Das Datei-Icon ist das Icon der ausführbaren Datei, auf die Sie klicken, um das Projekt zu starten.

../../_images/icon_file_icon.png

To do that, you will need to specify the icon when exporting. Go to Project > Export. Assuming you have already created a Windows Desktop preset, select your icon in ICO format in the Application > Icon field.

../../_images/icon_export_settings.webp

Testen des Ergebnisses

Sie können das Projekt jetzt exportieren. Wenn es richtig funktioniert hat, sollten Sie Folgendes sehen:

../../_images/icon_result.png

Bemerkung

If your icon isn't showing up properly try clearing the icon cache. To do so, open the Run dialog and enter ie4uinit.exe -ClearIconCache or ie4uinit.exe -show.