mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-25 05:09:03 -05:00
Without a network, muOS and ArkOS launchers ask to copy the BIOS files from the card the system does not read (muOS bind.sh, dArkOS roms2), then install with --from and the pack. CI checks that shellcheck is present, and the test fails under CI without it.
60 lines
1.9 KiB
Bash
Executable File
60 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
# HELP: Checks the BIOS folder and installs the missing BIOS files
|
|
# ICON: retrobios
|
|
# GRID: RetroBIOS
|
|
|
|
# RetroBIOS for muOS, from Applications: the installer's full-screen
|
|
# interface in muxterm, the terminal muOS's own Terminal core runs, with
|
|
# PortMaster's gptokeyb2 adding the keys muxterm leaves unmapped. Without
|
|
# muxterm it runs on the console with the full mapping.
|
|
|
|
MUOS="${RB_MUOS:-/opt/muos}"
|
|
# shellcheck source=/dev/null
|
|
. "$MUOS/script/var/retro.sh"
|
|
SETUP_APP "retrobios" ""
|
|
|
|
APP_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
ROM_MOUNT="$(GET_VAR "device" "storage/rom/mount")"
|
|
PM_DIR="$ROM_MOUNT/MUOS/PortMaster"
|
|
MUXTERM="$MUOS/frontend/muxterm"
|
|
|
|
RB_DIR="$APP_DIR"
|
|
RB_PACK_PATH="$APP_DIR:$ROM_MOUNT"
|
|
RB_LOG="$APP_DIR/log.txt"
|
|
# muOS binds MUOS/bios from SD2 when that card has one, else from SD1, onto
|
|
# /run/muos/storage/bios (script/device/bind.sh:10-11,30-52): the other card's
|
|
# MUOS/bios is the one offered to copy from.
|
|
SD2_MOUNT="$(GET_VAR "device" "storage/sdcard/mount")"
|
|
RB_OTHER_CARDS="$ROM_MOUNT/MUOS/bios:$SD2_MOUNT/MUOS/bios"
|
|
RB_BIOS_DEST="${RB_BIOS_DEST:-/run/muos/storage/bios}"
|
|
# PortMaster keeps its runtimes here: the Python runtime is used when
|
|
# PortMaster has downloaded it.
|
|
controlfolder="$PM_DIR"
|
|
|
|
# shellcheck source=../shared/tui.txt
|
|
source "$APP_DIR/tui.txt"
|
|
: > "$RB_LOG"
|
|
|
|
if [ -x "$PM_DIR/gptokeyb2" ]; then
|
|
# As muOS's own launchers start it (script/launch/ext-xroar.sh).
|
|
ln -sf "$PM_DIR/libinterpose.aarch64.so" "/usr/lib/libinterpose.aarch64.so" >/dev/null 2>&1
|
|
RB_MAPPER="$PM_DIR/gptokeyb2"
|
|
fi
|
|
if [ -x "$MUXTERM" ]; then
|
|
RB_ROUTES="app"
|
|
RB_TERMAPP=("$MUXTERM" --gl --)
|
|
RB_GPTK="$APP_DIR/muxterm.gptk"
|
|
else
|
|
RB_ROUTES="vt"
|
|
RB_CONSOLE="${RB_CONSOLE:-/dev/tty0}"
|
|
RB_GPTK="$APP_DIR/retrobios.gptk"
|
|
fi
|
|
|
|
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
|