diff --git a/docs/SWBF2-2017-linux-setup.md b/docs/SWBF2-2017-linux-setup.md index a7892db..72b15b8 100644 --- a/docs/SWBF2-2017-linux-setup.md +++ b/docs/SWBF2-2017-linux-setup.md @@ -19,7 +19,7 @@ wrapper to import the necessary registry entries on every launch. ## Prerequisites (both setups) - SWBF2 (AppID 1237950) installed via Steam and fully downloaded -- GE-Proton10-34 or later installed +- GE-Proton10-34 — the setup scripts install this automatically if not present - An EA account created at ea.com and linked to your Steam account - `msitools` installed on the host: ```bash @@ -44,8 +44,8 @@ account. This is a one-time step that persists across reinstalls. ### Prerequisites (native) -- GE-Proton installed via ProtonUp-Qt or manually into `~/.steam/compatibilitytools.d/` - In Steam: SWBF2 → Properties → Compatibility → Force GE-Proton10-34 + (the setup script installs GE-Proton10-34 automatically if not present) ### Automated setup @@ -194,10 +194,9 @@ PYEOF ### Prerequisites (Wolf) - Wolf is running and Steam is open in a Moonlight session -- GE-Proton is installed inside the WolfSteam container - (`./manage.sh ge-proton`) - In Steam (via Moonlight): SWBF2 → Properties → Compatibility → Force GE-Proton10-34 + (the setup script installs GE-Proton10-34 into the container automatically if not present) ### Automated setup diff --git a/scripts/setup-swbf2-linux.sh b/scripts/setup-swbf2-linux.sh index ab3fa67..d971f3d 100755 --- a/scripts/setup-swbf2-linux.sh +++ b/scripts/setup-swbf2-linux.sh @@ -38,12 +38,12 @@ set -euo pipefail APPID="1237950" WRAPPER_PATH="$HOME/.local/bin/ea_install.sh" +GE_PROTON_VERSION="GE-Proton10-34" echo "=== SWBF2 (2017) Linux Steam Setup ===" echo "" # ── Locate Steam home ─────────────────────────────────────────────────────── -# Steam can live in either of two locations depending on install method. find_steam_home() { for candidate in \ "$HOME/.steam/steam" \ @@ -63,6 +63,31 @@ STEAM_HOME=$(find_steam_home) || { } echo "Steam home: $STEAM_HOME" +# ── Install GE-Proton if not present ─────────────────────────────────────── +GEP_DIR="$HOME/.steam/root/compatibilitytools.d" +mkdir -p "$GEP_DIR" +if [ -d "$GEP_DIR/$GE_PROTON_VERSION" ]; then + echo "GE-Proton: $GE_PROTON_VERSION already installed" +else + echo "Installing $GE_PROTON_VERSION..." + GEP_URL="https://github.com/GloriousEggroll/proton-ge-custom/releases/download/$GE_PROTON_VERSION/$GE_PROTON_VERSION.tar.gz" + GEP_TMP="/tmp/$GE_PROTON_VERSION.tar.gz" + if ! curl -L --progress-bar -o "$GEP_TMP" "$GEP_URL"; then + echo "ERROR: Download failed. Check your internet connection and try again." + exit 1 + fi + tar -xzf "$GEP_TMP" -C "$GEP_DIR" + rm -f "$GEP_TMP" + echo "GE-Proton installed to: $GEP_DIR/$GE_PROTON_VERSION" + echo "" + echo "IMPORTANT: Restart Steam now, then:" + echo " Right-click SWBF2 → Properties → Compatibility" + echo " → Force a specific Steam Play compatibility tool → $GE_PROTON_VERSION" + echo "Then re-run this script." + echo "" + read -rp "Press Enter after you have restarted Steam and set GE-Proton, or Ctrl+C to abort..." +fi + PFX_C="$STEAM_HOME/steamapps/compatdata/$APPID/pfx/drive_c" MSI="$PFX_C/ea_app.msi" diff --git a/scripts/setup-swbf2-wolf.sh b/scripts/setup-swbf2-wolf.sh index bf8dc81..62115e9 100755 --- a/scripts/setup-swbf2-wolf.sh +++ b/scripts/setup-swbf2-wolf.sh @@ -41,6 +41,7 @@ set -euo pipefail APPID="1237950" +GE_PROTON_VERSION="GE-Proton10-34" echo "=== SWBF2 (2017) Wolf/Moonlight Setup ===" echo "" @@ -70,6 +71,36 @@ if [ -z "$STEAM_HOME" ] || [ ! -d "$STEAM_HOME" ]; then fi echo "Steam home: $STEAM_HOME" +# ── Install GE-Proton inside the container if not present ────────────────── +GEP_CONTAINER_DIR="/home/retro/.steam/compatibilitytools.d" +GEP_INSTALLED=$(docker exec "$WOLF_CONTAINER" \ + bash -c "ls '$GEP_CONTAINER_DIR' 2>/dev/null | grep -i '$GE_PROTON_VERSION'" 2>/dev/null || true) +if [ -n "$GEP_INSTALLED" ]; then + echo "GE-Proton: $GE_PROTON_VERSION already installed in container" +else + echo "Installing $GE_PROTON_VERSION into WolfSteam container..." + GEP_URL="https://github.com/GloriousEggroll/proton-ge-custom/releases/download/$GE_PROTON_VERSION/$GE_PROTON_VERSION.tar.gz" + GEP_TMP="/tmp/$GE_PROTON_VERSION.tar.gz" + if ! curl -L --progress-bar -o "$GEP_TMP" "$GEP_URL"; then + echo "ERROR: Download failed. Check your internet connection and try again." + exit 1 + fi + docker exec "$WOLF_CONTAINER" mkdir -p "$GEP_CONTAINER_DIR" + docker cp "$GEP_TMP" "$WOLF_CONTAINER:/tmp/$GE_PROTON_VERSION.tar.gz" + docker exec -u 1000 "$WOLF_CONTAINER" \ + tar -xzf "/tmp/$GE_PROTON_VERSION.tar.gz" -C "$GEP_CONTAINER_DIR" + docker exec "$WOLF_CONTAINER" rm -f "/tmp/$GE_PROTON_VERSION.tar.gz" + rm -f "$GEP_TMP" + echo "GE-Proton installed in container." + echo "" + echo "IMPORTANT: In Steam (via Moonlight):" + echo " Right-click SWBF2 → Properties → Compatibility" + echo " → Force a specific Steam Play compatibility tool → $GE_PROTON_VERSION" + echo "Then re-run this script." + echo "" + read -rp "Press Enter after you have set GE-Proton in Steam, or Ctrl+C to abort..." +fi + PFX_C="$STEAM_HOME/.steam/steam/steamapps/compatdata/$APPID/pfx/drive_c" MSI="$PFX_C/ea_app.msi"