diff options
| author | GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> | 2022-07-19 01:33:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-18 19:33:36 -0400 |
| commit | 4d985cd534a3e691bf6c2233902be5708c1d19df (patch) | |
| tree | 4d850d83ca2db1921d3dad1e4abc39d3c99c89d1 /extract_assets.py | |
| parent | 10a8d54c963dcf57d47321fea7dc9622fda52b37 (diff) | |
Include game version in linux otr builds (#826)
Diffstat (limited to 'extract_assets.py')
| -rwxr-xr-x | extract_assets.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extract_assets.py b/extract_assets.py index 67b4ca6..6862fb0 100755 --- a/extract_assets.py +++ b/extract_assets.py @@ -4,10 +4,15 @@ import os, sys, shutil import shutil from rom_info import Z64Rom import rom_chooser +import struct def BuildOTR(xmlPath, rom): shutil.copytree("assets", "Extract/assets") + checksum = int(Z64Rom(rom).checksum.value, 16) + with open("Extract/version", "wb") as f: + f.write(struct.pack('<L', checksum)) + execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPDTR/ZAPD.out" execStr += " ed -i %s -b %s -fl CFG/filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, rom) |
