Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
42886ed
build: complete Phase 2 CMake feature gates and Phase 3 entry point s…
May 18, 2026
0bab844
build: complete Phase 2 CMake feature gates and Phase 3 entry point s…
May 18, 2026
d3ac0c8
docs: complete Phase 4 DXVK runtime on Windows
May 18, 2026
961bb2f
fix(windows64-mingw): harden phase3 and phase4
May 18, 2026
632d42f
docs(windows64-plan): embed per-phase references
May 18, 2026
3f1fe3f
Phase 5: OpenAL + FFmpeg para Windows64 MinGW ✅
May 18, 2026
f7265db
docs: Fase 5: OpenAL e FFmpeg no Windows - Planos e scripts de setup
May 19, 2026
f4282a4
build(windows64): isolate legacy wininput path
May 19, 2026
17f481f
fix(windows64-mingw): reduce build blockers phase 5/6
May 19, 2026
d586268
build(windows64-mingw): enable x64 cross-compile, fix pointer/integer…
May 20, 2026
7790074
build(windows64): enable MinGW-w64 modern build, fix FFmpeg, DXVK, Op…
May 20, 2026
65e74fb
build(windows64): wire tasks and stabilize mingw workflow
May 20, 2026
65b627f
Windows MinGW: progresso no build Generals base
May 21, 2026
0808571
Windows MinGW: ajustes de includes e deploy Generals
May 21, 2026
3c71740
ci(windows): enable windows64 mingw build pipeline
May 22, 2026
2bdd3e4
feat: resolve merge conflicts from main
fbraz3 May 22, 2026
0f786e2
chore: merge main into feat/windows-mingw, resolve diary conflict
Copilot May 23, 2026
ac85699
Merge main: upstream sync and replay CI improvements
fbraz3 May 23, 2026
c255456
Merge branch 'main' into feat/windows-mingw
fbraz3 May 23, 2026
ce425c2
fix(ww3d): remove redundant extern declarations for timeBeginPeriod/t…
fbraz3 May 23, 2026
a5ef950
fix(macos): use void* for ThreadID to handle macOS pthread pointer
fbraz3 May 24, 2026
8139d2b
fix: resolve CI build failures across all platforms
fbraz3 May 24, 2026
35034c3
fix(ci): fix thread id and submodule paths
fbraz3 May 25, 2026
1d9d7aa
fix(macos-build): unblock zh and generals build
fbraz3 May 25, 2026
1e8e7b5
fix(ci): harden macos and windows bootstrap
fbraz3 May 25, 2026
06cb20d
fix(ci): unblock macos zh and windows triplet
fbraz3 May 25, 2026
77baa90
fix(windows-ci): restore vcpkg glm discovery
fbraz3 May 25, 2026
fd4f51c
fix(windows-ci): chainload mingw via vcpkg
fbraz3 May 25, 2026
e55b456
chore: replace generalsx icons
fbraz3 May 25, 2026
8db7613
Merge branch 'main' of github.com:fbraz3/GeneralsX into feat/windows-…
fbraz3 May 25, 2026
7d300dd
fix(windows-ci): unblock vcpkg zlib lookup
fbraz3 May 25, 2026
c62d161
fix(windows64): unblock mingw game builds
May 26, 2026
e0b4ad7
fix(windows-ci): resolve widl oaidl import
fbraz3 May 26, 2026
1dfb37e
fix(ci): restore cross-platform keyboard cast
fbraz3 May 26, 2026
6c1def8
fix(windows-ci): widen widl include lookup
fbraz3 May 26, 2026
e8226db
fix(windows-ci): probe widl include dirs
fbraz3 May 26, 2026
9cf83d0
fix(ci-windows): ensure widl IDL headers in CI
fbraz3 May 27, 2026
b09492f
fix(ci-windows): make oaidl detection path-agnostic
fbraz3 May 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/agents/Bender.agent.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "Pay Bender a beer and he'll help you with GeneralsX development tasks!"
tools: [execute, read, agent, edit, search, web, 'cognitionai/deepwiki/*', 'git/*', 'github/*', todo]
tools: [vscode, execute, read, agent, edit, search, web, browser, 'cognitionai/deepwiki/*', 'git/*', 'codegraph/*', todo]
---

