Skip to content

Commit

Permalink
Merge pull request #74980 from YuriSizov/build-err-without-required-e…
Browse files Browse the repository at this point in the history
…ditor-modules

Err when trying to build the editor without its required modules
  • Loading branch information
akien-mga committed Apr 26, 2023
2 parents 51951a5 + a145194 commit c16821e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,15 @@ if selected_platform in platform_list:
env.module_list = modules_enabled
methods.sort_module_list(env)

if env.editor_build:
# Add editor-specific dependencies to the dependency graph.
env.module_add_dependencies("editor", ["freetype", "svg"])

# And check if they are met.
if not env.module_check_dependencies("editor"):
print("Not all modules required by editor builds are enabled.")
Exit(255)

methods.generate_version_header(env.module_version_string)

env["PROGSUFFIX_WRAP"] = suffix + env.module_version_string + ".console" + env["PROGSUFFIX"]
Expand All @@ -851,15 +860,15 @@ if selected_platform in platform_list:

if env["disable_3d"]:
if env.editor_build:
print("Build option 'disable_3d=yes' cannot be used for editor builds, but only for export templates.")
print("Build option 'disable_3d=yes' cannot be used for editor builds, only for export template builds.")
Exit(255)
else:
env.Append(CPPDEFINES=["_3D_DISABLED"])
if env["disable_advanced_gui"]:
if env.editor_build:
print(
"Build option 'disable_advanced_gui=yes' cannot be used for editor builds, "
"but only for export templates."
"only for export template builds."
)
Exit(255)
else:
Expand Down

0 comments on commit c16821e

Please sign in to comment.