From 279f063e40c141605954eb0bdf1d42de82439d31 Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:19:53 +0200 Subject: [PATCH 1/4] WineSettings: make path edits editable --- rare/components/tabs/settings/widgets/wine.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rare/components/tabs/settings/widgets/wine.py b/rare/components/tabs/settings/widgets/wine.py index 1d598f096..577b5ba99 100644 --- a/rare/components/tabs/settings/widgets/wine.py +++ b/rare/components/tabs/settings/widgets/wine.py @@ -34,6 +34,7 @@ def __init__(self, settings: RareAppSettings, rcore: RareCore, parent=None): edit_func=self._wine_prefix_edit, save_func=self.save_prefix, ) + self.wine_prefix_edit.line_edit.setReadOnly(False) # Wine executable self.wine_execut_edit = PathEdit( @@ -47,6 +48,7 @@ def __init__(self, settings: RareAppSettings, rcore: RareCore, parent=None): ), save_func=self.save_execut, ) + self.wine_execut_edit.line_edit.setReadOnly(False) layout = QFormLayout(self) layout.addRow(self.tr("Executable"), self.wine_execut_edit) From ac5493e092f3465f4c54b4eccb3e6a1550814820 Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:32:41 +0200 Subject: [PATCH 2/4] chore: refactor variable names --- rare/commands/launcher/lgd_helper.py | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/rare/commands/launcher/lgd_helper.py b/rare/commands/launcher/lgd_helper.py index 595800a6b..7c0ffc570 100644 --- a/rare/commands/launcher/lgd_helper.py +++ b/rare/commands/launcher/lgd_helper.py @@ -154,38 +154,38 @@ def get_launch_params(rgame: RareGameSlim, init: InitParams = None) -> LaunchPar def prepare_process(command: List[str], environment: Dict) -> Tuple[str, List[str], Dict]: logger.debug("Preparing process: %s", command) - environ = environment.copy() + _env = environment.copy() # Sanity check environment (mostly for Linux) # ensure shader compat dirs exist if platform.system() in {"Linux", "FreeBSD"}: - command_line = shlex.join(command) - if os.environ.get("XDG_CURRENT_DESKTOP", None) == "gamescope" or "gamescope" in command_line: + _cmd_line = shlex.join(command) + if os.environ.get("XDG_CURRENT_DESKTOP", None) == "gamescope" or "gamescope" in _cmd_line: # disable mangohud in gamescope - environ["MANGOHUD"] = "0" - if "STEAM_COMPAT_CLIENT_INSTALL_PATH" not in environ: - environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"] = "" - if "STEAM_COMPAT_DATA_PATH" in environ: - compat_pfx = os.path.join(environ["STEAM_COMPAT_DATA_PATH"], "pfx") + _env["MANGOHUD"] = "0" + if "STEAM_COMPAT_CLIENT_INSTALL_PATH" not in _env: + _env["STEAM_COMPAT_CLIENT_INSTALL_PATH"] = "" + if "STEAM_COMPAT_DATA_PATH" in _env: + compat_pfx = os.path.join(_env["STEAM_COMPAT_DATA_PATH"], "pfx") os.makedirs(compat_pfx, exist_ok=True) create_compat_users(compat_pfx) - if "WINEPREFIX" in environ and not os.path.isdir(environ["WINEPREFIX"]): - os.makedirs(environ["WINEPREFIX"], exist_ok=True) - create_compat_users(environ["WINEPREFIX"]) - if "STEAM_COMPAT_SHADER_PATH" in environ: - environ.update(setup_compat_shaders_dir(environ["STEAM_COMPAT_SHADER_PATH"])) - environ["WINEDLLOVERRIDES"] = environ.get("WINEDLLOVERRIDES", "") + ";lsteamclient=d;" + if "WINEPREFIX" in _env and not os.path.isdir(_env["WINEPREFIX"]): + os.makedirs(_env["WINEPREFIX"], exist_ok=True) + create_compat_users(_env["WINEPREFIX"]) + if "STEAM_COMPAT_SHADER_PATH" in _env: + _env.update(setup_compat_shaders_dir(_env["STEAM_COMPAT_SHADER_PATH"])) + _env["WINEDLLOVERRIDES"] = _env.get("WINEDLLOVERRIDES", "") + ";lsteamclient=d;" - _env = os.environ.copy() - _command = command.copy() + final_env = os.environ.copy() + final_cmd = command.copy() if os.environ.get("container") == "flatpak": - flatpak_command = ["flatpak-spawn", "--host"] - flatpak_command.extend(f"--env={name}={value}" for name, value in environ.items()) - _command = flatpak_command + command + _flat_cmd = ["flatpak-spawn", "--host"] + _flat_cmd.extend(f"--env={name}={value}" for name, value in _env.items()) + final_cmd = _flat_cmd + command else: - _env.update(environ) + final_env.update(_env) - return _command[0], _command[1:] if len(_command) > 1 else [], _env + return final_cmd[0], final_cmd[1:] if len(final_cmd) > 1 else [], final_env def dict_to_qprocenv(env: Dict) -> QProcessEnvironment: From f6896b0ef8beecf05db39b97318fae18326c58ba Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:33:21 +0200 Subject: [PATCH 3/4] lgd_helper: support LEGENDARY_WRAPPER_EXE (fake EpicGamesLauncher.exe) --- rare/commands/launcher/lgd_helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rare/commands/launcher/lgd_helper.py b/rare/commands/launcher/lgd_helper.py index 7c0ffc570..1ea574499 100644 --- a/rare/commands/launcher/lgd_helper.py +++ b/rare/commands/launcher/lgd_helper.py @@ -109,6 +109,10 @@ def get_game_params(rgame: RareGameSlim, init: InitParams, launch: LaunchParams) full_params = [] full_params.extend(params.launch_command) + if "LEGENDARY_WRAPPER_EXE" in params.environment: + lgd_wrapper = params.environment.pop("LEGENDARY_WRAPPER_EXE").strip() + if os.path.isfile(lgd_wrapper): + full_params.append(lgd_wrapper) full_params.append(os.path.join(params.game_directory, params.game_executable)) full_params.extend(params.game_parameters) full_params.extend(params.egl_parameters) From 188325915d87fb838d236f1c4d9d5c0e58020ebb Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:59:27 +0200 Subject: [PATCH 4/4] LocalLaunchSettings: make override_exe and prelaunch_cmd editable --- rare/components/tabs/library/details/game.py | 1 + rare/components/tabs/settings/widgets/launch.py | 1 + 2 files changed, 2 insertions(+) diff --git a/rare/components/tabs/library/details/game.py b/rare/components/tabs/library/details/game.py index 09ada8b42..47fc35c23 100644 --- a/rare/components/tabs/library/details/game.py +++ b/rare/components/tabs/library/details/game.py @@ -60,6 +60,7 @@ def __init__(self, rcore: RareCore, parent=None): save_func=self.__override_exe_save_callback, parent=self, ) + self.override_exe_edit.line_edit.setReadOnly(False) self.launch_params_edit = QLineEdit(self) self.launch_params_edit.setPlaceholderText(self.tr("Game specific command line arguments")) diff --git a/rare/components/tabs/settings/widgets/launch.py b/rare/components/tabs/settings/widgets/launch.py index 7d971545b..03dbfc2c0 100644 --- a/rare/components/tabs/settings/widgets/launch.py +++ b/rare/components/tabs/settings/widgets/launch.py @@ -36,6 +36,7 @@ def __init__(self, rcore: RareCore, wrapper_widget: Type[WrapperSettings], paren edit_func=self.__prelaunch_cmd_edit_callback, save_func=self.__prelaunch_cmd_save_callback, ) + self.prelaunch_cmd.line_edit.setReadOnly(False) self.prelaunch_args = QLineEdit("") self.prelaunch_args.setPlaceholderText(self.tr("Arguments to the script or program to run before the game"))