diff options
Diffstat (limited to 'gamechestcli')
| -rw-r--r-- | gamechestcli/gamechest/cliactions/install.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gamechestcli/gamechest/cliactions/install.py b/gamechestcli/gamechest/cliactions/install.py index 508dd48..90e9ac4 100644 --- a/gamechestcli/gamechest/cliactions/install.py +++ b/gamechestcli/gamechest/cliactions/install.py @@ -8,12 +8,21 @@ from ..statusdb import StatusDB def install_game(status_db, game_info): remote_basedir = config.get_remote_basedir() - source = f'{remote_basedir}/{game_info["package_name"]}' + package_name = game_info.get("package_name") dest = config.get_games_install_basedir() / game_info['id'] dest.mkdir(parents=True, exist_ok=True) - title = 'Installing game...' - task = functools.partial(Install, source, dest) - processor.process_task(title, task) + # now as of 2026-01-14: not having a package_name or having it set to none + # means there is no installation archive (all is managed by the runner), + # thus consider it installed with version given without extracting + # anything. + if package_name: + title = 'Installing game...' + source = f'{remote_basedir}/{package_name}' + task = functools.partial(Install, source, dest) + processor.process_task(title, task) + else: + (dest / "dummy").mkdir(parents=True, exist_ok=True) + status_db.set_installed(game_info) |
