mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
removed temporary directory that were used with previous wszst subprocess call with cwd in the game path
This commit is contained in:
parent
ebca6c3335
commit
1bb84fce32
2 changed files with 4 additions and 11 deletions
|
@ -234,10 +234,7 @@ class Game:
|
||||||
:param auto_add_dir: autoadd directory
|
:param auto_add_dir: autoadd directory
|
||||||
"""
|
"""
|
||||||
if os.path.exists(auto_add_dir): shutil.rmtree(auto_add_dir)
|
if os.path.exists(auto_add_dir): shutil.rmtree(auto_add_dir)
|
||||||
if not os.path.exists(self.path + "/tmp/"): os.makedirs(self.path + "/tmp/")
|
wszst.szs.autoadd(self.path, auto_add_dir)
|
||||||
wszst.szs.autoadd(self.path, get_nodir(self.path) + "/tmp/auto-add/")
|
|
||||||
shutil.move(self.path + "/tmp/auto-add/", auto_add_dir)
|
|
||||||
shutil.rmtree(self.path + "/tmp/")
|
|
||||||
|
|
||||||
def patch_bmg(self, gamefile: str) -> None:
|
def patch_bmg(self, gamefile: str) -> None:
|
||||||
"""
|
"""
|
||||||
|
@ -303,16 +300,12 @@ class Game:
|
||||||
|
|
||||||
f.write(f" {track_id}\t= {prefix}{track_name}\n")
|
f.write(f" {track_id}\t= {prefix}{track_name}\n")
|
||||||
|
|
||||||
if not os.path.exists("./file/tmp/"): os.makedirs("./file/tmp/")
|
|
||||||
|
|
||||||
shutil.copyfile(gamefile + ".d/message/Common.bmg", "./file/tmp/Common.bmg")
|
|
||||||
bmgcommon = wszst.ctc.patch_bmg(ctfile="./file/CTFILE.txt",
|
bmgcommon = wszst.ctc.patch_bmg(ctfile="./file/CTFILE.txt",
|
||||||
bmgs=["./file/tmp/Common.bmg", "./file/ExtraCommon.txt"])
|
bmgs=[gamefile + ".d/message/Common.bmg", "./file/ExtraCommon.txt"])
|
||||||
rbmgcommon = wszst.ctc.patch_bmg(ctfile="./file/RCTFILE.txt",
|
rbmgcommon = wszst.ctc.patch_bmg(ctfile="./file/RCTFILE.txt",
|
||||||
bmgs=["./file/tmp/Common.bmg", "./file/ExtraCommon.txt"])
|
bmgs=[gamefile + ".d/message/Common.bmg", "./file/ExtraCommon.txt"])
|
||||||
|
|
||||||
shutil.rmtree(gamefile + ".d")
|
shutil.rmtree(gamefile + ".d")
|
||||||
os.remove("./file/tmp/Common.bmg")
|
|
||||||
os.remove("./file/ExtraCommon.txt")
|
os.remove("./file/ExtraCommon.txt")
|
||||||
|
|
||||||
def finalise(file, bmgtext, replacement_list=None):
|
def finalise(file, bmgtext, replacement_list=None):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from . import *
|
from . import *
|
||||||
|
|
||||||
|
|
||||||
def szs_extract(file: str, dest_dir: str) -> None:
|
def extract(file: str, dest_dir: str) -> None:
|
||||||
"""
|
"""
|
||||||
Extract an szs in a directory
|
Extract an szs in a directory
|
||||||
:param file: .szs file
|
:param file: .szs file
|
||||||
|
|
Loading…
Reference in a new issue