diff --git a/SConstruct b/SConstruct index 442fa51b4..7f2b9b0af 100644 --- a/SConstruct +++ b/SConstruct @@ -367,11 +367,12 @@ if methods.get_cmdline_bool("fast_unsafe", env_base["target"] == "debug"): if env_base["use_precise_math_checks"]: env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"]) -if not env_base.File("#main/splash_editor.png").exists(): - # Force disabling editor splash if missing. - env_base["no_editor_splash"] = True -if env_base["no_editor_splash"]: - env_base.Append(CPPDEFINES=["NO_EDITOR_SPLASH"]) +if env_base["tools"]: + if not env_base.File("#main/splash_editor.png").exists(): + # Force disabling editor splash if missing. + env_base["no_editor_splash"] = True + if env_base["no_editor_splash"]: + env_base.Append(CPPDEFINES=["NO_EDITOR_SPLASH"]) if not env_base["deprecated"]: env_base.Append(CPPDEFINES=["DISABLE_DEPRECATED"]) diff --git a/main/SCsub b/main/SCsub index 0cffeaca5..6702600a6 100644 --- a/main/SCsub +++ b/main/SCsub @@ -12,7 +12,7 @@ env.add_source_files(env.main_sources, "*.cpp") env.Depends("#main/splash.gen.h", "#main/splash.png") env.CommandNoCache("#main/splash.gen.h", "#main/splash.png", run_in_subprocess(main_builders.make_splash)) -if not env["no_editor_splash"]: +if env["tools"] and not env["no_editor_splash"]: env.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png") env.CommandNoCache( "#main/splash_editor.gen.h", "#main/splash_editor.png", run_in_subprocess(main_builders.make_splash_editor) diff --git a/main/main.cpp b/main/main.cpp index fde068306..892fa00d0 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -82,7 +82,7 @@ #include "editor/progress_dialog.h" #include "editor/project_manager.h" #include "editor/script_editor_debugger.h" -#ifndef NO_EDITOR_SPLASH +#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH) #include "main/splash_editor.gen.h" #endif #endif