Skip to content

build environment

Jayson Jacobs edited this page Dec 3, 2019 · 6 revisions

Linux (ubuntu 18.04+) and Windows 64

# build dependencies
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 libssl-dev

# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# MXE dependencies
sudo apt install bash bison bzip2 flex  gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev  libtool-bin libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby sed unzip wget xz-utils lzip

#add build target
rustup target add x86_64-pc-windows-gnu

download and compile openssl 1.0.2

check for latest here: https://www.openssl.org/source/

# Download openssl 1.0.2
wget https://www.openssl.org/source/openssl-1.0.2t.tar.gz
tar xvf openssl-1.0.2t.tar.gz
cd openssl-1.0.2t
./Configure linux-x86_64
make

build static qt5

download source

mkdir -p ~/Qt/5.13.2 && cd ~/Qt/5.13.2
wget https://download.qt.io/archive/qt/5.13/5.13.2/single/qt-everywhere-src-5.13.2.tar.xz
tar xvf qt-everywhere-src-5.13.2.tar.xz && cd qt-everywhere-src-5.13.2

build

OPENSSL_LIBS='-L/path/to/openssl-1.0.2t -lssl -lcrypto' ./configure -static -prefix ~/Qt/5.11.2/static  -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  -nomake examples -nomake tests -qt-zlib -qt-libpng -feature-fontconfig -no-feature-getentropy  -release -openssl-linked -opensource

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

build mxe (cross compiled qt5 for windows)

note: this takes a long time

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

make -j$(nproc) MXE_TARGETS=x86_64-w64-mingw32.static qtbase qtwebsockets

build linux & windows

QT_STATIC=~/Qt/5.11.2/static MXE_PATH=~/github/mxe/usr/bin APP_VERSION=1.0.2 ./src/scripts/mkrelease.sh

macOS

install xcode

install commands tbd

install qt5

install commands tbd

install homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

install dmg helper lib

brew install create-dmg