mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-06 19:45:20 +00:00
allow using shortname of proton version as alternative to full file path
This commit is contained in:
parent
c116d7dbf9
commit
33bd82851a
13
ulwgl_run.py
13
ulwgl_run.py
@ -116,16 +116,19 @@ def check_env(
|
|||||||
raise ValueError(err)
|
raise ValueError(err)
|
||||||
env["GAMEID"] = os.environ["GAMEID"]
|
env["GAMEID"] = os.environ["GAMEID"]
|
||||||
|
|
||||||
if (
|
if "PROTONPATH" not in os.environ:
|
||||||
"PROTONPATH" not in os.environ
|
os.environ["PROTONPATH"] = ""
|
||||||
or not Path(os.environ["PROTONPATH"]).expanduser().is_dir()
|
get_ulwgl_proton(env)
|
||||||
):
|
elif Path("~/.local/share/Steam/compatibilitytools.d/" + os.environ["PROTONPATH"]).expanduser().is_dir():
|
||||||
# Attempt to auto set this env var for the user
|
env["PROTONPATH"] = Path("~/.local/share/Steam/compatibilitytools.d/").expanduser().joinpath(os.environ["PROTONPATH"])
|
||||||
|
elif not Path(os.environ["PROTONPATH"]).expanduser().is_dir():
|
||||||
os.environ["PROTONPATH"] = ""
|
os.environ["PROTONPATH"] = ""
|
||||||
get_ulwgl_proton(env)
|
get_ulwgl_proton(env)
|
||||||
else:
|
else:
|
||||||
env["PROTONPATH"] = os.environ["PROTONPATH"]
|
env["PROTONPATH"] = os.environ["PROTONPATH"]
|
||||||
|
|
||||||
|
print(env["PROTONPATH"])
|
||||||
|
|
||||||
# If download fails/doesn't exist in the system, raise an error
|
# If download fails/doesn't exist in the system, raise an error
|
||||||
if not os.environ["PROTONPATH"]:
|
if not os.environ["PROTONPATH"]:
|
||||||
err: str = "Download failed.\nProton could not be found in cache or compatibilitytools.d\nPlease set $PROTONPATH or visit https://github.com/Open-Wine-Components/ULWGL-Proton/releases"
|
err: str = "Download failed.\nProton could not be found in cache or compatibilitytools.d\nPlease set $PROTONPATH or visit https://github.com/Open-Wine-Components/ULWGL-Proton/releases"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user