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.
Checking the stable version of the documentation...
Změna ikony aplikace pro systém Windows
Ve výchozím nastavení je ikonou exportovaného projektu ikona Godotu. S největší pravděpodobností ji budete chtít pro svůj projekt změnit. V systému Windows lze změnit dva typy ikon: ikonu souboru a ikonu hlavního panelu.
Creating a custom ICO file
Poznámka
Since Godot 4.1, Godot can create an ICO file for you based on the icon file defined in the Windows export preset. This icon file can be in PNG, WebP or SVG format. 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. Note that even if Godot creates the ICO file for you, you still need to set up rcedit so that the file icon actually changes.
Windows does not use formats such as PNG or JPEG for application icons. Instead, it uses a Windows-only format called ICO. 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.
`Tento videonávod <https://www.youtube.com/watch?v=uqV3UfM-n5Y>`_ popisuje, jak exportovat soubor ICO pomocí programu GIMP.
Obrázek PNG je také možné převést na soubor ICO vhodný pro hiDPI pomocí tohoto příkazu `ImageMagick <https://www.imagemagick.org/>;`_:
magick convert icon.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico
Depending on which version of ImageMagick you installed, you might need to leave out the magick
and run this command instead:
convert icon.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico
Varování
Aby soubor ICO účinně nahradil výchozí ikonu Godot, musí obsahovat všechny velikosti obsažené ve výchozí ikoně Godot: 16×16, 32×32, 48×48, 64×64, 128×128, 256×256. Pokud soubor ICO neobsahuje všechny velikosti, bude výchozí ikona Godot zachována pro velikosti, které nebyly přepsány.
Výše uvedený příkaz ImageMagick to bere v úvahu.
Změna ikony hlavního panelu
Ikona hlavního panelu je ikona, která se zobrazí na hlavním panelu, když je projekt spuštěný.

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.

Toto nastavení změní ikonu exportované hry pouze v systému Windows. Chcete-li nastavit ikonu pro macOS, použijte Macos Native Icon
. Pro ostatní platformy použijte nastavení Icon
.
Změna ikony souboru
In Godot 3.5 and later, you can change the file icon without external tools using godoticon. Changing the file icon this way should work for executables containing an embedded PCK.
Ikona souboru je ikona spustitelného souboru, na kterou kliknete pro spuštění projektu.

Než jej vyberete v možnostech exportu, budete muset nainstalovat další nástroj s názvem rcedit. Můžete si jej stáhnout zde.
After downloading, you need to tell Godot the path to the rcedit executable on your computer. Go to Editor > Editor Settings > Export > Windows. Click on the folder icon for the rcedit entry. Navigate to and select the rcedit executable.
Poznámka
Uživatelé Linuxu a macOS si také budou muset nainstalovat WINE, aby mohli používat rcedit.
On macOS, make sure to use a 64-bit version of both WINE and rcedit since 32-bit applications aren't supported anymore.

You should now have everything in place to change the file icon. 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.
Varování
All the supplied metadata must be valid. Most importantly, the version
identifiers must take the form major.minor.patch.revision
where
every component is required and is a positive integer. For instance,
1.2.0.0
is valid but 1.2.0
is not.
If you provide invalid metadata in the export preset, the application icon won't change as rcedit will fail to change the executable's metadata.

Poznámka
Pokud rcedit nezmění ikonu, můžete místo toho zkompilovat své vlastní šablony exportu Windows se změněnou ikonou. Chcete-li tak učinit, nahraďte platform/windows/godot.ico svým vlastním souborem ICO před kompilací exportu šablony.
Po dokončení této operace můžete zadat své šablony exportu jako vlastní šablony exportu v předvolbě exportu projektu'Windows.
Testování výsledku
Nyní můžete projekt exportovat. Pokud vše proběhlo správně, měli byste vidět toto:

Poznámka
Pokud se ikona nezobrazuje správně, zkuste ve Windows 10 vymazat mezipaměť ikon. Za tímto účelem otevřete dialogové okno Spustit a zadejte ie4uinit.exe -ClearIconCache
nebo ie4uinit.exe -show
.