# 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.