From abff2b3fc41b54eb3cd0432fe310b47f17f64398 Mon Sep 17 00:00:00 2001 From: jyelon Date: Thu, 19 Jun 2025 20:54:21 -0400 Subject: [PATCH] Modified to include its own copy of UnrealEngine --- build.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index e6db71aa..a9b05931 100755 --- a/build.py +++ b/build.py @@ -118,7 +118,7 @@ def autodetect_system_config(): config.INTEGRATION = os.path.dirname(os.path.abspath(sys.argv[0])) if not Path(f"{config.INTEGRATION}/Source/Integration").is_dir(): sys.exit(f"Integration repository is not valid: {config.INTEGRATION}") - config.UNREALENGINE = os.path.join(config.INTEGRATION, "UnrealEngine") + config.UNREALENGINE = config.INTEGRATION + ".UE" # Configure other parameters. if sys.platform == "windows": config.OS = "Windows" @@ -166,9 +166,11 @@ def unzip_unreal_engine_and_apply_patch(): version = z.namelist()[0].split('/')[0] if not fnmatch.fnmatch(version, 'UnrealEngine-*-release'): sys.exit("UnrealEngine.zip does not contain UnrealEngine-*-release") - shell(INTEGRATION, f"rm -rf {version}") - shell(INTEGRATION, f"unzip UnrealEngine.zip") - shell(INTEGRATION, f"mv {version} UnrealEngine") + unrealversion = os.path.join(INTEGRATION, version) + shutil.rmtree(UNREALENGINE, ignore_errors=True) + shutil.rmtree(unrealversion, ignore_errors=True) + shell(INTEGRATION, "unzip UnrealEngine.zip") + Path(unrealversion).rename(UNREALENGINE) shell(UNREALENGINE, f"patch -p1 < {INTEGRATION}/EnginePatches/EnginePatch")