Files
Martin Pham 20dd7fe082 Home screen forwarders start a game with --rom and --core
From mihawk-99/PS5_RetroArch#34 (Martin Pham). A forwarder, a small app
with a home screen tile of its own, starts the title with --rom <file>
[--core <core>] [--exit-after-game] (each also as --x=<value>). On a
launch that names no mode, src/frontend_mode_ps5.cpp takes it as game
mode takes a frontend's request: the content (absolute, or inside
/app0/content/ and never above it) and the core are checked by
ps5_game_check, RetroArch starts with -L, and afterwards the title
opens as from the home screen, or closes with --exit-after-game.
Without --core the playlists choose, else the one core whose info file
lists the extension (Genesis Plus GX for the Mega Drive extensions both
Sega cores list) or, for a folder, the one core that opens folders. A
refusal goes to trace.txt and the launch goes on as from the home
screen; a handover's --ps5-mode wins over --rom.

Changed from the pull request: its README examples and test fixtures no
longer name games and use the ES-DE folder names content/ has now; one
header comment is moved to its declaration. Its line-ending rewrites of
the PowerShell scripts are dropped (they are gone, 8f14452), and its
GitHub workflow is parked in parked/github-build-workflow, with what
would finish it at the top of build.yml: it cannot run here, and it
does not fetch PS5_MihawkGen, which the frontend compiles now.

To prove it on a console, whose control payload launches without
arguments: the relaunch test takes its restarts' arguments from the
lines after the arm line, and tools/run-title.sh --relaunch-arg writes
them.

Evidence: tests/frontend_mode_ps5_test.cpp (parsing, paths, cores by
playlist, extension and folder, refusals, after the game);
tests/relaunch_ps5_test.cpp (arguments carried; a control character or
a ninth argument arms nothing). Gates: format, unit (204), build
(staged cores reused), integration, evidence PASS. Console: with this
series' deploy.
2026-10-17 21:42:17 -04:00

33 lines
1.8 KiB
Bash

#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# The host tools of the core and title jobs, in an ubuntu:26.04 container: README's (git, wget,
# unzip, make, patch, pkg-config, readelf, host compilers), what the core builds run (CMake,
# Ninja, autotools, Python 3), rev and flock for the SDK's scripts, and LLVM 22 as the unversioned
# clang, clang++ and llvm-config: /usr/bin/clang is the compiler tools/build-title.sh names
# (PS5_CLANG), and the SDK's wrappers run the LLVM its prospero-llvm-config finds, llvm-config
# when no llvm-config-15 to -21 is installed. LLVM 22 links what the project's checks expect:
# FreeBSD/PS5 core libraries (tools/check-core.py) and -z nodynamic-undefined-weak for the
# title's weak references. Its bin directory goes on PATH for the unversioned tools (llvm-objdump).
set -euo pipefail
apt-get update
apt-get install --yes --no-install-recommends \
ca-certificates git curl wget unzip zip xz-utils bzip2 file make build-essential pkgconf \
patch rsync ccache binutils cmake ninja-build autoconf automake libtool bison flex gperf \
bsdextrautils util-linux xxd python3 python3-pip python3-yaml python3-jsonschema \
clang-22 lld-22 llvm-22 libclang-rt-22-dev
git config --global --add safe.directory '*'
for tool in clang clang++ llvm-config; do
ln -sf "../lib/llvm-22/bin/$tool" "/usr/bin/$tool"
done
for version in 15 16 17 18 19 20 21; do
! command -v "llvm-config-$version" >/dev/null || { echo "llvm-config-$version would be the SDK's" >&2; exit 2; }
done
llvm=/usr/lib/llvm-22/bin
[[ -n ${GITHUB_PATH:-} ]] && echo "$llvm" >> "$GITHUB_PATH"
for tool in "$llvm/llvm-objdump" "$llvm/ld.lld" \
"$(clang --print-resource-dir)/lib/linux/libclang_rt.builtins-x86_64.a"; do
[[ -e $tool ]] || { echo "missing $tool" >&2; exit 2; }
done
clang --version | head -n 1
llvm-config --version