diff --git a/src/protontricks/cli.py b/src/protontricks/cli.py index 9641970..6a2b268 100755 --- a/src/protontricks/cli.py +++ b/src/protontricks/cli.py @@ -15,8 +15,8 @@ import sys from . import __version__ from .gui import select_steam_app_with_gui -from .steam import (find_legacy_steam_runtime_path, find_proton_app, - find_steam_path, get_steam_apps, get_steam_lib_paths) +from .steam import (find_proton_app, find_steam_path, get_steam_apps, + get_steam_lib_paths) from .util import run_command from .winetricks import get_winetricks_path @@ -75,8 +75,7 @@ def main(args=None): "WINE: path to a custom 'wine' executable\n" "WINESERVER: path to a custom 'wineserver' executable\n" "STEAM_RUNTIME: 1 = enable Steam Runtime, 0 = disable Steam " - "Runtime, valid path = custom Steam Runtime path, " - "empty = enable automatically (default)" + "Runtime, empty = enable automatically (default)" ), formatter_class=argparse.RawTextHelpFormatter ) @@ -138,18 +137,9 @@ def main(args=None): ) sys.exit(-1) - # 2. Find the pre-installed legacy Steam Runtime if enabled - legacy_steam_runtime_path = None - use_steam_runtime = True - + # 2. Use Steam Runtime if enabled if os.environ.get("STEAM_RUNTIME", "") != "0" and not args.no_runtime: - legacy_steam_runtime_path = find_legacy_steam_runtime_path( - steam_root=steam_root - ) - - if not legacy_steam_runtime_path: - print("Steam Runtime was enabled but couldn't be found!") - sys.exit(-1) + use_steam_runtime = True else: use_steam_runtime = False logger.info("Steam Runtime disabled.") @@ -212,7 +202,6 @@ def main(args=None): proton_app=proton_app, steam_app=steam_app, use_steam_runtime=use_steam_runtime, - legacy_steam_runtime_path=legacy_steam_runtime_path, command=[winetricks_path, "--gui"], use_bwrap=use_bwrap ) @@ -282,7 +271,6 @@ def main(args=None): proton_app=proton_app, steam_app=steam_app, use_steam_runtime=use_steam_runtime, - legacy_steam_runtime_path=legacy_steam_runtime_path, use_bwrap=use_bwrap, command=[winetricks_path] + args.winetricks_command) elif args.command: @@ -292,7 +280,6 @@ def main(args=None): steam_app=steam_app, command=args.command, use_steam_runtime=use_steam_runtime, - legacy_steam_runtime_path=legacy_steam_runtime_path, use_bwrap=use_bwrap, # Pass the command directly into the shell *without* # escaping it diff --git a/src/protontricks/steam.py b/src/protontricks/steam.py index 8554e24..509afb6 100644 --- a/src/protontricks/steam.py +++ b/src/protontricks/steam.py @@ -13,8 +13,8 @@ from .util import lower_dict __all__ = ( "COMMON_STEAM_DIRS", "SteamApp", "find_steam_path", "find_steam_proton_app", "find_proton_app", - "find_legacy_steam_runtime_path", "find_appid_proton_prefix", - "get_steam_lib_paths", "get_steam_apps", "get_custom_proton_installations" + "find_appid_proton_prefix", "get_steam_lib_paths", + "get_steam_apps", "get_custom_proton_installations" ) COMMON_STEAM_DIRS = [ @@ -283,37 +283,6 @@ def find_steam_path(): return None, None -def find_legacy_steam_runtime_path(steam_root): - """ - Find the legacy Steam Runtime either using the STEAM_RUNTIME env or - steam_root - """ - env_steam_runtime = os.environ.get("STEAM_RUNTIME", "") - - if env_steam_runtime == "0": - # User has disabled Steam Runtime - logger.info("STEAM_RUNTIME is 0. Disabling Steam Runtime.") - return None - elif env_steam_runtime and Path(env_steam_runtime).is_dir(): - # User has a custom Steam Runtime - logger.info( - "Using custom Steam Runtime at %s", env_steam_runtime) - return Path(env_steam_runtime) - elif env_steam_runtime in ["1", ""]: - # User has enabled Steam Runtime or doesn't have STEAM_RUNTIME set; - # default to enabled Steam Runtime in either case - steam_runtime_path = steam_root / "ubuntu12_32" / "steam-runtime" - - logger.info( - "Using default Steam Runtime at %s", str(steam_runtime_path)) - return steam_runtime_path - - logger.error( - "Path in STEAM_RUNTIME doesn't point to a valid Steam Runtime!") - - return None - - APPINFO_STRUCT_HEADER = "<4sL" APPINFO_STRUCT_SECTION = "