From 8b8abec70ee329f850432599da771f5716b2c4ca Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 10 Jan 2021 13:28:29 -0600 Subject: [PATCH] Tools - Build dev (filepatching) with hemtt if installed (#8061) * Build dev (filepatching) with hemtt if installed * Update build.py --- tools/build.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/build.py b/tools/build.py index 9151daa095..257fbff224 100644 --- a/tools/build.py +++ b/tools/build.py @@ -9,6 +9,17 @@ MAINPREFIX = "z" PREFIX = "ace_" ########################## +def tryHemttBuild(projectpath): + hemttExe = os.path.join(projectpath, "hemtt.exe") + if os.path.isfile(hemttExe): + os.chdir(projectpath) + ret = subprocess.call([hemttExe, "pack"], stderr=subprocess.STDOUT) + print("Using hemtt: {}".format(ret)); + return True + else: + print("hemtt not installed"); + return False + def mod_time(path): if not os.path.isdir(path): return os.path.getmtime(path) @@ -40,6 +51,8 @@ def main(): projectpath = os.path.dirname(os.path.dirname(scriptpath)) addonspath = os.path.join(projectpath, "addons") + if (tryHemttBuild(projectpath)): return + os.chdir(addonspath) made = 0