First real new-build drop on the cart exposed it: the kit pushed environ.ini and glass_layout.cfg into the fresh 4.11.817 extract, but runpod.bat launches `-egg PODTEST.EGG` and that mission only ever existed on the pod -- mkdist ships git-TRACKED content only, so the new install had no mission to run. Master copy now sits at C:\bt411\ with the other kit files and podkit.ps1 installs it. Does not affect testers: play_solo/join/play_steam pick their own missions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rw7No5wLTpkaUgA3ANbtZZ
49 lines
2.6 KiB
PowerShell
49 lines
2.6 KiB
PowerShell
# Apply the ALPHA-MR pod kit to a BT411 install's content directory.
|
|
#
|
|
# WHY THIS EXISTS: the frozen rig config lives in content\environ.ini and
|
|
# glass_layout.cfg -- both INSIDE the versioned install folder, and neither is
|
|
# shipped in the zip (environ.ini is generated on first run). So extracting a
|
|
# new build gives you a cab that comes up wrong with no error anywhere. The
|
|
# MASTERS live beside this script at a stable path; this pushes them into
|
|
# whichever install you point it at. Idempotent -- safe to re-run.
|
|
param([Parameter(Mandatory=$true)][string]$Content)
|
|
|
|
$here = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
|
$prof = Join-Path $here 'podprofile.ini'
|
|
$lay = Join-Path $here 'glass_layout.cfg'
|
|
$ini = Join-Path $Content 'environ.ini'
|
|
|
|
if (-not (Test-Path $Content)) { Write-Output "NO SUCH CONTENT DIR: $Content"; exit 1 }
|
|
if (-not (Test-Path $prof)) { Write-Output "MISSING MASTER: $prof"; exit 1 }
|
|
|
|
# --- the env block: replace anything between the markers, keep the rest ------
|
|
$block = Get-Content $prof
|
|
$keep = @()
|
|
if (Test-Path $ini) {
|
|
$inBlock = $false
|
|
foreach ($line in (Get-Content $ini)) {
|
|
if ($line -match '^# ==== BT411 POD PROFILE') { $inBlock = $true; continue }
|
|
if ($line -match '^# ==== END BT411 POD PROFILE') { $inBlock = $false; continue }
|
|
if (-not $inBlock) { $keep += $line }
|
|
}
|
|
while ($keep.Count -gt 0 -and $keep[-1].Trim() -eq '') { $keep = $keep[0..($keep.Count-2)] }
|
|
}
|
|
($keep + @('') + $block) | Set-Content $ini -Encoding ascii
|
|
|
|
# --- the layout: the master always wins -------------------------------------
|
|
# Re-tuning the cab means editing the MASTER beside this script, not the copy
|
|
# in the install -- a BT_GLASS_LAYOUT=save drag inside an install is overwritten
|
|
# on the next apply, on purpose. One place to look when a panel moves.
|
|
if (Test-Path $lay) { Copy-Item $lay (Join-Path $Content 'glass_layout.cfg') -Force }
|
|
|
|
# --- the pod test mission ----------------------------------------------------
|
|
# PODTEST.EGG is NOT in the repo -- it was made on the cart, so a fresh extract
|
|
# has no mission for runpod.bat to launch (found the first time a new build was
|
|
# dropped: the launcher ran and nothing came up). Carry it in the kit.
|
|
$egg = Join-Path $here 'PODTEST.EGG'
|
|
if (Test-Path $egg) { Copy-Item $egg (Join-Path $Content 'PODTEST.EGG') -Force }
|
|
|
|
Write-Output "pod kit applied to $Content"
|
|
Get-Content $ini | Select-String '^(BT_|L4)' | ForEach-Object { " " + $_.Line }
|
|
if (Test-Path $lay) { Get-Content (Join-Path $Content 'glass_layout.cfg') | Select-String '^[A-Z]' | ForEach-Object { " " + $_.Line } }
|