Update ULWGL paths

- Fixes the problem where the path ~/.local/share/ULWGL was the first path candidate which would cause lutris to run outdated files while the updated files pulled from the runtime would remain in the runtime directory. The current model expects clients to install ULWGL as a system package (e.g., flatpak, system package) and execute it.

- To ensure the ULWGL launcher and runtime files are synchronized or updated, this makes it so lutris never executes ulwgl_run.py in ~/.local/share/ULWGL and to instead prioritize the system package install then the lutris runtime directory.
This commit is contained in:
R1kaB3rN 2024-03-19 12:27:30 -07:00
parent ed0f86e6f6
commit 8dd67de3f3
No known key found for this signature in database

View file

@ -24,14 +24,14 @@ def get_ulwgl_path():
if system.can_find_executable("ulwgl-run"):
return system.find_executable("ulwgl-run")
path_candidates = (
os.path.expanduser("~/.local/share"),
"/app/share", # prioritize flatpak due to non-rolling release distros
"/usr/local/share",
"/usr/share",
"/opt",
settings.RUNTIME_DIR,
)
for path_candidate in path_candidates:
script_path = os.path.join(path_candidate, "ULWGL", "ulwgl_run.py")
script_path = os.path.join(path_candidate, "ulwgl", "ulwgl_run.py")
if system.path_exists(script_path):
return script_path