aheinecke@575: Installation Instructions aheinecke@575: ************************* aheinecke@575: aheinecke@575: For Debian based GNU / Linux aheinecke@575: ============================ andre@876: Tested development platform: Ubuntu 14.4 amd64. bernhard@598: aheinecke@575: The following commands build qt5 and polarssl which are dependencies of the Software. andre@876: To only build for the amd64 platform omit the i386 instructions. andre@876: aheinecke@575: For build dependencies please refer to the Qt documentation bernhard@598: ( qtbase/src/plugins/platforms/xcb/README ). bernhard@598: Polarssl needs cmake and build-essentials. aheinecke@575: aheinecke@575: export YOURPREFIX= aheinecke@577: export PATH=$YOURPREFIX/bin:$PATH aheinecke@575: andre@778: curl https://download.qt-project.org/official_releases/qt/5.3/5.3.1/single/qt-everywhere-opensource-src-5.3.1.tar.xz.mirrorlist | grep SHA-256 aheinecke@575: andre@778: 29d2ab3b1aef87e2dd806b278802e357274016475a513341348040468bf233ac aheinecke@575: andre@778: http://qt-mirror.dannhauer.de/official_releases/qt/5.3/5.3.1/single/qt-everywhere-opensource-src-5.3.1.tar.xz aheinecke@575: andre@778: sha256sum qt-everywhere-opensource-src-5.3.1.tar.xz aheinecke@575: andre@778: tar -xf qt-everywhere-opensource-src-5.3.1.tar.xz andre@778: andre@778: cd qt-everywhere-opensource-src-5.3.1/qtbase aheinecke@575: aheinecke@575: build dependencies have to to be installed at this point, aheinecke@575: see ../qtbase/src/plugins/platforms/xcb/README aheinecke@575: aheinecke@575: ./configure --prefix=$YOURPREFIX \ aheinecke@575: -opensource \ aheinecke@575: -release -nomake tests -nomake examples -confirm-license \ andre@876: -static -no-cups -no-nis -no-icu -no-fontconfig -qt-freetype \ andre@778: -no-directfb -no-opengl -no-kms -no-eglfs -no-egl -no-openssl -no-glib \ andre@931: -qpa xcb -qt-xkbcommon -qt-xcb -no-nis -no-libjpeg -qt-libpng \ andre@876: -qt-zlib -no-gif && \ andre@887: nice make -j`nproc` && \ andre@666: make install andre@666: andre@784: cd .. && \ andre@784: cd qttools/src/designer/src/uitools && \ andre@778: qmake && \ andre@887: nice make -j`nproc` && \ aheinecke@575: make install aheinecke@575: andre@784: cd ../../../linguist && \ andre@784: qmake && \ andre@887: nice make -j`nproc` &&\ andre@666: make install aheinecke@577: andre@823: curl -O https://polarssl.org/download/polarssl-1.3.8-gpl.tgz andre@823: 318171db41335cacbb5b0047c94f1faf91442ab70a223b5223436703c9406ff1 polarssl-1.3.8-gpl.tgz aheinecke@575: andre@823: tar -xf polarssl-1.3.8-gpl.tgz andre@823: cd polarssl-1.3.8 aheinecke@575: mkdir build aheinecke@575: cd build aheinecke@575: cmake .. -DCMAKE_C_FLAGS=-fpic -DCMAKE_INSTALL_PREFIX=$YOURPREFIX aheinecke@575: make && make test && make install aheinecke@575: andre@998: Trustbridge checkout: andre@998: At this point you need a trustbridge checkout as curl needs to be patched andre@998: to enable the certificate pinning and the force of SSL Ciphersuites when andre@998: using polarssl. andre@998: andre@998: hg clone https://wald.intevation.org/hg/trustbridge/ andre@998: andre@908: Libcurl: andre@998: andre@960: wget http://curl.haxx.se/download/curl-7.37.1.tar.gz andre@960: a32492a38c10a097344892f5fd2041e54698cb909696852311b1161e4aa979f3 curl-7.37.1.tar.gz andre@960: andre@908: tar -xf curl-7.37.1.tar.gz andre@908: cd curl-7.37.1/ andre@998: patch -p1 < ../trustbridge/patches/*.patch andre@971: mkdir build andre@971: cd build andre@908: andre@971: ../configure --prefix=$YOURPREFIX \ andre@908: --without-nghttp2 --without-libidn --without-winidn --without-libssh2 \ andre@908: --without-librtmp --without-libmetalink --without-axtls --without-nss \ andre@908: --without-cyassl --without-ssl --without-gnutls --disable-gopher --disable-smtp \ andre@908: --disable-imap --disable-pop3 --disable-tftp --disable-telnet --disable-dict \ andre@953: --disable-rtsp --disable-ldaps --disable-ldap --disable-file \ andre@908: --disable-ftp --enable-http --enable-shared=no -enable-static=yes \ andre@948: --with-polarssl=$YOURPREFIX --without-ca-bundle --without-ca-path \ andre@948: --without-zlib andre@953: make && make install andre@908: aheinecke@575: To compile the software you can use plain cmake. An out of source build is aheinecke@575: highly suggested. For build options see CMakeList.txt aheinecke@575: aheinecke@575: cd trustbridge andre@834: hg clone https://wald.intevation.org/hg/trustbridge/nss-cmake-static aheinecke@575: mkdir build-linux aheinecke@575: cd build-linux aheinecke@575: cmake .. -DCMAKE_PREFIX_PATH=$YOURPREFIX aheinecke@575: aheinecke@575: andre@876: I386 andre@876: ==== andre@876: Install dependencies (list might be incomplete) andre@876: apt-get install libx32stdc++-4.8-dev libc6:i386 g++-4.8-multilib \ andre@876: libxcb1:i386 libxcb1-dev:i386 libx11-xcb1:i386 libx11-xcb-dev:i386 libxcb-keysyms1:i386 \ andre@876: libxcb-keysyms1-dev:i386 libxcb-image0:i386 libxcb-image0-dev:i386 \ andre@876: libxcb-shm0:i386 libxcb-shm0-dev:i386 libxcb-icccm4:i386 \ andre@876: libxcb-icccm4-dev:i386 libxcb-sync-dev:i386 \ andre@876: libxcb-render-util0:i386 libxcb-render-util0-dev:i386 \ andre@876: libxcb-xfixes0-dev:i386 libxrender-dev:i386 libxcb-shape0-dev:i386 \ andre@876: libxcb-randr0-dev:i386 libxcb-glx0-dev:i386 libdbus-1-dev:i386 \ andre@888: libsm-dev:i386 libnss3-dev:i386 andre@876: andre@876: Create a new directory for qt. As qt has to build in source you need a different andre@876: directory. andre@876: mkdir i386 andre@876: cd i386 andre@876: tar -xf ../qt-everywhere-opensource-src-5.3.1.tar.xz andre@876: cd qt-everywhere-opensource-src-5.3.1/qtbase/ andre@876: ./configure --prefix=$YOURPREFIX/i386 \ andre@876: -opensource -platform linux-g++-32 \ andre@876: -release -nomake tests -nomake examples -confirm-license \ andre@876: -static -no-cups -no-nis -no-icu \ andre@876: -no-directfb -no-opengl -no-kms -no-eglfs -no-egl -no-openssl -no-glib \ andre@876: -system-libpng -qpa xcb -qt-xcb -no-nis -no-libjpeg -no-gif -qt-zlib \ andre@876: -no-fontconfig -qt-freetype -qt-libpng -qt-xkbcommon \ andre@876: && \ andre@887: nice make -j`nproc` && \ andre@876: make install andre@876: andre@876: Switch back to the polarssl directory andre@876: cd ../../../polarssl-1.3.8/ andre@876: mkdir build-i386 andre@876: cd build-i386 andre@876: cmake .. -DCMAKE_C_FLAGS="-fpic -m32" -DCMAKE_INSTALL_PREFIX=$YOURPREFIX/i386 \ andre@876: -DCMAKE_VERBOSE_MAKEFILE=True \ andre@876: -DENABLE_TESTING=FALSE -DENABLE_PROGRAMS=FALSE && \ andre@887: nice make -j`nproc` && \ andre@876: make install andre@876: andre@971: Change to the curl directory andre@971: cd ../../curl-7.37.1/ andre@971: mkdir build-i386 andre@971: cd build-i386 andre@971: CFLAGS="-fpic -m32" CPPFLAGS="-fpic -m32" ../configure --prefix=$YOURPREFIX/i386 \ andre@971: --without-nghttp2 --without-libidn --without-winidn --without-libssh2 \ andre@971: --without-librtmp --without-libmetalink --without-axtls --without-nss \ andre@971: --without-cyassl --without-ssl --without-gnutls --disable-gopher --disable-smtp \ andre@971: --disable-imap --disable-pop3 --disable-tftp --disable-telnet --disable-dict \ andre@971: --disable-rtsp --disable-ldaps --disable-ldap --disable-file \ andre@971: --disable-ftp --enable-http --enable-shared=no -enable-static=yes \ andre@971: --with-polarssl=$YOURPREFIX/i386 --without-ca-bundle --without-ca-path \ andre@971: --without-zlib andre@971: make && make install andre@971: andre@876: Now for Trustbridge itself andre@876: cd ../../trustbridge andre@876: mkdir build-i386 andre@876: cd build-i386 andre@876: cmake .. -DCMAKE_PREFIX_PATH="$YOURPREFIX/i386" \ andre@876: -DCMAKE_VERBOSE_MAKEFILE=True \ andre@876: -DCMAKE_C_FLAGS=-m32 \ andre@876: -DCMAKE_CXX_FLAGS="-m32" andre@876: aheinecke@585: Hiawatha (for Downloader unit test) aheinecke@585: =================================== aheinecke@585: Hiawatha is used in the downloader unit tests to provide a testbench aheinecke@585: for the ssl connection. To build it you may need libxslt-dev as additional aheinecke@585: dependency. aheinecke@585: aheinecke@585: wget https://www.hiawatha-webserver.org/files/hiawatha-9.5.tar.gz aheinecke@585: sha256sum hiawatha-9.5.tar.gz aheinecke@585: aheinecke@585: c181011db1af187006190fc186689a0707a6f1e7b524c2a4347840e8fdf68b4f hiawatha-9.5.tar.gz aheinecke@585: aheinecke@585: tar -xf hiawatha-9.5.tar.gz aheinecke@585: cp polarssl-1.3.7-gpl.tgz hiawatha-9.5/polarssl/polarssl.tgz aheinecke@585: cd hiawatha-9.5/polarssl aheinecke@585: sed -i 's/wget.*//' upgrade andre@998: ./upgrade 1.3.8 aheinecke@585: cd .. aheinecke@585: mkdir build aheinecke@585: cd build aheinecke@585: cmake .. -DCMAKE_INSTALL_PREFIX=$YOURPREFIX aheinecke@585: make && make install aheinecke@585: andre@998: andre@998: andre@635: Osslsigncode (for binverify unit test) andre@635: ====================================== andre@635: Osslsigncode is used to create PKCS#7 embedded signatures for Windows Authenticode andre@635: it is needed for the Windows part of the binverify unit test on the build system. andre@635: andre@847: wget http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz andre@847: sha256sum osslsigncode-1.7.1.tar.gz andre@847: # f9a8cdb38b9c309326764ebc937cba1523a3a751a7ab05df3ecc99d18ae466c9 andre@847: tar -xf osslsigncode-1.7.1.tar.gz andre@847: cd osslsigncode-1.7.1 andre@847: ./configure --without-curl --prefix=$YOURPREFIX andre@635: make && make install andre@635: andre@635: # for a windows binary (optional) andre@635: OPENSSL_CFLAGS=-I$MXETARGET/include OPENSSL_LIBS="-L$MXETARGET/lib -lcrypto -lz -lgdi32" ./configure --without-curl --host=i686-w64-mingw32 --prefix=$MXETARGET andre@635: aheinecke@575: For Microsoft Windows aheinecke@575: ===================== aheinecke@575: The Windows variant can be cross compiled on Debian based GNU / Linux systems. bernhard@598: The minimum requirement is Debian stable. bernhard@598: Tested development platform: Ubuntu 13.10. aheinecke@575: aheinecke@575: Dependencies on the Host system: aheinecke@575: git autoconf automake bash bison bzip2 \ aheinecke@575: cmake flex gettext git g++ intltool \ aheinecke@575: libffi-dev libtool libltdl-dev libssl-dev \ aheinecke@575: libxml-parser-perl make openssl patch perl \ aheinecke@575: pkg-config scons sed unzip wget xz-utils autopoint \ aheinecke@575: gperf aheinecke@575: aheinecke@577: Build the windows binaries: aheinecke@575: MXEPATH=$YOURPREFIX/win andre@949: git clone https://github.com/Intevation/mxe.git $MXEPATH aheinecke@575: cd $MXEPATH andre@958: git checkout trustbridge aheinecke@575: echo "MXE_TARGETS := i686-w64-mingw32.static" > settings.mk aheinecke@575: make polarssl aheinecke@575: make qtbase andre@949: (optional) make curl aheinecke@575: andre@1019: Add CMAKE_STRIP to the toolchain file: andre@1019: echo "set(CMAKE_STRIP $MXEPATH/usr/bin/i686-w64-mingw32.static-strip)" >> \ andre@1019: "$MXEPATH/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake" andre@1019: aheinecke@575: Workaround Qt CMake Bugs: aheinecke@575: find $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake -name \*.cmake | \ aheinecke@575: xargs sed -i 's/\/\([a-z]*\)\.lib/\/lib\1\.a/g' aheinecke@575: sed -i 's/^_qt5gui_find_extra_libs.*//' \ aheinecke@575: $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake aheinecke@575: aheinecke@575: Compile the software: aheinecke@575: cd trustbridge aheinecke@575: mkdir build-windows aheinecke@575: cd build-windows aheinecke@575: MXETARGET=$MXEPATH/usr/i686-w64-mingw32.static/ aheinecke@575: cmake .. \ aheinecke@575: -DCMAKE_PREFIX_PATH="$MXETARGET/qt5;$MXETARGET;" \ aheinecke@575: -DCMAKE_TOOLCHAIN_FILE="$MXETARGET/share/cmake/mxe-conf.cmake" \ andre@1024: -DCMAKE_VERBOSE_MAKEFILE=True andre@848: andre@848: Runtime Depdendencies andre@848: ===================== andre@848: The Admin tool needs some additional software to be able to create installtion andre@848: packages: andre@848: andre@848: apt-get install nsis wine sharutils