ct_icon.tpl.png tried to be converted to tpl before being created, causing a crash

This commit is contained in:
raphael60650 2021-05-27 13:58:04 +02:00
parent 111a4a6a3a
commit 1657b00746

View file

@ -21,18 +21,18 @@ def patch_file(self):
self.Progress(statut=self.translate("Configuration de LE-CODE"), add=1) self.Progress(statut=self.translate("Configuration de LE-CODE"), add=1)
self.create_lecode_config() self.create_lecode_config()
self.Progress(statut=self.translate("Création de ct_icon.png"), add=1)
self.patch_ct_icon()
self.Progress(statut=self.translate("Création des images descriptives"), add=1)
self.patch_img_desc()
for i, file in enumerate(fc["img"]): for i, file in enumerate(fc["img"]):
self.Progress(statut=self.translate("Conversion des images")+f"\n({i + 1}/{len(fc['img'])}) {file}", add=1) self.Progress(statut=self.translate("Conversion des images")+f"\n({i + 1}/{len(fc['img'])}) {file}", add=1)
if not (os.path.exists("./file/" + get_filename(file))): if not (os.path.exists("./file/" + get_filename(file))):
subprocess.call(["./tools/szs/wimgt", "ENCODE", "./file/" + file, "-x", fc["img"][file]] subprocess.call(["./tools/szs/wimgt", "ENCODE", "./file/" + file, "-x", fc["img"][file]]
, creationflags=CREATE_NO_WINDOW) , creationflags=CREATE_NO_WINDOW)
self.Progress(statut=self.translate("Création des images descriptives"), add=1)
self.patch_img_desc()
self.Progress(statut=self.translate("Création de ct_icon.png"), add=1)
self.patch_ct_icon()
for file in glob.glob(self.path_mkwf+"/files/Scene/UI/MenuSingle_?.szs"): for file in glob.glob(self.path_mkwf+"/files/Scene/UI/MenuSingle_?.szs"):
self.patch_bmg(file) self.patch_bmg(file)