From 524ec6c7863e55e1ed1ebab272bdf99253b16caa Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Mon, 8 Jan 2024 17:49:59 -0500 Subject: [PATCH] call Config.locate_bin_from_steam_config in cli setup --- ptlaunch/cli.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ptlaunch/cli.py b/ptlaunch/cli.py index c9c2f3e..26c63b4 100644 --- a/ptlaunch/cli.py +++ b/ptlaunch/cli.py @@ -43,8 +43,21 @@ def cli_locate_bin(ctx, directory: str = None): def cli_setup(ctx, nuke: bool = False): "Setup the WINE prefix for Project Torque" + click.echo("Setting up WINE prefix") ctx.obj.setup(nuke = nuke) - click.echo("WINE prefix for Project Torque setup :3") + + if not ctx.obj.binpath.exists(): + click.echo("Finding path to Project Torque binary") + + try: + ctx.obj.locate_bin_from_steam_config() + ctx.obj.save() + + except FileNotFoundError as e: + click.echo(str(e)) + return + + click.echo("Launcher setup finished :3") @cli.command("run", context_settings = {"allow_extra_args": True})