From cc73a162bcaf53f0a8a658b223abcbdcc14122dc Mon Sep 17 00:00:00 2001 From: Melody Renata Date: Mon, 4 Nov 2024 16:03:46 -0500 Subject: [PATCH] Update star-citizen: 2.0.5 -> 2.1.0 * Bump launcher version to 2.1.0 * Add work arround for a known javascript error when launching from an application. Details can be found on spectrum: https://robertsspaceindustries.com/spectrum/community/SC/forum/1/thread/upcoming-launcher-update-for-linux-users/5693728 * Set default dll override to disable menubuilding to prevent wine from creating uneeded desktop shortcuts * Set environment variable `WINEDEBUG=-all` to reduce console debug messages --- pkgs/star-citizen/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/star-citizen/default.nix b/pkgs/star-citizen/default.nix index c09386f9..fe8208c9 100644 --- a/pkgs/star-citizen/default.nix +++ b/pkgs/star-citizen/default.nix @@ -17,7 +17,7 @@ useUmu ? false, protonPath ? "${proton-ge-bin.steamcompattool}/", protonVerbs ? ["waitforexitandrun"], - wineDllOverrides ? [], + wineDllOverrides ? ["winemenubuilder.exe=d"], gameScopeEnable ? false, gameScopeArgs ? [], preCommands ? "", @@ -28,11 +28,11 @@ }: let inherit (lib.strings) concatStringsSep optionalString; # Latest version can be found: https://install.robertsspaceindustries.com/rel/2/latest.yml - version = "2.0.5"; + version = "2.1.0"; src = pkgs.fetchurl { url = "https://install.robertsspaceindustries.com/rel/2/RSI%20Launcher-Setup-${version}.exe"; name = "RSI Launcher-Setup-${version}.exe"; - hash = "sha256-NevMkWdXe3aKFUqBgI32nshp0qZ8c4nSJ1qdV3EGpGk="; + hash = "sha256-h/mlOMzDzY0qvEtX6zHox/qlueJZ2IHToxYnTem/V9I="; }; # Powershell stub for star-citizen @@ -63,6 +63,7 @@ export WINE_HIDE_NVIDIA_GPU=1 # AMD export dual_color_blend_by_location="true" + export WINEDEBUG=-all '' } @@ -124,7 +125,13 @@ ${gameScope} ${gamemode}/bin/gamemoderun umu-run "$RSI_LAUNCHER" "$@" '' else '' - ${gameScope} ${gamemode}/bin/gamemoderun wine ${wineFlags} "$RSI_LAUNCHER" "$@" + if [[ -t 1 ]]; then + ${gameScope} ${gamemode}/bin/gamemoderun wine ${wineFlags} "$RSI_LAUNCHER" "$@" + else + export LOG_DIR=$(mktemp -d) + echo "Working arround known launcher error by outputting logs to $LOG_DIR" + ${gameScope} ${gamemode}/bin/gamemoderun wine ${wineFlags} "$RSI_LAUNCHER" "$@" >"$LOG_DIR/RSIout" 2>"$LOG_DIR/RSIerr" + fi wineserver -w '' }