You are Bender, a sarcastic assistant for GeneralsX project. development. Focus on gaming and graphics programming (DirectX8, Vulkan, C++, asset pipelines).
Expand Down
52 changes: 24 additions & 28 deletions .github/instructions/generalsx.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@ Use local Deepwiki repo `fbraz3/GeneralsX` for navigation when helpful.

### Build Presets

#### Legacy Compatibility Presets (Maintenance Only)
- **`vc6`** -- Visual Studio 6 (C++98), 32-bit, DirectX 8 + Miles
- **`win32`** -- MSVC 2022 (C++20), experimental upstream path

These presets remain useful for regression checks and upstream sync, but they are no longer the primary release path.
#### Legacy Compatibility Presets (Reference Only)
- **`vc6`** and **`win32`** may appear in upstream/reference contexts, but they are not support targets for this repository.

#### Cross-Platform Builds (SDL3 + DXVK + OpenAL)
- **`linux64-deploy`** -- Linux x86_64 (GCC/Clang) -- **PRIMARY LINUX TARGET**
Expand All @@ -105,8 +102,9 @@ These presets remain useful for regression checks and upstream sync, but they ar
- Native Mach-O binaries
- DXVK + MoltenVK + SDL3 + OpenAL
- macOS 15.0+ minimum; Universal binary (arm64 + x86_64) planned
- **`mingw-w64-i686`** -- exploratory MinGW-w64 cross-compile for Windows
- **`windows64-deploy`** -- planned MinGW-w64 x86_64 preset (issue #29, not an active release target)
- **`windows64-deploy`** -- Windows x86_64 MinGW-w64 -- **PRIMARY WINDOWS TARGET**
- **`windows64-debug`** -- Windows x86_64 MinGW-w64 debug variant
- **`mingw-w64-i686`** -- legacy/transition preset (do not prioritize for new work)

### Build Workflow

Expand All @@ -116,8 +114,8 @@ These presets remain useful for regression checks and upstream sync, but they ar
./scripts/build/linux/docker-configure-linux.sh linux64-deploy
./scripts/build/linux/docker-build-linux-zh.sh linux64-deploy

# Optional exploratory MinGW cross-compile (Windows .exe)
./scripts/build/linux/docker-build-mingw-zh.sh mingw-w64-i686
# Optional Windows cross-compile (Windows .exe)
./scripts/build/linux/docker-build-mingw-zh.sh windows64-deploy
```

**Native builds (on respective platforms)**:
Expand All @@ -130,15 +128,15 @@ cmake --build build/linux64-deploy --target z_generals
cmake --preset macos-vulkan
cmake --build build/macos-vulkan --target z_generals

# Optional Windows via MinGW cross-build
cmake --preset mingw-w64-i686
cmake --build build/mingw-w64-i686 --target z_generals
# Windows via MinGW native build
cmake --preset windows64-deploy
cmake --build build/windows64-deploy --target z_generals
```

### Testing Strategy

1. **Per-platform smoke tests**: Launch game, reach main menu, load skirmish map
2. **Replay compatibility**: VC6 optimized builds with `RTS_BUILD_OPTION_DEBUG=OFF` (determinism)
2. **Replay compatibility**: Optimized non-debug builds with `RTS_BUILD_OPTION_DEBUG=OFF` (determinism)
3. **Cross-platform validation**: Same replays must remain valid across platforms (rendering/audio changes must not affect game logic)

## CRITICAL: DXVK Source of Truth (macOS)
Expand All @@ -165,7 +163,7 @@ cmake --build build/mingw-w64-i686 --target z_generals
- **Scope discipline**: Focus on cross-platform port (SDL3, DXVK, OpenAL). Avoid unrelated refactors.
- **Root cause**: Fix underlying issues, not symptoms. No lazy workarounds.
- **Isolation**: Platform-specific code stays in platform layers (`Core/GameEngineDevice/`, `Core/Libraries/Source/Platform/`)
- **Fallback paths**: Keep legacy Windows paths (DX8, Miles) intact behind `#ifdef` guards for VC6 baseline
- **Fallback paths**: Keep fallback behavior behind clear compile guards when required by active targets
- **Determinism**: Never break gameplay determinism. Rendering/audio changes must not affect logic.

### Code Style & Conventions
Expand Down Expand Up @@ -483,12 +481,12 @@ mkdir -p logs && gdb -batch -ex "run -win" -ex "bt full" -ex "thread apply all b

---

## Windows (Future / Exploratory)
## Windows (Active / MinGW-w64 x64)

**Branch**: TBD
**Status**: Not an active repository focus
**Branch**: `main`
**Status**: Active repository focus for Windows work

**Note**: Follow issue #29 direction for Windows modernization only when the work is explicitly requested. MinGW-w64 is the likely future toolchain path for SDL3 + DXVK + OpenAL + FFmpeg, but Windows is currently not an active delivery target for this repository. Legacy `vc6` and `win32` remain useful for compatibility checks and upstream alignment.
**Note**: Windows work should target MinGW-w64 x86_64 via `windows64-deploy`. Do not gate Windows changes on VC6/win32 compatibility.

### Possible Architecture Direction
- SDL3 for windowing/input
Expand All @@ -498,23 +496,21 @@ mkdir -p logs && gdb -batch -ex "run -win" -ex "bt full" -ex "thread apply all b
- MinGW-w64 toolchain as default Windows path

### Build Presets
- **`mingw-w64-i686`** -- exploratory Windows cross-build preset
- **`mingw-w64-i686-debug`** -- debug variant
- **`mingw-w64-i686-profile`** -- profiling variant
- **`windows64-deploy`** -- planned MinGW-w64 x86_64 preset (issue #29)
- **`windows64-deploy`** -- MinGW-w64 x86_64 release preset (primary)
- **`windows64-debug`** -- MinGW-w64 x86_64 debug preset
- **`mingw-w64-i686`** -- legacy/transition 32-bit preset

### Build Workflow
```bash
# Cross-build Windows binary from Linux/macOS host using Docker
./scripts/build/linux/docker-build-mingw-zh.sh mingw-w64-i686
./scripts/build/linux/docker-build-mingw-zh.sh windows64-deploy

# Direct preset build (when MinGW toolchain is locally available)
cmake --preset mingw-w64-i686
cmake --build build/mingw-w64-i686 --target z_generals
# Native Windows64 preset build
cmake --preset windows64-deploy
cmake --build build/windows64-deploy --target z_generals
```

### Longer-Term Windows Work
- [ ] Add and validate `windows64-deploy` (MinGW x86_64)
### Windows Follow-up Work
- [ ] Validate DXVK + Vulkan runtime requirements on Windows
- [ ] Validate OpenAL integration and runtime audio
- [ ] Validate FFmpeg intro/briefing videos with audio
Expand Down
62 changes: 62 additions & 0 deletions .github/prompts/setup-windows-mingw-environment.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: setup-windows-mingw-environment
description: Set up or validate the local Windows MinGW/MSYS2 environment for GeneralsX using the repository bootstrap scripts and confirm the toolchain is ready for Windows64 MinGW work
argument-hint: Optional setup constraints or scope (for example: "install MSYS2 if missing", "validate only", or "persist environment root and open a prepared shell")
agent: Bender
---

# Setup Windows MinGW Environment

Prepare a Windows development environment for the modern GeneralsX MinGW workflow.

The goal is to make the local machine ready for `windows64-deploy` style work without relying on Visual Studio.

## Primary References

- Use [scripts/env/setup-mingw-windows.ps1](../../scripts/env/setup-mingw-windows.ps1) to configure the current PowerShell session for MSYS2 MinGW64.
- Use [scripts/env/enter-mingw-windows.cmd](../../scripts/env/enter-mingw-windows.cmd) to open a new PowerShell window with the MinGW/MSYS2 environment already loaded.
- Treat [cmake/toolchains/mingw-w64-x86_64.cmake](../../cmake/toolchains/mingw-w64-x86_64.cmake) as the current repository example for MSYS2-aware MinGW toolchain wiring.

## Required Workflow

1. Detect whether MSYS2 is already installed in `C:\msys64` or in the path stored in `GENERALSX_MSYS2_ROOT`.
2. If MSYS2 is missing and the user did not explicitly request validation-only mode, install MSYS2 in a short ASCII-only path.
3. Update the MSYS2 base system with `pacman -Syuu` until it is fully current.
4. Install the packages required for the repository bootstrap and MinGW workstream.
- At minimum: `base-devel`, `mingw-w64-x86_64-toolchain`, `mingw-w64-x86_64-ninja`, and `mingw-w64-x86_64-cmake`.
5. Run or dot-source [scripts/env/setup-mingw-windows.ps1](../../scripts/env/setup-mingw-windows.ps1) with `-ShowSummary`.
6. If requested, run the script with `-PersistUserRoot` so `GENERALSX_MSYS2_ROOT` is stored for future sessions.
7. Validate the session by checking:
- `x86_64-w64-mingw32-gcc`
- `make`
- `cmake`
- `MSYSTEM`
- `MSYSTEM_PREFIX`
8. If requested, launch [scripts/env/enter-mingw-windows.cmd](../../scripts/env/enter-mingw-windows.cmd) so the user gets a ready-to-use shell.
9. Report exactly what was installed, what was already present, and any remaining blockers for `windows64-deploy` work.

## Expected Environment State

After successful setup:

- `GENERALSX_MSYS2_ROOT` should point to the active MSYS2 root.
- `MSYSTEM` should be set to `MINGW64` for the `windows64-deploy` bootstrap path.
- `MSYSTEM_PREFIX` should point at the active MinGW prefix.
- The session `PATH` should include the active MinGW `bin` directory and `usr/bin` from MSYS2.
- `cmake` should remain the repository-preferred Windows installation if already present.

## Constraints

- Do not assume Visual Studio is available or required.
- Prefer the repository bootstrap scripts over ad-hoc PATH editing.
- Keep the setup reproducible and explicit; do not silently mutate system-wide PATH entries unless the user asks for persistence.
- If the machine already has a working MSYS2 installation, reuse it instead of reinstalling it.

## Deliverables

Provide a short final report with:

1. Installation status.
2. Validation status.
3. Active MSYS2 root and MinGW prefix.
4. Any missing packages or next steps for `windows64-deploy` work.
33 changes: 30 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,36 @@ jobs:
echo "VULKAN_SDK=$VULKAN_SDK"
echo "CC=$CC"
echo "CXX=$CXX"
cmake --preset ${{ inputs.preset }} 2>&1 | tee logs/configure_macos.log
CONFIG_STATUS=${PIPESTATUS[0]}
if [ $CONFIG_STATUS -eq 0 ]; then echo "✅ CMake configuration complete"; else echo "❌ CMake configuration failed"; exit 1; fi
# GeneralsX @build GitHub Copilot 25/05/2026 Retry configure to mitigate transient vcpkg upstream/network failures (e.g., HTTP 502 while downloading ports).
MAX_ATTEMPTS=3
ATTEMPT=1
CONFIG_STATUS=1

while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do
ATTEMPT_LOG="logs/configure_macos_attempt_${ATTEMPT}.log"
echo "Configure attempt ${ATTEMPT}/${MAX_ATTEMPTS}..."
cmake --preset ${{ inputs.preset }} 2>&1 | tee "${ATTEMPT_LOG}"
CONFIG_STATUS=${PIPESTATUS[0]}

if [ $CONFIG_STATUS -eq 0 ]; then
cp "${ATTEMPT_LOG}" logs/configure_macos.log
echo "✅ CMake configuration complete"
break
fi

if [ $ATTEMPT -lt $MAX_ATTEMPTS ]; then
echo "⚠️ Configure failed on attempt ${ATTEMPT}; retrying after cleanup..."
rm -rf "build/${{ inputs.preset }}"
sleep $((ATTEMPT * 15))
fi

ATTEMPT=$((ATTEMPT + 1))
done

if [ $CONFIG_STATUS -ne 0 ]; then
echo "❌ CMake configuration failed after ${MAX_ATTEMPTS} attempts"
exit 1
fi

- name: Build ${{ matrix.game.value }}
run: |
Expand Down
Loading
Loading