Building DCP-o-matic for Windows

DCP-o-matic for Windows is built using MXE inside a docker container. I host this on Linux but it should also be possible to use other operating systems.

A docker image first needs to be created, using the following Dockerfile:

FROM ubuntu:20.04

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install \
  autoconf automake autopoint bash bison bzip2 flex gettext \
  git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \
  libtool-bin libltdl-dev libssl-dev libxml-parser-perl make \
  openssl p7zip-full patch perl pkg-config python ruby scons \
  sed unzip wget xz-utils openssh-server cmake nsis yasm curl lzip vim \
  ccache

RUN cd /opt && git clone git://git.carlh.net/git/mxe.git && cd mxe && git checkout carl-2 && make

RUN useradd -ms /bin/bash -u user_id user_name

where user_id is your numerical user ID on the host system and user_name is your user name. Build the image using

docker build -t windows .

This will take a while as it has to build lots of DCP-o-matic's dependencies.

Building DCP-o-matic

The final step is to build DCP-o-matic itself. For this I use a python script which I wrote, called cdist. Download it using

git clone git://git.carlh.net/git/cdist.git

then copy the cdist script somewhere onto your path (e.g. /usr/local/bin).

cdist needs a file ~/.config/cdist which should contain:

git_prefix git://git.carlh.net/git/
mxe_prefix /opt/mxe

Once you have done this,

cdist -p dcpomatic -t windows-64 package

should build a Windows installer of DCP-o-matic for 64-bit.