pack-dist: release zips nest everything under an RP412 folder

Unpacking the zip anywhere now yields one self-contained RP412\
directory instead of scattering ~1000 files into the extraction
folder. The -Zip step stages a copy under the temp dir as RP412\ and
compresses that folder.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-24 20:12:53 -05:00
co-authored by Claude Fable 5
parent 1bd6dd83e2
commit 53228686b4
+10 -1
View File
@@ -275,5 +275,14 @@ Write-Host ("dist ready: {0:N1} MB" -f ($size / 1MB))
if ($Zip) {
$zipPath = Join-Path $root 'RedPlanet-4.12.2.zip'
Write-Host "zipping to $zipPath..."
Compress-Archive -Path "$dist\*" -DestinationPath $zipPath -Force
# Everything lives under a single RP412\ folder inside the zip, so
# unpacking anywhere gives one self-contained game directory instead
# of scattering files into the extraction folder.
$stage = Join-Path ([System.IO.Path]::GetTempPath()) 'rp412-zipstage'
if (Test-Path $stage) { Remove-Item -Recurse -Force $stage }
New-Item -ItemType Directory -Force "$stage\RP412" | Out-Null
Copy-Item "$dist\*" "$stage\RP412" -Recurse -Force
Compress-Archive -Path "$stage\RP412" -DestinationPath $zipPath -Force
Remove-Item -Recurse -Force $stage
}