mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
WIP: single stage Docker build for 64bit MXE
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0a3007836f
commit
24bf9540cc
3 changed files with 60 additions and 12 deletions
|
|
@ -3,13 +3,15 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Start from Ubuntu
|
# Start from Ubuntu
|
||||||
From ubuntu:18.04
|
From ubuntu:20.04
|
||||||
|
|
||||||
|
# very often master is broken, so we pass in a known good SHA
|
||||||
ARG mxe_sha=master
|
ARG mxe_sha=master
|
||||||
ENV _ver=${mxe_sha}
|
ENV _ver=${mxe_sha}
|
||||||
|
|
||||||
# update and set up the packages we need for this cross build
|
# update and set up the packages we need for this cross build
|
||||||
RUN apt-get update && apt-get upgrade -y && \
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
apt-get install -y \
|
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
||||||
autoconf \
|
autoconf \
|
||||||
automake \
|
automake \
|
||||||
autopoint \
|
autopoint \
|
||||||
|
|
@ -47,18 +49,24 @@ apt-get install -y \
|
||||||
lzip \
|
lzip \
|
||||||
scons
|
scons
|
||||||
|
|
||||||
# copy over the partial MXE settings (simply missing QtWebKit so we don't exceed the 6h limit)
|
# checkout MXE at the right version
|
||||||
RUN mkdir -p /win
|
RUN mkdir -p /win
|
||||||
ADD settings-stage1.mk /win/settings.mk
|
|
||||||
RUN cd /win ; git clone git://github.com/mxe/mxe ; \
|
RUN cd /win ; git clone git://github.com/mxe/mxe ; \
|
||||||
cd mxe ; \
|
cd mxe ; \
|
||||||
git checkout ${_ver} ;
|
git checkout ${_ver} ;
|
||||||
|
|
||||||
# Patch the qtconnectivity build to explicilty enable native-win32-bluetooth and ensure another
|
# Patch the qtconnectivity build to explicilty enable native-win32-bluetooth and ensure another
|
||||||
# backend is not picked
|
# backend is not picked
|
||||||
ADD qtconnectivity-1.patch /win/qtconnectivity-1.patch
|
ADD qtconnectivity-1.patch /win/mxe/src/qtconnectivity-1.patch
|
||||||
RUN mv /win/qtconnectivity-1.patch /win/mxe/src
|
|
||||||
RUN mv /win/settings.mk /win/mxe
|
# Move the settings into place to build everything that we need
|
||||||
|
# separate download from build so that we can redo the build
|
||||||
|
ADD settings.mk /win/mxe/settings.mk
|
||||||
RUN cd /win/mxe ; \
|
RUN cd /win/mxe ; \
|
||||||
make -j 6 2>&1 | tee build.log ;
|
make -j 6 download 2>&1 | tee mxe-build.log
|
||||||
RUN cd /win/mxe ; \
|
RUN cd /win/mxe ; \
|
||||||
make MXE_TARGETS=i686-w64-mingw32.static glib -j 6 2>&1 | tee -a build.log ;
|
make -j 6 2>&1 | tee -a mxe-build.log ;
|
||||||
|
|
||||||
|
# for some reason smtk2ssrf needs a static build of mdbtools
|
||||||
|
RUN cd /win/mxe ; \
|
||||||
|
make MXE_TARGETS=x86_64-w64-mingw32.static glib mdbtools -j 6 2>&1 | tee -a mxe-build.log ;
|
||||||
|
|
@ -2,10 +2,13 @@
|
||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# known good MXE sha
|
||||||
|
MXE_SHA="8966a64"
|
||||||
SCRIPTPATH=$(dirname $0)
|
SCRIPTPATH=$(dirname $0)
|
||||||
|
|
||||||
export VERSION=1.1
|
# version of the docker image
|
||||||
|
VERSION=2.0
|
||||||
|
|
||||||
pushd $SCRIPTPATH
|
pushd $SCRIPTPATH
|
||||||
docker build -t subsurface/mxe-build-container:$VERSION --build-arg=mxe_sha=1ee37f8 -f Dockerfile-stage1 .
|
docker build -t subsurface/mxe-build-container:$VERSION --build-arg=mxe_sha=$MXE_SHA -f Dockerfile .
|
||||||
docker build -t subsurface/mxe-build-container:$VERSION --build-arg=VERSION=$VERSION -f Dockerfile-stage2 .
|
|
||||||
popd
|
popd
|
||||||
|
|
|
||||||
37
scripts/docker/mxe-build-container/settings.mk
Normal file
37
scripts/docker/mxe-build-container/settings.mk
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
# This is a template of configuration file for MXE. See
|
||||||
|
# index.html for more extensive documentations.
|
||||||
|
|
||||||
|
# This variable controls the number of compilation processes
|
||||||
|
# within one package ("intra-package parallelism").
|
||||||
|
JOBS := 8
|
||||||
|
|
||||||
|
# This variable controls the targets that will build.
|
||||||
|
MXE_TARGETS := x86_64-w64-mingw32.shared
|
||||||
|
|
||||||
|
# The three lines below makes `make` build these "local packages" instead of all packages.
|
||||||
|
LOCAL_PKG_LIST := nsis \
|
||||||
|
curl \
|
||||||
|
libxml2 \
|
||||||
|
libxslt \
|
||||||
|
libzip \
|
||||||
|
libusb1 \
|
||||||
|
hidapi \
|
||||||
|
libgit2 \
|
||||||
|
libftdi1 \
|
||||||
|
mdbtools \
|
||||||
|
qtbase \
|
||||||
|
qtconnectivity \
|
||||||
|
qtdeclarative \
|
||||||
|
qtimageformats \
|
||||||
|
qtlocation \
|
||||||
|
qtmultimedia \
|
||||||
|
qtwebkit \
|
||||||
|
qtquickcontrols \
|
||||||
|
qtquickcontrols2 \
|
||||||
|
qtcharts \
|
||||||
|
qtsvg \
|
||||||
|
qttools \
|
||||||
|
qttranslations \
|
||||||
|
zstd
|
||||||
|
.DEFAULT local-pkg-list:
|
||||||
|
local-pkg-list: $(LOCAL_PKG_LIST)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue