How to Use
Add BuildZri to your C++ project with the following steps.
#
Add the BuildZri scriptBuildZri comes as a Python v3 script that you can execute on GNU/Linux, macOS, and Windows. Copy-paste
scripts/bz.py
into your scripts
directory.
Next, add required execution permissions on Unix or Unix-like platforms.
#
Create the configuration fileCreate the buildzri.config.json
file for your project according to the reference. Look at
the following minimal C++ project.
- buildzri.config.json
- main.cpp
The above project consists of one C++ source file, but you can add multiple source files easily with the wildcard syntax. As show above, you can configure BuildZri to automatically set version details via a macro definition.
Inspect the build configuration file of the Neutralinojs framework to learn how to integrate BuildZri for medium-scale projects.
#
Start building binariesAfter configuring your project, run the bz.py
script file to start the compilation process. For example,
on Unix or Unix-like platforms, you can use the following command:
The compilation warnings and error messages will appear on the terminal as usual. Also, you can use the --verbose
flag to identify pre-compilation issues. The BuildZri tool is built for both developers and CI/CD environments,
so you can use the same build command on GitHub Actions, as shown below: