Implement install game in CLI
This commit is contained in:
parent
ef24ad43ca
commit
32b6ba965f
@ -35,6 +35,10 @@ class UI:
|
|||||||
print("Updating game from archive (this may takes some time)...")
|
print("Updating game from archive (this may takes some time)...")
|
||||||
self._installer.update_game(filepath)
|
self._installer.update_game(filepath)
|
||||||
|
|
||||||
|
def _install_from_archive(self, filepath):
|
||||||
|
print("Installing game from archive (this may takes some time)...")
|
||||||
|
self._installer.install_game(filepath)
|
||||||
|
|
||||||
def _apply_voiceover_from_archive(self, filepath):
|
def _apply_voiceover_from_archive(self, filepath):
|
||||||
print("Applying voiceover from archive (this may takes some time)...")
|
print("Applying voiceover from archive (this may takes some time)...")
|
||||||
self._installer.apply_voiceover(filepath)
|
self._installer.apply_voiceover(filepath)
|
||||||
@ -56,9 +60,9 @@ class UI:
|
|||||||
|
|
||||||
def install_from_file(self, filepath):
|
def install_from_file(self, filepath):
|
||||||
gamever = self._installer.get_game_version()
|
gamever = self._installer.get_game_version()
|
||||||
|
print("Archive game version: " + self._installer.get_game_archive_version(filepath))
|
||||||
if gamever:
|
if gamever:
|
||||||
print("Current game installation detected. ({})".format(self._installer.get_game_version()))
|
print("Current game installation detected. ({})".format(self._installer.get_game_version()))
|
||||||
print("Archive game version: " + self._installer.get_game_archive_version(filepath))
|
|
||||||
if not self._ask("Do you want to update the game? ({})".format(filepath)):
|
if not self._ask("Do you want to update the game? ({})".format(filepath)):
|
||||||
print("Aborting update process.")
|
print("Aborting update process.")
|
||||||
return
|
return
|
||||||
@ -69,8 +73,8 @@ class UI:
|
|||||||
if not self._ask("Do you want to install the game? ({})".format(filepath)):
|
if not self._ask("Do you want to install the game? ({})".format(filepath)):
|
||||||
print("Aborting installation process.")
|
print("Aborting installation process.")
|
||||||
return
|
return
|
||||||
raise NotImplementedError("Install from file not implemented yet.")
|
self._install_from_archive(filepath)
|
||||||
# print("Game installed successfully.")
|
print("Game installed successfully.")
|
||||||
|
|
||||||
def install_game(self):
|
def install_game(self):
|
||||||
# TODO
|
# TODO
|
||||||
|
Loading…
Reference in New Issue
Block a user