kyber-server: prompt for manual SWBF2 path if not found via Steam

Instead of hard-failing, show an rsync example for copying game files from
another machine, then prompt for the path. Validates that starwarsbattlefrontii.exe
exists at the given location before continuing.

Also silence "register_service: command not found" in all three services when
run standalone (guard with command -v check).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs
This commit is contained in:
Claude
2026-06-26 02:33:26 +00:00
parent 97ff75e4e2
commit 06d7e95dc0
3 changed files with 24 additions and 13 deletions
+2 -1
View File
@@ -30,7 +30,8 @@
# Without the fix: bwrap: setting up uid map: Permission denied
# ── Registration ──────────────────────────────────────────────────────────────
register_service kyber-launcher gaming "Kyber Launcher — native Linux AppImage for SWBF2 (2017) multiplayer (requires discrete GPU)"
command -v register_service &>/dev/null && \
register_service kyber-launcher gaming "Kyber Launcher — native Linux AppImage for SWBF2 (2017) multiplayer (requires discrete GPU)"
# ── Install function ──────────────────────────────────────────────────────────
install_kyber_launcher() {
+20 -11
View File
@@ -20,7 +20,8 @@
# and set KYBER_MAP_ROTATION to a base64-encoded rotation string (use the Kyber client
# HOST tab to build a rotation, then base64-encode it).
# ── Registration ──────────────────────────────────────────────────────────────
register_service kyber-server gaming "Kyber dedicated server for SWBF2 (2017) — headless, no GPU required"
command -v register_service &>/dev/null && \
register_service kyber-server gaming "Kyber dedicated server for SWBF2 (2017) — headless, no GPU required"
# ── Helpers ───────────────────────────────────────────────────────────────────
@@ -131,18 +132,26 @@ install_kyber_server() {
SWBF2_PATH=$(_kyber_find_swbf2)
if [[ -z "$SWBF2_PATH" ]]; then
log_warning "SWBF2 not found in standard Steam paths."
echo ""
echo " ╔══════════════════════════════════════════════════════════════╗"
echo " ║ ERROR: Star Wars Battlefront II (2017) not found. ║"
echo " ║ ║"
echo " ║ Install it first: ║"
echo " ║ 1. Install Steam: https://store.steampowered.com ║"
echo " ║ 2. In Steam, install SWBF2 (AppID 1237950): ║"
echo " ║ steam://install/1237950 ║"
echo " ║ 3. Re-run this installer once the download completes. ║"
echo " ╚══════════════════════════════════════════════════════════════╝"
echo " The dedicated server mounts the game files read-only — no Steam or EA"
echo " authentication needed at runtime. You can copy the game folder from"
echo " another machine that has SWBF2 installed:"
echo ""
return 1
echo " rsync -av --progress \\"
echo " '/path/to/STAR WARS Battlefront II/' \\"
echo " user@thisserver:/home/user/swbf2/"
echo ""
prompt_text "Enter the full path to the SWBF2 game folder (or leave blank to abort):" "" SWBF2_PATH
if [[ -z "$SWBF2_PATH" ]]; then
log_error "No path provided — cannot continue without game files."
return 1
fi
if [[ ! -f "$SWBF2_PATH/starwarsbattlefrontii.exe" ]]; then
log_error "starwarsbattlefrontii.exe not found in: $SWBF2_PATH"
log_error "Make sure you pointed to the root of the SWBF2 install folder."
return 1
fi
fi
log_success "Found SWBF2 at: $SWBF2_PATH"
+2 -1
View File
@@ -31,7 +31,8 @@
# Moonlight shows it as a launchable app. The Kyber AppImage must already
# be installed (run setup-kyber-linux.sh first).
# ── Registration ──────────────────────────────────────────────────────────
register_service sunshine homelab "Sunshine game streaming host for Moonlight clients (coexists with Wolf on offset ports)"
command -v register_service &>/dev/null && \
register_service sunshine homelab "Sunshine game streaming host for Moonlight clients (coexists with Wolf on offset ports)"
# ── Install function ──────────────────────────────────────────────────────
install_sunshine() {