Skip to content

feat(windows): implement SDL3 backend, DLL packaging, and deterministic replay CI - #348

Open
fbraz3 wants to merge 67 commits into
mainfrom
feat/windows-sdl3
Open

fbraz3 wants to merge 67 commits into
mainfrom
feat/windows-sdl3

Conversation

@fbraz3

@fbraz3 fbraz3 commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Description

Implements the modern SDL3 windowing and input backend on Windows (windows64-deploy preset), brings self-contained runtime DLL packaging, and integrates native Windows headless deterministic replay testing into CI, achieving full architectural parity across Linux, macOS, and Windows while strictly preserving retail VC6 / 32-bit compatibility.

Context & Motivation

Previously, modern windowing and input (SDL3 + DXVK + OpenAL) were active on Linux and macOS, whereas Windows builds remained tethered to legacy Win32/DirectInput stubs or VC6 32-bit builds. This PR brings native SDL3 windowing, mouse, keyboard, and self-contained packaging to Windows 64-bit builds while isolating modern code behind if(SAGE_USE_SDL3).

Upstream TheSuperHackers PR TheSuperHackers#2639 was reviewed as an informative reference and adapted to fit GeneralsX's cross-platform conventions.

Changes

1. Windowing & Display Backend

  • SDL3 Win32 Bridge: Extracted native Win32 HWND from SDL3 properties (SDL_PROP_WINDOW_WIN32_HWND_POINTER) in SDL3Main.cpp so DXVK / DirectX 8 binds properly to the window.
  • Window Management: Conditioned window visibility on SAGE_USE_SDL3 across all platforms in W3DDisplay.cpp.
  • Mode Switching: Added SWP_NOSENDCHANGING to SetWindowPos in dx8wrapper.cpp to prevent message reentrancy during display mode switches.
  • Busy State: Included Win32OSDisplay.cpp when targeting Windows with SDL3 to handle OSDisplaySetBusyState() without Linux stubs.

2. Input Subsystem

  • Cross-Platform Cursors & Mouse: Cleaned up #ifdef __linux__ in SDL3Mouse.cpp so ANI animated cursors, hotspot calculation, and surface boundary clamping work identically across Windows, Linux, and macOS.
  • Routing: Routed createKeyboard() and createMouse() to instantiate SDL3Keyboard and SDL3Mouse whenever SAGE_USE_SDL3 is active, maintaining legacy DirectInput as fallback when disabled.

3. Build & Packaging (Self-Contained Bundles)

  • Bundle Packaging: Updated deploy-windows-zh.ps1 and deploy-windows-generals.ps1 to detect and package all runtime DLLs:
    • SDL3.dll & SDL3_image.dll (natively built via FetchContent)
    • OpenAL32.dll (OpenAL Soft)
    • d3d8.dll, dxgi.dll, and d3d11.dll (DXVK runtime)
    • MinGW CRT runtimes (libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll)
    • Compression/image libraries (libpng16-16.dll, libzlib1.dll, zlib1.dll)
  • CMake & Build Scripts: Enabled SAGE_USE_SDL3 on windows64-deploy preset in CMakePresets.json. Enforced MinGW vcpkg triplets in build scripts to avoid manifest collisions during rebuilds.

4. Deterministic Replay Tests in CI

  • Deterministic Replay Workflow (replay-tests-windows.yml):
    • Added dedicated Windows replay testing workflow for the SDL3 MinGW x64 bundle.
    • Added Windows bundle preparation, asset extraction (generalszh.7z with ASSETS_KEY), and user data/map cache setup.
    • Added replay fallback logic (uses windows_*.rep if recorded, or linux_*.rep as cross-platform deterministic baseline).
    • Added diagnostic fingerprint logging (GAME_BIN_SHA256, INIZH.big, MapsZH.big, and replay checksums).
    • Added headless deterministic execution (.\GeneralsXZH.exe -headless -replay <rep>) with dummy video/audio drivers (SDL_VIDEODRIVER=dummy, SDL_AUDIODRIVER=dummy, DXVK_LOG_LEVEL=none), 180s timeout, error/CRC/MISMATCH regex diagnostics, and per-replay GitHub Step Summary reporting.
  • CI Pipeline Integration (ci.yml):
    • Added build-windows-sdl3 invocation via build-windows-sdl3.yml.
    • Added replay-test-windows-sdl3 job invoking replay-tests-windows.yml.
    • Added Windows SDL3 build and replay test statuses into ci-summary matrix and failure gates.

Validation

  • Successfully compiled and linked GeneralsXZH.exe (z_generals) with SDL3, OpenAL, and DXVK.
  • Successfully compiled and linked GeneralsX.exe (g_generals) with SDL3, OpenAL, and DXVK.
  • Verified deployed bundles in build/bundles/windows-generalsxzh-windows64-deploy and build/bundles/windows-generalsx-windows64-deploy containing all 12 necessary DLLs alongside executables.
  • Tested deterministic replay workflow integration across replay-tests-windows.yml, ci.yml, and build-windows-sdl3.yml.
  • Zero Hour and Generals base build paths both clean without regressions to Linux or macOS.
  • Updated monthly diary in docs/WORKLOG/2026-09-DIARY.md.

