UNIFY: one exe -- retire the pod/glass/steam compile split

The three build dirs (build\ pod, build-glass\, build-steam\) were compile-
time splits of the same game; the tax was real: a stale steam exe shipped 2
days behind, the felt keymap flipped with the boot flavor, and cockpit
clicks were silently dead in the pod build (the trigger-config incident).

Now everything compiles into the single build\ exe:
- CMakeLists: BT_GLASS/BT_STEAM options removed; the glass TUs (PadRIO,
  bindings, panel, glass windows, plasma) + FE/console + Steam transport
  compile unconditionally; both macros always defined (seam markers).
- Steam: steam_api.lib linked with /DELAYLOAD:steam_api.dll + delayimp --
  the DLL maps only when SteamAPI is first called, and every call site
  gates on BT_STEAM_NET=1 (BTSteamNet_* short-circuit on steamActive), so
  machines without the DLL run everything but Steam sessions.
- CABINET GUARD (btl4main): the miniconsole menu previously claimed any
  zero-arg launch -- unified, that would hijack the pod cabinet's boot
  shape.  The menu now requires BT_PLATFORM=glass (or BT_FE_MENU=1);
  platform parse moved above the fe_menu_mode computation.  A bare boot
  behaves exactly like the old pod build (DEV profile, wait for egg).
- Bats (play_solo/join/join_lan/play_steam) + the btoperator.py template:
  single build\ path + BT_PLATFORM=glass.  mkdist: one exe (+DLL scan
  picks up OpenAL32 + steam_api).  build-glass\/build-steam\/build-glass2\
  (a stale Jul-20 cache) deleted.

Verified matrix on the unified exe:
  bare zero-arg boot == old pod exe (same DEV profile + egg-load path;
    the segfault on a missing egg is pre-existing, baselined vs the zip exe)
  glass + BT_BTNTEST scripted click -> [cfgmap] ENTER/EXIT (trigger config)
  runs with steam_api.dll ABSENT (delay-load proven)
  glass zero-arg -> miniconsole menu
  2-node loopback MP: 145 ticks each, cross-connected
  BT_STEAM_NET=1 without Steam client -> "staying on Winsock", game runs

