Tools - Build dev (filepatching) with hemtt if installed (#8061)

* Build dev (filepatching) with hemtt if installed

* Update build.py
This commit is contained in:
PabstMirror 2021-01-10 13:28:29 -06:00 committed by GitHub
parent d991f8ebdc
commit 8b8abec70e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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