You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #104148 from YeldhamDev/scons_move_env_checks
Make SConstruct file check some envs before querying modules
This commit is contained in:
50
SConstruct
50
SConstruct
@@ -930,6 +930,31 @@ suffix += env.extra_suffix
|
|||||||
sys.path.remove(tmppath)
|
sys.path.remove(tmppath)
|
||||||
sys.modules.pop("detect")
|
sys.modules.pop("detect")
|
||||||
|
|
||||||
|
if env["disable_3d"]:
|
||||||
|
if env.editor_build:
|
||||||
|
print_error("Build option `disable_3d=yes` cannot be used for editor builds, only for export template builds.")
|
||||||
|
Exit(255)
|
||||||
|
else:
|
||||||
|
env.Append(CPPDEFINES=["_3D_DISABLED"])
|
||||||
|
env["disable_xr"] = True
|
||||||
|
if env["disable_advanced_gui"]:
|
||||||
|
if env.editor_build:
|
||||||
|
print_error(
|
||||||
|
"Build option `disable_advanced_gui=yes` cannot be used for editor builds, only for export template builds."
|
||||||
|
)
|
||||||
|
Exit(255)
|
||||||
|
else:
|
||||||
|
env.Append(CPPDEFINES=["ADVANCED_GUI_DISABLED"])
|
||||||
|
if env["disable_xr"]:
|
||||||
|
env.Append(CPPDEFINES=["XR_DISABLED"])
|
||||||
|
if env["minizip"]:
|
||||||
|
env.Append(CPPDEFINES=["MINIZIP_ENABLED"])
|
||||||
|
if env["brotli"]:
|
||||||
|
env.Append(CPPDEFINES=["BROTLI_ENABLED"])
|
||||||
|
|
||||||
|
if not env["verbose"]:
|
||||||
|
methods.no_verbose(env)
|
||||||
|
|
||||||
modules_enabled = OrderedDict()
|
modules_enabled = OrderedDict()
|
||||||
env.module_dependencies = {}
|
env.module_dependencies = {}
|
||||||
env.module_icons_paths = []
|
env.module_icons_paths = []
|
||||||
@@ -999,31 +1024,6 @@ env["SHLIBSUFFIX"] = suffix + env["SHLIBSUFFIX"]
|
|||||||
env["OBJPREFIX"] = env["object_prefix"]
|
env["OBJPREFIX"] = env["object_prefix"]
|
||||||
env["SHOBJPREFIX"] = env["object_prefix"]
|
env["SHOBJPREFIX"] = env["object_prefix"]
|
||||||
|
|
||||||
if env["disable_3d"]:
|
|
||||||
if env.editor_build:
|
|
||||||
print_error("Build option `disable_3d=yes` cannot be used for editor builds, only for export template builds.")
|
|
||||||
Exit(255)
|
|
||||||
else:
|
|
||||||
env.Append(CPPDEFINES=["_3D_DISABLED"])
|
|
||||||
env["disable_xr"] = True
|
|
||||||
if env["disable_advanced_gui"]:
|
|
||||||
if env.editor_build:
|
|
||||||
print_error(
|
|
||||||
"Build option `disable_advanced_gui=yes` cannot be used for editor builds, only for export template builds."
|
|
||||||
)
|
|
||||||
Exit(255)
|
|
||||||
else:
|
|
||||||
env.Append(CPPDEFINES=["ADVANCED_GUI_DISABLED"])
|
|
||||||
if env["disable_xr"]:
|
|
||||||
env.Append(CPPDEFINES=["XR_DISABLED"])
|
|
||||||
if env["minizip"]:
|
|
||||||
env.Append(CPPDEFINES=["MINIZIP_ENABLED"])
|
|
||||||
if env["brotli"]:
|
|
||||||
env.Append(CPPDEFINES=["BROTLI_ENABLED"])
|
|
||||||
|
|
||||||
if not env["verbose"]:
|
|
||||||
methods.no_verbose(env)
|
|
||||||
|
|
||||||
GLSL_BUILDERS = {
|
GLSL_BUILDERS = {
|
||||||
"RD_GLSL": env.Builder(
|
"RD_GLSL": env.Builder(
|
||||||
action=env.Run(glsl_builders.build_rd_headers),
|
action=env.Run(glsl_builders.build_rd_headers),
|
||||||
|
|||||||
Reference in New Issue
Block a user