From 53228686b49ea3065b23de0f72770cc3be664f9c Mon Sep 17 00:00:00 2001 From: Cyd Date: Fri, 24 Jul 2026 20:12:53 -0500 Subject: [PATCH] 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 --- pack-dist.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pack-dist.ps1 b/pack-dist.ps1 index da17500..702e49e 100644 --- a/pack-dist.ps1 +++ b/pack-dist.ps1 @@ -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 }