Open dustdfg opened 9 months ago
This is generally mentioned (but not the editor menu, which now is called "Engine Compilation Configuration Editor...") here
This is generally mentioned (but not the editor menu, which now is called "Engine Compilation Configuration Editor...") here
The issue is exactly about the fact that the editor isn't mentioned. But it seems to me that you think that the menu is a built-in custom.py
file generator but it isn't so. The menu generates json file in the following format:
{
"disabled_build_options": {
"module_freetype_enabled": false,
"opengl3": false
},
"disabled_classes": [
"AnimationPlayer",
"AnimationTree"
],
"type": "build_profile"
}
In contrast to a custom.py
file, the menu ("Engine Compilation Configuration Editor...") allows you to disable/enable particular nodes. It is a feature which custom.py
file doesn't have (at least I didn't notice it).
Abilities | cutom.py file |
Engine Compilation Configuration Editor... menu |
---|---|---|
Set "compiler" build options [^1] | ✅ | ❌ |
Disable particular engine modules [^2] | ✅ | ❌ |
Disable particular engine nodes | ❌ | ✅ |
Disable particular engine servers | partially [^3] | ❌ |
Disable particular "highlevel" build options [^4] | ✅ | ✅ |
Automatic detection of what is safe to disable | ❌ | ✅ |
[^1]: Such as target=template_release
and lto=full
[^2]: Those which are in the modules directory. The menu can disable them but does give user control on what to disable and often doesn't disable thing if it isn't used...
[^3]: Build options like disable_3d=yes
can disable server compilation but it is rather "manual" process then systematic approach
[^4]: disable_3d=yes
, disable_advanced_gui=yes
They are used somewhere in the build scripts. For example 3d modules won't be considered for build if disable_3d
is set to yes
even if you didn't manually disable particular 3d modules https://github.com/godotengine/godot/blob/77dcf97d82cbfe4e4615475fa52ca03da645dbd8/modules/gltf/config.py#L1C1-L2C33
My opinion is that it is a very powerful tool but it is hidden and is mentioned almost nowhere. It is sad that there custom.py
and the menu are two separate tools they should be the one tool...
I would create an issue that "hey there two tools which have the same purpose and they doesn't have feature parity" but I am afraid it won't have any sense because one of them is abandoned... I even tried to do something for this part of the engine https://github.com/godotengine/godot/pull/89512 but I am not competent enough and it seems that no one needs this part of the editor... Maybe I am even wrong and they are the same thing... I doesn't know what to believe about this engine...
Then that menu does indeed not belong in this section so the documentation isn't missing this
What you are suggesting is something that needs a proposal, but this isn't missing from this if it doesn't actually provide that functionality
I don't actually remember if compiling with disabled nodes (which only the editor can do) reduces the size of the build but at least it is what I expect. But don't you think that section about optimizing for size would benefit from the thing which can reduce the size of the build?
Disabling classes doesn't reduce size as far as I recall, it stops some binds but it doesn't control what is compiled or not, though I might be wrong, try and see
Disabling classes may result in reduced size (I haven't tested myself but godotengine/godot#62996 had claim of 25% reduction in barebones project). As far as I understand it, all disabled nodes aren't quaranteed to be missing from the build (because some are being depended on by various systems), but some will.
Yeah, I've just compiled bareback export template and got 72 vs 49 MB sizes
I was wrong custom.py
also can disable classes https://github.com/godotengine/godot/pull/50381 scons disable_classes=RayCast2D,Area3D
. Anyway docs should mention ability to disable particular classes and the fact that built-in menu can ease the process with auto-detection
I was wrong
custom.py
also can disable classes godotengine/godot#50381scons disable_classes=RayCast2D,Area3D
. Anyway docs should mention ability to disable particular classes and the fact that built-in menu can ease the process with auto-detection
It looks like this disable_classes
CLI was removed when the editor tool was introduced, so classes can only be disabled through a build profile generated by the editor tool. There may be other things left on the TODO list of the editor tool's original PR...
Your Godot version:
4.2-4.3
Issue description:
I read the pages about compiling my custom exporting templates but there I found how to create my custom
.py
file which will configure what is necessary to compile and what no but then I knew about builtin UI menuProject --> Customize Engine Build Configuration
. I knew about it from godot forum and think it should be added to the docs somewhere if it isn't there now (I tried to find it in the docs but failed. Maybe I overlooked...)URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/contributing/development/compiling/optimizing_for_size.htm
https://docs.godotengine.org/en/stable/contributing/development/compiling/index.html