From 0e71d57276a49ceda224197f847b5a288e03dd77 Mon Sep 17 00:00:00 2001 From: Mason Remaley Date: Mon, 5 Aug 2024 21:21:10 -0700 Subject: [PATCH] Improves upgrade instructions --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 09c5918..f2c24f2 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,15 @@ At build time, `generate.zig` is called on the relevant JSON files to generate a Update `build.zig.zon`, and then if the headers changed, regenerate them into `src/cached` with [dear_bindings](https://github.com/dearimgui/dear_bindings). -Building `cimgui.h` is explained in their README, here'd how to build a backend. You can also see the command format in their `bindings.bat` file. +Here's how to build `cimgui.h`: +```sh +python3 $DEAR_BINDINGS_PATH/dear_bindings.py -o src/cached/cimgui $DEAR_IMGUI_PATH/imgui.h +``` + +Here's how to build a backend, using Vulkan as an example: ```sh -python3 dear_bindings.py --backend --imconfig-path ~/Documents/imgui/imconfig.h -o cimgui_internal ~/Documents/imgui/imgui_internal.h +python3 $DEAR_BINDINGS_PATH/dear_bindings.py --backend --imconfig-path $DEAR_IMGUI_PATH/imconfig.h -o src/cached/cimgui_impl_vulkan $DEAR_IMGUI_PATH/backends/imgui_impl_vulkan.h ``` If `generator.zig` fails, you may need to add missing values to the enumeration. `std.json` does not provide helpful errors at the time of writing, the easiest way to debug this is to comment out the actual generation code, and all fields in `Header`, adding them back until you figure out which are causing the issue.