Although you can compile PlanetaryImager from sources, the best way to build Linux and Windows packages is to use Docker containers, together with a python script building images and packages.

Quick Start

You can view all the available images by running:

python3 ./support/docker/docker.py list

The docker.py script

Main entry point for the build system and CI settings file management. Inside it you can notice a list of images:

images = [
  Ubuntu('19.04', 'x86_64'),
  Ubuntu('19.04', 'arm32v7'),
  Ubuntu('18.04', 'x86_64'),
  Ubuntu('18.04', 'arm32v7'),
  Ubuntu('16.04', 'x86_64'),
  Ubuntu('16.04', 'arm32v7'),
  Debian('stretch', 'x86_64'),
  Debian('stretch', 'arm32v7'),
  Debian('buster', 'x86_64'),
  Debian('buster', 'arm32v7'),
  Fedora('29', 'x86_64'),
  Fedora('30', 'x86_64'),
  Fedora('31', 'x86_64'),
  Windows('x86_64', 'static'),
]

Each image is a python class (Ubuntu extends Linux which extends Dockerfile). This is where a new OS or OS version can be added. Additionally you can see that you can specify an architecture (either arm32v7 or x86_64, i386 or i686 are deprecated, but possibly can be supported too).

This Dockerfile class representation is used to create a docker image that's going to be used in Travis to build the project for that particular distribution.

The docker.py --help command will show a list of available commands for building images, pushing them to docker hub and generate the .travis.yml file.

It also has a package subcommand, which can be used both to test images locally and build packages. Travis also uses the docker.py package command to generate new packages.

support/docker/snippets directory

This directory contains the Dockerfile snippets that are going to be interpolated and concatenated by the Dockerfile python classes to generate a single Dockerfile to create the docker image. It can contains variables in the form of %{Variable_Name} that will be interpolated by the python classes.

support/docker/files directory

This directory contains files that will be used during the build process.

entrypoint

shell script that will be run by default by the docker image

configuration-${distribution_name_and_version}.cmake

CMake configuration file that will be passed to the build system via the cmake -C <initial-cache> command argument. For instance in debian it will set the CPACK_GENERATOR variable to DEB and sets the debian dependencies.

${distribution}-package-checker.sh

If the distribution supports it (currently .deb. and .rpm are supported) this script will install the generated package into the docker subsystem in order to check its consistency.

travis.yml

The command docker.py generate-travis-yml will create the travis.yml configuration file and dump it to stdout (if you're happy with it, you can use a regular shell redirection to write it to the project root .travis.yml file).

It will collect all the configured docker images (the list present in docker.py) and create a build matrix with a different environment for each one of them. It also accepts the following parameters:

Other travis parameters such as trigger conditions, environment variables, scripts and commands invoked are hardcoded in the travis.py file.