Whenever programmers, especially beginners, start a new project, they tend to jump straight to coding without thinking about the overall structure and architecture of the application or the library they are building. cbuilder is a cross-platform C++ project generation tool that forces programmers to first think about the overall underlying structure of the project and encourages developers to think in a more abstract, high-level view of the project.
cbuilder enforces the architecture where the project is consisted of modules, which further hold systems/components, which in turn actually have the C++ classes and actual code.
Additionally, cbuilder allows you to generate cross-platform GUI project powered by ImGui. It generates the entry point and the boilerplate code to start your GUI app, so when you compile the project, it will already have a window created with a ClientApplication class provided for you to write your UI code in.
Linux | Windows | MacOS |
---|---|---|
✓ | ✓ | ✓ |
[Note] On Windows, you would use .bat building and installation scripts, while on Linux and MacOS you would use .sh scripts.
- Generating Console Projects
- None
-
Generating GUI Projects
- Windows
DirectX 11
- MacOS:
brew install glfw3
brew install GL
- Linux:
sudo apt-get install libglfw3 libglfw3-dev libgl1-mesa-dev
- Windows
cbuilder is very easy to use. Simply launch the script with python3 cbuilder.py
from any directory and follow the steps.
First you get to select the project type and name. cbuilder is able to generate either console app projects or cross-platform GUI projects powered by ImGui and native graphics APIs.
Next you will be greeted with your project's main menu. From there cbuilder forces you to think about your project in terms of modules and components/systems rather than diving in into specifics of the code. This enforces a more abstract and often better structure, and allows easily generating a lot of boiler plate code.
Finally, to generate the project on the filesystem, choose option 5:
What this will do is create the appropriate directory structure including CMake files and some boilerplate plate for all your added classes and systems :)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.