mirror of
https://github.com/mihawk-99/PS5_RetroArch.git
synced 2026-10-18 23:09:29 -05:00
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.
64 lines
1.9 KiB
PowerShell
64 lines
1.9 KiB
PowerShell
<#
|
|
ps5-native-app-boilerplate - Native dependency bootstrapper.
|
|
Copyright (C) 2026 BlackBearReloaded
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
Runs the canonical Linux/WSL dependency bootstrap and returns its paths as
|
|
JSON for PowerShell callers.
|
|
#>
|
|
|
|
#requires -Version 5.1
|
|
param(
|
|
[switch]$SkipSdk
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)
|
|
|
|
function Fail([string]$Message) {
|
|
throw "ps5-native-app-boilerplate: $Message"
|
|
}
|
|
|
|
function Convert-ToWslPath([string]$Path) {
|
|
$absolute = [IO.Path]::GetFullPath($Path)
|
|
if ($absolute -notmatch '^([A-Za-z]):\\(.*)$') {
|
|
Fail "The repository must be on a Windows drive visible to WSL."
|
|
}
|
|
return "/mnt/$($Matches[1].ToLowerInvariant())/$($Matches[2].Replace('\', '/'))"
|
|
}
|
|
|
|
if (-not (Get-Command wsl.exe -ErrorAction SilentlyContinue)) {
|
|
Fail "WSL was not found."
|
|
}
|
|
|
|
$script = Convert-ToWslPath (Join-Path $root "tools/setup-native-dependencies.sh")
|
|
$arguments = @("--exec", "bash", $script)
|
|
if ($SkipSdk) {
|
|
$arguments += "--skip-sdk"
|
|
}
|
|
$lines = @(& wsl.exe @arguments)
|
|
if ($LASTEXITCODE -ne 0) {
|
|
Fail "Native dependency bootstrap failed."
|
|
}
|
|
|
|
$values = @{}
|
|
foreach ($line in $lines) {
|
|
if ($line -match '^([A-Z_]+)=(.*)$') {
|
|
$values[$Matches[1]] = $Matches[2]
|
|
}
|
|
}
|
|
foreach ($name in @("ZLIB_INCLUDE", "ZLIB_ARCHIVE")) {
|
|
if (-not $values.ContainsKey($name)) {
|
|
Fail "Native dependency bootstrap did not report $name."
|
|
}
|
|
}
|
|
if (-not $SkipSdk -and -not $values.ContainsKey("SDK_ROOT")) {
|
|
Fail "Native dependency bootstrap did not report SDK_ROOT."
|
|
}
|
|
|
|
[pscustomobject]@{
|
|
sdkRoot = if ($SkipSdk) { "" } else { $values["SDK_ROOT"] }
|
|
zlibInclude = $values["ZLIB_INCLUDE"]
|
|
zlibArchive = $values["ZLIB_ARCHIVE"]
|
|
} | ConvertTo-Json -Compress
|