pod: make the frozen rig survive a NEW BUILD, not just a reboot
Both frozen files live inside the versioned install and neither ships in the zip -- environ.ini is generated on first run, glass_layout.cfg is ours. So Nick extracting the next build would get a cab that comes up wrong with no error anywhere, which is exactly the failure the freeze was supposed to end. Masters now live at the stable C:\bt411\ (podprofile.ini, glass_layout.cfg, podkit.ps1). setup_pod.bat pushes them into the newest BT411_* folder -- run once per extract. runpod.bat resolves the newest install and applies the kit itself, so the remote launch path needs no per-build edit. Re-tuning means editing the MASTER: the apply overwrites the install's copy on purpose, so a moved panel has one place to look. Also records, for playtesting on the cab: all five tester launchers set no pod key at all, so each inherits the rig from environ.ini without knowing the pod exists -- verified by running play_solo.bat on the cart (7 settings applied, not 9, because the bat sets BT_PLATFORM and BT_START_INSIDE itself and the real environment wins). That is the case against a separate pod-only ini: a second file would need every launcher to opt in. Verified: kit re-applies idempotently, and the rewritten runpod.bat brings the cab up correct -- 9 settings, GLASS, -fit borderless, all three surfaces on their intended displays. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rw7No5wLTpkaUgA3ANbtZZ
This commit is contained in:
co-authored by
Claude Opus 5
parent
d96fa4f4e2
commit
05d8164801
@@ -0,0 +1,11 @@
|
||||
# ALPHA-MR cab layout -- VERIFIED BY EYE 2026-08-06 (do not re-guess from
|
||||
# desktop coordinates; they say nothing about physical cab position).
|
||||
# DISPLAY4 -> the COLOUR RADAR LCD in the yellow-button frame, so the colour
|
||||
# surface goes there. (An RGB composite landed here first and
|
||||
# showed all three channels overlaid.)
|
||||
# DISPLAY2 -> the VGA port feeding the Heat + Comm + Mfd2 CRT group.
|
||||
# DISPLAY1 -> the VGA port feeding the Mfd1 + Mfd3 CRT group.
|
||||
# monitor: binding, not pixel rects -- the USB graphics adapter re-enumerates.
|
||||
Secondary / Radar=monitor:DISPLAY4,bare
|
||||
VGA Port A=monitor:DISPLAY2,bare
|
||||
VGA Port B=monitor:DISPLAY1,bare
|
||||
@@ -0,0 +1,41 @@
|
||||
# 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 }
|
||||
|
||||
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 } }
|
||||
@@ -1,9 +1,22 @@
|
||||
@echo off
|
||||
REM BT411 pod -- ALPHA-MR. The rig config is FROZEN in content\environ.ini
|
||||
REM (glass panels, RGB split, channel map, radar rotation, -fit, no plasma),
|
||||
REM so this launcher carries nothing but the log switches and the mission.
|
||||
REM Fallback if environ.ini is ever lost: runpod_env.bat sets it all inline.
|
||||
cd /d C:\bt411\BT411_4.11.801\content
|
||||
REM BT411 pod -- ALPHA-MR. Resolves the NEWEST BT411_* install, applies the
|
||||
REM frozen rig config (so a fresh zip drop needs no hand-editing), and launches
|
||||
REM straight into a mission. The rig itself is frozen in content\environ.ini;
|
||||
REM this carries only the log switches and the mission.
|
||||
REM Fallback if the kit is ever lost: runpod_env.bat sets everything inline.
|
||||
setlocal
|
||||
set ROOT=C:\bt411
|
||||
set INSTALL=
|
||||
for /f "delims=" %%d in ('dir /b /ad /o-d "%ROOT%\BT411_*" 2^>nul') do (
|
||||
if not defined INSTALL set INSTALL=%ROOT%\%%d
|
||||
)
|
||||
if not defined INSTALL goto noinstall
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\podkit.ps1" -Content "%INSTALL%\content" >nul
|
||||
cd /d %INSTALL%\content
|
||||
set BT_GLASS_LOG=1
|
||||
set BT_LOG=podrun.log
|
||||
start "" ..\build\Release\btl4.exe -egg PODTEST.EGG
|
||||
exit /b
|
||||
:noinstall
|
||||
echo No BT411_* folder found under %ROOT%.
|
||||
exit /b 1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
REM ============================================================================
|
||||
REM RUN THIS AFTER EXTRACTING A NEW BT411 BUILD.
|
||||
REM It finds the newest BT411_* folder under C:\bt411 and pushes the cab's
|
||||
REM frozen rig config into it (environ.ini block + glass_layout.cfg).
|
||||
REM Without it a fresh extract comes up with the MFDs wrong and no error.
|
||||
REM ============================================================================
|
||||
setlocal
|
||||
set ROOT=C:\bt411
|
||||
set INSTALL=
|
||||
for /f "delims=" %%d in ('dir /b /ad /o-d "%ROOT%\BT411_*" 2^>nul') do (
|
||||
if not defined INSTALL set INSTALL=%ROOT%\%%d
|
||||
)
|
||||
if not defined INSTALL goto noinstall
|
||||
echo Newest install: %INSTALL%
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%ROOT%\podkit.ps1" -Content "%INSTALL%\content"
|
||||
echo.
|
||||
echo Done. play_solo.bat / join.bat / play_steam.bat in that folder will now
|
||||
echo all come up on the pod glass -- they inherit it from environ.ini.
|
||||
pause
|
||||
exit /b
|
||||
:noinstall
|
||||
echo No BT411_* folder found under %ROOT%. Extract the zip there first.
|
||||
pause
|
||||
Reference in New Issue
Block a user