Add PCSX2 and Dolphin to wolf.sh's auto-download emulators
Factored the existing Azahar-only download block into a reusable _wolf_download_emulator_appimage() helper (same fetch-latest-release- and-find-.AppImage-asset logic, parameterized), then reused it for: - PCSX2 (PS2) — officially publishes Linux AppImages via GitHub Releases (PCSX2/pcsx2), same pattern as Azahar. - Dolphin (GameCube/Wii) — dolphin-emu.org's own Linux distribution is Flatpak-only, no official AppImage at all. Uses the well-regarded community AppImage build (pkgforge-dev/Dolphin-emu-AppImage) instead, with explicit warnings before the prompt and in the generated README that this is a third-party build, not an official Dolphin release — so the user can decide knowingly rather than this silently substituting an unofficial build for what looks like an official option. Motivated by a live "could not write to/read from Wii system memory" error — GameCube/Wii isn't handled by a RetroArch libretro core in any stable way (Dolphin's libretro core is unstable for Wii specifically), so ES-DE needs a real standalone Dolphin binary to hand those systems off to, the same way it already does for 3DS via Azahar. Also updated the DRY-RUN summary and the generated README's emulators section to describe all three instead of just Azahar.
This commit is contained in:
+87
-39
@@ -205,6 +205,45 @@ fi
|
|||||||
|
|
||||||
register_service wolf gaming "Cloud gaming via Moonlight (Games-on-Whales Wolf)" 47989
|
register_service wolf gaming "Cloud gaming via Moonlight (Games-on-Whales Wolf)" 47989
|
||||||
|
|
||||||
|
# Downloads the latest GitHub-released AppImage for a standalone emulator into
|
||||||
|
# $EMU_DIR (skipped if a matching file is already there). AppImages dropped
|
||||||
|
# there are found automatically by ES-DE's app finder (it checks
|
||||||
|
# ~/Applications inside the container, mounted from emulators/) — this covers
|
||||||
|
# every system ES-DE hands off to a standalone frontend instead of a
|
||||||
|
# RetroArch libretro core (3DS, GameCube/Wii, PS2, ...). Same shape as the
|
||||||
|
# original Azahar-only download this was factored out of, just parameterized
|
||||||
|
# so PCSX2/Dolphin/anything else reuse the same fetch-latest-release logic
|
||||||
|
# instead of copy-pasting it per emulator.
|
||||||
|
_wolf_download_emulator_appimage() {
|
||||||
|
local _display_name="$1" _owner_repo="$2" _existing_glob="$3" _dir="$4"
|
||||||
|
if ls "$_dir"/$_existing_glob 2>/dev/null | grep -q .; then
|
||||||
|
log_info "$_display_name already present in $_dir/"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
local _get=""
|
||||||
|
echo ""
|
||||||
|
log_info "$_display_name can be auto-downloaded."
|
||||||
|
prompt_yn "Download $_display_name AppImage now? (y/n):" "y" _get
|
||||||
|
[[ "$_get" =~ ^[Yy]$ ]] || return 0
|
||||||
|
|
||||||
|
log_info "Fetching latest $_display_name release from GitHub..."
|
||||||
|
local _url
|
||||||
|
_url=$(curl -fsSL "https://api.github.com/repos/${_owner_repo}/releases/latest" \
|
||||||
|
| python3 -c "import sys,json; r=json.load(sys.stdin); \
|
||||||
|
print(next((a['browser_download_url'] for a in r['assets'] \
|
||||||
|
if a['name'].endswith('.AppImage')), ''))" 2>/dev/null)
|
||||||
|
if [[ -z "$_url" ]]; then
|
||||||
|
log_warning "Could not resolve download URL — get it manually from https://github.com/${_owner_repo}/releases"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local _file="$_dir/$(basename "$_url")"
|
||||||
|
curl -fL --progress-bar -o "$_file" "$_url" \
|
||||||
|
&& chmod +x "$_file" \
|
||||||
|
&& chown "$ACTUAL_USER:$ACTUAL_USER" "$_file" \
|
||||||
|
&& log_success "$_display_name downloaded: $_file" \
|
||||||
|
|| log_warning "Download failed — get it manually from https://github.com/${_owner_repo}/releases"
|
||||||
|
}
|
||||||
|
|
||||||
install_wolf() {
|
install_wolf() {
|
||||||
require_docker || return 1
|
require_docker || return 1
|
||||||
|
|
||||||
@@ -237,6 +276,8 @@ EOF
|
|||||||
echo " - Open Moonlight UFW ports: TCP ${WOLF_PORTS_TCP[*]} / UDP ${WOLF_PORTS_UDP[*]}"
|
echo " - Open Moonlight UFW ports: TCP ${WOLF_PORTS_TCP[*]} / UDP ${WOLF_PORTS_UDP[*]}"
|
||||||
echo " - Start Wolf and inject Steam + EmulationStation app profiles"
|
echo " - Start Wolf and inject Steam + EmulationStation app profiles"
|
||||||
echo " - Create bios/ + retroarch/{cores,shaders,overlays}/ on the game drive and pre-download RetroArch cores (~1.5 GB)"
|
echo " - Create bios/ + retroarch/{cores,shaders,overlays}/ on the game drive and pre-download RetroArch cores (~1.5 GB)"
|
||||||
|
echo " - Offer to auto-download standalone emulator AppImages into emulators/:"
|
||||||
|
echo " Azahar (3DS), PCSX2 (PS2), Dolphin (GameCube/Wii — unofficial community build)"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -771,37 +812,33 @@ UDEV
|
|||||||
log_success "Storage layout: $GAME_STORAGE_DIR/{roms/<system>/,steam,saves,media,emulators,...}"
|
log_success "Storage layout: $GAME_STORAGE_DIR/{roms/<system>/,steam,saves,media,emulators,...}"
|
||||||
log_info "ES-DE ROM directories pre-created. Drop ROMs in the matching subfolder."
|
log_info "ES-DE ROM directories pre-created. Drop ROMs in the matching subfolder."
|
||||||
|
|
||||||
# ── Optional: download Azahar (3DS emulator) ─────────────────────────────
|
# ── Optional: download standalone emulator AppImages ─────────────────────
|
||||||
# Azahar is an open-source Citra fork — the recommended legal 3DS emulator
|
# AppImages dropped in emulators/ are found automatically by ES-DE's app
|
||||||
# for ES-DE. AppImages dropped in emulators/ are found automatically by
|
# finder (checks ~/Applications inside the container). These are the
|
||||||
# ES-DE's app finder (checks ~/Applications inside the container).
|
# systems ES-DE hands off to a standalone frontend rather than a
|
||||||
local _AZAHAR_DIR="$GAME_STORAGE_DIR/emulators"
|
# RetroArch libretro core (Dolphin's libretro core in particular is
|
||||||
if ! ls "$_AZAHAR_DIR"/azahar*.AppImage 2>/dev/null | grep -q .; then
|
# unstable for Wii — confirmed live: "could not write to/read from Wii
|
||||||
local _get_az=""
|
# system memory" errors go away once a real standalone Dolphin build is
|
||||||
echo ""
|
# present instead).
|
||||||
log_info "3DS emulation: Azahar (open-source Citra fork) can be auto-downloaded."
|
local _EMU_DIR="$GAME_STORAGE_DIR/emulators"
|
||||||
prompt_yn "Download Azahar 3DS emulator AppImage now? (y/n):" "y" _get_az
|
_wolf_download_emulator_appimage \
|
||||||
if [[ "$_get_az" =~ ^[Yy]$ ]]; then
|
"Azahar (3DS — open-source Citra fork)" "azahar-emu/azahar" "azahar*.AppImage" "$_EMU_DIR"
|
||||||
log_info "Fetching latest Azahar release from GitHub..."
|
_wolf_download_emulator_appimage \
|
||||||
local _AZ_URL
|
"PCSX2 (PS2)" "PCSX2/pcsx2" "pcsx2*.AppImage" "$_EMU_DIR"
|
||||||
_AZ_URL=$(curl -fsSL "https://api.github.com/repos/azahar-emu/azahar/releases/latest" \
|
|
||||||
| python3 -c "import sys,json; r=json.load(sys.stdin); \
|
# Dolphin itself ships no official Linux AppImage — dolphin-emu.org's own
|
||||||
print(next((a['browser_download_url'] for a in r['assets'] \
|
# Linux distribution is Flatpak-only. pkgforge-dev/Dolphin-emu-AppImage is
|
||||||
if a['name'].endswith('.AppImage')), ''))" 2>/dev/null)
|
# a well-regarded THIRD-PARTY community build, not an official Dolphin
|
||||||
if [[ -n "$_AZ_URL" ]]; then
|
# release — flagged explicitly rather than silently offered as if it were
|
||||||
local _AZ_FILE="$_AZAHAR_DIR/$(basename "$_AZ_URL")"
|
# one, so skip it and grab Dolphin's own Flatpak/build by hand instead if
|
||||||
curl -fL --progress-bar -o "$_AZ_FILE" "$_AZ_URL" \
|
# you'd rather not run an unofficial build.
|
||||||
&& chmod +x "$_AZ_FILE" \
|
if ! ls "$_EMU_DIR"/*[Dd]olphin*.AppImage 2>/dev/null | grep -q .; then
|
||||||
&& chown "$ACTUAL_USER:$ACTUAL_USER" "$_AZ_FILE" \
|
log_warning "Dolphin (GameCube/Wii) has no official Linux AppImage (dolphin-emu.org ships Flatpak only)."
|
||||||
&& log_success "Azahar downloaded: $_AZ_FILE" \
|
log_warning "The option below is a well-regarded but THIRD-PARTY community build (pkgforge-dev), not"
|
||||||
|| log_warning "Download failed — get it manually from https://github.com/azahar-emu/azahar/releases"
|
log_warning "an official Dolphin release."
|
||||||
else
|
|
||||||
log_warning "Could not resolve download URL — get it manually from https://github.com/azahar-emu/azahar/releases"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
log_info "Azahar already present in $GAME_STORAGE_DIR/emulators/"
|
|
||||||
fi
|
fi
|
||||||
|
_wolf_download_emulator_appimage \
|
||||||
|
"Dolphin (GameCube/Wii, community AppImage build)" "pkgforge-dev/Dolphin-emu-AppImage" "*[Dd]olphin*.AppImage" "$_EMU_DIR"
|
||||||
|
|
||||||
# ── App selection ─────────────────────────────────────────────────────────
|
# ── App selection ─────────────────────────────────────────────────────────
|
||||||
echo ""
|
echo ""
|
||||||
@@ -3055,7 +3092,7 @@ Two things live on the game drive (\`$GAME_STORAGE_DIR\`):
|
|||||||
- \`retroarch/shaders/\` → ~/.config/retroarch/shaders (shaders/CRT filters — persist)
|
- \`retroarch/shaders/\` → ~/.config/retroarch/shaders (shaders/CRT filters — persist)
|
||||||
- \`retroarch/overlays/\` → ~/.config/retroarch/overlays (bezels/overlays — persist)
|
- \`retroarch/overlays/\` → ~/.config/retroarch/overlays (bezels/overlays — persist)
|
||||||
- \`saves/\` → /mnt/games/saves (RetroArch saves & states)
|
- \`saves/\` → /mnt/games/saves (RetroArch saves & states)
|
||||||
- \`emulators/\` → /mnt/games/emulators + ~/Applications (Azahar 3DS AppImage, etc.)
|
- \`emulators/\` → /mnt/games/emulators + ~/Applications (Azahar/PCSX2/Dolphin AppImages)
|
||||||
|
|
||||||
**2. \`wolf-state/\`** — Wolf's entire state folder (\`WOLF_STATE_DIR\` in
|
**2. \`wolf-state/\`** — Wolf's entire state folder (\`WOLF_STATE_DIR\` in
|
||||||
\`.env\`). This is the key to keeping games off the OS drive: it holds
|
\`.env\`). This is the key to keeping games off the OS drive: it holds
|
||||||
@@ -3096,14 +3133,25 @@ ES-DE is usable the moment you launch it; only ROMs and BIOS are yours to add.
|
|||||||
- **Exit a game** back to ES-DE: Start+Select opens the RetroArch menu → Quit,
|
- **Exit a game** back to ES-DE: Start+Select opens the RetroArch menu → Quit,
|
||||||
or use the Wolf hotkey START+UP+RB (Ctrl+Alt+Shift+W on a keyboard).
|
or use the Wolf hotkey START+UP+RB (Ctrl+Alt+Shift+W on a keyboard).
|
||||||
|
|
||||||
## 3DS emulation
|
## Standalone emulators (3DS / PS2 / GameCube+Wii)
|
||||||
Azahar (open-source Citra fork) AppImage lives in \`emulators/\` → mounted at
|
RetroArch's own libretro cores handle these systems poorly or not at all
|
||||||
\`/mnt/games/emulators\` and \`~/Applications\` (where ES-DE's app finder looks).
|
(Dolphin's libretro core in particular is unstable for Wii), so ES-DE hands
|
||||||
Point ES-DE's 3DS system at it via Alternative Emulators if it isn't
|
them off to standalone AppImages instead:
|
||||||
auto-detected. Re-download with:
|
|
||||||
\`\`\`bash
|
- **Azahar** (3DS, open-source Citra fork) — official releases
|
||||||
cd $WOLF_DIR && ./manage.sh apps
|
- **PCSX2** (PS2) — official releases
|
||||||
\`\`\`
|
- **Dolphin** (GameCube/Wii) — Dolphin itself ships no official Linux
|
||||||
|
AppImage (dolphin-emu.org's own Linux distribution is Flatpak-only); this
|
||||||
|
uses a well-regarded but **third-party** community AppImage build
|
||||||
|
(pkgforge-dev) instead. Skip it and install Dolphin's own Flatpak by hand
|
||||||
|
if you'd rather not run an unofficial build.
|
||||||
|
|
||||||
|
All three live in \`emulators/\` → mounted at \`/mnt/games/emulators\` and
|
||||||
|
\`~/Applications\` (where ES-DE's app finder looks). Point ES-DE's
|
||||||
|
3DS/PS2/GameCube/Wii systems at one via Alternative Emulators if it isn't
|
||||||
|
auto-detected. Missing ones get offered again on a fresh install
|
||||||
|
(\`sudo ./setup.sh wolf\`); to grab just one by hand, download its AppImage
|
||||||
|
into \`emulators/\`, \`chmod +x\` it.
|
||||||
|
|
||||||
## Troubleshooting: app exits immediately ("Permission denied")
|
## Troubleshooting: app exits immediately ("Permission denied")
|
||||||
If a launcher (Steam, etc.) closes the moment it opens, its Wolf-managed home
|
If a launcher (Steam, etc.) closes the moment it opens, its Wolf-managed home
|
||||||
|
|||||||
Reference in New Issue
Block a user