Update extract_assets.py

This commit is contained in:
MegaMech 2022-04-07 02:03:07 -07:00 committed by GitHub
parent 64327fafb1
commit 4f1fe0189c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -4,11 +4,13 @@ import argparse, json, os, signal, time, sys, shutil
from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError
import shutil
romPath = "..\\soh\\baserom_non_mq.z64"
def BuildOTR(xmlPath):
shutil.copytree("assets", "Extract/assets")
execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out"
execStr += " ed -i %s -b baserom.z64 -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath)
execStr += " ed -i %s -b %s -fl CFG\\filelists -o placeholder -osf placeholder -gsf 1 -rconf CFG/Config.xml -se OTR" % (xmlPath, romPath)
print(execStr)
exitValue = os.system(execStr)
@ -30,6 +32,7 @@ def main():
xmlVer = "GC_NMQ_PAL_F"
elif (args.version == "dbg_mq"):
xmlVer = "GC_MQ_D"
romVer = "..\\soh\\baserom_mq.z64"
if (os.path.exists("Extract")):
shutil.rmtree("Extract")
@ -37,4 +40,4 @@ def main():
BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\")
if __name__ == "__main__":
main()
main()