diff options
| author | Adam Malczewski <[email protected]> | 2026-04-11 19:06:35 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-04-11 19:06:35 +0900 |
| commit | 93f50d20a021150a0b95242be0d5dd5cae9d0185 (patch) | |
| tree | 48054581d580974651260900d1ef79d370872952 /.rules/plan/phase-00-skeleton.md | |
| download | winman-raylib-main.tar.gz winman-raylib-main.zip | |
plan and researchmain
Diffstat (limited to '.rules/plan/phase-00-skeleton.md')
| -rw-r--r-- | .rules/plan/phase-00-skeleton.md | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/.rules/plan/phase-00-skeleton.md b/.rules/plan/phase-00-skeleton.md new file mode 100644 index 0000000..f6bac05 --- /dev/null +++ b/.rules/plan/phase-00-skeleton.md @@ -0,0 +1,72 @@ +# Phase 0 — Project Skeleton & Dev Environment + +--- + +## Step 0.1 — Makefile and empty main + +Create the basic project structure: + +``` +src/ + main.c — int main() { return 0; } +bin/ + build.sh — runs make + run.sh — builds then launches the binary +Makefile — compiles src/*.c → build/winman-raylib +``` + +**Makefile** compiles with `cc`, links nothing yet. Uses `pkg-config` for +flags. Output goes to `build/`. + +**Verify:** `./bin/build.sh` succeeds, `./build/winman-raylib` runs and +exits silently with code 0. + +--- + +## Step 0.2 — Install dependencies and verify Xephyr + +Create `bin/setup-deps.sh` that installs all needed packages (Arch +`pacman` commands): + +- **Build:** `base-devel`, `raylib` +- **X11 libs:** `libx11`, `libxcomposite`, `libxdamage`, `libxfixes`, + `libxrender`, `libxext`, `libxrandr` +- **GL:** `mesa`, `glew` +- **Dev tools:** `xorg-server-xephyr`, `xorg-xinit`, `xorg-xauth` +- **Test clients:** `xorg-xeyes`, `xorg-xclock`, `xterm`, + `xorg-xwininfo`, `xorg-xprop`, `xorg-xdpyinfo` + +**Verify:** `./bin/setup-deps.sh` runs without errors. `Xephyr -help` +prints usage. `pkg-config --libs raylib x11 xcomposite xdamage xfixes` +prints flags. + +--- + +## Step 0.3 — Xephyr launch/kill scripts + +Create two scripts: + +- `bin/xephyr-start.sh` — Launches Xephyr on `:1` with + `-br -ac -noreset -resizeable -no-host-grab -screen 1280x800`. + Prints the PID. Exits immediately (Xephyr runs in background). +- `bin/xephyr-stop.sh` — Kills the Xephyr process cleanly. + +**Verify:** `./bin/xephyr-start.sh` opens a black Xephyr window. +`DISPLAY=:1 xeyes &` shows xeyes inside it. `./bin/xephyr-stop.sh` +closes everything. + +--- + +## Step 0.4 — `bin/run.sh` — full dev loop script + +A single script that: + +1. Builds the project (`make`). +2. Starts Xephyr on `:1` if not already running. +3. Launches `build/winman-raylib` with `DISPLAY=:1`. + +Accepts an optional `--clients` flag that also spawns `xeyes`, `xclock`, +and `xterm` into `:1` after a short delay. + +**Verify:** `./bin/run.sh --clients` opens Xephyr, launches the (still +empty) binary, and spawns the test clients into the Xephyr window. |
