docker-build
: Create docker images with build dependencies, fetch sources and build them withbuild-release
andmake-unizip
in Docker in a controlled environment.build-release
: The the entry point to generate the binaries and Breakpad symbol files for a given platform. This script can be used outside of Docker but it may be difficult to set up the required static libraries.make-unizip
: Produces an universal zip reusing the files produced bybuild-release
. This script can be used outside of Docker.
Various cross compilers are used on Debian to build every Linux and Windows targets. The macOS targets are built on Darling on Ubuntu.
For the reference
argument, you should use a tag or a commit hash, rather than a branch name, in order to avoid false caching.
It is recommended to check the results with validate-release, for example:
../validate-release/validate-release build/release/linux-amd64.zip`
./docker-build --clean
./docker-build --reference 85dee939 --targets linux-amd64
./docker-build --clean --reimage --reference 85dee939 --targets all --unizip
Output files will be found in build/release
.
usage: docker-build [-h] [--clean] [--prune] [--reimage] [--reference [REFERENCE]]
[--targets TARGETS [TARGETS ...]] [--unizip] [--chown] [--docker PATH]
docker-build builds Unvanquished engine, virtual machine and universal zip in Docker.
options:
-h, --help show this help message and exit
--clean Delete previous target and universal zip builds.
--prune Delete all docker images from previous target builds.
--reimage Rebuild the system docker images for the targets to build.
--reference [REFERbINLENCE]
Git reference for targets to build.
--targets TARGETS [TARGETS ...]
List of targets. Requires a reference. Available targets: all linux-amd64
linux-i686 linux-arm64 linux-armhf windows-amd64 windows-i686 macos-amd64
vm
--unizip Make an universal zip out of built targets.
--chown Change ownership of produced files, this option should never be needed as
other tasks are expected to do it.
--docker PATH Path to the docker binary. Default: docker.
You need docker to use the docker-build
script. To build the macos-amd64
target, docker
should be configured to use the btrfs
storage driver since darling
does not run over overlayfs.
For the rev
argument, you should use a tag or a commit hash, rather than a branch name, in order to avoid false caching.
# Build
docker build -t unvrel . --build-arg=rev=3173f3307 --build-arg=targets=linux-amd64
# Get outputs
docker create --name tmp unvrel
docker cp tmp:/Unvanquished/build/release/linux-amd64.zip .
docker rm tmp
# Build
docker build -t unvrel . --build-arg=rev=8bef4ceee
# Get outputs
docker create --name tmp unvrel
docker cp tmp:/Unvanquished/build/release/unvanquished_0.zip .
docker rm tmp