Files
libretro/ports/batocera/RetroBIOS.sh
T
Abdessamad Derraz 801a0150e6 feat: run the handheld launchers in the tui
The PortMaster port now starts install.py --tui on the console (or in
foot or xterm under a compositor), with gptokeyb in kill mode on the
installer's path, retrobios.gptk, TERM=linux and a Terminus font, and
puts the console, font and mapper back on exit. pugwash screens stay as
the fallback where no terminal can show, and start in no-check mode so
PortMaster's A/B fix applies. Without a network, every launcher installs
from a pack found on the card or names the pack and the folder.

Adds launchers for Batocera and Knulli (Ports, evmapy .keys), muOS
(.muxapp in muxterm with gptokeyb2) and the Tools menu of ArkOS,
dArkOS, ROCKNIX, JELOS and AmberELEC, built by build_port.py with the
pinned installer and tested on a simulated device.
2026-10-23 16:26:47 +02:00

36 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# RetroBIOS for Batocera and Knulli, started from Ports: checks the BIOS
# folder and downloads the files it lacks, in the installer's full-screen
# interface. Batocera gives the controller the keys of RetroBIOS.sh.keys
# (evmapy) while this runs.
#
# The interface needs a terminal the player can see, and EmulationStation
# covers the console. In order: xterm or foot in the graphical session, else
# console 4 switched to and back from. Console 4 because Batocera's exit
# hotkey sends Alt+F4 (batocera_launch emulators/sh.py), which on a console
# switches to console 4: there it leaves the interface where it is.
HERE="$(cd "$(dirname "$0")" && pwd)"
RB_DIR="$HERE/retrobios"
RB_ROUTES="app vt"
RB_VT_SWITCH="${RB_VT_SWITCH:-4}"
RB_PACK_PATH="$RB_DIR:$HERE:/userdata"
RB_LOG="$RB_DIR/log.txt"
# The X11 builds start EmulationStation on display :0, which a script run
# from it does not always inherit.
if [ -z "${DISPLAY:-}" ] && [ -z "${WAYLAND_DISPLAY:-}" ] && [ -S /tmp/.X11-unix/X0 ]; then
export DISPLAY=:0
fi
# shellcheck source=../shared/tui.txt
source "$RB_DIR/tui.txt"
: > "$RB_LOG"
rb_select_python
# A launcher's own arguments are not install.py's (muOS passes the app folder).
# shellcheck disable=SC2119
rb_launch
status=$?
rb_release_python
exit $status