Skip to content

Commit

Permalink
Tools - Use hemtt in build.py if installed (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Jan 20, 2021
1 parent f638bba commit 1116413
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
PREFIX = "acre_"
##########################

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)
Expand Down Expand Up @@ -40,6 +52,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
Expand Down

0 comments on commit 1116413

Please sign in to comment.