fbraz3 and others added 30 commits May 18, 2026 14:19
…election

Phase 2 - CMake Feature Gates:
- Gate Miles for legacy-only (cmake/miles.cmake)
- Gate Bink for legacy-only (cmake/bink.cmake)
- Modern Windows64 path uses SDL3, DXVK, OpenAL, FFmpeg
- Remove hard dependencies on 32-bit checks from modern path

Phase 3 - Entry Point and Engine Selection:
- Audit WinMain.cpp and SDL3Main.cpp entry points
- Define SAGE_USE_SDL3 feature flag for backend selection
- Modern path: SAGE_USE_SDL3=ON => SDL3-based engine
- Legacy path: SAGE_USE_SDL3=OFF => Win32-based engine
- Document Phase 2 and Phase 3 deliverables

See docs/WORKDIR/planning/PHASE2_WINDOWS64_CMAKE_FEATURE_GATES.md
See docs/WORKDIR/planning/PHASE3_WINDOWS64_ENTRY_POINT_ENGINE_SELECTION.md
…election

Phase 2 - CMake Feature Gates:
- Gate Miles for legacy-only (cmake/miles.cmake)
- Gate Bink for legacy-only (cmake/bink.cmake)
- Modern Windows64 path uses SDL3, DXVK, OpenAL, FFmpeg
- Remove hard dependencies on 32-bit checks from modern path

Phase 3 - Entry Point and Engine Selection:
- Audit WinMain.cpp and SDL3Main.cpp entry points
- Define SAGE_USE_SDL3 feature flag for backend selection
- Modern path: SAGE_USE_SDL3=ON => SDL3-based engine
- Legacy path: SAGE_USE_SDL3=OFF => Win32-based engine
- Document Phase 2 and Phase 3 deliverables

See docs/WORKDIR/planning/PHASE2_WINDOWS64_CMAKE_FEATURE_GATES.md
See docs/WORKDIR/planning/PHASE3_WINDOWS64_ENTRY_POINT_ENGINE_SELECTION.md
Phase 4 - DXVK Runtime on Windows:
- Audit existing DXVK integration via dxvk_adapter.h
- Define d3d8.dll bundling and loading strategy
- Gate SAGE_USE_DXVK already exists
- DXVK already integrated for cross-platform graphics
- Create Phase 4 documentation and session report

See docs/WORKDIR/planning/PHASE4_WINDOWS64_DXVK_RUNTIME.md
Guard legacy Miles/Bink linkage on the modern Windows64 path and\nselect SDL3GameEngine from WinMain when SAGE_USE_SDL3 is enabled.\n\nImplement DXVK Windows runtime staging in cmake/dx8.cmake by fetching\nthe DXVK release bundle and staging d3d8.dll, dxgi.dll, and d3d11.dll\nfor build/install outputs while keeping min-dx8-sdk for compile-time\nheaders/import libs.\n\nUpdate planning docs and May dev diary with the corrected phase status\nand runtime policy details.
Refactor the Windows64 execution strategy and task files to keep\nimplementation guidance phase-local.\n\nEmbed task references directly under each phase in the main strategy\ndocument and remove dependence on a separate child-task list.\n\nUpdate task files to execution-oriented wording, explicit outputs, and\nper-phase Implementation Reading (LLM) sections.
- ✅ OpenAL Soft v1.24.2 via FetchContent (WASAPI backend)
- ✅ FFmpeg cross-platform config (pkg-config Linux/macOS, kit Windows64)
- ✅ SAGE_USE_OPENAL=ON forçado no Windows (modern path)
- ✅ mingw.cmake inclui openal32 e FFmpeg libs
- ✅ CMakeLists.txt ativa as libs no build moderno
- ✅ Preset windows64-deploy com ambas as libs
- ✅ Documentação completa (task 05 + diary + planning)

- Next: Phase 6 - Legacy Windows Cull audit
- Target: GeneralsXZH first, backport shared libs to Generals
- docs/WORKDIR:
  - PLAN-2026-05-18_PHASE5_COMPLETION.md: checklist de conclusao Fase 5

- scripts/env:
  - setup-windows64.ps1: script de setup MSYS2+MinGW+FFmpeg

Fase 5 OpenAL+FFmpeg Windows64 configurado:
- OpenAL Soft v1.24.2 via FetchContent (cmake/openal.cmake)
- FFmpeg FindFFmpeg-Windows.cmake (FetchContent pattern)
- FFmpeg FindFFmpeg.cmake (cross-platform detection)
- CMakeLists.txt inclui ambas libs

Faltam:
- Instalar MSYS2
- Smoke test completo

