mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-02 10:48:29 +02:00
progress bar path are now relative to the extracted game path
This commit is contained in:
parent
6fe1223c8b
commit
162e56b1e0
5 changed files with 9 additions and 6 deletions
|
@ -109,7 +109,7 @@
|
||||||
"SETTINGS_FILE": "Settings file",
|
"SETTINGS_FILE": "Settings file",
|
||||||
"EXPORT_SETTINGS": "Export settings",
|
"EXPORT_SETTINGS": "Export settings",
|
||||||
"IMPORT_SETTINGS": "Import settings",
|
"IMPORT_SETTINGS": "Import settings",
|
||||||
"PREPARING_RIIVOLUTION": "Preparing for riivolution",
|
"PREPARING_RIIVOLUTION": "Preparing for Riivolution",
|
||||||
"CONVERTING_TO_RIIVOLUTION": "Converting to Riivolution patch",
|
"CONVERTING_TO_RIIVOLUTION": "Converting to Riivolution patch",
|
||||||
"PATCHS": "patchs",
|
"PATCHS": "patchs",
|
||||||
"PRE-PATCHS": "pre-patchs",
|
"PRE-PATCHS": "pre-patchs",
|
||||||
|
|
|
@ -428,13 +428,15 @@ class ProgressBar(ttk.LabelFrame):
|
||||||
self.progress_bar_part = ttk.Progressbar(self, orient="horizontal")
|
self.progress_bar_part = ttk.Progressbar(self, orient="horizontal")
|
||||||
self.progress_bar_part.grid(row=1, column=1, sticky="nsew")
|
self.progress_bar_part.grid(row=1, column=1, sticky="nsew")
|
||||||
|
|
||||||
self.title = ttk.Label(self, text="", anchor="center", font=("TkDefaultFont", 10), wraplength=350)
|
self.title = ttk.Label(self, text="", anchor=tkinter.CENTER, justify=tkinter.CENTER,
|
||||||
|
font=("TkDefaultFont", 10), wraplength=350)
|
||||||
self.title.grid(row=2, column=1, sticky="nsew")
|
self.title.grid(row=2, column=1, sticky="nsew")
|
||||||
|
|
||||||
self.progress_bar_step = ttk.Progressbar(self, orient="horizontal")
|
self.progress_bar_step = ttk.Progressbar(self, orient="horizontal")
|
||||||
self.progress_bar_step.grid(row=3, column=1, sticky="nsew")
|
self.progress_bar_step.grid(row=3, column=1, sticky="nsew")
|
||||||
|
|
||||||
self.description = ttk.Label(self, text="", anchor="center", font=("TkDefaultFont", 10), wraplength=350)
|
self.description = ttk.Label(self, text="", anchor=tkinter.CENTER, justify=tkinter.CENTER,
|
||||||
|
font=("TkDefaultFont", 10), wraplength=350)
|
||||||
self.description.grid(row=4, column=1, sticky="nsew")
|
self.description.grid(row=4, column=1, sticky="nsew")
|
||||||
|
|
||||||
def set_state(self, state: InstallerState) -> None:
|
def set_state(self, state: InstallerState) -> None:
|
||||||
|
|
|
@ -115,7 +115,8 @@ class ExtractedGame:
|
||||||
|
|
||||||
for extracted_szs in filter(lambda path: path.is_dir(), self.path.rglob("*.d")):
|
for extracted_szs in filter(lambda path: path.is_dir(), self.path.rglob("*.d")):
|
||||||
# for every directory that end with a .d in the extracted game, recreate the szs
|
# for every directory that end with a .d in the extracted game, recreate the szs
|
||||||
yield Progress(description=_("REPACKING", ' "', extracted_szs, '"'), determinate=False)
|
yield Progress(description=_("REPACKING", ' "', extracted_szs.relative_to(self.path), '"'),
|
||||||
|
determinate=False)
|
||||||
|
|
||||||
szs.create(extracted_szs, extracted_szs.with_suffix(".szs"), overwrite=True)
|
szs.create(extracted_szs, extracted_szs.with_suffix(".szs"), overwrite=True)
|
||||||
shutil.rmtree(str(extracted_szs.resolve()))
|
shutil.rmtree(str(extracted_szs.resolve()))
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PatchDirectory(PatchObject):
|
||||||
"""
|
"""
|
||||||
patch a subdirectory of the game with the PatchDirectory
|
patch a subdirectory of the game with the PatchDirectory
|
||||||
"""
|
"""
|
||||||
yield Progress(description=_("PATCHING", " ", game_subpath))
|
yield Progress(description=_("PATCHING", ' "', game_subpath.relative_to(extracted_game.path), '"'))
|
||||||
|
|
||||||
# check if the directory should be patched
|
# check if the directory should be patched
|
||||||
if not self.is_enabled(extracted_game): return
|
if not self.is_enabled(extracted_game): return
|
||||||
|
|
|
@ -82,7 +82,7 @@ class PatchFile(PatchObject):
|
||||||
"""
|
"""
|
||||||
patch a subfile of the game with the PatchFile
|
patch a subfile of the game with the PatchFile
|
||||||
"""
|
"""
|
||||||
yield Progress(description=translate("PATCHING", " ", game_subpath))
|
yield Progress(description=translate("PATCHING", ' "', game_subpath.relative_to(extracted_game.path), '"'))
|
||||||
# translate is not renamed "_" here because it is used to drop useless value in unpacking
|
# translate is not renamed "_" here because it is used to drop useless value in unpacking
|
||||||
|
|
||||||
# check if the file should be patched
|
# check if the file should be patched
|
||||||
|
|
Loading…
Reference in a new issue