Skip to content

Commit

Permalink
add mxe32-qt
Browse files Browse the repository at this point in the history
  • Loading branch information
positron96 committed Oct 8, 2021
1 parent eee25d9 commit 6068e0e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
35 changes: 35 additions & 0 deletions mxe32-qt/Dockerfile
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

25 changes: 25 additions & 0 deletions mxe32-qt/README.adoc
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`

0 comments on commit 6068e0e

Please sign in to comment.