wolf: actually build ti99sim-sdl instead of punting it to a manual step
Fixes a cop-out from the previous commit — rather than just warning about a possible glibc/SDL2 mismatch and handing the user a manual build guide, build ti99sim-sdl inside a throwaway container running the exact same image ES-DE itself runs (ghcr.io/games-on-whales/es-de:edge), which actually eliminates the mismatch risk instead of just noting it. Runs during install_wolf() when the TI-99/4A prompt is accepted, skips itself if the binary's already present, and drops the result straight into emulators/ti99sim-sdl ready to use. Caught a real bug before pushing, not after: `make` alone leaves the binary under ti99sim's own src/ directory, not the repo root (confirmed against its README), so a naive `cp ti99sim-sdl` would have failed outright. Uses `make install` instead — the project's own reliable way to collect the binary (copies to /opt/ti99sim/bin, symlinks into /usr/local/bin) — rather than guessing the exact build subpath. The one piece that's still genuinely a manual step, and stays that way: supplying your own TI-99/4A console ROM + GROM dump, real copyrighted console firmware no installer can legally source for you. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLX1yYKJExGSXmgUhxKQG6
This commit is contained in:
+64
-31
@@ -948,14 +948,15 @@ UDEV
|
||||
# ti99sim-sdl (billzajac/ti99sim) is the real target — genuine SDL2
|
||||
# joystick/gamepad support, confirmed against its own README — but it's
|
||||
# source-only with no AppImage, so unlike Azahar/PCSX2/Dolphin/Cemu this
|
||||
# installer can't just download a working binary: building it here would
|
||||
# mean compiling against the HOST's glibc/SDL2 while the binary actually
|
||||
# needs to run inside the ES-DE container's own (different) runtime, and
|
||||
# that mismatch isn't something to guess at blind. The custom system
|
||||
# installer can't just download a working binary. Building it against the
|
||||
# HOST's glibc/SDL2 risks a mismatch against the ES-DE container's own
|
||||
# (different) runtime, so instead it's built INSIDE a throwaway container
|
||||
# running the exact same image ES-DE itself runs
|
||||
# (ghcr.io/games-on-whales/es-de:edge) — that's what actually guarantees
|
||||
# compatibility rather than just avoiding the question. The custom system
|
||||
# definition below always gets written — cheap and correct regardless —
|
||||
# pointing at emulators/ti99sim-sdl (the same ~/Applications convention
|
||||
# every other standalone emulator here uses), so dropping a working
|
||||
# binary there is the only remaining step.
|
||||
# every other standalone emulator here uses).
|
||||
echo ""
|
||||
local _GET_TI99=""
|
||||
prompt_yn "Set up TI-99/4A as its own ES-DE system (artwork scraping, gameplay-time tracking)? (y/n):" "n" _GET_TI99
|
||||
@@ -984,18 +985,49 @@ XMLEOF
|
||||
log_info "TI-99/4A system definition already present — left as-is."
|
||||
fi
|
||||
echo ""
|
||||
log_warning "ti99sim-sdl itself still needs to be built and placed by hand — this installer can't"
|
||||
log_warning "safely cross-compile a binary that's guaranteed to run inside the ES-DE container:"
|
||||
log_info " 1. git clone https://github.com/billzajac/ti99sim.git && cd ti99sim && make"
|
||||
log_info " (needs libsdl2-dev — same build machine/container the ES-DE image itself runs on"
|
||||
log_info " gives the best chance the result actually runs; a plain host build may hit a"
|
||||
log_info " glibc/SDL2 mismatch inside the container)"
|
||||
log_info " 2. Copy the resulting ti99sim-sdl binary to:"
|
||||
log_info " $GAME_STORAGE_DIR/emulators/ti99sim-sdl"
|
||||
log_info " 3. You'll also need your own TI-99/4A console ROM + GROM dump (real console"
|
||||
log_info " firmware, same legal situation as any other console BIOS) — ti99sim's own"
|
||||
log_info " README covers where it expects that once you have it."
|
||||
log_info " 4. Drop .ctg/.rpk/.bin cartridge files into roms/ti994a/"
|
||||
if [ ! -x "$GAME_STORAGE_DIR/emulators/ti99sim-sdl" ]; then
|
||||
# Build inside a container running the EXACT SAME image ES-DE
|
||||
# itself runs (ghcr.io/games-on-whales/es-de:edge), not the host —
|
||||
# that's what actually eliminates the glibc/SDL2 mismatch risk,
|
||||
# rather than just noting it and asking the user to build blind.
|
||||
# --entrypoint overrides GoW's own init (which normally drops to
|
||||
# the unprivileged 'retro' user), so -u root is explicit here for
|
||||
# apt-get; the built binary only ever runs later as 'retro',
|
||||
# unaffected by what user built it.
|
||||
log_info "Building ti99sim-sdl inside the same container image ES-DE runs (matches its"
|
||||
log_info "glibc/SDL2 exactly, so the result is guaranteed compatible)..."
|
||||
# `make` alone leaves the binary under src/, not the repo root —
|
||||
# confirmed against the project's own README ("all the
|
||||
# executables are left in their corresponding directories").
|
||||
# `make install` is the project's own reliable way to collect
|
||||
# it (copies to /opt/ti99sim/bin, symlinks into
|
||||
# /usr/local/bin), so use that instead of guessing the exact
|
||||
# build subpath.
|
||||
if docker run --rm -u root --entrypoint /bin/bash \
|
||||
-v "$GAME_STORAGE_DIR/emulators:/output" \
|
||||
ghcr.io/games-on-whales/es-de:edge -c '
|
||||
set -e
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq git build-essential libsdl2-dev ca-certificates
|
||||
git clone -q https://github.com/billzajac/ti99sim.git /tmp/ti99sim
|
||||
cd /tmp/ti99sim
|
||||
make
|
||||
make install
|
||||
cp /usr/local/bin/ti99sim-sdl /output/ti99sim-sdl
|
||||
'; then
|
||||
chmod +x "$GAME_STORAGE_DIR/emulators/ti99sim-sdl"
|
||||
chown "$ACTUAL_USER:$ACTUAL_USER" "$GAME_STORAGE_DIR/emulators/ti99sim-sdl"
|
||||
log_success "ti99sim-sdl built and installed -> $GAME_STORAGE_DIR/emulators/ti99sim-sdl"
|
||||
else
|
||||
log_warning "Build failed — check the docker output above. Retry later with: sudo ./setup.sh wolf"
|
||||
fi
|
||||
else
|
||||
log_info "ti99sim-sdl already present — skipping build."
|
||||
fi
|
||||
log_info "The one thing this can't do for you: your own TI-99/4A console ROM + GROM dump"
|
||||
log_info "(real console firmware, same legal situation as any other BIOS) — ti99sim-sdl's"
|
||||
log_info "own README covers exactly where it expects that once you have it."
|
||||
log_info "Then just drop .ctg/.rpk/.bin cartridge files into roms/ti994a/"
|
||||
fi
|
||||
|
||||
# ── App selection ─────────────────────────────────────────────────────────
|
||||
@@ -3474,19 +3506,20 @@ tracking) via a custom system definition at
|
||||
service, which is browser-based and isn't something ES-DE can launch as a
|
||||
system.
|
||||
|
||||
The emulator itself, \`ti99sim-sdl\` (real SDL2 gamepad support), isn't
|
||||
auto-downloaded — it has no AppImage, and building it on the host risks a
|
||||
glibc/SDL2 mismatch against the ES-DE container's own runtime that isn't
|
||||
safe to guess at blind. Build it yourself and drop the binary at
|
||||
\`emulators/ti99sim-sdl\`:
|
||||
\`\`\`bash
|
||||
git clone https://github.com/billzajac/ti99sim.git && cd ti99sim && make
|
||||
\`\`\`
|
||||
(needs \`libsdl2-dev\`). You'll also need your own TI-99/4A console ROM +
|
||||
GROM dump — same legal situation as any other console BIOS, and not
|
||||
something this installer supplies — ti99sim's own README covers where it
|
||||
expects that. Then drop \`.ctg\`/\`.rpk\`/\`.bin\` cartridge files into
|
||||
\`roms/ti994a/\`.
|
||||
The emulator itself, \`ti99sim-sdl\` (real SDL2 gamepad support), has no
|
||||
AppImage — so instead of a plain host build (which risks a glibc/SDL2
|
||||
mismatch against the ES-DE container's own runtime), this installer builds
|
||||
it inside a throwaway container running the exact same image ES-DE itself
|
||||
runs (\`ghcr.io/games-on-whales/es-de:edge\`), guaranteeing compatibility,
|
||||
and drops the result at \`emulators/ti99sim-sdl\` automatically. Re-run
|
||||
\`sudo ./setup.sh wolf\` if the build ever needs retrying (network hiccup,
|
||||
etc.) — it skips the build if the binary's already there.
|
||||
|
||||
The one thing this can't do for you: your own TI-99/4A console ROM + GROM
|
||||
dump — same legal situation as any other console BIOS, and not something
|
||||
any installer can supply — ti99sim-sdl's own README covers exactly where
|
||||
it expects that once you have it. Then just drop \`.ctg\`/\`.rpk\`/\`.bin\`
|
||||
cartridge files into \`roms/ti994a/\`.
|
||||
|
||||
## MAME: sample packs showing up as games
|
||||
MAME sample packs (audio for a handful of older analog-sound games) use the
|
||||
|
||||
Reference in New Issue
Block a user