Skip to content

ci(windows): add windows64-deploy pre-alpha build and bundle pipeline#147

Open
fbraz3 wants to merge 38 commits into
mainfrom
feat/windows-mingw
Open

ci(windows): add windows64-deploy pre-alpha build and bundle pipeline#147
fbraz3 wants to merge 38 commits into
mainfrom
feat/windows-mingw

Conversation

@fbraz3
Copy link
Copy Markdown
Owner

@fbraz3 fbraz3 commented May 22, 2026

Summary

This PR enables a real Windows64 MinGW CI path as pre-alpha scope while keeping Linux/macOS as the stable validation baseline.

The Windows pipeline now compiles and generates bundles in CI, but it is intentionally treated as early-stage and not yet feature-complete.

Pre-Alpha Positioning (Windows)

  • Windows support is now explicitly treated as pre-alpha in project guidance.
  • CI scope for Windows is currently limited to build + bundle generation.
  • Replay tests are not included in Windows CI yet.
  • Failures and regressions are expected during this phase and should be handled incrementally.

What Changed

  • Replaced placeholder Windows workflow with a real pipeline in .github/workflows/build-windows.yml.
  • Added MSYS2 MinGW64 setup and execution flow for:
    • configure (windows64-deploy)
    • build (g_generals, z_generals)
    • bundle generation (Generals + Zero Hour)
    • artifact upload (bundles + logs)
  • Integrated Windows job into .github/workflows/ci.yml summary and failure gates.
  • Updated instructions/prompts/agent docs to align with windows64-deploy as the active Windows path and removed outdated VC6-required wording for current workflows.
  • Updated replay guidance docs to require optimized non-debug builds (RTS_BUILD_OPTION_DEBUG=OFF) without VC6-specific dependency.

CI Scope in This PR

  • Linux: unchanged (build + replay flow as configured)
  • macOS: unchanged (build + replay flow as configured)
  • Windows (pre-alpha): compile + bundle only

Out of Scope

  • Windows replay tests in CI
  • Windows runtime/gameplay parity guarantees
  • Full determinism validation on Windows

Validation

  • Local diagnostics for modified workflow/doc files are clean.
  • Branch used: feat/windows-mingw
  • Commit: 3c7174061

Follow-up Suggestions

  • Add a dedicated Windows pre-alpha checklist in docs/WORKDIR/ for runtime milestones.
  • Add optional Windows smoke-run stage (menu launch) after bundle generation.
  • Add replay CI stage for Windows only after runtime stability is acceptable.

GeneralsX Developer and others added 16 commits May 18, 2026 19:03
…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]
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
@fbraz3
Copy link
Copy Markdown
Owner Author

fbraz3 commented May 23, 2026

@copilot resolve the merge conflicts in this pull request

Co-authored-by: fbraz3 <10731570+fbraz3@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI commented May 23, 2026

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 0f786e2. The only conflict was in docs/DEV_BLOG/2026-05-DIARY.md — both sets of 2026-05-22 diary entries (Windows CI pipeline from this branch and the replay/fingerprint/sync entries from main) are now preserved in the merged file.

Copilot finished work on behalf of fbraz3 May 23, 2026 01:02
fbraz3 added 9 commits May 22, 2026 23:25
- 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
On macOS, GetCurrentThreadId() returns _opaque_pthread_t* (pointer), not DWORD.
Changed ThreadID type from unsigned long to void* and removed invalid casts.

Fixes macOS builds that were failing with:
- "static_cast from 'THREAD_ID' to 'int' is not allowed"
- "comparison between pointer and integer"

GeneralsX @BugFix 24/05/2026
- Add vcpkg execution to Windows configure script with --recurse flag
- Add GLM and GLI dependencies to vcpkg-lock.json
- Enable VCPKG_MANIFEST_MODE for windows64-deploy preset
- Fix invalid cast in wwmemlog.cpp for cross-platform compatibility

Fixes #123
Use platform-native thread id types in wwmemlog/wwprofile to restore Linux and macOS builds, and remove invalid nested submodule gitlinks under references/references that triggered git exit 128 in CI post-job cleanup.
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