Files
CydandClaude Fable 5 2f17631081 FS507D asset recovery, ConLobby V5.0.7Df promotion, mechlab New-Mech crash fix
FS507D_20161015 release analysis wrap-up (drop itself is gitignored; art-review
folder kept local for review):
- Recovered the only assets our tree lacked: 13 hsh HUD/radar/mech bmps and the
  two 5.07D lobby decals (decal_46/47.tga, extracted from release props.mw4 via
  a ported gos_LZDecompress).
- ResourceImagePool.cpp: missing-texture placeholder is now LAB_ONLY (editor
  keeps degraded mode); Release restores the original fatal STOP. Release +
  Profile rebuilt, 0 errors.

Console script reconciled:
- ConLobby.script.new ("BattleTech Console V5.0.7Df", newest revision anywhere)
  promoted to Content\ShellScripts\ConLobby.script; .new removed; stale loose
  deploy copy removed. Verified in-game (console title shows V5.0.7Df).
- Corrected CLAUDE.md: the release never "renamed" the console to
  ComputerPlayer.script -- the resource packer stores script contents under
  alphabetically skewed entry names (runtime resolves the same pairing).
  Packer quirks documented (stale entry carry-forward on incremental builds,
  name/content skew in directory sweeps).

Mechlab bug fix (first FireStorm bug hunt):
- New-Mech dialog showed blank rows for Wolfhound/Zeus and crashed (KERNELBASE
  read AV) when creating a Zeus. Root cause: newmech in chassis.script created
  its Type droplist without setting $$m_listBoxSize$$, so capacity defaulted to
  60 while 65 chassis were written in -- OOB script-array writes. Fixed by
  sizing the list from $$m_chassisCount$$. Latent stock-MW4 bug armed when the
  FireStorm roster passed 60 chassis. Verified: Zeus variant creates cleanly.

props.mw4 fully repacked (decals + promoted console + mechlab fix, junk
.new/.org entries gone); game deploy refreshed at MW4\. Gitignore: FS507D drop
and player-created MW4\Resource\Variants.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:04:45 -05:00
..
2026-06-26 10:55:33 -05:00
2026-06-26 10:55:33 -05:00

build-env — Extracted MW4 / FireStorm build toolchain

Everything here was extracted from the original build machine's disk image (mounted at E:\). It is self-contained — no external installs required to compile the game. Build user on the original machine was jeff.

Contents

Folder Source on image Purpose
VisualStudio6/ E:\Program Files\Microsoft Visual Studio Visual C++ 6.0 — compiler (VC98\Bin\CL.EXE, LINK.EXE, NMAKE.EXE), IDE (Common\MSDev98\Bin\MSDEV.EXE), headers, libs, MFC/ATL. 204 MB.
dx7asdk/ E:\Code\dx7asdk DirectX 7.0a SDKinclude\ (ddraw.h DIRECTDRAW_VERSION 0x0700, d3d.h immediate mode, dinput.h, dsound.h) + lib\ (ddraw.lib, dinput.lib, dsound.lib, d3dim.lib …). Matches GameOS GOS_REQUIRES_DX7A.
DXMedia/ E:\Code\DXMedia DirectX Media 6.0 SDK — DirectShow headers (amstream.h, control.h, strmif.h) + libs (strmiids.lib, quartz.lib, strmbase.lib …). Needed by GameOS for video.
CommonFiles-MSShared/ E:\Program Files\Common Files\Microsoft Shared\{VS98,MSDesigners98} Shared VS components referenced by the HKLM registration (help/designer DLLs).
setup-mw4-build.bat (generated) Sets PATH/INCLUDE/LIB for command-line builds — exact original ordering.
vc6-directories.reg (generated) HKCU import — exact original Tools→Options→Directories (rebased) so headers resolve DX7-correctly.
vc6-hklm-registration.reg (generated) HKLM import — VC6 install registration (rebased + redirected under Wow6432Node) so msdev.exe runs from the copy.
_raw_visualstudio6.reg, _raw_devstudio6.reg exported from image software hive Untransformed source exports (provenance; not for import).

