#!/usr/bin/env bash # Launch Xenia Canary on the title — the oracle, not our renderer and not the port. # # tools/run-canary.sh [extra canary flags...] # # 🔴 THE VERSION THIS REPLACES WAS BROKEN IN TWO WAYS, and both are worth # knowing because both cost a session: # # * it pointed at `xenia-rs/sylpheed.iso`, a SYMLINK — Wine cannot resolve one # and reports "path invalid", which reads as a corrupt image rather than a # path problem. Point at the real file. # * it hardcoded `/home/fabi/RE Project Sylpheed/...`, so it worked on exactly # one machine, and `xenia-rs` is retired (docs/agents/CONSOLIDATION.md). # # ⚠️ Standing constraints, none of them optional: # * ONE emulator process at a time — ours or Canary, never both. # * Canary runs MUTED (`mute=true` in its config). # * NEVER judge a crash, a hang or a freeze from a Bash-launched run. A SIGKILL # that looked like the binary turned out to be the editor's process # supervisor. Ask the human to run it natively. set -euo pipefail PROJECT="${SYLPH_PROJECT_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}" CANARY="${SYLPH_CANARY_BIN:-$PROJECT/xenia-canary/build/bin/Linux/Release/xenia_canary}" ISO="${SYLPH_ISO:-$PROJECT/Project Sylpheed - Arc of Deception (USA, Europe) (En,Ja).iso}" [ -x "$CANARY" ] || { echo "no canary binary at $CANARY — set SYLPH_CANARY_BIN" >&2; exit 1; } [ -f "$ISO" ] || { echo "no ISO at $ISO — set SYLPH_ISO" >&2; exit 1; } [ -L "$ISO" ] && echo "⚠️ $ISO is a SYMLINK; Wine will report 'path invalid'" >&2 exec "$CANARY" "$ISO" --log_level=3 --disable_instruction_infocache=true "$@"