ConfigHelper: Fix an issue with wine prefix resolution
This probably should be split into separate wine and proton discovery functions.
This commit is contained in:
parent
83328f400d
commit
1a7f89687b
|
@ -64,11 +64,12 @@ def get_game_envvar(option: str, app_name: Optional[str] = None, fallback: Any =
|
|||
def get_wine_prefix(app_name: Optional[str] = None, fallback: Any = None) -> str:
|
||||
_prefix = os.path.join(
|
||||
_config.get("default.env", "STEAM_COMPAT_DATA_PATH", fallback=fallback), "pfx")
|
||||
if app_name is not None:
|
||||
_prefix = os.path.join(
|
||||
_config.get(f'{app_name}.env', "STEAM_COMPAT_DATA_PATH", fallback=_prefix), "pfx")
|
||||
_prefix = _config.get("default.env", "WINEPREFIX", fallback=_prefix)
|
||||
_prefix = _config.get("default", "wine_prefix", fallback=_prefix)
|
||||
if app_name is not None:
|
||||
_prefix = os.path.join(
|
||||
_config.get(f'{app_name}.env', "STEAM_COMPAT_DATA_PATH", fallback=fallback), "pfx")
|
||||
_prefix = _config.get(f'{app_name}.env', 'WINEPREFIX', fallback=_prefix)
|
||||
_prefix = _config.get(app_name, 'wine_prefix', fallback=_prefix)
|
||||
return _prefix
|
||||
|
|
|
@ -216,9 +216,9 @@ def get_steam_environment(tool: Optional[Union[ProtonTool, CompatibilityTool]],
|
|||
|
||||
def find_tools() -> List[Union[ProtonTool, CompatibilityTool]]:
|
||||
steam_path = find_steam()
|
||||
logger.info("Using Steam install in %s", steam_path)
|
||||
logger.debug("Using Steam install in %s", steam_path)
|
||||
steam_libraries = find_libraries(steam_path)
|
||||
logger.info("Searching for tools in libraries %s", steam_libraries)
|
||||
logger.debug("Searching for tools in libraries %s", steam_libraries)
|
||||
|
||||
runtimes = {}
|
||||
for library in steam_libraries:
|
||||
|
|
Loading…
Reference in a new issue