Skip to content

Commit

Permalink
Include game version in linux otr builds (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts authored Jul 18, 2022
1 parent 97d1f0e commit 046b7e8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OTRExporter/extract_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
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)

Expand Down

0 comments on commit 046b7e8

Please sign in to comment.