mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-04 18:45:21 +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)
|
||||
env["GAMEID"] = os.environ["GAMEID"]
|
||||
|
||||
if (
|
||||
"PROTONPATH" not in os.environ
|
||||
or not Path(os.environ["PROTONPATH"]).expanduser().is_dir()
|
||||
):
|
||||
# Attempt to auto set this env var for the user
|
||||
if "PROTONPATH" not in os.environ:
|
||||
os.environ["PROTONPATH"] = ""
|
||||
get_ulwgl_proton(env)
|
||||
elif Path("~/.local/share/Steam/compatibilitytools.d/" + os.environ["PROTONPATH"]).expanduser().is_dir():
|
||||
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"] = ""
|
||||
get_ulwgl_proton(env)
|
||||
else:
|
||||
env["PROTONPATH"] = os.environ["PROTONPATH"]
|
||||
|
||||
print(env["PROTONPATH"])
|
||||
|
||||
# If download fails/doesn't exist in the system, raise an error
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user