diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 35 |
1 files changed, 21 insertions, 14 deletions
@@ -13,16 +13,27 @@ and EnTT are planned but not yet wired up. ### Container (reproducible, any distro) +The `Makefile` wraps the Podman workflow. Run it from the repo root: + ```sh -podman build -t forts-clone-dev . -podman run --rm -v "$PWD":/src:Z --userns=keep-id localhost/forts-clone-dev:latest \ - sh -c "cd /src && meson setup builddir && meson compile -C builddir" -./builddir/forts-clone # run from repo root +make image # one-time, and after editing Containerfile +make run # compile in the container, then launch on the host ``` +| Target | What it does | +|---|---| +| `make build` | compile in the container (default; configures on first use) | +| `make run` | compile, then run the game on the host | +| `make check` | compile + validate the Lua data | +| `make reconfigure` | re-run `meson setup` after editing `meson.build` | +| `make shell` | interactive shell in the dev container | +| `make clean` / `make clean-image` | remove `builddir/` / the dev image | + The container builds every dependency into `/usr/local` and links Lua -statically, so the resulting binary runs on any host. You still run it on the -host (it needs the host's SDL3 and a display). +statically, so the resulting binary runs on any host. Compilation happens in the +container, but the game runs on the host, which supplies SDL3 and a display; +`make run` handles both halves. Run from the repo root either way, since `data/` +is resolved relative to the working directory. ### Local (Arch Linux) @@ -30,6 +41,10 @@ host (it needs the host's SDL3 and a display). libraries the code actually uses. bgfx, SoLoud, ENet and EnTT are part of the planned stack but not yet wired up, so they are not required to build. +The `make` targets above all go through Podman, so a native build drives meson +directly. (`make check-lua` is the exception: it runs on the host and works +either way.) + ```sh # repo packages sudo pacman -S --needed meson ninja gcc pkgconf sdl3 lua54 glm box2d @@ -45,14 +60,6 @@ meson compile -C builddir Native builds link Lua dynamically against the system `lua54`, which is fine when you build and run on the same machine. -### Removing the container image - -```sh -podman rmi localhost/forts-clone-dev:latest # drop the dev image -podman image prune -f # drop dangling build layers -rm -rf builddir # meson dir, reconfigure after -``` - ## Assets The repo ships CC0 placeholders only. If you own Forts, real textures load at |
