Files
Sylpheed/tools/run-canary.sh
MechaCat02 6bdbf89ebc
All checks were successful
CI / Native — linux (pull_request) Successful in 37m56s
CI / WASM — Web (pull_request) Successful in 28m5s
CI / Formatting (pull_request) Successful in 59s
chore(tools): adopt the PPC manual and a canary launcher that works anywhere
CONSOLIDATION.md Phase 6. Both lived untracked in the project root -- on one
disk, backed up by nothing.

  tools/ppc-manual/   393 files, 3.7 MB. 455 instructions, 350 family pages,
                      598 mnemonics resolvable through index.json, plus the
                      generator that produced them.
  tools/run-canary.sh the oracle launcher.

🔴 THE LAUNCHER WAS BROKEN IN TWO WAYS AND IS REWRITTEN, not copied:

  * it pointed at `xenia-rs/sylpheed.iso`, a SYMLINK. Wine cannot resolve one
    and says "path invalid", which reads as a corrupt image rather than a path
    problem -- it has cost a session before. It now points at the real file and
    warns if handed a symlink.
  * it hardcoded one machine's absolute paths, and named `xenia-rs`, which this
    consolidation retires. Now derived from the script's own location, with
    SYLPH_CANARY_BIN / SYLPH_ISO overrides and a check that each exists.

The standing constraints are in its header where someone will read them: one
emulator at a time, Canary runs MUTED, and never judge a crash or a hang from
a Bash-launched run -- a SIGKILL that looked like the binary was the editor's
process supervisor.

⚠️ The manual's GENERATOR reads the xenia-rs source tree, which is going away.
Its decoder now lives here as crates/sylpheed-ppc, so the generator must be
repointed before it is run again. Recorded in the README rather than left for
someone to discover; the manual's content is checked in and regenerates from
nothing implicitly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 21:18:00 +02:00

32 lines
1.6 KiB
Bash
Executable File

#!/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 "$@"