Files
BT411/tools/podbringup.bat
T
Joe DiPrimaandClaude Opus 5 654277bb7b pod: freeze the ALPHA-MR rig in environ.ini (BT_FIT, L4PLASMA=NONE)
The cart's display config was carried by a launcher .bat, so it only came up
right if the game was started one particular way.  Move it into the file the
engine already reads before anything touches the environment.

  content/environ.ini  <- scratchpad/pod/podprofile.ini, merged idempotently
                          between markers by scratchpad/pod/mergeprofile.ps1

Two gates were missing for that to be enough:

  BT_FIT=1      the env spelling of -fit, so the borderless main view does not
                depend on one launcher's command line (shortcut, scheduled
                task and autostart all have to produce the same rig)
  L4PLASMA=     NONE / OFF / 0 -> no marquee at all.  Leaving it unset does
                NOT work: the GLASS profile force-defaults it to SCREEN, which
                drops a desktop plasma window on the cab's glass.  The boot
                banner now reports the live state instead of always claiming
                "plasma window".

Also lands the bring-up engine work this depended on: monitor:<name|index>
layout binding (device-bound, not pixel-bound -- desktop rects move when a
display re-enumerates), ",bare" implying frameless, rotation-aware radar
surface sizing, BT_GAUGE_SEC_ROT accepting 0-3 (it silently forced 3 for
anything but 1), 180-degree ExpandPlaneToBGRA, and the BT_POD_CHANMAP /
BT_POD_IDENT / BT_POD_CHANTEST identification gates.

Verified on the cart, build 4.11.813, launcher carrying none of it:
  [boot] environ.ini: 9 setting(s) applied
  [boot] platform profile: GLASS (PadRIO; plasma off [L4PLASMA])
  [cockpit] -fit: borderless 800x600
  [glasswin] radar rotation 0 (none)
  ... all three surfaces on their intended \.\DISPLAYn
No [plasmawin] line in an otherwise-logging run = the ctor never ran.

KB: pod-hardware.md gains the ALPHA-MR section (mapping, the two wiring
deviations, the frozen profile, the session-0 remote-work traps) and its RGB
SPLIT "OPEN: which way is the cart wired" is now SETTLED -- it is splitter
wired, the composite is what lit it.  glass-cockpit.md documents monitor:
binding, BT_FIT and L4PLASMA=NONE.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rw7No5wLTpkaUgA3ANbtZZ
2026-08-06 17:40:39 -05:00

102 lines
4.4 KiB
Batchfile

