Added voiceover language info & archive type and install_game function

Available through Installer.get_voiceover_archive_type and Installer.get_voiceover_archive_language
Also some other optimizations including not extracting unneeded files from diff archive, deprecate _read_version_from_config function, and added install_game, uninstall_game, voiceover_lang_translate, get_installed_voiceovers
This commit is contained in:
2022-02-17 22:02:08 +07:00
parent b1a9223c19
commit ef24ad43ca
4 changed files with 160 additions and 57 deletions

View File

@ -32,14 +32,17 @@ class UI:
def _update_from_archive(self, filepath):
print("Reverting patches if patched...")
self._patcher.revert_patch(True)
print("Updating game from archive...")
print("Updating game from archive (this may takes some time)...")
self._installer.update_game(filepath)
def _apply_voiceover_from_archive(self, filepath):
print("Applying voiceover from archive...")
print("Applying voiceover from archive (this may takes some time)...")
self._installer.apply_voiceover(filepath)
def install_voiceover_from_file(self, filepath):
print("Archive voiceover language: {} ({})".format(
self._installer.get_voiceover_archive_language(filepath),
"Full archive" if self._installer.get_voiceover_archive_type(filepath) else "Update archive"))
if not self._ask("Do you want to apply this voiceover pack? ({})".format(filepath)):
print("Aborting apply process.")
return
@ -55,8 +58,8 @@ class UI:
gamever = self._installer.get_game_version()
if gamever:
print("Current game installation detected. ({})".format(self._installer.get_game_version()))
print("Archive game version: " + self._installer.get_archive_version(filepath))
if not self._ask("Do you want to update the game? (from {})".format(filepath)):
print("Archive game version: " + self._installer.get_game_archive_version(filepath))
if not self._ask("Do you want to update the game? ({})".format(filepath)):
print("Aborting update process.")
return
self._update_from_archive(filepath)