Not copied (intentionally)

  • EAX SDK — not required as a separate install; eax.h is bundled in the repo (Gameleap\code/CoreTech/Libraries/GameOS/Eax.h) and no eax.lib exists on the image (EAX is resolved at runtime, not statically linked).
  • DirectX 8 SDKd3d8.lib/d3dx8.lib are NOT on the image. Only a few standalone tools (Gos2Light, Gos2Text, HighTide) link DX8; the game and editor build entirely on DX7, so their absence does not block the main build.

Exact original directory ordering (recovered from jeff's NTUSER.DAT)

Source key: HKCU\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Directories

  • Include: DXMedia\include → dx7asdk\include → VC98\INCLUDE → VC98\MFC\INCLUDE → VC98\ATL\INCLUDE
  • Library: VC98\LIB → VC98\MFC\LIB (only VC98 — see below)

Two non-obvious but verified facts that make this work:

  1. DXMedia\include has no core DX headers (only DirectShow: amstream/control/strmif), so listing it first does NOT override DirectDraw. ddraw.h still resolves from dx7asdk (next in line) — satisfying GameOS\pch.hpp's #if DIRECTDRAW_VERSION != 0x0700 → #error DirectX 7 SDK is required — before VC98's older ddraw.h (last) is ever reached.
  2. Library Dirs lists only VC98 because the DirectX/DirectShow .libs (ddraw, dinput, dsound, dxguid, strmiids, quartz, strmbase, amstrmid) were copied into VC98\Lib on the original machine. They're pulled in via #pragma comment(lib,...) (e.g. GameOS\guids.cpp), not via the link line. Our copied VC98 tree already contains them.

How to build

stlnative/ — native headers STLport wraps (now in-tree)

STLport (mw4\Libraries\stlport) wraps a 27 MB snapshot of the VC98 + Platform SDK headers (974 files). It used to require a hardcoded C:\stlnative; it now lives here at build-env\stlnative\, and the 3 macros in stl_inc_find.hpp point at <c:\VWE\firestorm\build-env\stlnative/##x>. No external C:\stlnative is needed — the build is self-contained under c:\VWE\firestorm. (If you ever relocate the working tree, update those 3 macro lines to the new absolute path.)

One-time setup: register VC6 + the directory paths

Run elevated (HKLM write needs admin; do both in the same shell):

reg import c:\VWE\firestorm\build-env\vc6-hklm-registration.reg
reg import c:\VWE\firestorm\build-env\vc6-directories.reg
  • vc6-hklm-registration.reg → registers the VC6 install (ProductDir/InstallDir, environment packages) under HKLM\SOFTWARE\Wow6432Node\Microsoft\{VisualStudio,DevStudio}\6.0 so 32-bit msdev.exe finds itself when launched from the copied tree.
  • vc6-directories.reg → HKCU; the exact original include/lib/path ordering.

Wow6432Node, why: on 64-bit Windows a 32-bit process (msdev.exe) reads HKLM\SOFTWARE\Microsoft\... redirected to HKLM\SOFTWARE\Wow6432Node\Microsoft\..., so the HKLM keys are placed there. HKCU\Software is not redirected, so the directories key stays at its normal path.

Option A — IDE (most faithful to original)

  1. Launch VisualStudio6\Common\MSDev98\Bin\MSDEV.EXE.
  2. (Directories are already set by the .reg import — verify under Tools → Options → Directories if desired.)
  3. Open c:\VWE\firestorm\Gameleap\code\mw4\Code\MechWarrior4.dsw, set MW4Application as the Active Project, pick a config, Build.

Option B — command line (scriptable)

cd c:\VWE\firestorm\build-env
setup-mw4-build.bat
cd c:\VWE\firestorm\Gameleap\code\mw4\Code
msdev MechWarrior4.dsw /MAKE "MW4Application - Win32 Release"

msdev /MAKE reads include/lib dirs from the registry (the .reg above), not from %INCLUDE%. The setup-mw4-build.bat env vars matter only if you drive cl/nmake directly. Run the .reg import once and either path works. Caveat: msdev.exe run from a copied tree may still expect its HKLM install registration; if it misbehaves, use the IDE (Option A) or install VC6 from the image.