hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-22 06:57:16 +0200
committerhachem <im@hachem.wtf>2026-09-22 06:57:16 +0200
commit4afbb2ed9cc055ad925abd678d0fc0c63ab90fbc (patch)
tree3c79f12f13855110958f693d3b3915b43e188619 /docs
parent0b2f3a21187bf4f6cd45c8262138469ed11c03d1 (diff)
docs: Windows build notes
Diffstat (limited to 'docs')
-rw-r--r--docs/architecture.md23
1 files changed, 17 insertions, 6 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index 98f2b6f..1e6560b 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -313,16 +313,27 @@ a few points worth knowing:
## the build system
-donut uses premake5 to generate gnu makefiles. both backends compile into one
-binary; the choice between them is made at runtime from the saved settings, so
-there is no separate "opengl build" and "vulkan build".
-
-generate and build (arm64 macos):
+donut uses premake5 to generate the build: gnu makefiles on macos
+(`premake5 gmake`) and a visual studio 2022 solution on windows
+(`premake5 vs2022`). both backends compile into one binary; the choice between
+them is made at runtime from the saved settings, so there is no separate "opengl
+build" and "vulkan build". the one exception is windows without the vulkan sdk:
+premake then leaves the vulkan backend out (`DONUT_NO_VULKAN`) and the binary is
+opengl only. on windows `vulkan-1.dll` is delay-loaded, so a vulkan build still
+starts on a machine with no vulkan driver, and any vulkan failure at startup falls
+back to opengl. step-by-step instructions for both platforms are in the
+[readme](../README.md#building).
```bash
-premake5 gmake && make config=debug
+premake5 gmake && make config=debug donut # macos
+premake5 vs2022 # windows, then build donut.sln
```
+the shaders are authored once in slang (`assets/shaders/*.slang`) and compiled by
+`tools/compile-shaders.sh` into `assets/shaders/generated/`: glsl 4.10 for opengl
+and spir-v for vulkan. the generated files are committed, so windows builds use
+them as-is; on macos the script runs as a prebuild step and keeps them current.
+
`premake5 clean` is wired up as a custom action that removes the generated build
output (`bin/`, `bin-int/`, the makefiles) along with the transient runtime files
(`logs/`, `config/`, `imgui.ini`), for a genuine from-scratch reset.