wowlet/Dockerfile.windows

190 lines
8.4 KiB
Docker
Raw Permalink Normal View History

2021-01-10 23:40:17 +00:00
FROM ubuntu:20.04
ARG THREADS=1
ARG QT_VERSION=v5.15.2
2021-01-10 23:40:17 +00:00
ENV SOURCE_DATE_EPOCH=1397818193
2021-02-05 10:53:18 +00:00
ENV OPENSSL_ROOT_DIR=/usr/local/openssl/
ENV TOR_BIN=/usr/local/tor/bin/tor.exe
2022-05-04 16:18:30 +00:00
ENV TOR_VERSION='tor-0.4.5.7'
2021-02-05 10:53:18 +00:00
2021-01-10 23:40:17 +00:00
RUN apt update && \
2021-04-06 00:20:42 +00:00
DEBIAN_FRONTEND=noninteractive apt install -y curl nano wget zip automake build-essential cmake gcc-mingw-w64 g++-mingw-w64 gettext git libtool pkg-config \
2021-01-10 23:40:17 +00:00
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)
2023-03-24 15:49:50 +00:00
RUN git clone -b v0.18.2.0 --depth 1 https://github.com/monero-project/monero && \
2021-01-10 23:40:17 +00:00
cd monero && \
2023-03-24 15:49:50 +00:00
git reset --hard 99be9a044f3854f339548e2d99c539c18d7b1b01 && \
2021-01-10 23:40:17 +00:00
cp -a contrib/depends / && \
cd .. && \
rm -rf monero
RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1
RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
cd qt5 && \
git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
2021-04-06 00:20:42 +00:00
git clone git://code.qt.io/qt/qtdeclarative.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtgraphicaleffects.git -b ${QT_VERSION} --depth 1 && \
2021-01-10 23:40:17 +00:00
git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \
2021-04-06 00:20:42 +00:00
git clone git://code.qt.io/qt/qtquickcontrols.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtquickcontrols2.git -b ${QT_VERSION} --depth 1 && \
2021-01-10 23:40:17 +00:00
git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \
git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
OPENSSL_LIBS="-lssl -lcrypto -lpthread -ldl" \
./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 \
2021-04-06 00:20:42 +00:00
-opensource -confirm-license -release -static -static-runtime -opengl dynamic -no-angle \
-no-feature-qml-worker-script -no-avx -openssl -I /depends/x86_64-w64-mingw32/include -L /depends/x86_64-w64-mingw32/lib \
2021-01-10 23:40:17 +00:00
-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 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 qtwebview -skip qtwinextras -skip qtx11extras \
-skip serialbus -skip webengine \
-nomake examples -nomake tests -nomake tools && \
make -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
# zlib -> libpng, Tor
RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \
cd zlib && \
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \
2021-04-13 19:56:48 +00:00
CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar ./configure --static --prefix=/usr/x86_64-w64-mingw32 && \
2021-01-10 23:40:17 +00:00
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
# libpng -> libqrencode
RUN git clone -b libpng16 https://github.com/glennrp/libpng.git && \
2021-01-10 23:40:17 +00:00
cd libpng && \
2021-04-06 00:20:42 +00:00
git reset --hard a37d4836519517bdce6cb9d956092321eca3e73b && \
2021-01-10 23:40:17 +00:00
CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
./configure --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
RUN git clone -b v4.0.2 --depth 1 https://github.com/fukuchi/libqrencode.git && \
cd libqrencode && \
git reset --hard 59ee597f913fcfda7a010a6e106fbee2595f68e4 && \
./autogen.sh && \
CPPFLAGS="-I/depends/x86_64-w64-mingw32/include" LDFLAGS="-L/depends/x86_64-w64-mingw32/lib" \
./configure --disable-shared --enable-static --host=x86_64-w64-mingw32 --prefix=/depends/x86_64-w64-mingw32 && \
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
RUN wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz && \
echo "e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 libiconv-1.16.tar.gz" | sha256sum -c && \
tar -xzf libiconv-1.16.tar.gz && \
rm libiconv-1.16.tar.gz && \
cd libiconv-1.16 && \
./configure --enable-static --host=x86_64-w64-mingw32 --prefix=/usr/x86_64-w64-mingw32 && \
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
# OpenSSL -> Tor
2021-04-06 00:20:42 +00:00
RUN wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz && \
echo "892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5 openssl-1.1.1k.tar.gz" | sha256sum -c && \
tar -xzf openssl-1.1.1k.tar.gz && \
rm openssl-1.1.1k.tar.gz && \
cd openssl-1.1.1k && \
2021-01-10 23:40:17 +00:00
./Configure mingw64 no-shared no-dso --cross-compile-prefix=x86_64-w64-mingw32- --prefix=/usr/local/openssl && \
make -j$THREADS && \
2021-02-05 10:53:18 +00:00
make -j$THREADS install_sw && \
2021-01-10 23:40:17 +00:00
rm -rf $(pwd)
# libevent -> Tor
RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz && \
echo "a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d libevent-2.1.11-stable.tar.gz" | sha256sum -c && \
tar -zxvf libevent-2.1.11-stable.tar.gz && \
cd libevent-2.1.11-stable && \
./configure --prefix=/usr/local/libevent \
--disable-shared \
--enable-static \
--with-pic \
--host=x86_64-w64-mingw32 && \
make -j$THREADS && \
make -j$THREADS install && \
rm -rf $(pwd)
2021-04-06 00:20:42 +00:00
RUN git clone -b tor-0.4.5.7 --depth 1 https://git.torproject.org/tor.git && \
2021-01-10 23:40:17 +00:00
cd tor && \
2021-04-06 00:20:42 +00:00
git reset --hard 83f895c015de55201e5f226f84a866f30f5ee14b && \
2021-01-10 23:40:17 +00:00
./autogen.sh && \
./configure --host=x86_64-w64-mingw32 \
--disable-asciidoc \
--disable-zstd \
--disable-lzma \
--disable-manpage \
--disable-html-manual \
--disable-system-torrc \
--disable-module-relay \
--enable-static-tor \
--with-libevent-dir=/usr/local/libevent \
--with-openssl-dir=/usr/local/openssl \
2021-04-13 19:56:48 +00:00
--with-zlib-dir=/usr/x86_64-w64-mingw32 \
2021-01-10 23:40:17 +00:00
--disable-tool-name-check \
--enable-fatal-warnings \
--prefix=/usr/local/tor \
LIBS=-lcrypt32 && \
make -j$THREADS && \
make -j$THREADS install && \
2021-02-05 10:53:18 +00:00
rm -rf $(pwd) && \
strip -s -D /usr/local/tor/bin/tor.exe
2021-01-12 13:31:40 +00:00
RUN git clone https://git.wownero.com/wowlet/wownero-seed.git && \
cd wownero-seed && \
git reset --hard ef6910b6bb3b61757c36e2e5db0927d75f1731c8 && \
2021-01-14 23:18:44 +00:00
cmake -DCMAKE_INSTALL_PREFIX=/depends/x86_64-w64-mingw32 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/depends/x86_64-w64-mingw32/share/toolchain.cmake -Bbuild && \
2021-01-12 13:31:40 +00:00
make -Cbuild -j$THREADS && \
make -Cbuild install && \
2021-01-23 02:18:34 +00:00
rm -rf $(pwd)
2021-04-13 09:39:12 +00:00
RUN git config --global --add safe.directory /wowlet
2023-03-24 15:49:50 +00:00
RUN git config --global --add safe.directory /wowlet/wownero