Support launching directly from ~/.local/share/ULWGL

This commit is contained in:
Mathieu Comandon 2024-03-01 18:17:16 -08:00
parent aabc632341
commit fe3edd83da

View file

@ -19,7 +19,13 @@ def get_ulwgl_path():
return script_path
if system.can_find_executable("ulwgl-run"):
return system.find_executable("ulwgl-run")
for path_candidate in ("/usr/share", "/usr/local/share", "/opt"):
path_candidates = (
os.path.expanduser("~/.local/share"),
"/usr/share",
"/usr/local/share",
"/opt"
)
for path_candidate in path_candidates:
script_path = os.path.join(path_candidate, "ULWGL", "ulwgl_run.py")
if system.path_exists(script_path):
return script_path