Next: MSYS2 install -> setup script -> smoke test -> Phase 6
Advance Windows64 MinGW bring-up with incremental compatibility and build-graph fixes.

- harden WWVegas 64-bit compatibility paths (Except/registry/systimer/thread-id usage)

- remove Windows64 dependency on PkgConfig::FFMPEG in GameEngineDevice targets

- improve SDL3 zlib/libpng discovery for MSYS2 MinGW path

- update Windows64 strategy/task plans and May dev diary with current blocker state
…/timeGetTime issues

- MinGW-w64 x64 compatibility: disables x86-only code, fixes pointer/integer casts, adapts debug/exception handling for x64 CONTEXT, disables legacy FPU dump, fixes StackWalk64 function pointer types
- All timeGetTime usage replaced with GetTickCount macro for MinGW
- Fixes for socklen_t, HKL, CANDIDATELIST, HWND, and other Win32 types
- CompatLib headers forward to system SDK on MinGW
- CMake: winmm linkage for timeGetTime
- cmake/mingw.cmake: removes _int64/__int64 macro definitions
- This commit intentionally breaks VC6/MSVC6 compatibility (per user instruction)

See: #windows64-link-notes, #windows-mingw-setup

GeneralsX @build GitHub Copilot 20/05/2026 MinGW-w64 x64 cross-compile fixes.
…enAL, and platform stubs

- Corrige fallback de FFmpeg para MSYS2
- Remove dependências de d3d8/d3dx8d do caminho MinGW
- Adiciona stubs de FrameGrab e Bink para builds sem SDK proprietário
- Corrige link de ws2_32 para FTP/WinSock
- Substitui timeGetTime por GetTickCount no MinGW
- Ajusta fallback de GLI opcional
- Corrige headers e targets para Win32 input/teclado
- Não garante compatibilidade VC6 (quebrado por padrão)

[skip ci]
chore(sync): merge thesuperhackers main 2026-05-21
Enable real GitHub Actions Windows builds for Generals and Zero Hour\nwith configure/build/bundle/artifact stages using windows64-deploy.\n\nAlign repository docs/instructions/prompts with the active Windows64\nMinGW direction and remove outdated VC6-required wording for current\nworkflows and replay guidance.
- Remove .github/copilot-instructions.md (deleted in main)
- Update AGENTS.md and README.md from main
- Keep local development diary entries (Windows64 MinGW work)

Conflicts resolved in docs/DEV_BLOG/2026-05-DIARY.md
Co-authored-by: fbraz3 <10731570+fbraz3@users.noreply.github.com>
- Temporarily disable replay test jobs for determinism stabilization
- Add build fingerprint reporting to CI workflows
- Add replay CI provenance diagnostics for CRC mismatch triage
- Harden replay CI against host-specific map cache artifacts
- Sync merge from TheSuperHackers main with conflict resolution
- Windows64 MinGW CI pipeline enabled and documentation aligned
- Temporarily disable deterministic replay jobs in CI
- Add build fingerprint steps to CI build jobs
- Add replay CI provenance diagnostics for CRC mismatch triage
- Harden replay CI against host-specific map cache artifacts
- Sync merge from TheSuperHackers main
…imeEndPeriod

MinGW already includes these WinMM API declarations via <windows.h>, causing "ambiguating new declaration" errors. The functions are used elsewhere in the file and work correctly without the redundant extern declarations.

Fixes all 6 failing CI builds (Linux Flatpak, macOS, Windows) that were blocked by compilation errors in WW3D2/ww3d.cpp.

GeneralsX @BugFix 23/05/2026
fbraz3 and others added 9 commits May 25, 2026 18:53
Implement SDL3 modern windowing and input backend for Windows 64-bit builds, bringing Windows to architecture and feature parity with Linux and macOS.

- Enable SAGE_USE_SDL3 for windows64-deploy and windows64-debug presets.
- Modernize SDL3GameEngine, SDL3Keyboard, and SDL3Mouse to support Windows HWND extraction and DirectInput-free event processing.
- Unify color cursor fallback and boundary clamping across all platforms.
- Ensure strict conditional isolation behind SAGE_USE_SDL3 so legacy Win32 / VC6 32-bit builds remain intact without regressions for multiplayer cross-play.
- Backport changes symmetrically to Generals base game.

Related-to #29
- Enhance Windows deploy scripts to discover and package runtime DLLs:
  SDL3, SDL3_image, OpenAL32, DXVK (d3d8, dxgi, d3d11), MinGW CRT
  runtime, and zlib/png
- Add build-windows-sdl3.yml compiling both ZH and Base targets with
  MSYS2 MinGW-w64, checking DLL dependencies, and running headless
  replay simulations with step summaries
- Wire build-windows-sdl3.yml into CI pipeline (ci.yml)
- Fix CRT __argc/__argv conflict on Windows in SDL3Main.cpp and
  virtual method signatures in SDL3GameEngine.h
