Skip to content

Commit

Permalink
umu_run: update format
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Jun 29, 2024
1 parent 7df99c9 commit 71205fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,17 @@ def check_env(env: dict[str, str]) -> dict[str, str] | dict[str, Any]:
if os.environ.get("WINEPREFIX") == "":
err: str = "Environment variable is empty: WINEPREFIX"
raise ValueError(err)

if "WINEPREFIX" not in os.environ:
pfx: Path = Path.home().joinpath("Games", "umu", env["GAMEID"])
pfx.mkdir(parents=True, exist_ok=True)
os.environ["WINEPREFIX"] = str(pfx)

if not Path(os.environ["WINEPREFIX"]).expanduser().is_dir():
pfx: Path = Path(os.environ["WINEPREFIX"])
pfx.mkdir(parents=True, exist_ok=True)
os.environ["WINEPREFIX"] = str(pfx)

env["WINEPREFIX"] = os.environ["WINEPREFIX"]

# Proton Version
Expand Down Expand Up @@ -209,6 +212,7 @@ def set_env(
protonpath: Path = (
Path(env["PROTONPATH"]).expanduser().resolve(strict=True)
)

# Command execution usage
is_cmd: bool = isinstance(args, tuple)

Expand Down Expand Up @@ -381,6 +385,7 @@ def enable_steam_game_drive(env: dict[str, str]) -> dict[str, str]:
for rtpath in steamrt_paths:
if not Path(rtpath).is_symlink() and Path(rtpath, libc).is_file():
paths.add(rtpath)

env["STEAM_RUNTIME_LIBRARY_PATH"] = ":".join(list(paths))

return env
Expand Down

0 comments on commit 71205fe

Please sign in to comment.