Commit 51fe60

2026-10-11 19:24:29 Matt Hughes: -/-
development/building pointcaster.md ..
@@ 6,32 6,24 @@
cd pointcaster
```
-## Linux
+Builds use a containerised development environment that handles download and configuration of all dependencies. The [compose.yaml](https://github.com/matth-av/pointcaster/blob/qt/compose.yaml) in the root of the repository defines two services, `dev` for Linux and `dev-win` for Windows, which mount the repository inside the container and open a shell. Either [Docker](https://docs.docker.com/engine/install/) or [Podman](https://podman.io/docs/installation) (with `podman compose`) must be installed and configured on your system to proceed.
-Builds on Linux use a containerised development environment created using the [Dockerfile](https://github.com/matth-av/pointcaster/blob/qt/Dockerfile) in the root of the repository. This handles download and configuration of all dependencies. Either [Docker](https://docs.docker.com/engine/install/) or [Podman](https://podman.io/docs/installation) must be installed and configured on your system to proceed.
+## Linux
-The container image can be pulled from Pointcaster servers:
+Start a development shell:
```sh
-docker pull cr.pointcaster.net/pointcaster-dev
+docker compose run --rm dev
```
-
-Or you can build it yourself (but it will take a while):
+Or with Podman:
```sh
-docker build -t pointcaster-dev .
+podman compose run --rm dev
```
-
-It can be run directly to create release builds:
+The container image is pulled from Pointcaster servers on first run. Or you can build it yourself from the [Dockerfile](https://github.com/matth-av/pointcaster/blob/qt/Dockerfile) (but it will take a while):
```sh
-docker run --rm -v ./:/pointcaster:Z cr.pointcaster.net/pointcaster-dev \
- ./scripts/build-linux-release.sh
+docker build -t cr.pointcaster.net/pointcaster-dev:latest-linux .
```
-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`:
-```sh
-docker run --rm -it -v ./:/pointcaster:Z cr.pointcaster.net/pointcaster-dev bash
-```
-Then from inside:
+From inside the container, configure and build using `cmake`:
```sh
cmake --preset linux-release
cmake --build build/linux-release
@@ 40,36 32,29 @@
```
The install target places a portable build at `build/linux-release/install/bin/pointcaster`, and the package target creates an AppImage at `dist/pointcaster-<version>-linux-release.AppImage`, both of which can be run from outside the container.
+
+To produce a release package without opening a shell:
+```sh
+docker compose run --rm dev ./scripts/build-linux-release.sh
+```
> [!TIP]
-> The docker image is used as a base for a [Development Container](https://containers.dev/) in IDEs that support it. Visual Studio Code will automatically install extensions needed for C++, CMake and QML. See the [devcontainer.json](https://github.com/matth-av/pointcaster/blob/qt/.devcontainer/devcontainer.json).
+> The same image is used as a base for a [Development Container](https://containers.dev/) in IDEs that support it. Visual Studio Code will automatically install extensions needed for C++, CMake and QML. See the [devcontainer.json](https://github.com/matth-av/pointcaster/blob/qt/.devcontainer/devcontainer.json).
## Windows
### Windows Builds Using Docker
-Automated Windows builds use [Docker](https://docs.docker.com/engine/install/) to configure the build environment. [`scripts/windows.Dockerfile`](https://github.com/matth-av/pointcaster/blob/qt/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](#windows-builds-in-an-ide).
+Automated Windows builds use a Windows container with Visual Studio Build Tools and other binary dependencies installed by [`scripts/windows.Dockerfile`](https://github.com/matth-av/pointcaster/blob/qt/scripts/windows.Dockerfile). 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](#windows-builds-in-an-ide).
-The following commands assume you have a working docker installation capable of running Windows containers on the command line.
+The `dev-win` service requires Docker running Windows containers. It uses process isolation, so the host must be able to run Windows Server 2022 based images.
-The container image can be pulled from Pointcaster servers:
+Start a development shell:
```sh
-docker pull cr.pointcaster.net/pointcaster-dev
+docker compose run --rm dev-win
```
-
-Or you can build it yourself (but it will take a while):
+Or build the image yourself (but it will take a while):
```sh
-docker build -t pointcaster-dev .
+docker build -f scripts/windows.Dockerfile -t cr.pointcaster.net/pointcaster-dev:latest-windows .
```
-To produce a Pointcaster release package:
-```
-docker run -v ./:C:\pointcaster cr.pointcaster.net/pointcaster-dev \
- .\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 cr.pointcaster.net/pointcaster-dev powershell
-```
And from inside the container:
```sh
cmake --preset windows-release
@@ 78,11 63,11 @@
cmake --build build/windows-release --target package
```
The install target places a portable build at `build/windows-release/install/pointcaster.exe`, and the package target creates a zip archive at `dist/pointcaster-<version>-windows-release.zip`.
-> [!TIP]
-> You might benefit from passing some docker args to fully utilise available resources, e.g.:
-> ```sh
-> docker run --memory=20G --cpus=16 ...
-> ```
+
+To produce a release package without opening a shell:
+```sh
+docker compose run --rm dev-win .\scripts\build-windows-release.ps1
+```
### Windows Builds in an IDE
#### Development Dependencies
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9