How do I use "Build Configuration Profiles" in Godot 4?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By popcar2

In Godot 4, there’s an option to create a custom build configuration file for your project that supposedly allows you to compile the engine yourself to only get the parts you want, such as disabling 3D and the Vulkan renderer. I never really understood how to use it and it doesn’t seem to exist in the docs. Any help? How much benefit should I expect from using this in terms of export size?

The option I’m talking about is in Project --> Customize Engine Build Configuration...

A screenshot of the build configuration profile window

:bust_in_silhouette: Reply From: brettmakesgames

I’ve been curious about this too, so I looked into it. From what I understand, creating a custom build profile allows you to compile a custom version of the engine and export templates with only the features you (or your game) needs.

The screenshot you posted is an interface to allow you to create a .build file that’s used with the scons compiler. Example:

scons p=windows target=release tools=no build_feature_profile="soso.build"

Here’s the PR that introduce the functionality.

It seems like it might be helpful for reducing export sizes. It does not appear to improve performance.

I asked about it a while ago, too. Calinou said he doesn’t recommend using it yet, and that it doesn’t reduce binary size as much as disabling options using scons arguments: Documentation pages to add or update for Godot 4.0 · Issue #5121 · godotengine/godot-docs · GitHub

popcar2 | 2023-04-01 13:57

1 Like

build_feature_profile was renamed to build_profile

so the usage is now:

scons p=windows target=release tools=no build_profile="soso.build"
2 Likes