diff --git a/src/protontricks/cli.py b/src/protontricks/cli.py index cc65a03..5c3fc7a 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, is_flatpak_sandbox from .winetricks import get_winetricks_path @@ -77,8 +77,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 ) @@ -148,18 +147,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.") @@ -222,7 +212,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 ) @@ -292,7 +281,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: @@ -302,7 +290,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 4ab778b..f3f5f99 100644 --- a/src/protontricks/steam.py +++ b/src/protontricks/steam.py @@ -12,8 +12,8 @@ from .util import lower_dict __all__ = ( "COMMON_STEAM_DIRS", "SteamApp", "find_steam_path", - "find_legacy_steam_runtime_path", "get_appinfo_sections", - "get_proton_appid", "find_steam_proton_app", "find_appid_proton_prefix", + "get_appinfo_sections", "get_proton_appid", + "find_steam_proton_app", "find_appid_proton_prefix", "find_proton_app", "get_steam_lib_paths", "get_compat_tool_dirs", "get_custom_proton_installations_in_dir", "get_custom_proton_installations", "find_current_steamid3", "get_appid_from_shortcut", @@ -300,37 +300,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 = "