Exportando para Windows
Ver também
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 Compilando para Windows.
A maneira mais simples de distribuir um jogo para PC é copiar o executável (godot.exe), comprimir a pasta e enviá-la para outra pessoa. Entretanto, muitas vezes isto não é desejado.
A Godot oferece uma abordagem mais elegante para a distribuição de PCs ao utilizar o sistema de exportação. Ao exportar para Windows, o exportador pega todos os arquivos do projeto e cria um arquivo data.pck. Este arquivo é empacotado com um binário especialmente otimizado que é menor, mais rápido e não contém o editor e depurador.
Changing the executable icon
Godot will automatically use whatever image is set as your project's icon in the project settings, and convert it to an ICO file for the exported project. If you want to manually create an ICO file for greater control over how the icon looks at different resolutions then see the Manually changing application icon for Windows page.
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.
Aviso
Se você exportar para Windows com arquivos PCK embutidos, você não poderá assinar o programa pois ele irá quebrar.
No Windows, a incorporação do PCK também é conhecida por causar falsos positivos em programas antivírus. Portanto, é recomendável evitar usá-lo a menos que você esteja distribuindo seu projeto via Steam, pois ele ignora a assinatura de código e as verificações de antivírus.
Configurar
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.
Variáveis de ambiente
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 |
|
Opções de exportação
You can find a full list of export options available in the EditorExportPlatformWindows class reference.