Building Pointcaster
Source code for Pointcaster is available on Github. Start by cloning the repository:
git clone https://github.com/matth-av/pointcaster.git cd pointcaster
Linux
Builds on Linux use a containerised development environment created using the Dockerfile in the root of the repository. This handles download and configuration of all dependencies. Either Docker or Podman must be installed and configured on your system to proceed.
The container image can be pulled from Pointcaster servers:
docker pull cr.pointcaster.net/pointcaster-dev
Or you can build it yourself (but it will take a while):
docker build -t pointcaster-dev .
It can be run directly to create release builds:
docker run --rm -t -v ./:/pointcaster:Z cr.pointcaster.net/pointcaster-dev \ ./scripts/build-linux-release.sh
The -v argument ensures the repository is mounted inside the container.
For a development shell, invoke bash or fish, then you can configure and build using cmake:
docker run --rm -it -v ./:/pointcaster:Z cr.pointcaster.net/pointcaster-dev \ bash
Then from inside:
cmake --preset linux-release cmake --build build/linux-release cmake --build build/linux-release --target install cmake --build build/linux-release --target package
The install target places a portable build at build/linux-release/install/bin/pointcaster, and the package target creates an AppImage at build/linux-release/Pointcaster-Linux-<version>.AppImage, both of which can be run from outside the container.
The docker image is used as a base for a Development Container in IDEs that support it. Visual Studio Code will automatically install extensions needed for C++, CMake and QML. See the devcontainer.json.
Windows
Windows Builds Using Docker
Automated Windows builds use Docker to configure the build environment. scripts/windows.Dockerfile installs Visual Studio Build Tools and other binary dependencies in a Windows container. This is how release builds are produced, but if you are looking to develop Pointcaster or a Pointcaster plugin you'll most likely want to build and debug using an IDE - in which case you might prefer installing dependencies manually.
The following commands assume you have a working docker installation capable of running Windows containers on the command line.
To build the Windows docker image:
docker build -f scripts/windows.Dockerfile -t pointcaster-win .
To produce a Pointcaster release package:
docker run -v ./:C:\pointcaster pointcaster-win .\scripts-build-windows-release.ps1
The -v argument ensures the repository is mounted inside the container.
For a development shell:
docker run -it -v ./:C:\pointcaster pointcaster-win powershell
You might benefit from passing some docker args to fully utilise available resources, e.g.:
docker run --memory=20G --cpus=16 ...
And from inside the container:
cmake --preset windows-release cmake --build build/windows-release cmake --build build/windows-release --target install cmake --build build/windows-release --target package
Windows Builds in an IDE
Development Dependencies
To build Pointcaster on Windows using an IDE like Visual Studio, you'll need to install the following libraries on your host:
- Qt
QtVersion, with the 'shadertools', 'quick3d' and 'tasktree' modules - oneAPI Threading Building Blocks (oneTBB)
TbbVersion - Python
PythonVersion - Jinja
Jinja2Version
Additionally, your environment will need CMake, MSVC from Visual Studio 2022, vcpkg and Ninja.
