diff options
| author | xiphon <xiphon@protonmail.com> | 2020-09-20 07:28:06 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-09-20 10:15:04 +0000 |
| commit | 2d464a126605827c550bafd1d98d5cbafca1cc57 (patch) | |
| tree | 3e71ed90ae1e54d8f12c4cdce66d81b48bb8db7c /Dockerfile.windows | |
| parent | d313c2de377e5163a27835d28a835c274ee7abf4 (diff) | |
| download | monzero-gui-2d464a126605827c550bafd1d98d5cbafca1cc57.tar.gz monzero-gui-2d464a126605827c550bafd1d98d5cbafca1cc57.tar.xz monzero-gui-2d464a126605827c550bafd1d98d5cbafca1cc57.zip | |
docker: Windows static build (cross-compilation from Linux)
Diffstat (limited to 'Dockerfile.windows')
| -rw-r--r-- | Dockerfile.windows | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Dockerfile.windows b/Dockerfile.windows new file mode 100644 index 00000000..0c2da9bd --- /dev/null +++ b/Dockerfile.windows @@ -0,0 +1,71 @@ +FROM ubuntu:20.04 + +ARG THREADS=1 + +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -y build-essential cmake g++-mingw-w64 gettext git libtool pkg-config \ + python && \ + rm -rf /var/lib/apt/lists/* + +RUN update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \ + update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix) + +RUN git clone -b v0.17.0.0 --depth 1 https://github.com/monero-project/monero && \ + cd monero && \ + git reset --hard d27d4526fe89b7cdeb4b296280c4a6cf7efe21f8 && \ + cp -a contrib/depends / && \ + cd .. && \ + rm -rf monero + +RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1 + +RUN curl -LO https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz && \ + echo "5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 qt-everywhere-opensource-src-5.9.9.tar.xz" > hashsum.txt && \ + sha256sum -c hashsum.txt && \ + tar -xf qt-everywhere-opensource-src-5.9.9.tar.xz && \ + rm qt-everywhere-opensource-src-5.9.9.tar.xz && \ + cd qt-everywhere-opensource-src-5.9.9 && \ + ./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \ + -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \ + -I $(pwd)/qtbase/src/3rdparty/angle/include \ + -opensource -confirm-license -release -static -static-runtime -opengl dynamic -no-angle \ + -no-avx -no-openssl -no-sql-sqlite \ + -qt-freetype -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \ + -skip gamepad -skip location -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts \ + -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras \ + -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors \ + -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qtvirtualkeyboard -skip qtwayland \ + -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras \ + -skip serialbus -skip webengine \ + -nomake examples -nomake tests -nomake tools && \ + make QMAKE="$(pwd)/qtbase/bin/qmake CONFIG-='debug debug_and_release'" -j$THREADS && \ + make -j$THREADS install && \ + cd qttools/src/linguist/lrelease && \ + ../../../../qtbase/bin/qmake && \ + make -j$THREADS && \ + make -j$THREADS install && \ + cd ../../../.. && \ + rm -rf $(pwd) + +RUN git clone -b libgpg-error-1.38 --depth 1 git://git.gnupg.org/libgpg-error.git && \ + cd libgpg-error && \ + git reset --hard 71d278824c5fe61865f7927a2ed1aa3115f9e439 && \ + ./autogen.sh && \ + ./configure --disable-shared --enable-static --disable-doc --disable-tests \ + --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \ + make -j$THREADS && \ + make -j$THREADS install && \ + cd .. && \ + rm -rf libgpg-error + +RUN git clone -b libgcrypt-1.8.5 --depth 1 git://git.gnupg.org/libgcrypt.git && \ + cd libgcrypt && \ + git reset --hard 56606331bc2a80536db9fc11ad53695126007298 && \ + ./autogen.sh && \ + ./configure --disable-shared --enable-static --disable-doc \ + --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 \ + --with-gpg-error-prefix=/depends/x86_64-w64-mingw32 && \ + make -j$THREADS && \ + make -j$THREADS install && \ + cd .. && \ + rm -rf libgcrypt |
