diff --git a/.gitignore b/.gitignore index c59cf68..a23c292 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,11 @@ ipch/ *.log rpl4.log +# Build-output static libs that land in lib/ (the two committed dependency +# libs, OpenAL32.lib and libsndfile-1.lib, stay tracked). +/lib/Munga_L4.lib +/lib/DivLoader.lib + # Stale Subversion metadata .svn/ diff --git a/BUILD.md b/BUILD.md index 30ae1d9..77bf71b 100644 --- a/BUILD.md +++ b/BUILD.md @@ -4,6 +4,13 @@ This is the Win32 source for the pod-racing game **Red Planet**, built on the in-house **MUNGA** engine and its **L4** (Win32 / DirectX 9) platform layer. The code targets the Visual Studio 2005/2008 era and the legacy DirectX SDK. +> ✅ **Verified build (2026-07-01):** all 4 projects build clean (`Release|Win32`) +> with **Visual C++ 2008 Express SP1** + **Windows SDK v6.0A** (VS-bundled) + +> **DirectX SDK (June 2010)**. Outputs: `Release\rpl4opt.exe` (the game), +> `Release\RPL4TOOL.exe`, `lib\Munga_L4.lib`, `lib\DivLoader.lib`. +> Only compiler *warnings* remain (deprecated CRT calls, int→Scalar narrowing, +> benign `LNK4006`/`LNK4221` duplicate-symbol notes). See §7 for the CLI recipe. + --- ## 1. Requirements @@ -135,9 +142,39 @@ now builds it: Checklist for a clean Express build: 1. Install **Visual C++ 2008 Express SP1**. -2. Install the **Windows SDK 7.1** (for `WS2_32.lib`, `dbghelp.lib`, core Win32 - headers/libs that Express's bundled SDK subset may not fully cover). -3. Install the **DirectX SDK** (already done — June 2010) and confirm `DXSDK_DIR`. -4. Open `WinTesla.sln`, pick `Release|Win32`, build. -5. If the linker can't find `dbghelp.lib`, remove it from - `RP_L4` → Linker → Input → Additional Dependencies (it is unused). +2. Install the **DirectX SDK (June 2010)** and confirm `DXSDK_DIR` is set. +3. Open `WinTesla.sln`, pick `Release|Win32`, build. + +> The Windows SDK **v6.0A** that ships with VS2008 already provides `WS2_32.lib` +> and `dbghelp.lib`, so a separate Windows SDK 7.1 install was **not** needed in +> the verified build. `dinput8.lib`/`dxguid.lib` come from the DirectX SDK. + +--- + +## 7. Verified command-line build recipe + +This is exactly what produced the verified build. The key gotcha: a shell opened +*before* the DirectX SDK set the machine-level `DXSDK_DIR` will not see it, so the +recipe sets it explicitly. + +```bat +@echo off +call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" +set "DXSDK_DIR=C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\" +cd /d C:\VWE\RP411 +vcbuild /nologo /rebuild WinTesla.sln "Release|Win32" +``` + +Expected result: `4 Projects succeeded, 0 Projects failed`. + +### DirectX SDK paths per project (all via `$(DXSDK_DIR)`) + +For the build to find DirectX headers/libs, each project that touches DirectX +must reference the SDK through `$(DXSDK_DIR)`. This is now wired up as: + +| Project | Include `$(DXSDK_DIR)Include` | Lib `$(DXSDK_DIR)Lib\x86` | +|---------|:---:|:---:| +| Munga_L4 | ✅ | ✅ | +| RP_L4 | ✅ | ✅ | +| RPL4TOOL | (not needed) | ✅ | +| DivLoader | ✅ | (static lib, no link) | diff --git a/DivLoader/DivLoader.vcproj b/DivLoader/DivLoader.vcproj index 7131b30..8c44300 100644 --- a/DivLoader/DivLoader.vcproj +++ b/DivLoader/DivLoader.vcproj @@ -38,6 +38,7 @@ /> **Environment gotcha:** the DirectX SDK installer sets `DXSDK_DIR` at machine +> scope, but any shell already running when it was set won't inherit it. The +> first build failed on `D3DX9.h` purely because the build shell had an empty +> `DXSDK_DIR`; setting it explicitly in the build script fixed it. See the CLI +> recipe in [BUILD.md](../BUILD.md) §7. + +### 2.6 Build outputs kept out of git + +The Release build writes `Munga_L4.lib` and `DivLoader.lib` into the tracked +`lib/` directory (that is their configured output path). These are build +artifacts — `Munga_L4.lib` alone is ~200 MB — and are now git-ignored by name. +The two genuine dependency libs in `lib/` (`OpenAL32.lib`, `libsndfile-1.lib`) +remain tracked. Executables and per-project `Release/`/`Debug/` intermediate +folders were already covered by `.gitignore`. + --- ## 3. Project reference data