Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build in docker
- Loading branch information
Showing
5 changed files
with
98 additions
and
38 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# MXE cross build | ||
|
||
Scripts to cross build a windows QGIS binary from Linux using MXE: | ||
(M cross environment) http://mxe.cc/ | ||
|
||
The product is a zip file that contains a Windows build of QGIS, | ||
ready to be unzipped on a Windows machine, it does not require | ||
installation, just run the `qgis` binary. | ||
|
||
Unfortunately it has some... | ||
|
||
## Limitations | ||
|
||
- No Python support | ||
- No OpenCL support | ||
- No support for the new native Windows overrides (notifications etc.) | ||
|
||
## The easy way (requires docker) | ||
|
||
From the main directory of QGIS repo issue the following command: | ||
|
||
``` | ||
ms-windows/mxe/build.sh | ||
``` | ||
|
||
## The hard way | ||
|
||
Follow the instructions on the website to prepare the mxe environment, you | ||
will need to build all required dependencies for QGIS (or see `mxe.Dockerfile` to get an idea). | ||
|
||
The following command will select the posix threads enabled target and install | ||
the dependencies required by QGIS: | ||
|
||
``` | ||
make MXE_TARGETS=i686-w64-mingw32.shared.posix -j 16 \ | ||
qca \ | ||
qtlocation \ | ||
qscintilla2 \ | ||
qwt \ | ||
gdal \ | ||
qtkeychain \ | ||
qtserialport \ | ||
qtwebkit \ | ||
qtwinextras \ | ||
libzip \ | ||
gsl \ | ||
libspatialindex | ||
``` | ||
|
||
When done, you can check and edit the `build-mxe.sh` script and set the `MXE` path to your mxe installation directory, `MXE` can also be passed as an environment variable. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# Location of current script | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
docker run \ | ||
-v `pwd`:`pwd` \ | ||
-w `pwd` --rm \ | ||
--user $(id -u):$(id -g) \ | ||
-it elpaso/mxe-qt5-builder \ | ||
${DIR}/build-mxe.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM buildpack-deps:stretch | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends autopoint bison flex gperf libtool ruby scons unzip p7zip-full intltool libtool libtool-bin nsis zip | ||
|
||
WORKDIR /mxe | ||
|
||
RUN git clone https://github.com/mxe/mxe . || git pull origin master | ||
RUN make MXE_TARGETS=i686-w64-mingw32.shared.posix -j 16 \ | ||
qca \ | ||
qtlocation \ | ||
qscintilla2 \ | ||
qwt \ | ||
gdal \ | ||
qtkeychain \ | ||
qtserialport \ | ||
qtwebkit \ | ||
qtwinextras \ | ||
libzip \ | ||
gsl \ | ||
libspatialindex | ||
|
||
RUN chmod -R a+rw /mxe/usr/i686-w64-mingw32.shared.posix |