From 5d0044b93cfd5ada490c7c1b296bdd0f1602a8f2 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Fri, 29 Mar 2019 21:03:43 -0500 Subject: Add a bunch of scripts --- scripts/windows/Dockerfile | 17 ++++++++++++++++ scripts/windows/Dockerfile-mxe | 44 ++++++++++++++++++++++++++++++++++++++++++ scripts/windows/how-to-push.md | 19 ++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 scripts/windows/Dockerfile create mode 100644 scripts/windows/Dockerfile-mxe create mode 100644 scripts/windows/how-to-push.md (limited to 'scripts/windows') diff --git a/scripts/windows/Dockerfile b/scripts/windows/Dockerfile new file mode 100644 index 00000000..90d6c27e --- /dev/null +++ b/scripts/windows/Dockerfile @@ -0,0 +1,17 @@ +FROM oldmud0/mxe-qt:5.12.1-win32-static-posix +#FROM fffaraz/qt:windows + +ENV TARGET_SPEC i686-w64-mingw32.static.posix + +# Build Discord RPC statically +RUN git clone https://github.com/discordapp/discord-rpc +WORKDIR discord-rpc/build +RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr/${TARGET_SPEC} +RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake --build . --config Release --target install +WORKDIR ../.. + +# Build QtApng statically +RUN git clone https://github.com/Skycoder42/QtApng +WORKDIR QtApng +RUN /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake && make qmake_all && make && make install +WORKDIR .. diff --git a/scripts/windows/Dockerfile-mxe b/scripts/windows/Dockerfile-mxe new file mode 100644 index 00000000..e6caec57 --- /dev/null +++ b/scripts/windows/Dockerfile-mxe @@ -0,0 +1,44 @@ +FROM ubuntu:18.04 + +RUN apt-get update +RUN apt-get install -y \ + autoconf \ + automake \ + autopoint \ + bash \ + bison \ + bzip2 \ + flex \ + g++ \ + g++-multilib \ + gettext \ + git \ + gperf \ + intltool \ + libc6-dev-i386 \ + libgdk-pixbuf2.0-dev \ + libltdl-dev \ + libssl-dev \ + libtool-bin \ + libxml-parser-perl \ + lzip \ + make \ + openssl \ + p7zip-full \ + patch \ + perl \ + pkg-config \ + python \ + ruby \ + sed \ + unzip \ + wget \ + xz-utils + +RUN git clone https://github.com/mxe/mxe.git +RUN mv mxe /opt/mxe +WORKDIR /opt/mxe +RUN make -j4 MXE_TARGETS="i686-w64-mingw32.static.posix" qtbase qtmultimedia +ENV PATH=/opt/mxe/usr/bin:$PATH + +WORKDIR / diff --git a/scripts/windows/how-to-push.md b/scripts/windows/how-to-push.md new file mode 100644 index 00000000..8c1c18d6 --- /dev/null +++ b/scripts/windows/how-to-push.md @@ -0,0 +1,19 @@ +When you want to build a new version of Qt: +```docker +docker build -t mxe-windows-static . -f Dockerfile-mxe +docker tag mxe-windows-static oldmud0/mxe-qt:5.12.1-win32-static-posix +docker push oldmud0/mxe-qt:5.12.1-win32-static-posix +``` + +Remember to log into Docker Hub before attempting to push. + +When you want to build a new version of any dependency required for building AO: +```docker +docker build -t mxe-windows-static-ao . -f Dockerfile +docker tag mxe-windows-static-ao registry.gitlab.com/attorneyonline/ao2-client/builder-windows-i686 +docker push registry.gitlab.com/attorneyonline/ao2-client/builder-windows-i686 +``` + +Remember to create an access token in GitLab before attempting to push. + +GitLab CI depends on `builder-windows-i686` image to be present in the repository's registry in order for the Windows build to succeed. -- cgit From ede4c512ae2b365c78af1a7452b49c45178f1b68 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 27 Jul 2019 12:33:52 -0500 Subject: CI: Fix entry point bug in build artifact --- scripts/windows/Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'scripts/windows') diff --git a/scripts/windows/Dockerfile b/scripts/windows/Dockerfile index 90d6c27e..f4f1a836 100644 --- a/scripts/windows/Dockerfile +++ b/scripts/windows/Dockerfile @@ -1,4 +1,4 @@ -FROM oldmud0/mxe-qt:5.12.1-win32-static-posix +FROM oldmud0/mxe-qt:5.13.0-win32-static-posix #FROM fffaraz/qt:windows ENV TARGET_SPEC i686-w64-mingw32.static.posix @@ -10,8 +10,5 @@ RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake --build . --config Release --target install WORKDIR ../.. -# Build QtApng statically -RUN git clone https://github.com/Skycoder42/QtApng -WORKDIR QtApng -RUN /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake && make qmake_all && make && make install -WORKDIR .. +# NOTE: Do not build QtApng statically! libpng contains a self-test entry point that +# takes precedence for some reason over the final build's entry point. -- cgit From c09fdc49a79ed3ac45b2d2e2392a6e5a367cf283 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Sat, 27 Jul 2019 12:34:18 -0500 Subject: CI: Add libarchive for launcher builds --- scripts/windows/Dockerfile-mxe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/windows') diff --git a/scripts/windows/Dockerfile-mxe b/scripts/windows/Dockerfile-mxe index e6caec57..873e1442 100644 --- a/scripts/windows/Dockerfile-mxe +++ b/scripts/windows/Dockerfile-mxe @@ -38,7 +38,7 @@ RUN apt-get install -y \ RUN git clone https://github.com/mxe/mxe.git RUN mv mxe /opt/mxe WORKDIR /opt/mxe -RUN make -j4 MXE_TARGETS="i686-w64-mingw32.static.posix" qtbase qtmultimedia +RUN make -j4 MXE_TARGETS="i686-w64-mingw32.static.posix" qtbase qtmultimedia libarchive ENV PATH=/opt/mxe/usr/bin:$PATH WORKDIR / -- cgit