From 584cde6f91596117f0d6f22a9732a4a7871c51f1 Mon Sep 17 00:00:00 2001 From: jyelon Date: Wed, 11 Jun 2025 19:30:44 -0400 Subject: [PATCH] Add fix to build UBT itself --- build.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build.py b/build.py index 0466869d..0ee63b5e 100755 --- a/build.py +++ b/build.py @@ -11,7 +11,7 @@ # - Applies patch to Unreal Engine source. # - Runs Setup.sh in the UnrealEngine repository # - Builds luprex -# - Builds ShaderCompileWorker +# - Builds Unreal Build Tool and Shader Compile Worker # - Builds Unreal Engine and Unreal Editor # - Builds integration # @@ -240,14 +240,11 @@ def generate_integration_code_workspace_ubt(): workspace.rename(workspace_ubt) -def build_shadercompileworker(): +def build_unrealbuildtool(): """ - I have no idea why shadercompileworker isn't built automatically by - unreal's build system, but we have to do this separately. + Build the unreal build tool itself, also including shader compile worker. """ - shell(UNREALENGINE, f"{UNREALENGINE}/Engine/Build/BatchFiles/{BUILD_BAT} -waitmutex ShaderCompileWorker {OS} Shipping") - Path(f"Engine/Binaries/{OS}/ShaderCompileWorker{DOT_EXE}").unlink(missing_ok=True) - shutil.copyfile(f"{UNREALENGINE}/Engine/Binaries/{OS}/ShaderCompileWorker-{OS}-Shipping{DOT_EXE}", f"{UNREALENGINE}/Engine/Binaries/{OS}/ShaderCompileWorker{DOT_EXE}") + shell(UNREALENGINE, f"{UNREALENGINE}/Engine/Build/BatchFiles/{BUILD_BAT} -buildubt ShaderCompileWorker {OS} Development") def build_luprex_and_integration(): @@ -315,13 +312,16 @@ CONFIG = autodetect_system_config() store_system_config_in_globals(CONFIG) os.chdir(f"{INTEGRATION}/EnginePatches") +if MODE == "experiment": + build_unrealbuildtool() + if MODE == "all": generate_buildconfiguration_xml() generate_lpx_paths() patch_unrealengine_source_code() generate_integration_uproject() run_unrealengine_setup_bat() - build_shadercompileworker() + build_unrealbuildtool() if MODE in ["all", "c++"]: build_luprex_and_integration()