Skip to content

Cross compilation using Docker

Victor Luchits edited this page Jun 20, 2019 · 2 revisions

1. Prerequisites

Install docker

Add your Unix user to the docker group

Clone qfusion git repository

git clone https://github.com/Qfusion/qfusion.git
cd qfusion
git submodule update --init --recursive

Create Unix user for the buildbot on the host machine:

sudo groupadd -g 1066 buildbot
sudo useradd -u 1066 -g 1066 -r -m buildbot

Add your Unix user to the buildbot group (you may need to re-login afterwards):

sudo usermod -G buildbot -a <username>

Create an output directory for the buildbot. This directory can be anywhere as long as its writable by Unix user or group 1066.

mkdir -p $HOME/qfusion/builds
chown :buildbot $HOME/qfusion/builds
chmod 0775 $HOME/qfusion/builds

2. Creating Docker images

The following commands are supposed to be run in qfusion git repository root.

Linux x86_64

docker build -t qfusion/qfusion-x86_64:latest -f platforms/docker/x86_64/Dockerfile .

Windows x86_64

docker build -t qfusion/qfusion-win32_x86_64:latest -f platforms/docker/win32_x86_64/Dockerfile .

3. Compilation

Linux x86_64

docker run --rm -i -t -v $HOME/qfusion/builds:/home/buildbot/tar_gz warsow/qfusion-x86_64:latest /bin/bash -c "make && make tar_gz"

Windows x86_64

docker run --rm -i -t -v $HOME/qfusion/builds:/home/buildbot/tar_gz warsow/qfusion-win32_x86_64:latest /bin/bash -c "make && make tar_gz"
Clone this wiki locally