From 3b01e79d6db0d341f4b60e365e10e523c3111e88 Mon Sep 17 00:00:00 2001 From: Micon Frink Date: Thu, 29 Oct 2020 16:31:38 +0000 Subject: [PATCH] adding documentation --- README.md | 2 ++ generator/generator.bat | 2 +- generator/generator.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3c6297..507b24f 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Notes: # using generator +``` * this is only needed (before compilation) if you want an imgui version different from the one provided, otherwise generation is already done. * you will need LuaJIT (https://github.com/LuaJIT/LuaJIT.git better 2.1 branch) or precompiled for linux/macOS/windows in https://luapower.com/luajit/download * you need to use also a C++ compiler for doing preprocessing: gcc (In windows MinGW-W64-builds for example), clang or cl (MSVC). (this repo was done with gcc) @@ -40,6 +41,7 @@ Notes: * edit config_generator.lua for adding includes needed by your chosen backends (vulkan needs that). * Run generator.bat or generator.sh with gcc, clang or cl and LuaJIT on your PATH. * as a result some files are generated: `cimgui.cpp`, `cimgui.h` and `cimgui_impl.h` for compiling and some lua/json files with information about the binding: `definitions.json` with function info, `structs_and_enums.json` with struct and enum info, `impl_definitions.json` with functions from the backends info. +* You can pass compiler flags to generator.sh or generator.bat at the end ofthe call to further specify the compiler behavior. (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32) # generate binding * C interface is exposed by cimgui.h when you define CIMGUI_DEFINE_ENUMS_AND_STRUCTS diff --git a/generator/generator.bat b/generator/generator.bat index b439743..fad64a1 100644 --- a/generator/generator.bat +++ b/generator/generator.bat @@ -17,7 +17,7 @@ set PATH=%PATH%;C:\anima;C:\mingws\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\min :: arg[1] compiler name gcc, clang or cl :: arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation :: examples: "" "internal" "internal freetype" -:: arg[3..n] name of implementations to generate +:: arg[3..n] name of implementations to generate and/or CLFLAGS (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32) luajit ./generator.lua gcc "internal" glfw opengl3 opengl2 sdl ::leave console open diff --git a/generator/generator.sh b/generator/generator.sh index efb48b3..2fb7a4d 100755 --- a/generator/generator.sh +++ b/generator/generator.sh @@ -15,5 +15,5 @@ # arg[1] compiler name gcc, clang, or cl # arg[2] options as words in one string: internal for imgui_internal generation, freetype for freetype generation # examples: "" "internal" "internal freetype" -# arg[3..n] name of implementations to generate +# arg[3..n] name of implementations to generate and/or CLFLAGS (e.g. -DIMGUI_USER_CONFIG or -DIMGUI_USE_WCHAR32) luajit ./generator.lua gcc "internal" glfw opengl3 opengl2 sdl