Disable some unsafe CLI arguments in template builds by default.

This commit is contained in:
Pāvels Nadtočajevs
2025-10-22 11:09:53 +03:00
parent 0fdbf050e0
commit 29da94290f
8 changed files with 130 additions and 49 deletions

View File

@ -239,7 +239,14 @@ opts.Add(BoolVariable("disable_physics_3d", "Disable 3D physics nodes and server
opts.Add(BoolVariable("disable_navigation_2d", "Disable 2D navigation features", False))
opts.Add(BoolVariable("disable_navigation_3d", "Disable 3D navigation features", False))
opts.Add(BoolVariable("disable_xr", "Disable XR nodes and server", False))
opts.Add(BoolVariable("disable_overrides", "Disable project settings overrides and related CLI arguments", False))
opts.Add(BoolVariable("disable_overrides", "Disable project settings overrides (override.cfg)", False))
opts.Add(
BoolVariable(
"disable_path_overrides",
"Disable CLI arguments to override project path/main pack/scene and run scripts (export template only)",
True,
)
)
opts.Add("build_profile", "Path to a file containing a feature build profile", "")
opts.Add("custom_modules", "A list of comma-separated directory paths containing custom modules to build.", "")
opts.Add(BoolVariable("custom_modules_recursive", "Detect custom modules recursively for each specified path.", True))
@ -1033,6 +1040,9 @@ if env["brotli"]:
if not env["disable_overrides"]:
env.Append(CPPDEFINES=["OVERRIDE_ENABLED"])
if env.editor_build or not env["disable_path_overrides"]:
env.Append(CPPDEFINES=["OVERRIDE_PATH_ENABLED"])
if not env["verbose"]:
methods.no_verbose(env)