Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
Export pro systém Windows¶
Viz také
This page describes how to export a Godot project to Windows. If you're looking to compile editor or export template binaries from source instead, read Compiling for Windows.
Nejjednodušší způsob distribuce hry pro PC je zkopírovat spustitelné soubory (godot.exe
pro Windows, godot
pro ostatní), zkomprimovat složku a poslat ji někomu jinému. To však často není žádoucí.
Godot nabízí elegantnější přístup k distribuci na PC při použití systému exportu. Při exportu pro PC (Linux, Windows, macOS) vezme exportér všechny soubory projektu a vytvoří soubor data.pck
. K tomuto souboru je přibalena speciálně optimalizovaná binárka, která je menší, rychlejší a neobsahuje editor a ladicí program.
Code signing¶
Godot is capable of automatic code signing on export. To do this you must have the
Windows SDK
(on Windows) or osslsigncode
(on any other OS) installed. You will also need a package signing certificate,
information on creating one can be found here.
Varování
Pokud exportujete pro systém Windows s vloženými soubory PCK, nebudete moci program podepsat, protože přestane fungovat.
V systému Windows je také známo, že vložení PCK způsobuje falešně pozitivní výsledky antivirových programů. Proto se doporučuje nepoužívat jej, pokud svůj projekt nedistribuujete prostřednictvím služby Steam, protože ta obchází podepisování kódu a antivirové kontroly.
Setup¶
Settings need to be changed in two places. First, in the editor settings, under
Export > Windows. Click on the folder next to the Sign Tool
setting, if
you're using Windows navigate to and select SignTool.exe
, if you're on a different
OS select osslsigncode
.
The second location is the Windows export preset, which can be found in Project > Export.... Add a windows desktop preset if you haven't already. Under options there is a code signing category.
Enabled
must be set to true, and Identity
must be set to the signing
certificate. The other settings can be adjusted as needed. Once this is Done
Godot will sign your project on export.
Environment variables¶
You can use the following environment variables to set export options outside of the editor. During the export process, these override the values that you set in the export menu.
Export option |
Environment variable |
---|---|
Encryption / Encryption Key |
|
Options / Codesign / Identity Type |
|
Options / Codesign / Identity |
|
Options / Codesign / Password |
|