Remove ATL dependency so VC++ Express can build

The Express editions of Visual C++ ship without ATL. The only ATL usage was
in MUNGA_L4/L4APP.cpp (atlbase.h/atlconv.h + USES_CONVERSION/W2A macros, all
in that one file) for wide-to-ANSI conversion of command-line arguments.

- Replace the ATL includes with a self-contained L4WideToAnsi helper (a
  WideCharToMultiByte wrapper) and local USES_CONVERSION/W2A macros that
  reproduce ATL's W2A semantics. All call sites consume the result immediately
  (stricmp / CString assignment / atoi / atol), so behaviour is unchanged.
- Set UseOfATL="0" in Munga_L4.vcproj, RP_L4.vcproj and their VS2008 variants.
- Document the Express build path and the confirmed June 2010 DirectX SDK in
  BUILD.md (new section 6) and docs/BUILD-NOTES.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-01 09:30:08 -05:00
co-authored by Claude Opus 4.8
parent 2229f154d1
commit f849415c02
7 changed files with 103 additions and 14 deletions
+27
View File
@@ -91,6 +91,33 @@ $(DXSDK_DIR)Lib\x86
`DXSDK_DIR` is set by the DirectX SDK installer and ends in a trailing
backslash, so `$(DXSDK_DIR)Include` resolves correctly.
> **Status update:** the **DirectX SDK (June 2010)** is now installed at
> `C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\`, and `DXSDK_DIR`
> is set machine-wide to that path. All required headers (`d3d9.h`, `d3dx9.h`,
> `dinput.h`) and libs (`d3d9.lib`, `d3dx9.lib`, `dxerr.lib`, `dxguid.lib`) are
> present. The un-hardcoded projects resolve to it automatically.
### 2.4 ATL removed (enables VC++ Express)
The Express editions of Visual C++ ship without ATL. The codebase's only ATL
usage was in `MUNGA_L4/L4APP.cpp``<atlbase.h>` / `<atlconv.h>` and the
`USES_CONVERSION` / `W2A` macros (28 references, all in that one file), used
purely to convert wide command-line arguments to ANSI in the arg parser. No
COM, no `CComPtr`, no ATL windows.
Changes:
- Replaced the ATL includes with a self-contained `L4WideToAnsi` helper class
(a `WideCharToMultiByte` wrapper) plus local `USES_CONVERSION` / `W2A` macros
that reproduce ATL's `W2A` semantics — each use yields an independent buffer
valid until the end of the enclosing full-expression. Every call site consumes
the result immediately (compare via `stricmp`, assign to MUNGA's `CString`,
or pass to `atoi`/`atol`), so the behaviour is identical.
- Set `UseOfATL="0"` in `Munga_L4.vcproj`, `RP_L4.vcproj`, and the two `VS2008`
variants.
`CString` in this file is **MUNGA's own** class (`MUNGA/CSTR.h`), not ATL's, so
dropping the ATL headers does not affect it.
---
## 3. Project reference data