From 103a6968f90c00aa131a3e68f51a9690aee154a5 Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:09:47 -0800 Subject: [PATCH] ulwgl_util: fix bug when copying ULWGL-Runner - ULWGL-Runner should be copied to ~/.local/share/Steam/compatibilitytools.d --- ulwgl_util.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ulwgl_util.py b/ulwgl_util.py index f0eb401b..e3b8551a 100644 --- a/ulwgl_util.py +++ b/ulwgl_util.py @@ -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, ) @@ -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) @@ -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, )