- Update monthly dev diary with validation details for both targets
- Add native Windows support to .github/workflows/replay-tests.yml
  including artifact extraction, 7z asset unpacking, map cache setup,
  and diagnostic provenance fingerprinting
- Add headless deterministic replay simulation on Windows with dummy
  SDL/DXVK drivers and timeout/CRC mismatch diagnostics
- Hook replay-test-windows into .github/workflows/ci.yml and update
  ci-summary reporting table and failure gates
- Keep build-windows-sdl3.yml focused on compilation and packaging
- Update monthly dev diary with Windows replay CI details
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 188 files, which is 88 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: Repository: fbraz3/GeneralsX/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7851401e-2dda-412b-b1fc-c96272d47dbf
📥 Commits

Reviewing files that changed from the base of the PR and between 76ce079 and f147c90.

⛔ Files ignored due to path filters (147)
  • Dependencies/Utility/Utility/intrin_compat.h is excluded by !Dependencies/**
  • assets/generalsx-zh_icon.ico is excluded by !**/*.ico, !assets/**
  • assets/generalsx_icon.ico is excluded by !**/*.ico, !assets/**
  • references/Code/Libraries/DX90SDK/Include/D2D1.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D2D1Helper.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D2DBaseTypes.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D2Derr.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D10.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D10_1.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D10_1shader.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D10effect.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D10shader.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D11.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D11SDKLayers.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3D11Shader.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DCSX.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX10.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX10core.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX10math.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX10math.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX10mesh.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX10tex.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX11.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX11async.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX11core.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX11tex.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3DX_DXGIFormatConvert.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/D3Dcommon.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/DWrite.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/DXGI.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/DXGIFormat.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/DXGIType.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/Dcommon.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/DxErr.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/PIXPlugin.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/X3DAudio.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XAPO.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XAPOBase.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XAPOFX.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XAudio2.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XAudio2fx.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XDSP.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/XInput.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/audiodefs.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/comdecl.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d10misc.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d10sdklayers.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d8.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d8caps.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d8types.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d9.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d9caps.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3d9types.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx10async.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx12.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8core.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8effect.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8math.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8math.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8mesh.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8shape.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx8tex.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9anim.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9core.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9effect.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9math.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9math.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9mesh.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9shader.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9shape.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9tex.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/d3dx9xof.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dinput.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dinputd.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dsconf.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dsetup.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dsound.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dxdiag.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dxfile.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/dxsdkver.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/gameux.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/rmxfguid.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/rmxftmpl.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/rpcsal.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xact3.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xact3d3.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xact3wb.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xma2defs.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xnamath.h is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xnamathconvert.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xnamathmatrix.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xnamathmisc.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Include/xnamathvector.inl is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/D3DCSX.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/D3DCSXd.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/DxErr.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/X3DAudio.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/XAPOFX.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/XInput.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d2d1.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3d10.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3d10_1.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3d11.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3d9.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dx10.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dx10d.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dx11.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dx11d.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dx9.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dx9d.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/d3dxof.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/dinput8.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/dsound.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/dwrite.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/dxguid.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/xapobase.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x64/xapobased.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/D3DCSX.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/D3DCSXd.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/DxErr.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/X3DAudio.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/XAPOFX.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/XInput.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d2d1.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3d10.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3d10_1.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3d11.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3d8.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3d9.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx10.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx10d.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx11.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx11d.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx8.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx9.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dx9d.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/d3dxof.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/dinput.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/dinput8.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/dsetup.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/dsound.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/dwrite.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/dxguid.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/xapobase.lib is excluded by !references/**
  • references/Code/Libraries/DX90SDK/Lib/x86/xapobased.lib is excluded by !references/**
📒 Files selected for processing (188)
  • .github/prompts/setup-windows-mingw-environment.prompt.md
  • .github/workflows/build-linux-flatpak.yml
  • .github/workflows/build-macos.yml
  • .github/workflows/build-windows-sdl3.yml
  • .github/workflows/ci.yml
  • .github/workflows/replay-tests-windows.yml
  • .vscode/tasks.json
  • CMakeLists.txt
  • CMakePresets.json
  • Core/GameEngine/Include/GameClient/Smudge.h
  • Core/GameEngine/Include/GameNetwork/WOLBrowser/FEBDispatch.h
  • Core/GameEngine/Include/GameNetwork/WOLBrowser/WebBrowser.h
  • Core/GameEngine/Include/Precompiled/PreRTS.h
  • Core/GameEngine/Source/Common/Bezier/BezierSegment.cpp
  • Core/GameEngine/Source/Common/FramePacer.cpp
  • Core/GameEngine/Source/Common/UserPreferences.cpp
  • Core/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp
  • Core/GameEngine/Source/GameClient/GUI/IMEManager.cpp
  • Core/GameEngine/Source/GameClient/Input/Keyboard.cpp
  • Core/GameEngine/Source/GameNetwork/WOLBrowser/WebBrowser.cpp
  • Core/GameEngine/Source/GameNetwork/udp.cpp
  • Core/GameEngineDevice/CMakeLists.txt
  • Core/GameEngineDevice/Include/MilesAudioDevice/MilesAudioManager.h
  • Core/GameEngineDevice/Include/MilesAudioDevice/mss/mss.h
  • Core/GameEngineDevice/Include/OpenALAudioDevice/OpenALAudioStream.h
  • Core/GameEngineDevice/Include/Win32Device/Common/Win32GameEngine.h
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/GUI/GUICallbacks/W3DMainMenu.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DMouse.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWater.cpp
  • Core/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cpp
  • Core/GameEngineDevice/Source/Win32Device/GameClient/Win32DIKeyboardStub.cpp
  • Core/Libraries/Source/Compression/EAC/huffencode.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/dx8webbrowser.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/framgrab.h
  • Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp
  • Core/Libraries/Source/WWVegas/WW3D2/ww3d.cpp
  • Core/Libraries/Source/WWVegas/WWAudio/MilesStub.h
  • Core/Libraries/Source/WWVegas/WWDebug/wwprofile.cpp
  • Core/Libraries/Source/WWVegas/WWDebug/wwprofile.h
  • Core/Libraries/Source/WWVegas/WWDownload/Download.cpp
  • Core/Libraries/Source/WWVegas/WWDownload/FTP.cpp
  • Core/Libraries/Source/WWVegas/WWLib/Except.cpp
  • Core/Libraries/Source/WWVegas/WWLib/registry.cpp
  • Core/Libraries/Source/WWVegas/WWLib/registry.h
  • Core/Libraries/Source/WWVegas/WWLib/systimer.cpp
  • Core/Libraries/Source/WWVegas/WWLib/systimer.h
  • Core/Libraries/Source/debug/debug_debug.cpp
  • Core/Libraries/Source/debug/debug_debug.h
  • Core/Libraries/Source/debug/debug_except.cpp
  • Core/Libraries/Source/debug/debug_stack.cpp
  • Core/Libraries/Source/debug/debug_stack.inl
  • Core/Libraries/Source/profile/profile.cpp
  • Core/Libraries/Source/profile/profile_funclevel.h
  • Generals/Code/CompatLib/Include/comip_compat.h
  • Generals/Code/CompatLib/Include/comutil_compat.h
  • Generals/Code/CompatLib/Include/memory_compat.h
  • Generals/Code/CompatLib/Include/module_compat.h
  • Generals/Code/CompatLib/Include/types_compat.h
  • Generals/Code/CompatLib/Include/windows.h
  • Generals/Code/CompatLib/Include/windows_wrapper.h
  • Generals/Code/GameEngine/CMakeLists.txt
  • Generals/Code/GameEngine/Include/Common/CriticalSection.h
  • Generals/Code/GameEngine/Source/Common/System/StackDump.cpp
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp
  • Generals/Code/GameEngineDevice/CMakeLists.txt
  • Generals/Code/GameEngineDevice/Include/SDL3Device/GameClient/SDL3Keyboard.h
  • Generals/Code/GameEngineDevice/Include/SDL3Device/GameClient/SDL3Mouse.h
  • Generals/Code/GameEngineDevice/Include/SDL3GameEngine.h
  • Generals/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DGameClient.h
  • Generals/Code/GameEngineDevice/Source/SDL3Device/GameClient/SDL3Keyboard.cpp
  • Generals/Code/GameEngineDevice/Source/SDL3Device/GameClient/SDL3Mouse.cpp
  • Generals/Code/GameEngineDevice/Source/SDL3GameEngine.cpp
  • Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DWebBrowser.cpp
  • Generals/Code/Libraries/Source/WWVegas/CMakeLists.txt
  • Generals/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt
  • Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt
  • Generals/Code/Main/CMakeLists.txt
  • Generals/Code/Main/RTS.RC
  • Generals/Code/Main/SDL3Main.cpp
  • Generals/Code/Main/WinMain.cpp
  • Generals/Code/Main/WinMain.h
  • GeneralsMD/Code/CompatLib/CMakeLists.txt
  • GeneralsMD/Code/CompatLib/Include/memory_compat.h
  • GeneralsMD/Code/CompatLib/Include/module_compat.h
  • GeneralsMD/Code/CompatLib/Include/types_compat.h
  • GeneralsMD/Code/CompatLib/Include/windows.h
  • GeneralsMD/Code/CompatLib/Include/windows_wrapper.h
  • GeneralsMD/Code/GameEngine/CMakeLists.txt
  • GeneralsMD/Code/GameEngine/Include/GameNetwork/GeneralsOnline/NetworkMesh.h
  • GeneralsMD/Code/GameEngine/Source/Common/System/StackDump.cpp
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp
  • GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SlavedUpdate.cpp
  • GeneralsMD/Code/GameEngineDevice/CMakeLists.txt
  • GeneralsMD/Code/GameEngineDevice/Include/PchCompat.h
  • GeneralsMD/Code/GameEngineDevice/Include/SDL3Device/GameClient/SDL3Keyboard.h
  • GeneralsMD/Code/GameEngineDevice/Include/SDL3Device/GameClient/SDL3Mouse.h
  • GeneralsMD/Code/GameEngineDevice/Include/SDL3GameEngine.h
  • GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DGameClient.h
  • GeneralsMD/Code/GameEngineDevice/Source/OpenALAudioManager.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/SDL3Device/GameClient/SDL3Keyboard.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/SDL3Device/GameClient/SDL3Mouse.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/SDL3GameEngine.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/VideoDevice/BinkVideoPlayerStub.cpp
  • GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DWebBrowser.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/CMakeLists.txt
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/CMakeLists.txt
  • GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/FrameGrabStub.cpp
  • GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt
  • GeneralsMD/Code/Main/CMakeLists.txt
  • GeneralsMD/Code/Main/RTS.RC
  • GeneralsMD/Code/Main/SDL3Main.cpp
  • GeneralsMD/Code/Main/WinMain.cpp
  • Patches/SagePatch/CMakeLists.txt
  • TESTING.md
  • WIKI_PAGES/ARCHITECTURE/DATA.md
  • WIKI_PAGES/ARCHITECTURE/FLOW.md
  • WIKI_PAGES/ARCHITECTURE/LAYERS.md
  • WIKI_PAGES/CHANGES/2026-05.md
  • WIKI_PAGES/CONCEPTS/DETERMINISM.md
  • WIKI_PAGES/CONCEPTS/PORTING.md
  • WIKI_PAGES/CONCEPTS/RAG.md
  • WIKI_PAGES/CONCEPTS/RETAIL.md
  • WIKI_PAGES/ENTITIES/CORE.md
  • WIKI_PAGES/ENTITIES/GAME.md
  • WIKI_PAGES/ENTITIES/PLATFORM.md
  • WIKI_PAGES/ENTITIES/REFERENCES.md
  • WIKI_PAGES/LATEST.md
  • WIKI_PAGES/OVERVIEW.md
  • WIKI_PAGES/README.md
  • WIKI_PAGES/TOPICS/ARCHITECTURE.md
  • WIKI_PAGES/TOPICS/BRANCHING.md
  • WIKI_PAGES/TOPICS/BUILD.md
  • WIKI_PAGES/TOPICS/DEBUGGING.md
  • WIKI_PAGES/TOPICS/TESTING.md
  • WIKI_PAGES/WIKI_SCHEMA.md
  • WIKI_PAGES/WIKI_SCHEMA_PART2.md
  • WIKI_PAGES/WIKI_SCHEMA_PART3.md
  • WIKI_SCHEMA.md
  • WIKI_SCHEMA_PART2.md
  • WIKI_SCHEMA_PART3.md
  • cmake/FindFFmpeg-Windows.cmake
  • cmake/FindFFmpeg.cmake
  • cmake/ccache.cmake
  • cmake/config-build.cmake
  • cmake/dx8.cmake
  • cmake/mingw.cmake
  • cmake/sdl3.cmake
  • cmake/toolchains/mingw-w64-i686.cmake
  • cmake/toolchains/mingw-w64-x86_64.cmake
  • docs/ETC/COMMAND_LINE_PARAMETERS.md
  • docs/WORKDIR/fixes/2026-05-24-CI-Fixes.md
  • docs/WORKDIR/lessons/2026-05-LESSONS.md
  • docs/WORKDIR/planning/PHASE0_WINDOWS64_POLICY_AND_BASELINE_COMPLETE.md
  • docs/WORKDIR/planning/PHASE1_WINDOWS64_TOOLCHAIN_PRESETS.md
  • docs/WORKDIR/planning/PHASE2_WINDOWS64_CMAKE_FEATURE_GATES.md
  • docs/WORKDIR/planning/PHASE3_WINDOWS64_ENTRY_POINT_ENGINE_SELECTION.md
  • docs/WORKDIR/planning/PHASE4_WINDOWS64_DXVK_RUNTIME.md
  • docs/WORKDIR/planning/PLAN-2026-05-18_PHASE5_COMPLETION.md
  • docs/WORKDIR/planning/PLAN-2026-05-18_WINDOWS64_MINGW_STRATEGY.md
  • docs/WORKDIR/planning/PLAN-2026-05-21_THESUPERHACKERS_SYNC.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_01_TOOLCHAIN_AND_PRESETS.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_02_CMAKE_FEATURE_GATES.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_03_ENTRYPOINT_AND_ENGINE_FACTORY.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_04_DXVK_WINDOWS_RUNTIME.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_05_OPENAL_FFMPEG_WINDOWS.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_06_LEGACY_WINDOWS_CULL.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_07_BUNDLE_AND_RUNTIME_VALIDATION.md
  • docs/WORKDIR/planning/PLAN-WINDOWS64_TASK_08_CI_AND_DOCS.md
  • docs/WORKDIR/reports/PHASE0_WINDOWS64_POLICY_BASELINE_SESSION_REPORT.md
  • docs/WORKDIR/reports/PHASE1_WINDOWS64_TOOLCHAIN_PRESETS_COMPLETE.md
  • docs/WORKDIR/reports/PHASE2_WINDOWS64_CMAKE_FEATURE_GATES_SESSION_REPORT.md
  • docs/WORKDIR/reports/PHASE3_WINDOWS64_ENTRY_POINT_ENGINE_SELECTION_SESSION_REPORT.md
  • docs/WORKDIR/reports/PHASE4_WINDOWS64_DXVK_RUNTIME_SESSION_REPORT.md
  • docs/WORKLOG/2026-05-DIARY.md
  • docs/WORKLOG/2026-09-DIARY.md
  • docs/WORKLOG/2026-10-DIARY.md
  • scripts/README.md
  • scripts/build/windows/build-windows-generals.ps1
  • scripts/build/windows/build-windows-zh.ps1
  • scripts/build/windows/configure-windows64.ps1
  • scripts/build/windows/deploy-windows-generals.ps1
  • scripts/build/windows/deploy-windows-zh.ps1
  • scripts/env/enter-mingw-windows.cmd
  • scripts/env/setup-mingw-windows.ps1
  • scripts/env/setup-windows64.ps1
  • vcpkg-lock.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

GeneralsX Developer added 20 commits September 30, 2026 17:08
…nd Windows MinGW caching

- Remove accidental systimer.h include in GameCommon.h to fix MSVC x86 build
- Link VideoToolbox, CoreMedia, CoreVideo, and AudioToolbox frameworks with SWRESAMPLE in cmake/FindFFmpeg.cmake for macOS arm64
- Update setup-msys2 with msystem MINGW64 and inherit path-type, and expand MinGW candidate search paths in cmake/sdl3.cmake and configure-windows64.ps1
- Save vcpkg binary cache immediately after CMake configure in build-windows-sdl3.yml to prevent 30-minute recompilations
- Update monthly worklog diary
…cpkg caching

- Add standard Miles U32, S32, and F32 typedefs to Core/GameEngineDevice/Include/MilesAudioDevice/mss/mss.h to fix MSVC x86 build
- Export MINGW_PREFIX and MSYSTEM_PREFIX in build-windows-sdl3.yml using msys2 shell to make them available to pwsh steps
- Add -InstallDependenciesOnly switch to configure-windows64.ps1 and isolate vcpkg cache save before CMake configure
- Prioritize MINGW_PREFIX and RUNNER_TEMP msys2 paths in all Windows build, deploy, and toolchain scripts
- Update September 2026 worklog diary
…o signatures

- Correct parameter and return types in Core/GameEngineDevice/Include/MilesAudioDevice/mss/mss.h for AIL_stream_ms_position, AIL_set_3D_user_data, AIL_3D_user_data, AIL_sample_user_data, and AIL_set_sample_user_data to resolve MSVC x86 C2664 type errors
- Pin build-windows-sdl3.yml to runs-on windows-2022 matching other Windows workflows, avoiding the Visual Studio 2026 Preview / Windows SDK resource compiler cmcldeps wrapper bug
- Use cygpath -m to export clean Windows filesystem paths for MINGW_PREFIX and MSYSTEM_PREFIX
- Remove duplicate mingw cmake from setup-msys2 package list
- Update September 2026 worklog diary
Remove unused MSS_auto_cleanup declaration and AIL_startup macro override
from Core/GameEngineDevice/Include/MilesAudioDevice/mss/mss.h. This fixes
LNK2019 unresolved external symbol _MSS_auto_cleanup when linking
GeneralsX.exe and GeneralsXZH.exe on MSVC x86.
…ility

Change _int64 to __int64 in WWProfile_Get_Ticks parameter in wwprofile.cpp,
matching all class members (StartTime, ResetTime, Time, End) and callers.
Also add a fallback _int64 typedef under __MINGW32__ in wwprofile.h.
This resolves compiler error '_int64 was not declared in this scope' on
MinGW GCC builds for Windows 64-bit.
Remove duplicate static inline declarations of strlcpy and strlcat
in Download.cpp and FTP.cpp under __MINGW32__ that conflict with
declarations provided by Utility/stringex.h.
…atibility

Do not define __debugbreak as a function-like macro on _WIN32. On Windows,
MSVC and MinGW-w64 provide __debugbreak() natively via <intrin.h>, and
defining it as a zero-argument macro conflicts with function declarations
like extern void __cdecl __debugbreak(void); in SDL3/SDL_assert.h.
- Remove invalid direct <ws2ipdef.h> include from NetworkMesh.h,
  preventing undefined SCOPE_ID and SOCKET_ADDRESS errors in MinGW-w64
  and aligning with NGMP networking header guidelines.
- Move <filesystem> include under SYSTEM INCLUDES prior to USER INCLUDES
  in UserPreferences.cpp so standard library templates in <chrono> and
  <codecvt> are not polluted by GameSpy min/max macros.
Define socklen_t as int when _WIN32 is defined without restricting to
_MSC_VER, resolving undefined socklen_t compilation errors in UDP::Read,
GetInputBuffer, and GetOutputBuffer under MinGW-w64 GCC.
…3 are enabled

In 64-bit Windows SDL3 builds (windows64-deploy), MilesAudioManager.cpp
failed to compile under MinGW GCC due to 32-bit pointer-to-integer casts
on HSAMPLE and HSTREAM types. Furthermore, OpenAL and SDL3/BinkVideoPlayerStub
supersede Miles and Bink respectively for modern builds.

Guard MilesAudioManager under 'if(NOT SAGE_USE_OPENAL AND NOT SAGE_USE_MINIAUDIO)'
and BinkVideoPlayer under 'if(NOT SAGE_USE_SDL3)' in Core/GameEngineDevice/CMakeLists.txt,
preserving legacy MSVC x86 multimedia compilation while excluding them from
modern 64-bit builds.
…ol resolution

On Windows (PE/COFF), DLLs cannot have unresolved external symbols at link
time. Patches/SagePatch/CMakeLists.txt linked SDL3::SDL3 on UNIX but lacked
a WIN32 branch, causing undefined reference errors to SDL windowing and
display functions (such as SDL_GetWindowFromID, SDL_SetWindowMouseGrab,
SDL_SetWindowPosition) when linking libsage_patch.dll under MinGW.

Add an elseif(WIN32) branch linking SDL3::SDL3 to sage_patch to ensure all
symbols resolve during DLL linking.
…iscovery

- Remove invalid #include "always.h" from OpenALAudioStream.h
- Replace hardcoded MSYS2 path with dynamic MinGW prefix candidates for libavcodec in Core/GameEngineDevice/CMakeLists.txt
- Package MinGW FFmpeg runtime DLLs in Windows deployment scripts for Generals and Zero Hour
… headers

- Add mingw-w64-x86_64-ffmpeg to MSYS2 installation in build-windows-sdl3.yml
- Remove unused libavcodec and libavutil includes from OpenALAudioManager.cpp
- Resolve FFmpeg library paths using find_library and target_link_directories in Core/GameEngineDevice/CMakeLists.txt
…llback decoding

- Reintroduce libavcodec and libavutil headers in OpenALAudioManager.cpp required by setFrameCallback
- Update development worklog accordingly
…for self-contained Windows bundle

- Add recursive PE import dependency resolution to Windows deploy scripts
  (deploy-windows-zh.ps1, deploy-windows-generals.ps1) to resolve all
  transitive MinGW runtime libraries imported by FFmpeg and engine binaries.
- Copy libsage_patch.dll, libgamespy.dll, and all vcpkg dynamic runtime DLLs
  (libcurl-4.dll, GameNetworkingSockets.dll, libprotobuf.dll) into bundles.
- Assert presence of primary runtime DLLs and dependency libraries during
  bundle verification step in build-windows-sdl3.yml.
- Update 2026-09-DIARY.md worklog with root-cause analysis of 0xC0000135
  (STATUS_DLL_NOT_FOUND) loader crash and packaging improvements.
…configure cache

- Validate PE machine type (IMAGE_FILE_MACHINE_AMD64 = 0x8664) across all packaged and transitive DLLs in deploy-windows-zh.ps1 and deploy-windows-generals.ps1 to prevent STATUS_INVALID_IMAGE_FORMAT (0xC000007B) crashes during replay tests.
- Filter vcpkg dynamic runtime copying to release bin/ binaries and sweep bundle for non-x64 images.
- Add automated 64-bit architecture verification in build-windows-sdl3.yml verify step.
- Add CMake FetchContent caching in build-windows-sdl3.yml to prevent repeated dependency re-downloads.
- Remove redundant vcpkg install execution from configure-windows64.ps1 during CMake configure.
- Optimize ccache configuration with CCACHE_BASEDIR, CCACHE_SLOPPINESS, and content compiler checks.
- Add ccache statistics logging in build-windows-zh.ps1 and build-windows-generals.ps1.
- Update docs/WORKLOG/2026-10-DIARY.md.
# Conflicts:
#	docs/WORKLOG/2026-10-DIARY.md
…0000139

Include libssl-3-x64.dll and libcrypto-3-x64.dll from MinGW MSYS2
in core runtime DLLs across deploy scripts to avoid missing OpenSSL
QUIC entrypoints imported by libcurl-4 and ngtcp2.

Also remove unused vcpkg libcurl.dll and stray debug DLLs, and add
OpenSSL runtime DLLs to CI bundle validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants