Skip to content

Zero Hour engine — macOS (Apple Silicon) engine-v0.1.11

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Jul 16:55

Native macOS arm64 build of the Command & Conquer: Generals — Zero Hour engine.

Fixed

  • Debug logs silently broken on macOS (\ path-separator bug). LogClass /
    StatDumpClass built their log-file path with the Windows-only idiom
    GetModuleFileName + strrchr(buffer, '\\') + "\\" + fname. On macOS the
    GetModuleFileName shim 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, where generalszh
    is a regular file), so fopen("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::normalize wrapper 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.cpp StatDumpClass (debug/profile), and
      W3DModelDraw.cpp (debug-CRC). Mirrors the existing Debug.cpp __APPLE__ fix.
      Windows path byte-identical (#else).
    • Verified live in CWC: clean Perf/Ping/QMPerf/StateChanged.txt are now written
      next to the binary, with no backslash junk created.

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.