Skip to content

ReStreet: FIFA Street (2012) recompiled for Windows PC, with online play, a launcher with friends, chat and rooms. Bring your own game.

fix: pin CI to published validated inputs and share backend integrity manifest

SamuelitoDaVila8f0718d63d45
diff --git a/.gitignore b/.gitignore
index 2cc40c7..e67a4e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ compiler/
**/out/
build/
dist/
+.ci-inputs/
publish/
*.exe
*.dll
diff --git a/Installer/BuildFifaStreet.ps1 b/Installer/BuildFifaStreet.ps1
index ef85fe3..a2b3dd2 100644
--- a/Installer/BuildFifaStreet.ps1
+++ b/Installer/BuildFifaStreet.ps1
@@ -304,8 +304,19 @@ $expectedBackends = @{
}
}
-foreach ($backendName in @('D3D12', 'Vulkan')) {
- $sourceBackend = Join-Path $bundledBackends $backendName
+foreach ($backendName in @('D3D12', 'Vulkan')) {
+ # New bundles carry the exact backend manifest verified during packaging.
+ # Retain the legacy constants above for historical v0.3 bundles.
+ $backendManifestPath = Join-Path $installerRoot 'backend-manifest.json'
+ if (Test-Path -LiteralPath $backendManifestPath) {
+ $backendManifest = Get-Content -LiteralPath $backendManifestPath -Raw | ConvertFrom-Json
+ $entry = $backendManifest.backends.$backendName
+ if (!$entry -or $entry.runtimeHash -notmatch '^[a-fA-F0-9]{64}$' -or $entry.gpuHash -notmatch '^[a-fA-F0-9]{64}$') {
+ throw "Invalid backend integrity manifest: $backendName"
+ }
+ $expectedBackends[$backendName] = @{ RuntimeHash = $entry.runtimeHash; GpuHash = $entry.gpuHash }
+ }
+ $sourceBackend = Join-Path $bundledBackends $backendName
$destinationBackend = Join-Path $outputBackends $backendName
$sourceRuntime = Join-Path $sourceBackend 'rexruntime.dll'
@@ -319,8 +330,8 @@ foreach ($backendName in @('D3D12', 'Vulkan')) {
throw "$backendName rexgpu-xenos.dll was not found: $sourceGpu"
}
- $runtimeHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $sourceRuntime).Hash
- $gpuHash = (Get-FileHash -Algorithm SHA256 -LiteralPath $sourceGpu).Hash
+ $runtimeHash = Get-InputSha256 $sourceRuntime
+ $gpuHash = Get-InputSha256 $sourceGpu
if ($runtimeHash -ne $expectedBackends[$backendName].RuntimeHash) {
throw "$backendName rexruntime.dll is not the validated runtime."
diff --git a/Installer/BuildSetup.ps1 b/Installer/BuildSetup.ps1
index b83949d..2eed39a 100644
--- a/Installer/BuildSetup.ps1
+++ b/Installer/BuildSetup.ps1
@@ -22,7 +22,8 @@ $backendInputs = Get-Content -LiteralPath $BackendManifest -Raw | ConvertFrom-Js
$stage = Join-Path $env:TEMP ('FifaStreetPackage_' + [guid]::NewGuid().ToString('N'))
$utf8 = [Text.UTF8Encoding]::new($false)
New-Item -ItemType Directory -Path $stage | Out-Null
-foreach ($name in @('BuildFifaStreet.ps1', 'BuildIntegrity.ps1', 'README.md')) { Copy-Item -LiteralPath (Join-Path $root $name) -Destination $stage }
+foreach ($name in @('BuildFifaStreet.ps1', 'BuildIntegrity.ps1', 'README.md')) { Copy-Item -LiteralPath (Join-Path $root $name) -Destination $stage }
+Copy-Item -LiteralPath $BackendManifest -Destination (Join-Path $stage 'backend-manifest.json')
$template = Join-Path $stage 'recomp-template'
foreach ($name in @('', 'config', 'src', 'generated')) { New-Item -ItemType Directory -Path (Join-Path $template $name) -Force | Out-Null }
foreach ($name in @('CMakeLists.txt','CMakePresets.json','fifastreet_manifest.toml','config\fifadllzf_overrides.toml','config\footballcompeng_overrides.toml','src\main.cpp','src\fifastreet_app.h','src\stubs.cpp','generated\rexglue.cmake')) {
diff --git a/Installer/TestSourceBackend.ps1 b/Installer/TestSourceBackend.ps1
index 8e99027..87663dc 100644
--- a/Installer/TestSourceBackend.ps1
+++ b/Installer/TestSourceBackend.ps1
@@ -1,7 +1,7 @@
$ErrorActionPreference = 'Stop'
. (Join-Path $PSScriptRoot 'InstallSourceBackend.ps1')
. (Join-Path $PSScriptRoot 'BuildIntegrity.ps1')
-$testRoot = Join-Path $env:TEMP ('FifaSourceBackendTest_' + [guid]::NewGuid().ToString('N'))
+$testRoot = Join-Path ([IO.Path]::GetTempPath()) ('FifaSourceBackendTest_' + [guid]::NewGuid().ToString('N'))
$runtime = Join-Path $testRoot 'runtime'
$output = Join-Path $testRoot 'output'
New-Item -ItemType Directory -Path $runtime -Force | Out-Null
diff --git a/ci/backend-manifest.json b/ci/backend-manifest.json
new file mode 100644
index 0000000..b70312e
--- /dev/null
+++ b/ci/backend-manifest.json
@@ -0,0 +1,15 @@
+{
+ "version": "v0.3.0",
+ "backends": {
+ "D3D12": {
+ "source": "out/win-amd64/Release",
+ "runtimeHash": "790b6b1b13765249160e53dce6f28af0f03b66d5d1aedb1054949c50b13f04e8",
+ "gpuHash": "461a88f1d27c605106453b0f3c92bd72bd4bc166dcdc0bbf01e825bcefb8418d"
+ },
+ "Vulkan": {
+ "source": "out/win-amd64-vulkan/Release",
+ "runtimeHash": "115722cc5905d07fc6a6212b47692ffe6405dd1ba9f87cda97f8da2c25e4767a",
+ "gpuHash": "71fa61d82ff6134f1f407d682acebac01f2b3b2dcefcc34151a0c082b746bdd2"
+ }
+ }
+}
diff --git a/ci/build-inputs.json b/ci/build-inputs.json
index a2c1b73..461760a 100644
--- a/ci/build-inputs.json
+++ b/ci/build-inputs.json
@@ -1,4 +1,4 @@
{
- "version": "v0.4.0-candidate",
- "sha256": "660a3d807f7bbff394aa7e6f740d45064924523af09c719c5c37aa9b14d9b67d"
+ "version": "v0.3.0",
+ "sha256": "f754c863c879008d3e31b8cb83b3f4070ec65455ea8a718b2625b2f195507b83"
}
diff --git a/ci/build-installer.ps1 b/ci/build-installer.ps1
index bc2cace..4d86ed1 100644
--- a/ci/build-installer.ps1
+++ b/ci/build-installer.ps1
@@ -1,4 +1,5 @@
-$ErrorActionPreference = 'Stop'
+param([switch]$SkipPublish)
+$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
$inputs = Join-Path $PWD '.ci-inputs'
New-Item -ItemType Directory -Force -Path $inputs | Out-Null
@@ -6,11 +7,13 @@ $archive = Join-Path $inputs 'inputs.zip'
$inputManifest = Get-Content -LiteralPath (Join-Path $PSScriptRoot 'build-inputs.json') -Raw | ConvertFrom-Json
. (Join-Path $PSScriptRoot '../Installer/BuildIntegrity.ps1')
if ($inputManifest.version -notmatch '^v[0-9A-Za-z.-]+$' -or $inputManifest.sha256 -notmatch '^[a-fA-F0-9]{64}$') { throw 'Invalid build input integrity manifest.' }
-$inputManifest = Get-Content -LiteralPath (Join-Path $PSScriptRoot 'build-inputs.json') -Raw | ConvertFrom-Json
-. (Join-Path $PSScriptRoot '../Installer/BuildIntegrity.ps1')
-if ($inputManifest.version -notmatch '^v[0-9A-Za-z.-]+$' -or $inputManifest.sha256 -notmatch '^[a-fA-F0-9]{64}$') { throw 'Invalid build input integrity manifest.' }
-$url = "$env:CI_API_V4_URL/projects/$env:CI_PROJECT_ID/packages/generic/validated-build-inputs/$($inputManifest.version)/inputs.zip"
-Invoke-WebRequest -Uri $url -Headers @{ 'JOB-TOKEN' = $env:CI_JOB_TOKEN } -OutFile $archive
+$url = "$env:CI_API_V4_URL/projects/$env:CI_PROJECT_ID/packages/generic/validated-build-inputs/$($inputManifest.version)/inputs.zip"
+try {
+ $downloadHeaders = if ($env:CI_JOB_TOKEN) { @{ 'JOB-TOKEN' = $env:CI_JOB_TOKEN } } else { @{} }
+ Invoke-WebRequest -Uri $url -Headers $downloadHeaders -OutFile $archive
+} catch {
+ throw "Cannot download validated-build-inputs/$($inputManifest.version)/inputs.zip. Verify that this exact package version is published and accessible to the CI job token. $($_.Exception.Message)"
+}
if ((Get-InputSha256 $archive) -ne $inputManifest.sha256) { throw 'Validated build input checksum mismatch.' }
Expand-Archive -LiteralPath $archive -DestinationPath $inputs
# Restore the unchanged public SDK and toolchain; no game code or data is included.
@@ -23,7 +26,7 @@ Copy-Item -LiteralPath (Join-Path $inputs 'licenses/ReXGlue.txt') -Destination R
Copy-Item -Path (Join-Path $inputs 'licenses/ReXGlue-thirdparty/*') -Destination ReXGlue/thirdparty -Recurse
Copy-Item -LiteralPath (Join-Path $inputs 'tools/extract-xiso.exe') -Destination Installer/tools/extract-xiso.exe
foreach ($backend in @('D3D12', 'Vulkan')) {
- $backendManifest = Get-Content Installer/backend-manifest.json -Raw | ConvertFrom-Json
+ $backendManifest = Get-Content (Join-Path $PSScriptRoot 'backend-manifest.json') -Raw | ConvertFrom-Json
$directory = Join-Path $PWD ("ReXGlue/" + $backendManifest.backends.$backend.source)
New-Item -ItemType Directory -Force -Path $directory | Out-Null
Copy-Item -Path (Join-Path $inputs "sdk/backends/$backend/*") -Destination $directory
@@ -36,11 +39,12 @@ New-Item -ItemType Directory -Force -Path (Join-Path $compiler 'doc/cmake') | Ou
Copy-Item -LiteralPath (Join-Path $inputs 'licenses/CMake.rst') -Destination (Join-Path $compiler 'doc/cmake/LICENSE.rst')
$env:PATH = "$(Join-Path $compiler 'bin');$env:PATH"
New-Item -ItemType Directory -Force -Path dist | Out-Null
-./Installer/BuildSetup.ps1 -Output "$PWD/dist/FifaStreet-Setup.exe" -LLVMRoot $compiler -CMakeRoot $compiler -NinjaPath (Join-Path $compiler 'bin/ninja.exe') -ClangResourceVersion '23'
+./Installer/BuildSetup.ps1 -Output "$PWD/dist/FifaStreet-Setup.exe" -LLVMRoot $compiler -CMakeRoot $compiler -NinjaPath (Join-Path $compiler 'bin/ninja.exe') -BackendManifest (Join-Path $PSScriptRoot 'backend-manifest.json')
if (-not (Test-Path -LiteralPath 'dist/FifaStreet-Setup.exe')) { throw 'Installer was not created.' }
"$(Get-InputSha256 'dist/FifaStreet-Setup.exe') FifaStreet-Setup.exe" |
Set-Content -Encoding ascii 'dist/FifaStreet-Setup.exe.sha256'
-$packageUrl = "$env:CI_API_V4_URL/projects/$env:CI_PROJECT_ID/packages/generic/installer-builds/$env:CI_COMMIT_SHA"
-foreach ($file in @('FifaStreet-Setup.exe', 'FifaStreet-Setup.exe.sha256')) {
+$packageUrl = "$env:CI_API_V4_URL/projects/$env:CI_PROJECT_ID/packages/generic/installer-builds/$env:CI_COMMIT_SHA"
+if ($SkipPublish) { Write-Host 'Installer built and verified; package publication skipped.'; return }
+foreach ($file in @('FifaStreet-Setup.exe', 'FifaStreet-Setup.exe.sha256')) {
Invoke-RestMethod -Method Put -Uri "$packageUrl/$file" -Headers @{ 'JOB-TOKEN' = $env:CI_JOB_TOKEN } -InFile (Join-Path $PWD "dist/$file") -ContentType 'application/octet-stream' | Out-Null
}
diff --git a/ci/validate-source.ps1 b/ci/validate-source.ps1
index 46dceb9..602e341 100644
--- a/ci/validate-source.ps1
+++ b/ci/validate-source.ps1
@@ -7,3 +7,4 @@ foreach ($file in $files) {
if ($parseErrors) { throw "$($file.Name): $($parseErrors.Message -join '; ')" }
}
Write-Host "PowerShell syntax verified for $($files.Count) source files."
+& (Join-Path $PSScriptRoot '../Installer/TestSourceBackend.ps1')
diff --git a/docs/GITLAB.md b/docs/GITLAB.md
index 1c26f33..5d32bd9 100644
--- a/docs/GITLAB.md
+++ b/docs/GITLAB.md
@@ -2,9 +2,22 @@
The repository, commit history, backup branch and experimental version tags have been migrated to GitLab.
+The current CI input manifest selects the published `validated-build-inputs/v0.3.0/inputs.zip`.
+That exact version must exist in the generic package registry before starting
+`build-installer`; publishing a Git tag does not upload its dependency archive.
+An HTTP 404 during the download means the package is missing or inaccessible to
+the job token. The archive checksum and all backend DLL hashes remain mandatory.
+CI uses `ci/backend-manifest.json` for that snapshot. It builds the current launcher
+and source installer with the older validated runtime, not the precompiled v0.4
+release. Local source builds compile the current patched runtime instead.
+Publishing a newer dependency snapshot requires package registry/API write access;
+change both CI manifests together only after uploading and verifying the archive.
+The installer bundle now carries the backend manifest used during packaging, so
+installation verifies the same DLL hashes instead of using a different version.
+
The GitLab pipeline checks PowerShell syntax on each commit. The Windows installer build is manual: open **Build > Pipelines** and start `build-installer`. It requires available GitLab Windows runner capacity and CI minutes. Installers and checksums are uploaded to the generic package registry under `installer-builds`, identified by commit hash. The small checksum artifact is also retained for 30 days. New builds do not replace the historical release automatically.
-The installer build compiles the launcher and installer from current source. It reuses the exact public SDK, graphics DLLs and compiler toolchain embedded in the validated v0.3.0 installer, downloading the dependency archive from the project's `validated-build-inputs` generic package and checking its SHA-256 before extraction. Existing backend hash checks remain enabled. It does not rebuild ReXGlue or revalidate gameplay. Developers rebuilding the SDK should follow `BUILDING.md` and regenerate the validated dependency archive only after testing.
+The installer build compiles the launcher and installer from current source. It reuses the versioned public SDK, graphics DLLs and compiler toolchain selected by `ci/build-inputs.json`, downloading the dependency archive from the project's `validated-build-inputs` generic package and checking its SHA-256 before extraction. The archive contains no game code or data. Existing backend hash checks remain enabled. It does not rebuild ReXGlue or revalidate gameplay. Developers rebuilding the SDK should follow `BUILDING.md` and regenerate the validated dependency archive only after testing.
Packaging uses the cover images tracked in the repository and accepts explicit LLVM, CMake, Ninja and Clang resource paths. It no longer depends on Samuel's local game directory or Miniconda installation.