Update extract_assets.py
This commit is contained in:
parent
64327fafb1
commit
4f1fe0189c
|
@ -4,11 +4,13 @@ import argparse, json, os, signal, time, sys, shutil
|
||||||
from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError
|
from multiprocessing import Pool, cpu_count, Event, Manager, ProcessError
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
romPath = "..\\soh\\baserom_non_mq.z64"
|
||||||
|
|
||||||
def BuildOTR(xmlPath):
|
def BuildOTR(xmlPath):
|
||||||
shutil.copytree("assets", "Extract/assets")
|
shutil.copytree("assets", "Extract/assets")
|
||||||
|
|
||||||
execStr = "x64\\Release\\ZAPD.exe" if sys.platform == "win32" else "../ZAPD/ZAPD.out"
|
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)
|
print(execStr)
|
||||||
exitValue = os.system(execStr)
|
exitValue = os.system(execStr)
|
||||||
|
@ -30,6 +32,7 @@ def main():
|
||||||
xmlVer = "GC_NMQ_PAL_F"
|
xmlVer = "GC_NMQ_PAL_F"
|
||||||
elif (args.version == "dbg_mq"):
|
elif (args.version == "dbg_mq"):
|
||||||
xmlVer = "GC_MQ_D"
|
xmlVer = "GC_MQ_D"
|
||||||
|
romVer = "..\\soh\\baserom_mq.z64"
|
||||||
|
|
||||||
if (os.path.exists("Extract")):
|
if (os.path.exists("Extract")):
|
||||||
shutil.rmtree("Extract")
|
shutil.rmtree("Extract")
|
||||||
|
@ -37,4 +40,4 @@ def main():
|
||||||
BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\")
|
BuildOTR("..\\soh\\assets\\xml\\" + xmlVer + "\\")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue