Add Windows cross-build and Gitea release; share CI setup

- just windows-deps / windows / package-windows: cross-compile with Odin
  objects + lld-link against an xwin SDK, static VC runtime
- Release workflow runs on v* tags, builds Linux and Windows packages,
  uploads them to the package registry and creates a Gitea release
- Shared toolchain setup as a local composite action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SansanandClaude Opus 5.5 committed 2026-10-01 21:27:22 +02:00
1 parent 9ee2eabe9a
commit e893c45d4f
6 files changed
+165 -66

No files matched your search

+6 -3
View File
@@ -33,6 +33,7 @@ Commands (see `justfile`): `just run`, `just check`, `just test`, `just package
2. **Old font failure root cause**: `DroidSansJapanese.ttf` was a GitHub HTML page saved from a blob URL, not a font. Always download fonts from raw URLs and check them with `file`.
3. **Thai shaping**: raylib does no text shaping, so Thai combining vowels/tone marks may be misplaced. Prefer standalone consonants on Thai cards.
4. Tests share the memory game's global state, so they must run single-threaded (`just test` sets `ODIN_TEST_THREADS=1`).
6. **Windows builds are cross-compiled**: Odin can't link Windows binaries on Linux, so `just windows` builds objects with `-build-mode:obj` and links with `lld-link` against an xwin SDK. The VC runtime is linked statically; only Windows system DLLs are needed. Not yet tested on a real Windows machine.
5. The game changes directory to the executable's folder at startup so `assets/` is found from anywhere.
## File Structure
@@ -43,9 +44,11 @@ HanjaKanaMun/
├── justfile # build/run/check/test/package recipes
├── ols.json # ols language server settings (neovim)
├── odinfmt.json # odinfmt formatter settings (4 spaces, LF)
├── .gitea/workflows/
│ ├── gitea-build.yaml # check + test + build on main/develop
│ └── gitea-release.yaml # package on version branches (*.*), upload to Gitea packages
├── .gitea/
│ ├── actions/setup/ # shared CI toolchain setup (apt, Odin, just)
│ └── workflows/
│ ├── gitea-build.yaml # check + test + build on main/develop
│ └── gitea-release.yaml # on tags v*: Linux + Windows packages, package registry upload, Gitea release
├── main.odin # Window/audio setup, screen state machine
├── src/
│ ├── themes/themes.odin # Theme struct, flag colors, Screen/Flag enums, layout constants