From 4eebc0ac87aca7e2ee8ac950ce0eab1c5d9c9103 Mon Sep 17 00:00:00 2001 From: Snider Date: Fri, 10 Oct 2025 12:03:46 +0100 Subject: [PATCH] Update README with build and packaging instructions Improved documentation for build customization, added examples for using Makefile variables, clarified release packaging output directory, and included instructions for cleaning the build directory. Also updated formatting for better readability. --- README.md | 85 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 03a00bd0..1353c12f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ [![Discord](https://img.shields.io/discord/379876792003067906?label=discord&logo=discord)](https://discord.gg/pfgT2Kz) ### Dependencies -| component / version | minimum
(not recommended but may work) | recommended | most recent of what we have ever tested | -|-----------------------------------------------------------------------------------------------------|--------------------------------------------|----------------|-----------------------------------------| -| gcc (Linux) | 8.4.0 | 9.4.0 | 12.3.0 | -| llvm/clang (Linux) | UNKNOWN | 7.0.1 | 8.0.0 | -| [MSVC](https://visualstudio.microsoft.com/downloads/) (Windows) | 2017 (15.9.30) | 2022 (17.11.5) | 2022 (17.12.3) | -| [XCode](https://developer.apple.com/downloads/) (macOS) | 12.3 | 14.3 | 15.2 | -| [CMake](https://cmake.org/download/) | 3.26.3 | 3.26.3 | 3.31.6 | +| component / version | minimum
(not recommended but may work) | recommended | most recent of what we have ever tested | +|-----------------------------------------------------------------------------|--------------------------------------------|----------------|-----------------------------------------| +| gcc (Linux) | 8.4.0 | 9.4.0 | 12.3.0 | +| llvm/clang (Linux) | UNKNOWN | 7.0.1 | 8.0.0 | +| [MSVC](https://visualstudio.microsoft.com/downloads/) (Windows) | 2017 (15.9.30) | 2022 (17.11.5) | 2022 (17.12.3) | +| [XCode](https://developer.apple.com/downloads/) (macOS) | 12.3 | 14.3 | 15.2 | +| [CMake](https://cmake.org/download/) | 3.26.3 | 3.26.3 | 3.31.6 | ## Cloning @@ -38,6 +38,20 @@ For most use cases, these two commands are all you need. They handle the entire You can use the `make build` target with variables for more control over the final binaries. + +## Creating Release Packages + +To create distributable packages (e.g., `.zip`, `.msi`, `.pkg`, `.deb`), run the `release` target. This will build the project, build the documentation, and then package everything. + + ```shell + make release TESTNET=1 + ``` +The final packages will be located in the `build/packages/` directory + +## Advanced Build Customization (Makefile Variables) + +For advanced use cases, you can override variables in the `Makefile` to customize the build process. + * **Build a `testnet` version:** ```shell make build TESTNET=1 @@ -46,37 +60,34 @@ You can use the `make build` target with variables for more control over the fin ```shell make build STATIC=1 ``` +* **Build a Debug build with 8 compile threads:** + ```shell + make build BUILD_TYPE=Debug CPU_CORES=8 + ``` +* **Use custom CMakePresets:** + ```shell + make build PRESET_CONFIGURE=my-config-preset PRESET_BUILD=my-build-preset + ``` -## Creating Release Packages +| Variable | Description | Default Value | +|--------------------|------------------------------------------------------------------------|-------------------------| +| `BUILD_TYPE` | Sets the build configuration (e.g., `Release`, `Debug`). | `Release` | +| `TESTNET` | Set to `1` to build for the test network. | `0` | +| `STATIC` | Set to `1` to link libraries statically. | `0` | +| `CPU_CORES` | Number of CPU cores to use for parallel compilation. | Auto-detected | +| `BUILD_VERSION` | The version string to embed in the binaries. | `6.0.1` | +| `BUILD_FOLDER` | The output directory for the build. | `build/release` | +| `PRESET_CONFIGURE` | The CMake preset to use for the `configure` step. | `conan-release` | +| `PRESET_BUILD` | The CMake preset to use for the `build` step. | `conan-release` | +| `CONAN_CACHE` | The path for the local Conan cache, where the dependencies are stored. | `./build/sdk` | +| `CONAN_EXECUTABLE` | The path to the usable Conan executable. | `./build/bin/conan` | +| `CONAN_URL` | The URL for the Conan remote repository. | `artifacts.host.uk.com` | +| `CONAN_USER` | The username for the Conan remote. | `public` | +| `CONAN_PASSWORD` | The password for the Conan remote. | | -To create distributable packages (e.g., `.zip`, `.deb`), run the `release` target. This will build the project, build the documentation, and then package everything. +## Cleaning the Build Directory - ```shell - make release - ``` -The final packages will be located in the `build/release/` directory +You can nuke the build directory with `make clean-build` -## Advanced Build Customization (Makefile Variables) - -For advanced use cases, you can override variables in the `Makefile` to customize the build process. - -Example: -```shell -make build BUILD_TYPE=Debug CPU_CORES=8 -``` - -| Variable | Description | Default Value | -|--------------------|------------------------------------------------------------------------|-------------------------------------------------------------------| -| `BUILD_TYPE` | Sets the build configuration (e.g., `Release`, `Debug`). | `Release` | -| `TESTNET` | Set to `1` to build for the test network. | `0` | -| `STATIC` | Set to `1` to link libraries statically. | `0` | -| `CPU_CORES` | Number of CPU cores to use for parallel compilation. | Auto-detected | -| `BUILD_VERSION` | The version string to embed in the binaries. | `6.0.1` | -| `BUILD_FOLDER` | The output directory for the build. | `build/release` | -| `PRESET_CONFIGURE` | The CMake preset to use for the `configure` step. | `conan-release` | -| `PRESET_BUILD` | The CMake preset to use for the `build` step. | `conan-release` | -| `CONAN_CACHE` | The path for the local Conan cache, where the dependencies are stored. | `./build/sdk` | -| `CONAN_EXECUTABLE` | The path to the usable Conan executable. | `./build/bin/conan` | -| `CONAN_URL` | The URL for the Conan remote repository. | `https://artifacts.host.uk.com/artifactory/api/conan/conan-build` | -| `CONAN_USER` | The username for the Conan remote. | `public` | -| `CONAN_PASSWORD` | The password for the Conan remote. | | \ No newline at end of file +To completely reset the build directory to its cached warm-up state, run `make clean`; +the selective clean script can be edited here: `cmake/CleanBuild.cmake` \ No newline at end of file