diff --git a/.forgejo/RUNNER_SETUP.md b/.forgejo/RUNNER_SETUP.md index 7eaeebb9..a3f0947b 100644 --- a/.forgejo/RUNNER_SETUP.md +++ b/.forgejo/RUNNER_SETUP.md @@ -18,7 +18,7 @@ Forgejo Actions is drone-compatible; runners register via | `release.yml` — linux_build | `linux,apricot` | apricot | REQUIRED | | `release.yml` — wasm_build | `linux,apricot` | apricot | REQUIRED | | `release.yml` — macos_build | `macos,arm64` | *(unassigned)* | TODO(prerequisite) | -| `release.yml` — windows_build | `windows,x86_64` | *(unassigned)* | TODO(prerequisite) | +| `release.yml` — windows_build | `linux,apricot` | apricot (cargo-xwin cross-compile) | REQUIRED — same runner as linux_build, no Windows host needed | Until a runner with matching labels registers, the corresponding jobs queue indefinitely on Forgejo. CI (push-to-main) only needs the apricot @@ -164,55 +164,44 @@ forgejo-runner daemon --- -## Windows runner (windows,x86_64) — TODO +## Windows build (cross-compiled from apricot via cargo-xwin) -No Windows runner is currently registered. Same queuing behavior as -macOS above. +Windows binaries are produced on the existing apricot Linux runner — +no Windows host is required. The .dll uses MSVC ABI via +[`cargo-xwin`](https://github.com/rust-cross/cargo-xwin), and Godot's +Windows export template runs natively from Linux. Verified end-to-end +2026-04-25 (p2-06b). -### Registration +### Toolchain prerequisites on apricot -On the target Windows host (PowerShell, as admin): +```bash +# 1. Add the Windows MSVC target to rustup. +rustup target add x86_64-pc-windows-msvc -```powershell -# 1. Install forgejo-runner (windows amd64 build). -Invoke-WebRequest ` - -Uri "https://code.forgejo.org/forgejo/runner/releases/download/nightly/forgejo-runner-nightly-windows-amd64.exe" ` - -OutFile "C:\Tools\forgejo-runner.exe" +# 2. Install cargo-xwin (downloads ~1.5GB of MS SDK on first build, +# cached at ~/.cache/cargo-xwin/). +cargo install cargo-xwin -# 2. Register with windows,x86_64 labels. -cd C:\Tools -.\forgejo-runner.exe register ` - --no-interactive ` - --instance http://10.0.0.11:3000 ` - --token "$env:FORGEJO_RUNNER_TOKEN" ` - --name win-release ` - --labels "windows,x86_64" - -# 3. Install as a Windows service (NSSM or sc.exe). -sc.exe create forgejo-runner binPath= "C:\Tools\forgejo-runner.exe daemon" start= auto -sc.exe start forgejo-runner +# 3. clang is required as the front-end compiler (already present on +# apricot via clang-21 rpm). lld is NOT required — cargo-xwin's +# bundled xwin sub-tool resolves the linker via the MSVC SDK. ``` -### Toolchain prerequisites on the Windows runner +### Verify -- **Rust + the MSVC target**: - ```powershell - # rustup-init from https://rustup.rs - rustup target add x86_64-pc-windows-msvc - ``` -- **Visual Studio Build Tools 2022** — specifically the "Desktop - development with C++" workload. Required for the MSVC linker that - `godot-rust` pulls in via `build-gdext.sh`. -- **Godot editor** — download the Windows standard build and add it to - `$PATH` as `godot`. Godot does not have a Windows package manager - entry comparable to Flatpak / brew; manual install is the norm. -- **Godot export templates** — matching the editor version, installed - under `%APPDATA%\Godot\export_templates\`. -- **7-Zip** — `choco install 7zip` (or scoop); the workflow uses `7z` - to build the Windows archive. -- **Git for Windows** — provides the `bash` shell that the workflow's - `shell: bash` steps depend on. -- **jq, curl** — `choco install jq curl`. +```bash +cd ~/Code/@projects/@magic-civilization +bash src/simulator/build-gdext.sh x86_64-pc-windows-msvc # ~3min first run +BUILD_WINDOWS_DLL=0 EXPORT_STAGED=1 bash tools/export-single.sh windows verify-$(date +%s) +ls .local/build/godot/verify-*/windows/ +# → MagicCivilization.exe + engine/addons/magic_civ_physics/magic_civ_physics.x86_64.dll +``` + +### Boots-and-plays smoke + +Wine is not installed on apricot; smoke verification needs either: +- `dnf install wine` on apricot (sudo), then run the .exe via wine, OR +- A real Windows machine to unzip + double-click the archive. --- diff --git a/.project/objectives/DASHBOARD_CATEGORIES.md b/.project/objectives/DASHBOARD_CATEGORIES.md index 2c5128f4..9fe1fadf 100644 --- a/.project/objectives/DASHBOARD_CATEGORIES.md +++ b/.project/objectives/DASHBOARD_CATEGORIES.md @@ -114,7 +114,7 @@ | [p2-04](p2-04-localization-audit.md) | ✅ done | P2 | Localization audit — no hardcoded strings | [shipwright](../team-leads/shipwright.md) | 🟢 | | [p2-05](p2-05-turn-latency.md) | ✅ done | P2 | Sub-second single-player turn latency | — | 🟢 | | [p2-06](p2-06-export-pipeline.md) | 🟡 partial | P1 | Export pipeline for Windows / macOS / Linux | [shipwright](../team-leads/shipwright.md) | 🟢 | -| [p2-06b](p2-06b-windows-runner.md) | ❌ missing | P2 | Register a Windows runner for forgejo to produce .dll + .exe on tag push | [shipwright](../team-leads/shipwright.md) | 🟢 | +| [p2-06b](p2-06b-windows-runner.md) | 🔵 in_progress | P2 | Cross-compile Windows .exe + .dll from Linux via cargo-xwin (no Windows host) | [shipwright](../team-leads/shipwright.md) | 🟢 | | [p2-07](p2-07-credits-screen.md) | ✅ done | P2 | Credits screen accessible from main menu | [shipwright](../team-leads/shipwright.md) | 🟢 | | [p2-08](p2-08-accessibility.md) | ✅ done | P2 | Accessibility baseline — colorblind palette + keyboard navigation | [shipwright](../team-leads/shipwright.md) | 🟢 | | [p2-09](p2-09-guide-web-deploy.md) | ✅ done | P2 | Player guide web app — builds clean from source | — | 🟢 | diff --git a/.project/objectives/README.md b/.project/objectives/README.md index 83c6483e..cb0538d0 100644 --- a/.project/objectives/README.md +++ b/.project/objectives/README.md @@ -16,9 +16,9 @@ |---|---|---|---|---|---|---|---| | **P0** | 0 | 3 | 0 | 1 | 0 | 39 | 43 | | **P1** | 0 | 4 | 0 | 8 | 1 | 21 | 34 | -| **P2** | 0 | 4 | 0 | 2 | 0 | 16 | 22 | +| **P2** | 1 | 4 | 0 | 1 | 0 | 16 | 22 | | **P3 (oos)** | 0 | 0 | 0 | 0 | 17 | 0 | 17 | -| **total** | **0** | **11** | **0** | **11** | **18** | **76** | **116** | +| **total** | **1** | **11** | **0** | **10** | **18** | **76** | **116** |