This is a python3 script that generates LuaJIT FFI bindings and lua wrappers by parsing the imgui header file via clang.
Used in BeamNG to generate the ImGui wrapper
-
install all the dependencies:
- on Ubuntu 20.04:
apt install python3-pip clang libclang-dev libclang-6.0-dev pip3 install clang
- on Windows 10:
ensure python3 and pip are installed and usable from command line
install LLVM to the default install path, using a prebuilt *win64.exe installer from: https://github.com/llvm/llvm-project/releases
pip3 install clang
- on Ubuntu 20.04:
-
run it like this:
python gen.py imgui.h
Warning: It contains specific fixes for BeamNG. Please read the code to remove/improve them