mirror of
https://github.com/lutris/lutris
synced 2024-07-05 16:38:42 +00:00
Rename ulwgl to umu
This commit is contained in:
parent
fdeeb4304b
commit
5af6c3b37b
|
@ -684,7 +684,7 @@ class Game(GObject.Object):
|
|||
return False
|
||||
command, env = get_launch_parameters(self.runner, gameplay_info)
|
||||
|
||||
if env.get("WINEARCH") == "win32" and "ulwgl" in " ".join(command):
|
||||
if env.get("WINEARCH") == "win32" and "umu" in " ".join(command):
|
||||
raise RuntimeError("Proton is not compatible with 32bit prefixes")
|
||||
env["game_name"] = self.name # What is this used for??
|
||||
env["GAMEID"] = proton.get_game_id(self)
|
||||
|
|
|
@ -159,7 +159,7 @@ def create_prefix(
|
|||
else:
|
||||
wineenv["PROTONPATH"] = proton.get_proton_path_from_bin(wine_path)
|
||||
|
||||
system.execute([proton.get_ulwgl_path(), "createprefix"], env=wineenv)
|
||||
system.execute([proton.get_umu_path(), "createprefix"], env=wineenv)
|
||||
|
||||
logger.info("%s Prefix created in %s", arch, prefix)
|
||||
prefix_manager = WinePrefixManager(prefix)
|
||||
|
@ -331,7 +331,7 @@ def wineexec(
|
|||
baseenv.update(env)
|
||||
|
||||
if proton.is_proton_path(wine_path):
|
||||
wine_path = proton.get_ulwgl_path()
|
||||
wine_path = proton.get_umu_path()
|
||||
|
||||
command_parameters = [wine_path]
|
||||
if executable:
|
||||
|
@ -400,7 +400,7 @@ def winetricks(
|
|||
if not runner:
|
||||
runner = import_runner("wine")()
|
||||
winetricks_wine = runner.get_executable()
|
||||
# We only need to perform winetricks if not using ulwgl/proton. ulwgl uses protonfixes
|
||||
# We only need to perform winetricks if not using umu/proton. umu uses protonfixes
|
||||
if ("Proton" not in wine_path) or ("lutris" in wine_path and "Proton" in wine_path):
|
||||
if arch not in ("win32", "win64"):
|
||||
arch = detect_arch(prefix, winetricks_wine)
|
||||
|
|
|
@ -1172,10 +1172,10 @@ class wine(Runner):
|
|||
def get_command(self):
|
||||
exe = self.get_executable()
|
||||
if proton.is_proton_path(exe):
|
||||
ulwgl_path = proton.get_ulwgl_path()
|
||||
if ulwgl_path:
|
||||
return [ulwgl_path]
|
||||
raise MissingExecutableError("Install ULWGL to use Proton")
|
||||
umu_path = proton.get_umu_path()
|
||||
if umu_path:
|
||||
return [umu_path]
|
||||
raise MissingExecutableError("Install umu to use Proton")
|
||||
return super().get_command()
|
||||
|
||||
def play(self): # pylint: disable=too-many-return-statements # noqa: C901
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
"""Utility module to deal with Proton and ULWGL"""
|
||||
"""Utility module to deal with Proton and umu"""
|
||||
import json
|
||||
import os
|
||||
from gettext import gettext as _
|
||||
|
@ -15,14 +15,14 @@ def is_proton_path(wine_path):
|
|||
return "Proton" in wine_path and "lutris" not in wine_path
|
||||
|
||||
|
||||
def get_ulwgl_path():
|
||||
custom_path = settings.read_setting("ulwgl_path")
|
||||
def get_umu_path():
|
||||
custom_path = settings.read_setting("umu_path")
|
||||
if custom_path:
|
||||
script_path = os.path.join(custom_path, "ulwgl_run.py")
|
||||
script_path = os.path.join(custom_path, "umu_run.py")
|
||||
if system.path_exists(script_path):
|
||||
return script_path
|
||||
if system.can_find_executable("ulwgl-run"):
|
||||
return system.find_executable("ulwgl-run")
|
||||
if system.can_find_executable("umu-run"):
|
||||
return system.find_executable("umu-run")
|
||||
path_candidates = (
|
||||
"/app/share", # prioritize flatpak due to non-rolling release distros
|
||||
"/usr/local/share",
|
||||
|
@ -31,7 +31,7 @@ def get_ulwgl_path():
|
|||
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, "umu", "umu_run.py")
|
||||
if system.path_exists(script_path):
|
||||
return script_path
|
||||
|
||||
|
@ -65,8 +65,8 @@ def get_proton_paths() -> List[str]:
|
|||
|
||||
def list_proton_versions() -> List[str]:
|
||||
"""Return the list of Proton versions installed in Steam"""
|
||||
ulwgl_path = get_ulwgl_path()
|
||||
if not ulwgl_path:
|
||||
umu_path = get_umu_path()
|
||||
if not umu_path:
|
||||
return []
|
||||
versions = [GE_PROTON_LATEST]
|
||||
for proton_path in get_proton_paths():
|
||||
|
@ -96,20 +96,20 @@ def get_proton_path_from_bin(wine_path):
|
|||
|
||||
|
||||
def get_game_id(game):
|
||||
default_id = "ulwgl-default"
|
||||
games_path = os.path.join(settings.RUNTIME_DIR, "ulwgl-games/ulwgl-games.json")
|
||||
default_id = "umu-default"
|
||||
games_path = os.path.join(settings.RUNTIME_DIR, "umu-games/umu-games.json")
|
||||
if not os.path.exists(games_path):
|
||||
return default_id
|
||||
with open(games_path, "r", encoding="utf-8") as games_file:
|
||||
ulwgl_games = json.load(games_file)
|
||||
for ulwgl_game in ulwgl_games:
|
||||
umu_games = json.load(games_file)
|
||||
for umu_game in umu_games:
|
||||
if (
|
||||
ulwgl_game["store"]
|
||||
umu_game["store"]
|
||||
and (
|
||||
ulwgl_game["store"] == game.service
|
||||
or (ulwgl_game["store"] == "humble" and game.service == "humblebundle")
|
||||
umu_game["store"] == game.service
|
||||
or (umu_game["store"] == "humble" and game.service == "humblebundle")
|
||||
)
|
||||
and ulwgl_game["appid"] == game.appid
|
||||
and umu_game["appid"] == game.appid
|
||||
):
|
||||
return ulwgl_game["ulwgl_id"]
|
||||
return umu_game["umu_id"]
|
||||
return default_id
|
||||
|
|
Loading…
Reference in New Issue
Block a user