Skip to content

Commit

Permalink
ulwgl_util: fix bug when copying ULWGL-Runner
Browse files Browse the repository at this point in the history
- ULWGL-Runner should be copied to ~/.local/share/Steam/compatibilitytools.d
  • Loading branch information
R1kaB3rN committed Feb 24, 2024
1 parent 90759c3 commit 103a696
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ulwgl_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,15 @@ def setup_ulwgl(root: Path, local: Path) -> None:
local.joinpath("ulwgl-run").symlink_to("ulwgl_run.py")

# Runner
print(f"Copying ULWGL-Runner -> {local} ...", file=stderr)
steam_compat: Path = Path.home().joinpath(
".local/share/Steam/compatibilitytools.d"
)
steam_compat.mkdir(parents=True, exist_ok=True)

print(f"Copying ULWGL-Runner -> {steam_compat} ...", file=stderr)
copytree(
root.joinpath("ULWGL-Runner").as_posix(),
local.joinpath("ULWGL-Runner").as_posix(),
steam_compat.joinpath("ULWGL-Runner"),
symlinks=True,
)

Expand Down Expand Up @@ -188,6 +193,10 @@ def setup_ulwgl(root: Path, local: Path) -> None:
and val != json_local["ulwgl"]["versions"]["runner"]
or not local.joinpath("ULWGL-Runner").is_dir()
):
steam_compat: Path = Path.home().joinpath(
".local/share/Steam/compatibilitytools.d"
)

# Runner
print(f"New version for {key}\nUpdating to {val} ...", file=stderr)

Expand All @@ -198,7 +207,7 @@ def setup_ulwgl(root: Path, local: Path) -> None:
# Prefer recreating the symbolic link within this dir
copytree(
root.joinpath("ULWGL-Runner").as_posix(),
local.joinpath("ULWGL-Runner").as_posix(),
steam_compat.joinpath("ULWGL-Runner"),
symlinks=True,
)

Expand Down

0 comments on commit 103a696

Please sign in to comment.