diff --git a/docs/SWBF2-2017-linux-setup.md b/docs/SWBF2-2017-linux-setup.md index 72b15b8..e9d5661 100644 --- a/docs/SWBF2-2017-linux-setup.md +++ b/docs/SWBF2-2017-linux-setup.md @@ -19,13 +19,9 @@ 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 — the setup scripts install this automatically if not present +- GE-Proton10-34 — installed automatically by the setup scripts if not present +- `msitools` — installed automatically by the setup scripts if not present - An EA account created at ea.com and linked to your Steam account -- `msitools` installed on the host: - ```bash - sudo apt-get install -y msitools # Debian / Ubuntu - sudo dnf install -y msitools # Fedora - ``` ### EA account requirement diff --git a/scripts/setup-swbf2-linux.sh b/scripts/setup-swbf2-linux.sh index d971f3d..aeb8f96 100755 --- a/scripts/setup-swbf2-linux.sh +++ b/scripts/setup-swbf2-linux.sh @@ -126,10 +126,18 @@ echo "[2/6] ea_app.msi ($(( MSI_SIZE / 1048576 )) MB): OK" # ── Step 3: extract MSI on the host ──────────────────────────────────────── echo "[3/6] Extracting EA Desktop files from MSI (~30s)..." if ! command -v msiextract >/dev/null 2>&1; then - echo "ERROR: msitools not installed." - echo " Debian/Ubuntu: sudo apt-get install -y msitools" - echo " Fedora: sudo dnf install -y msitools" - exit 1 + echo "msitools not found — installing..." + if command -v apt-get >/dev/null 2>&1; then + sudo apt-get install -y msitools + elif command -v dnf >/dev/null 2>&1; then + sudo dnf install -y msitools + elif command -v pacman >/dev/null 2>&1; then + sudo pacman -S --noconfirm msitools + else + echo "ERROR: Cannot auto-install msitools — package manager not recognised." + echo "Install msitools manually and re-run." + exit 1 + fi fi EXTRACT_DIR="/tmp/ea_app_extracted_$$" rm -rf "$EXTRACT_DIR" diff --git a/scripts/setup-swbf2-wolf.sh b/scripts/setup-swbf2-wolf.sh index 62115e9..b855016 100755 --- a/scripts/setup-swbf2-wolf.sh +++ b/scripts/setup-swbf2-wolf.sh @@ -139,9 +139,18 @@ echo "[2/6] ea_app.msi ($(( MSI_SIZE / 1048576 )) MB): OK" # ── Step 3: extract MSI on the host ──────────────────────────────────────── echo "[3/6] Extracting EA Desktop files from MSI (~30s)..." if ! command -v msiextract >/dev/null 2>&1; then - echo "ERROR: msitools not installed." - echo " sudo apt-get install -y msitools" - exit 1 + echo "msitools not found — installing..." + if command -v apt-get >/dev/null 2>&1; then + sudo apt-get install -y msitools + elif command -v dnf >/dev/null 2>&1; then + sudo dnf install -y msitools + elif command -v pacman >/dev/null 2>&1; then + sudo pacman -S --noconfirm msitools + else + echo "ERROR: Cannot auto-install msitools — package manager not recognised." + echo "Install msitools manually and re-run." + exit 1 + fi fi EXTRACT_DIR="/tmp/ea_app_extracted_$$" rm -rf "$EXTRACT_DIR"