Native macOS arm64 build of the Command & Conquer: Generals — Zero Hour engine.
Fixed
- Debug logs silently broken on macOS (
\path-separator bug).LogClass/
StatDumpClassbuilt their log-file path with the Windows-only idiom
GetModuleFileName+strrchr(buffer, '\\')+"\\"+fname. On macOS the
GetModuleFileNameshim returns a POSIX path with/separators, so the
backslash search never matched — the exe name was never stripped and the path
resolved inside the binary file (.../generalszh/Perf.txt, wheregeneralszh
is a regular file), sofopen("wt")failed silently.- Symptom (older builds): 0-byte junk files with a literal backslash next to
the binary —generalszh\Perf.txt,\Ping.txt,\QMPerf.txt,\StateChanged.txt. - Symptom (recent builds): the
apple_path::normalizewrapper hid the junk
file, but the Perf / Ping / QMPerf / StateChanged debug logs then never wrote at all. - Cause:
strrchr(buffer, '\\')can never match a POSIX (/) path. - Fix: strip and re-join with the native path separator (
/on Apple,
\on Windows) at all 5 idiom sites —MiniLog.cpp(the live-in-release one via
DEBUG_LOGGING),W3DDisplay.cppStatDumpClass(debug/profile), and
W3DModelDraw.cpp(debug-CRC). Mirrors the existingDebug.cpp__APPLE__fix.
Windows path byte-identical (#else). - Verified live in CWC: clean
Perf/Ping/QMPerf/StateChanged.txtare now written
next to the binary, with no backslash junk created.
- Symptom (older builds): 0-byte junk files with a literal backslash next to
The GeneralsZH Launcher downloads this engine automatically. You must own a
legitimate copy of Zero Hour — EA game data is not included.
Apple Silicon (M-series) only. Checksums in SHA256SUMS.