Files
TeslaRel410/restoration/source410/compile410.sh
T
CydandClaude Fable 5 63312e07f9 source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 07:33:26 -05:00

47 lines
1.8 KiB
Bash

#!/bin/bash
# compile410.sh -- per-TU compile verification for the 4.10 literal-source
# reconstruction, using the fleet's own Borland C++ 4.52 with the authentic
# OPT.MAK flags (CODE/BT/OPT.MAK = the BTL4OPT.EXE recipe).
#
# Usage:
# ./compile410.sh <file.cpp> [more.cpp ...] compile specific TUs
# ./compile410.sh --sweep sweep all surviving originals
#
# Output .obj files land in the current directory. -DNO_PRECOMPILED_HEADERS
# dodges the not-yet-reconstructed mech-family headers (BT.HPP gates on it);
# drop it once mech.hpp/btplayer.hpp/mechsub.hpp exist in 1995 form.
T=/c/VWE/TeslaRel410
export PATH="$T/BORLAND/BC45/BIN:$PATH"
C=c:/VWE/TeslaRel410/CODE/BT
R=c:/VWE/TeslaRel410/CODE/RP
S=c:/VWE/TeslaRel410/restoration/source410
# include order: BT tree over RP tree over source410 backfills over BC45
INC="$C/BT_L4;$C/BT;$C/MUNGA;$C/MUNGA_L4;$C/MUNGA_L4/SOS/BC4;$R/MUNGA;$R/MUNGA_L4;$R/MUNGA_L4/sos/bc4;$S/MUNGA;$S/BT;$S/BT_L4;c:/VWE/TeslaRel410/BORLAND/BC45/INCLUDE"
# CODE/BT/OPT.MAK flags (minus -H PCH, plus the NO_PRECOMPILED_HEADERS dodge)
FLAGS="-c -DLBE4 -DDEBUG_LEVEL=0 -DDEBUG_STREAM=cout -DNO_PRECOMPILED_HEADERS \
-b -r -ff -AT -k- -N- -v- -5 -a4 -V -Jg -x- -RT- -O2 -w-"
one() {
r=$(bcc32 $FLAGS -I"$INC" "$1" 2>&1 | grep "^Error" | head -1)
if [ -z "$r" ]; then
echo "OK $(basename "$1")"
else
echo "FAIL $(basename "$1"): $(echo "$r" | sed 's/.*Error //')"
fi
}
if [ "$1" = "--sweep" ]; then
for f in "$C"/BT/BTMSSN.CPP "$C"/BT/BTCNSL.CPP "$C"/BT/BTREG.CPP \
"$C"/BT/BTSCNRL.CPP "$C"/BT/BTTEAM.CPP "$C"/BT/BTTOOL.CPP \
"$C"/BT/GAUSS.CPP "$C"/BT/PPC.CPP \
"$C"/BT_L4/BTL4MODE.CPP "$C"/BT_L4/BTL4ARND.CPP \
"$S"/BT_L4/*.CPP; do
[ -f "$f" ] && one "$f"
done
else
for f in "$@"; do one "$f"; done
fi