KB: context/glass-cockpit.md compile-gates section rewritten for the
unified model.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-21 10:28:51 -05:00
co-authored by Claude Opus 4.8
parent d89ae71db5
commit 10ed66bd7c
9 changed files with 117 additions and 147 deletions
+6 -11
View File
@@ -2,23 +2,18 @@
rem BT411 -- join 107.202.218.169's game (internet). Seat/mech assigned
rem by the operator. Keep this file next to content\ + build\.
cd /d %~dp0
rem Prefer the GLASS build when present (dev checkout): PadRIO makes the
rem cockpit surround's buttons mouse-clickable (trigger config etc.). The
rem pod build renders the same cockpit but clicks are a no-op there; player
rem zips ship only build\.
set GAME=build\Release\btl4.exe
if exist "build-glass\Release\btl4.exe" (
set GAME=build-glass\Release\btl4.exe
set BT_PLATFORM=glass
)
if not exist "%GAME%" goto badpath
rem ONE unified build (2026-07-21): the exe carries every layer; the GLASS
rem platform env arms the desktop cockpit (clickable MFD buttons, trigger
rem config, bindings.txt keymap).
set BT_PLATFORM=glass
if not exist "build\Release\btl4.exe" goto badpath
if not exist "content\OPERATOR.EGG" goto badpath
set BT_RELAY=107.202.218.169:1500
set BT_LOG=join.log
set BT_START_INSIDE=1
set BT_DEV_GAUGES=1
cd content
..\%GAME% -egg OPERATOR.EGG -net 1501
..\build\Release\btl4.exe -egg OPERATOR.EGG -net 1501
echo.
echo The game has exited. If you did NOT quit on purpose
echo (crash, or it never connected), send the operator the
+6 -11
View File
@@ -5,23 +5,18 @@ rem unreliable on this network, so it is pinned). If the operator's IP changes,
rem update the address below (find it on the operator PC with `ipconfig`).
rem Joining over the INTERNET? Use join.bat instead.
cd /d %~dp0
rem Prefer the GLASS build when present (dev checkout): PadRIO makes the
rem cockpit surround's buttons mouse-clickable (trigger config etc.). The
rem pod build renders the same cockpit but clicks are a no-op there; player
rem zips ship only build\.
set GAME=build\Release\btl4.exe
if exist "build-glass\Release\btl4.exe" (
set GAME=build-glass\Release\btl4.exe
set BT_PLATFORM=glass
)
if not exist "%GAME%" goto badpath
rem ONE unified build (2026-07-21): the exe carries every layer; the GLASS
rem platform env arms the desktop cockpit (clickable MFD buttons, trigger
rem config, bindings.txt keymap).
set BT_PLATFORM=glass
if not exist "build\Release\btl4.exe" goto badpath
if not exist "content\OPERATOR.EGG" goto badpath
set BT_RELAY=10.0.0.46:1500
set BT_LOG=join.log
set BT_START_INSIDE=1
set BT_DEV_GAUGES=1
cd content
..\%GAME% -egg OPERATOR.EGG -net 1501
..\build\Release\btl4.exe -egg OPERATOR.EGG -net 1501
echo.
echo The game has exited. If you did NOT quit on purpose
echo (crash, or it never connected), send the operator the
+6 -16
View File
@@ -2,27 +2,17 @@
rem BT411 -- single-player practice (no network, no operator).
rem Edit the -egg below for other maps (ARENA2/DBASE/FOGDAY/...).
cd /d %~dp0
rem Prefer the GLASS build when present (dev checkout): it carries PadRIO, the
rem click-to-button seam that makes the cockpit surround's MFD red buttons,
rem radar rails and joystick buttons mouse-clickable (trigger config needs
rem this). The pod build renders the same cockpit but its clicks are a no-op
rem (PadRIO is not compiled there); player zips ship only build\.
set GAME=build\Release\btl4.exe
if exist "build-glass\Release\btl4.exe" (
set GAME=build-glass\Release\btl4.exe
rem The GLASS platform profile is what creates PadRIO (L4CONTROLS=PAD):
rem without it the boot falls to the DEV profile (KEYBOARD only) and every
rem cockpit click is silently discarded -- trigger config dead, keymap on
rem the btinput/CONTROLS.MAP engine instead of PadRIO/bindings.txt.
set BT_PLATFORM=glass
)
if not exist "%GAME%" goto badpath
rem ONE unified build (2026-07-21): the exe carries every layer; the GLASS
rem platform env arms the desktop cockpit (clickable MFD buttons, trigger
rem config, bindings.txt keymap).
set BT_PLATFORM=glass
if not exist "build\Release\btl4.exe" goto badpath
if not exist "content\OPERATOR.EGG" goto badpath
set BT_START_INSIDE=1
set BT_DEV_GAUGES=1
set BT_LOG=join.log
cd content
..\%GAME% -egg ARENA1.EGG
..\build\Release\btl4.exe -egg ARENA1.EGG
echo.
echo The game has exited. If it closed unexpectedly,
echo send the operator content\join.log.
+5 -5
View File
@@ -3,15 +3,15 @@ rem BT411 -- STEAM play (EXPERIMENTAL, dev testers). Launches the glass
rem front-end menu: HOST a Steam lobby or JOIN one from the menu -- there
rem is no address to configure; sessions form through the Steam lobby.
rem Requires: the Steam client RUNNING and logged in, and the steam build
rem (build-steam\) extracted next to content\.
rem extracted next to content\.
cd /d %~dp0
if not exist "build-steam\Release\btl4.exe" goto badpath
if not exist "build\Release\btl4.exe" goto badpath
if not exist "content\BTL4.RES" goto badpath
set BT_PLATFORM=glass
set BT_STEAM_NET=1
set BT_LOG=steam.log
cd content
..\build-steam\Release\btl4.exe
..\build\Release\btl4.exe
echo.
echo The game has exited. If it closed unexpectedly, send the operator
echo content\steam.log. Steam not running = the menu still works but
@@ -22,10 +22,10 @@ exit /b
echo.
echo ==================================================
echo ERROR: this file is not in the right place, or
echo this zip does not include the STEAM build.
echo the zip was not fully extracted.
echo.
echo It must sit in the EXTRACTED game folder, next to
echo the 'content' and 'build-steam' folders.
echo the 'content' and 'build' folders.
echo ==================================================
echo.
pause