From dbc02e2a4fb9541b53acc403460036c8566c3948 Mon Sep 17 00:00:00 2001 From: maelstrom Date: Thu, 10 Apr 2025 23:25:16 +0200 Subject: [PATCH] chore: added build instructions --- BUILD.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 54 insertions(+) create mode 100644 BUILD.md create mode 100644 README.md diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 0000000..7d803ed --- /dev/null +++ b/BUILD.md @@ -0,0 +1,49 @@ +# Building on Linux + +For pre-requisite packages, check [deps.txt](./deps.txt) + +If your distribution does not provide ReactPhysics3D, you will have to build (and install) it yourself prior to this step + +Use the following to generate the build files: + + cmake -Bbuild . + +Then build the project using: + + cmake --build build + +# Building on Windows + +The project will be built using VCPKG and MSVC + +## Pre-requisites + +* Visual Studio 17.13.3 or higher, with MSVC v143/14.42.34438.0 or higher +* Qt 6.8.3 or higher, with MSVC toolchain +* CMake +* Git (for cloning the repo, optional) +* ReactPhysics3D prebuilt library + +You will have to build and install ReactPhysics3D yourself. Check the [build instructions on ReactPhysics3D](https://www.reactphysics3d.com/documentation/index.html#building) for help + +To start, clone the repository: + + git clone https://git.maelstrom.dev/maelstrom/openblocks + +Then, launch the *x64 Native Tools Command Prompt for VS 2022*, and cd into the directory that you cloned the project into + +Once in the directory, add Qt to the `CMAKE_PREFIX_PATH` variable (for instance, if you install Qt to `C:\Qt\6.8.3`): + + set CMAKE_PREFIX_PATH=C:\Qt\6.8.3\msvc2022_64 + +Now, generate the build files with cmake via the vcpkg preset: + + cmake -Bbuild . --preset vcpkg + +Then, finally, build in release mode: + + cmake --build build --config Release + +The compiled binaries should then be placed in `./build/bin/` and should be ready for redistribution without any further work. + +If any of the compilation steps fail, or the binaries fail to execute, please create an issue so that this can be corrected. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..edb8331 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Openblocks + +[ Docs are work in progress! ] + +For build instructions, see [BUILD.md](./BUILD.md) \ No newline at end of file