mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 03:08:29 +02:00
fixed some problem with new subprocess.call, causing some file to go inside the wrong directory
some error with bmg file could appear if files already existed wu8 file were converted to bz instead of szs
This commit is contained in:
parent
e79075555a
commit
3d703932ca
1 changed files with 5 additions and 4 deletions
9
main.pyw
9
main.pyw
|
@ -66,15 +66,16 @@ class ClassApp():
|
|||
def patch_file(self):
|
||||
with open("./convert_file.json") as f: fc = json.load(f)
|
||||
for file in fc["img"]:
|
||||
print(get_filename(file))
|
||||
if not(os.path.exists("./file/"+get_filename(file))):
|
||||
subprocess.call(["wimgt", "ENCODE", "./file/"+file, "-x", fc["img"][file]])
|
||||
|
||||
for file in fc["bmg"]:
|
||||
if not(os.path.exists("./file/"+get_filename(file))):
|
||||
if not(os.path.exists("./file/"+get_filename(file)+".bmg")):
|
||||
subprocess.call(["wbmgt", "ENCODE", "./file/"+file])
|
||||
|
||||
subprocess.call(["wszst", "NORMALIZE", "./file/Track-WU8/*.wu8", "-d", "./file/Track/", "--szs", "--overwrite",
|
||||
"--autoadd-path", self.path_mkwf+"/files/Race/Course/"])
|
||||
subprocess.call(["wszst", "NORMALIZE", "./file/Track-WU8/*.wu8", "-d", "./file/Track/%N.szs", "--szs",
|
||||
"--overwrite", "--autoadd-path", self.path_mkwf+"/files/Race/Course/"])
|
||||
|
||||
|
||||
def install_mod(self):
|
||||
|
@ -112,7 +113,7 @@ class ClassApp():
|
|||
|
||||
print(extracted_file)
|
||||
for file in extracted_file:
|
||||
subprocess.call(["wszst", "CREATE", file+".d", "-d", "file", "--overwrite"])
|
||||
subprocess.call(["wszst", "CREATE", file+".d", "-d", file, "--overwrite"])
|
||||
if os.path.exists(file+".d"): shutil.rmtree(file+".d")
|
||||
|
||||
subprocess.call(["wstrt", "patch", self.path_mkwf+"/sys/main.dol", "--clean-dol", "--add-lecode"])
|
||||
|
|
Loading…
Reference in a new issue