@echo off
REM ===========================================================================
REM podbringup.bat -- ONE double-click pod bring-up. BT411.
REM
REM 1. self-elevates (accept the UAC prompt -- that is the only interaction)
REM 2. installs the built-in Windows OpenSSH SERVER
REM 3. authorizes ONE key (the laptop's bt411 key) and locks its ACL
REM 4. opens SSH on private/domain profiles ONLY (never the public internet)
REM 5. probes the display/GPU/monitor/serial topology
REM 6. sends the results BACK over Tailscale -- no copying by hand
REM
REM Undo (admin cmd):
REM sc stop sshd & sc config sshd start= disabled
REM del C:\ProgramData\ssh\administrators_authorized_keys
REM netsh advfirewall firewall delete rule name="BT411 SSH"
REM ===========================================================================
REM ---- 1. elevate -----------------------------------------------------------
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Requesting administrator rights -- click YES on the prompt...
powershell -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
setlocal enabledelayedexpansion
set LAPTOP=desktop-ae1su9u
set TS=C:\PROGRA~1\Tailscale\tailscale.exe
set REPORT=%~dp0podbringup_report.txt
set DXOUT=%~dp0podbringup_dxdiag.txt
echo ==================== BT411 POD BRING-UP ====================> "%REPORT%"
echo host=%COMPUTERNAME% user=%USERNAME% session=%SESSIONNAME%>> "%REPORT%"
ver >> "%REPORT%"
echo.>> "%REPORT%"
REM ---- 2. OpenSSH server ----------------------------------------------------
echo [1/5] installing OpenSSH server (this can take a minute)...
echo ---- OpenSSH install ---->> "%REPORT%"
dism /online /quiet /norestart /add-capability /capabilityname:OpenSSH.Server~~~~0.0.1.0 >> "%REPORT%" 2>&1
sc config sshd start= auto >> "%REPORT%" 2>&1
net start sshd >> "%REPORT%" 2>&1
sc query sshd | findstr /i "STATE" >> "%REPORT%" 2>&1
REM ---- 3. authorize the laptop key -----------------------------------------
echo [2/5] authorizing the BT411 key...
if not exist C:\ProgramData\ssh mkdir C:\ProgramData\ssh
set AKF=C:\ProgramData\ssh\administrators_authorized_keys
findstr /c:"bt411-claude-code@laptop" "%AKF%" >nul 2>&1
if errorlevel 1 (
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICmGkinDbZMwQ/UhwqU/oECUIeAN+pBjLgsekj41di7W bt411-claude-code@laptop>> "%AKF%"
)
icacls "%AKF%" /inheritance:r /grant "SYSTEM:F" /grant "BUILTIN\Administrators:F" >> "%REPORT%" 2>&1
echo ---- authorized_keys ---->> "%REPORT%"
type "%AKF%" >> "%REPORT%" 2>&1
REM ---- 4. firewall (private/domain only) ------------------------------------
echo [3/5] firewall rule (private/tailnet only)...
netsh advfirewall firewall show rule name="BT411 SSH" >nul 2>&1
if errorlevel 1 (
netsh advfirewall firewall add rule name="BT411 SSH" dir=in action=allow protocol=TCP localport=22 profile=private,domain >> "%REPORT%" 2>&1
)
REM ---- 5. topology probe ----------------------------------------------------
echo [4/5] probing displays / GPUs / monitors / serial ports...
echo.>> "%REPORT%"
echo ---- OS ---->> "%REPORT%"
wmic os get Caption,Version,BuildNumber,OSArchitecture /format:list >> "%REPORT%" 2>&1
echo ---- GPUs ---->> "%REPORT%"
wmic path Win32_VideoController get Name,DriverVersion,DriverDate,CurrentHorizontalResolution,CurrentVerticalResolution /format:list >> "%REPORT%" 2>&1
echo ---- Monitors ---->> "%REPORT%"
wmic path Win32_DesktopMonitor get DeviceID,Name,ScreenWidth,ScreenHeight,Availability /format:list >> "%REPORT%" 2>&1
echo ---- Serial ports (RIO) ---->> "%REPORT%"
wmic path Win32_SerialPort get DeviceID,Name /format:list >> "%REPORT%" 2>&1
echo ---- Tailscale ---->> "%REPORT%"
"%TS%" ip -4 >> "%REPORT%" 2>&1
echo ---- CONNECT WITH ---->> "%REPORT%"
echo ssh -i ~/.ssh/bt411_pod %USERNAME%@bt411-pod>> "%REPORT%"
echo [5/5] dxdiag (monitor rects + D3D caps, ~30s)...
dxdiag /whql:off /t "%DXOUT%"
REM ---- 6. send it all back --------------------------------------------------
echo Sending results back to %LAPTOP% over Tailscale...
"%TS%" file cp "%REPORT%" "%DXOUT%" %LAPTOP%:
if errorlevel 1 (
echo.
echo ! Taildrop send failed -- right-click these two files and use
echo "Send with Tailscale" instead:
echo %REPORT%
echo %DXOUT%
) else (
echo ...sent.
)
echo.
echo ================= DONE =================
echo ssh user: %USERNAME% host: bt411-pod
type "%REPORT%" | findstr /i "STATE ssh-ed25519 Caption"
echo.
pause