Skip to content
adityapk00 edited this page Nov 1, 2018 · 17 revisions

Setting up a build environment.

Linux

Pre-requisites

sudo apt install clang g++ build-essential make mingw-w64 git pkg-config libc6-dev m4 g++-multilib autoconf libtool-bin ncurses-dev unzip python python-zmq zlib1g-dev wget curl bsdmainutils automake libgl1-mesa-dev libglu1-mesa-dev libfontconfig1-dev autopoint bison flex gperf intltoolize ruby bzip2 7za gdk-pixbuf-csource libssl-dev

Static build of Qt5

Download Qt5 Sources

mkdir ~/Qt && cd ~/Qt

wget https://download.qt.io/archive/qt/5.11/5.11.2/single/qt-everywhere-src-5.11.2.tar.xz
tar xvf qt-everywhere-src-5.11.2.tar.xz && cd qt-everywhere-src-5.11.2

Configure and build Qt5 statically

./configure -static -prefix ~/Qt/5.11.2/static -skip qtconnectivity -skip qtlocation -skip qtmacextras -skip qtpurchasing -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtdatavis3d -skip qtdoc -skip qtcharts -skip qtdeclarative -skip qt3d -skip qtwebengine -skip qtandroidextras -skip qtwebview -skip qtgamepad -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtwebview -skip qtwebchannel -skip qtwebglplugin -skip qttools -nomake examples -nomake tests -openssl-linked -qt-zlib -qt-libpng -qt-xcb -qt-xkbcommon -feature-fontconfig -platform linux-clang -release -opensource

make -j$(nproc)
make -j$(nproc) install

Build MXE (Cross-compiled Qt5 for Windows in Linux)

mkdir ~/github && cd ~/github
git clone https://github.com/mxe/mxe.git
cd mxe

make MXE_TARGETS=x86_64-w64-mingw32.static qtbase

Build zec-qt-wallet

git clone [email protected]:adityapk00/zec-qt-wallet.git
~/Qt/5.11.2/static/bin/qmake zec-qt-wallet.pro CONFIG+=debug platform=linux-clang

make -j$(nproc)

Make release build

export QT_STATIC=~/Qt/5.11.2/static/
export MXE_PATH=~/github/mxe/usr/bin/

PREV_VERSION=0.2.5 APP_VERSION=0.2.6 src/scripts/mkrelease.sh

This will put all the windows and linux compiled binaries into the artifacts folder

Clone this wiki locally