Files
PS5_RetroArch/tools/setup-ffpkg-tooling.ps1
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

44 lines
1.4 KiB
PowerShell

<#
ps5-native-app-boilerplate - Optional UFS2Tool bootstrapper.
Copyright (C) 2026 BlackBearReloaded
SPDX-License-Identifier: GPL-3.0-or-later
Delegates to the shared WSL bootstrapper, which fetches and builds a pinned
UFS2Tool checkout inside the ignored dependency cache.
#>
#requires -Version 5.1
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)
$setup = Join-Path $root "tools/setup-packaging-dependencies.sh"
function Fail([string]$Message) {
throw "ps5-native-app-boilerplate: $Message"
}
function WslPath([string]$Path) {
$absolute = [IO.Path]::GetFullPath($Path)
if ($absolute -notmatch '^([A-Za-z]):\\(.*)$') {
Fail "Path is not on a Windows drive visible to WSL: $absolute"
}
return "/mnt/$($Matches[1].ToLowerInvariant())/$($Matches[2].Replace('\', '/'))"
}
if (-not (Get-Command wsl.exe -ErrorAction SilentlyContinue)) {
Fail "WSL was not found."
}
if (-not (Test-Path -LiteralPath $setup -PathType Leaf)) {
Fail "Shared packaging bootstrapper was not found: $setup"
}
$binary = & wsl.exe --exec bash (WslPath $setup) ffpkg
if ($LASTEXITCODE -ne 0) {
Fail "Unable to fetch and build UFS2Tool."
}
if ($binary -is [array]) { $binary = $binary[-1] }
if (-not $binary) {
Fail "UFS2Tool bootstrapper did not return its runner path."
}
Write-Output $binary.Trim()