diff --git a/src/protontricks/cli/main.py b/src/protontricks/cli/main.py index 535ec9b..690c1f9 100755 --- a/src/protontricks/cli/main.py +++ b/src/protontricks/cli/main.py @@ -14,8 +14,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 is_flatpak_sandbox, run_command from ..winetricks import get_winetricks_path from .util import (CustomArgumentParser, cli_error_handler, enable_logging, @@ -60,8 +60,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)\n" + "Runtime, empty = enable automatically (default)\n" "PROTONTRICKS_GUI: GUI provider to use, accepts either 'yad' " "or 'zenity'" ), @@ -147,17 +146,9 @@ def main(args=None): if not steam_path: exit_("Steam installation directory could not be found.") - # 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: - exit_("Steam Runtime was enabled but couldn't be found!") + use_steam_runtime = True else: use_steam_runtime = False logger.info("Steam Runtime disabled.") @@ -218,7 +209,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 ) @@ -286,7 +276,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: @@ -296,7 +285,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 e898caf..7448d11 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_tool_appid", "find_steam_compat_tool_app", "find_appid_proton_prefix", + "get_appinfo_sections", "get_tool_appid", + "find_steam_compat_tool_app", "find_appid_proton_prefix", "find_proton_app", "get_steam_lib_paths", "get_compat_tool_dirs", "get_custom_compat_tool_installations_in_dir", "get_custom_compat_tool_installations", "find_current_steamid3", "get_appid_from_shortcut", @@ -311,37 +311,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 = "