mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
fixed to convert the wu8 file
This commit is contained in:
parent
315b322c53
commit
11b4acc81a
1 changed files with 3 additions and 3 deletions
|
@ -27,7 +27,7 @@ def patch_file(self):
|
||||||
tracks.extend(ctconfig["tracks_list"])
|
tracks.extend(ctconfig["tracks_list"])
|
||||||
total_track = len(tracks)
|
total_track = len(tracks)
|
||||||
|
|
||||||
max_step = len(fc["img"]) + (total_track * 2) + 3 + len("EGFIS")
|
max_step = len(fc["img"]) + total_track + 3 + len("EGFIS")
|
||||||
self.Progress(show=True, indeter=False, statut=self.translate("Conversion des fichiers"), max=max_step, step=0)
|
self.Progress(show=True, indeter=False, statut=self.translate("Conversion des fichiers"), max=max_step, step=0)
|
||||||
|
|
||||||
self.Progress(statut=self.translate("Configuration de LE-CODE"), add=1)
|
self.Progress(statut=self.translate("Configuration de LE-CODE"), add=1)
|
||||||
|
@ -93,9 +93,8 @@ def patch_file(self):
|
||||||
os.remove(track_szs_file)
|
os.remove(track_szs_file)
|
||||||
|
|
||||||
if not(os.path.exists(track_szs_file)):
|
if not(os.path.exists(track_szs_file)):
|
||||||
print(f"convert {track_szs_file}")
|
|
||||||
process_list[track_szs_file] = subprocess.Popen([
|
process_list[track_szs_file] = subprocess.Popen([
|
||||||
"./tools/szs/wszst", "NORMALIZE", track_file, "--DEST",
|
"./tools/szs/wszst", "NORMALIZE", track_wu8_file, "--DEST",
|
||||||
"./file/Track/%N.szs", "--szs", "--overwrite", "--autoadd-path",
|
"./file/Track/%N.szs", "--szs", "--overwrite", "--autoadd-path",
|
||||||
"./file/auto-add/"], creationflags=CREATE_NO_WINDOW, stderr=subprocess.PIPE)
|
"./file/auto-add/"], creationflags=CREATE_NO_WINDOW, stderr=subprocess.PIPE)
|
||||||
break
|
break
|
||||||
|
@ -108,6 +107,7 @@ def patch_file(self):
|
||||||
stderr = process_list[process].stderr.read()
|
stderr = process_list[process].stderr.read()
|
||||||
if b"wszst: ERROR" in stderr: # Error occured
|
if b"wszst: ERROR" in stderr: # Error occured
|
||||||
process_list.pop(process)
|
process_list.pop(process)
|
||||||
|
print(process, stderr)
|
||||||
os.remove(process)
|
os.remove(process)
|
||||||
error_count += 1
|
error_count += 1
|
||||||
if error_count > error_max: # Too much track wasn't correctly converted
|
if error_count > error_max: # Too much track wasn't correctly converted
|
||||||
|
|
Loading…
Reference in a new issue