-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eee25d9
commit 6068e0e
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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,35 @@ | ||
FROM ubuntu:xenial | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update -qq \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl gnupg2 openssl apt-transport-https ca-certificates \ | ||
echo mxe \ | ||
&& curl -sSL "https://pkg.mxe.cc/repos/apt/client-conf/mxeapt.gpg" | apt-key add - \ | ||
&& echo "deb https://pkg.mxe.cc/repos/apt xenial main" >> /etc/apt/sources.list \ | ||
&& apt-get update -qq \ | ||
&& apt-get install -y --no-install-recommends \ | ||
make \ | ||
mxe-i686-w64-mingw32.static-cc \ | ||
mxe-i686-w64-mingw32.static-qtbase \ | ||
mxe-i686-w64-mingw32.static-qtserialport \ | ||
mxe-i686-w64-mingw32.static-qttools \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Add a qmake alias | ||
RUN ln -s /usr/lib/mxe/usr/i686-w64-mingw32.static/qt5/bin/qmake /usr/lib/mxe/usr/bin/qmake | ||
|
||
# Enhance path | ||
ENV PATH /usr/lib/mxe/usr/bin:$PATH | ||
|
||
ENTRYPOINT [ "/bin/sh", "-c" ] | ||
|
||
CMD ["qmake && make"] | ||
|
||
########################################################################## | ||
# Here the project specific workflow starts. | ||
|
||
WORKDIR /src | ||
|
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,25 @@ | ||
# mxe-qt | ||
|
||
This is a docker container that includes MXE toolchain for building windows applications inside docker for CI/CD purposes. | ||
It includes a compiler, linguist tools and qt5base and qt5serialport packages. | ||
Packages are for x86 (i686) static flavors. | ||
Packages are installed from MXE debian repository (https://pkg.mxe.cc/repos/apt/client-conf/mxeapt.gpg). | ||
|
||
Other packages can be added easily, provided `pkg.mxe.cc` is up. Example of installation: | ||
``` | ||
apt-get update -qq | ||
apt-get install mxe-i686-w64-mingw32.static-qtcharts | ||
``` | ||
|
||
# Usage example (for GitLab CI/CD yaml) | ||
|
||
Build project that is in current directory: | ||
|
||
``` | ||
docker run -it --rm -v `pwd`:/src mxe-qt "qmake && make" | ||
|
||
``` | ||
|
||
or just `docker run -it --rm -v `pwd`:/src mxe-qt` (it does the same `qmake` and `make`) | ||
|
||
Most probably, the binary will end up in `./release` |