Skip to content

Commit

Permalink
umu_dl_util: search GE-Proton versions when offline
Browse files Browse the repository at this point in the history
- Closes #69
  • Loading branch information
R1kaB3rN committed Mar 22, 2024
1 parent f9f3a2c commit eed7a08
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions umu/umu_dl_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,24 @@ def _get_from_steamcompat(
Executed when an error occurs when retrieving and setting the latest
Proton
"""
for proton in sorted(
[
proton
for proton in steam_compat.glob("*")
if proton.name.startswith("umu-proton")
or proton.name.startswith("ULWGL-Proton")
]
):
version: Union[Tuple[str], str] = (
"GE-Proton"
if environ.get("PROTONPATH") == "GE-Proton"
else ("umu-proton", "ULWGL-Proton")
)
protons: List[Path] = sorted(
[proton for proton in steam_compat.glob("*") if proton.name.startswith(version)]
)

if protons and version == "GE-Proton":
proton: str = protons.pop()
log.console(f"{proton.name} found in: {steam_compat}")
log.console(f"Using {proton.name}")
environ["PROTONPATH"] = proton.as_posix()
env["PROTONPATH"] = environ["PROTONPATH"]
return env
if protons:
proton: str = protons.pop()
log.console(f"{proton.name} found in: {steam_compat}")
log.console(f"Using {proton.name}")
environ["PROTONPATH"] = proton.as_posix()
Expand Down

0 comments on commit eed7a08

Please sign in to comment.