feat: auto-install msitools in both SWBF2 setup scripts
Both scripts now detect and install msitools if missing, supporting apt-get (Debian/Ubuntu), dnf (Fedora), and pacman (Arch). Falls back to a clear error if the package manager is not recognised. Remove msitools from manual prerequisites in the doc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs
This commit is contained in:
@@ -19,13 +19,9 @@ wrapper to import the necessary registry entries on every launch.
|
|||||||
## Prerequisites (both setups)
|
## Prerequisites (both setups)
|
||||||
|
|
||||||
- SWBF2 (AppID 1237950) installed via Steam and fully downloaded
|
- 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
|
- 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
|
### EA account requirement
|
||||||
|
|
||||||
|
|||||||
@@ -126,10 +126,18 @@ echo "[2/6] ea_app.msi ($(( MSI_SIZE / 1048576 )) MB): OK"
|
|||||||
# ── Step 3: extract MSI on the host ────────────────────────────────────────
|
# ── Step 3: extract MSI on the host ────────────────────────────────────────
|
||||||
echo "[3/6] Extracting EA Desktop files from MSI (~30s)..."
|
echo "[3/6] Extracting EA Desktop files from MSI (~30s)..."
|
||||||
if ! command -v msiextract >/dev/null 2>&1; then
|
if ! command -v msiextract >/dev/null 2>&1; then
|
||||||
echo "ERROR: msitools not installed."
|
echo "msitools not found — installing..."
|
||||||
echo " Debian/Ubuntu: sudo apt-get install -y msitools"
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
echo " Fedora: sudo dnf install -y msitools"
|
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
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
EXTRACT_DIR="/tmp/ea_app_extracted_$$"
|
EXTRACT_DIR="/tmp/ea_app_extracted_$$"
|
||||||
rm -rf "$EXTRACT_DIR"
|
rm -rf "$EXTRACT_DIR"
|
||||||
|
|||||||
@@ -139,9 +139,18 @@ echo "[2/6] ea_app.msi ($(( MSI_SIZE / 1048576 )) MB): OK"
|
|||||||
# ── Step 3: extract MSI on the host ────────────────────────────────────────
|
# ── Step 3: extract MSI on the host ────────────────────────────────────────
|
||||||
echo "[3/6] Extracting EA Desktop files from MSI (~30s)..."
|
echo "[3/6] Extracting EA Desktop files from MSI (~30s)..."
|
||||||
if ! command -v msiextract >/dev/null 2>&1; then
|
if ! command -v msiextract >/dev/null 2>&1; then
|
||||||
echo "ERROR: msitools not installed."
|
echo "msitools not found — installing..."
|
||||||
echo " sudo apt-get install -y msitools"
|
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
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
EXTRACT_DIR="/tmp/ea_app_extracted_$$"
|
EXTRACT_DIR="/tmp/ea_app_extracted_$$"
|
||||||
rm -rf "$EXTRACT_DIR"
|
rm -rf "$EXTRACT_DIR"
|
||||||
|
|||||||
Reference in New Issue
Block a user