+3 votes

I am learning how to compile Godot from source code on Windows, using the docs found here and here.

Following the docs, I have successfully compiled the Godot executable from the command line using scons, in conjunction with both Visual Studio and WinGW, and with various optimizations (for example, tools=no, disable_3d=yes, and disable_advanced_gui=yes)

My question concerns how I can now export my actual project using one of these custom builds of Godot?

I know that I should be doing this from the command line, since the editor is disabled in the custom build, and the command would be something like:

godot --path <path_to_project\project.godot> --export <export_preset_name> game_name.exe

I already have my PATH environment variable set up to reference the custom build of Godot in the command prompt.

The problem I'm running into is that I don't know how export presets and export templates fit into this picture, or how to set them up for my custom build.

According to the docs, export templates are "optimized versions of the engine without the editor pre-compiled for each platform".

If that's the case, I don't want to use one of Godot's default export templates, right? I need to somehow target the custom version of Godot that I compiled as the export template itself?

I think this means I need to create a new folder at %AppData%\Godot\Template beside the other template folders. I could call it, for example, 3.1.1.custom_build, and move my custom version of Godot there, renaming it windows_64_release.exe so it's associated with the "Windows Desktop" preset.

But then the question becomes, how can you specify in the command line to use that template folder and not another one?

The only parameters mentioned in the export doc are --export and --path. It's unclear how to link a preset to a custom export template.

So, my question boils down to this: How do you associate custom export templates to presets if you're not using a version of Godot that has the editor enabled?

asked Sep 3, 2019 in Engine by Diet Estus (1,494 points)
edited Sep 3, 2019 by Diet Estus

Either it's not documented or the command line misses that feature? I never really tried this tbh

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.