mirror of
https://github.com/tcsenpai/UWINE.git
synced 2025-06-06 11:35:20 +00:00
fix issue where defined but non-existent WINEPREFIX was ignored and therefore not created
This commit is contained in:
parent
429de35ee3
commit
a610be41d8
14
ulwgl_run.py
14
ulwgl_run.py
@ -128,15 +128,17 @@ def check_env(
|
|||||||
"WINEPREFIX" not in os.environ
|
"WINEPREFIX" not in os.environ
|
||||||
or not Path(os.environ["WINEPREFIX"]).expanduser().is_dir()
|
or not Path(os.environ["WINEPREFIX"]).expanduser().is_dir()
|
||||||
):
|
):
|
||||||
# Automatically create a prefix for the user if WINEPREFIX is not set
|
if "WINEPREFIX" not in os.environ:
|
||||||
# The GAMEID will be the name of the dir
|
# Automatically create a prefix for the user if WINEPREFIX is not set
|
||||||
pfx: Path = Path.home().joinpath("Games/ULWGL/" + env["GAMEID"])
|
# The GAMEID will be the name of the dir
|
||||||
|
pfx: Path = Path.home().joinpath("Games/ULWGL/" + env["GAMEID"])
|
||||||
|
else:
|
||||||
|
pfx: Path = Path(os.environ["WINEPREFIX"])
|
||||||
|
|
||||||
pfx.mkdir(parents=True, exist_ok=True)
|
pfx.mkdir(parents=True, exist_ok=True)
|
||||||
os.environ["WINEPREFIX"] = pfx.as_posix()
|
os.environ["WINEPREFIX"] = pfx.as_posix()
|
||||||
env["WINEPREFIX"] = os.environ["WINEPREFIX"]
|
|
||||||
else:
|
env["WINEPREFIX"] = os.environ["WINEPREFIX"]
|
||||||
env["WINEPREFIX"] = os.environ["WINEPREFIX"]
|
|
||||||
|
|
||||||
if "PROTONPATH" not in os.environ:
|
if "PROTONPATH" not in os.environ:
|
||||||
os.environ["PROTONPATH"] = ""
|
os.environ["PROTONPATH"] = ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user