Files
PS5_RetroArch/tools/setup-test-dependencies.sh
T
Mihawk 4df5c68c11 Scaffold the native pipeline for RetroArch, with the display layer
Sets up this project as the native pipeline's scaffolding plus RetroArch's
sources, so RetroArch is compiled for the title pipeline rather than converted
into it.

- tools/scaffold-native.sh builds the scaffold from
  ../ps5-native-app-boilerplate-main: tooling, runtime (digest verified),
  Makefile and its tools, merged into this repository's tools/ rather than
  replacing them. An earlier version replaced tools/ wholesale and deleted this
  project's own scripts; the copy is now additive and the reason is in the file.
- tools/fetch-retroarch.sh clones the pinned upstream tag into vendor/ and
  records the revision, so "built from RetroArch 1.22.2" is checkable.
- src/display.{hpp,cpp} owns the console's display: VideoOut, direct memory, two
  registered buffers, present-and-wait. The sequence and its two load-bearing
  details come from the sibling application that proved it on hardware.
- src/main.cpp draws a moving bar: the cheapest thing that proves build, title
  format, launcher, VideoOut and the direct-memory path together.
- sce_sys/param.json is this project's identity, PPSA99169.

Evidence: src/display.cpp compiles through the pipeline's compiler
(tooling/prospero-clang18 with PS5_CLANG=/usr/bin/clang, -std=c++20), and a
RetroArch source file compiles the same way with its include paths.
2026-09-18 13:50:22 -04:00

53 lines
1.7 KiB
Bash

#!/usr/bin/env bash
# ps5-native-app-boilerplate - Host test dependency bootstrapper.
# Copyright (C) 2026 BlackBearReloaded
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Fetches a verified GoogleTest source release into the ignored dependency cache.
set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
version="1.17.0"
directory="$root/.deps/test/googletest"
source="$directory/googletest-$version"
archive="$directory/googletest-$version.tar.gz"
stamp="$directory/.source-sha256"
url="https://github.com/google/googletest/archive/refs/tags/v$version.tar.gz"
hash="65fab701d9829d38cb77c14acdc431d2108bfdbf8979e40eb8ae567edf10b27c"
for command in wget sha256sum tar; do
command -v "$command" >/dev/null || {
echo "missing required command: $command" >&2
exit 2
}
done
mkdir -p "$directory"
if [[ -f $archive ]] &&
! printf '%s %s\n' "$hash" "$archive" | sha256sum --check --strict >/dev/null 2>&1; then
rm -f -- "$archive"
fi
if [[ ! -f $archive ]]; then
temporary="$archive.download"
rm -f -- "$temporary"
wget -q "$url" -O "$temporary"
printf '%s %s\n' "$hash" "$temporary" | sha256sum --check --strict >/dev/null
mv "$temporary" "$archive"
fi
if [[ ! -f $source/googletest/include/gtest/gtest.h ||
! -f $stamp || $(<"$stamp") != "$hash" ]]; then
echo "==> [test-deps] Extracting GoogleTest $version" >&2
rm -rf -- "$source"
tar -xzf "$archive" -C "$directory"
printf '%s\n' "$hash" >"$stamp"
fi
[[ -f $source/googletest/src/gtest-all.cc &&
-f $source/googletest/src/gtest_main.cc ]] || {
echo "the pinned GoogleTest source tree is incomplete" >&2
exit 2
}
printf '%s\n' "$source"