feat(windows): the ludic CLI and ludic bundle on Windows

The CLI's shell commands go through shell(), which is run() on POSIX and a
scratch script handed to Git for Windows' bash on Windows (exit codes read
directly there). compile_app links through `ludicc -o` on Windows, ludic run
starts the .exe, and ludic-dev build and ensure_ludicc assemble
selfhost/ludicc.win.seed.ll, which ludic-dev reseed now writes beside the
macOS seed. ludic bundle makes build/<name>/ with a GUI-subsystem exe carrying
the .ico beside `app icon` as an llvm-rc resource, game.lpak and packs.index;
ludicc gains --gui and --link, and quotes its whole link line for cmd.exe.

Verified: ludic-dev test 135/135, selfhost-test 32/32; on the PC a checkout
bootstraps from the Windows seed, ludic-dev build makes the toolchain, and
`ludic bundle` makes build/Maroon Lake/, which runs from its own folder.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-13 03:01:33 +03:00
parent 63d9f61bf1
commit 55b0e2ebf6
22 changed files with 112450 additions and 818 deletions

View file

@ -26,6 +26,14 @@ type: feat
clip, loops, volume, rate and a balance pan through the output matrix, RIFF WAVE in PCM or
float. It reads a clip through the asset pack, so a bundled game's first `Audio.load`
succeeds - AVAudioPlayer takes a filesystem path, which is why macOS cannot.
- **The CLI on Windows** — `ludic build`, `ludic run` and `ludic-dev build` work from a Windows
checkout. Every shell command the CLI issues runs through Git for Windows' bash
(`$LUDIC_BASH` names another), `compile_app` links through `ludicc -o`, and a checkout
bootstraps from the new `selfhost/ludicc.win.seed.ll`, which `ludic-dev reseed` now
writes beside the macOS seed.
- **`ludic bundle` on Windows** — `build/<name>/` holding a GUI-subsystem `<name>.exe`, the
`game.lpak` and `packs.index`; an `.ico` beside `app icon` is compiled with `llvm-rc` and
linked in. `ludicc` gains `--gui` (no console behind the window) and `--link <file>`.
- **Not yet** — the splash and `App.set_icon` do nothing, and `Http.*` is still a macOS
platform layer; a Windows build that uses it stops with a message saying so.
- **`Gl.*` on Windows** — `gl_win.ll` makes a WGL 4.1 core context on a hidden window's DC,