为 Windows 导出
参见
这个页面描述的是如何将 Godot 项目导出到 Windows。如果你想要找的是从源码编译编辑器或导出模板二进制文件,请阅读 为 Windows 平台编译。
在 PC 上分发游戏的最简单方法是复制可执行文件(godot.exe
),将文件夹压缩,然后发送给别人。然而,这样一般并不理想。
Godot 在使用导出系统时,为 PC 分发提供了一种更为优雅的方法。为 Windows 导出时,导出器将提取所有项目文件并创建一个 data.pck
文件。该文件与特别优化的二进制文件捆绑在一起,更小、更快,并且不包含编辑器和调试器。
启用代码签名
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.
警告
如果你用内嵌的PCK文件导出到Windows, 你将无法签名程序, 因为它会崩溃.
在Windows上,PCK嵌入也会在杀毒软件中造成误报. 因此, 建议避免使用它, 除非你的项目通过Steam发布, 因为这样就绕过了代码签名和防病毒检查.
场景布置
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.
环境变量
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.
导出选项 | 环境变量 |
---|---|
加密 / 密钥 |
|
选项 / 代码签名 / 身份类型 |
|
选项 / 代码签名 / 身份 |
|
选项 / 代码签名 / 密码 |
|
© 版权所有 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision b1c660f7
.
Built with Sphinx using a theme provided by Read the Docs.