BCad fork

Build Guide
Login

Build Guide

venv

The project venv is at bcad.venv/ in the project root.

cd $PROJBASE
python3 -m venv bcad.venv
source bcad.venv/bin/activate

Dependencies: pip install imgui-bundle (see below).

imgui_bundle (C++ native extension)

Source is at cpp/imgui_bundle/ — a local copy of the imgui-bundle repo with ImGuiColorTextEdit patches.

Prerequisites

sudo apt install libglfw3-dev libgl1-mesa-dev xorg-dev

First-time setup & build (one command)

source $PROJBASE$/bcad.venv/bin/activate
cd $PROJBASE$/cpp/imgui_bundle
pip install . --config-settings=build-dir=./build_py/ --no-build-isolation

First run compiles everything from source (several minutes). Subsequent runs reuse build_py for incremental rebuilds.

Incremental rebuild with cmake

If you only changed C++ files, a direct cmake rebuild is faster:

cd $PROJBASE$/cpp/imgui_bundle
cmake --build build_py -j$(nproc) --target _imgui_bundle
cp build_py/_imgui_bundle*.so ../../bcad.venv/lib/python3.14/site-packages/imgui_bundle/

Applying editor patches

The file cpp/imgui/imgui_color_text_edit.patch contains local modifications to ImGuiColorTextEdit. Apply before building:

cd $PROJBASE$/cpp/imgui_bundle
patch -p1 < $PROJBASE$/cpp/imgui/imgui_color_text_edit.patch