Mercurial > trustbridge
diff INSTALL @ 575:ab2d62fe2815
Add build documentation
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 26 May 2014 09:33:18 +0000 |
parents | |
children | 4ccae6acfaec |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/INSTALL Mon May 26 09:33:18 2014 +0000 @@ -0,0 +1,96 @@ +Installation Instructions +************************* + +For Debian based GNU / Linux +============================ +The following commands build qt5 and polarssl which are dependencies of the Software. +For build dependencies please refer to the Qt documentation +( qtbase/src/plugins/platforms/xcb/README ). Polarssl needs cmake and build-essentials. + + export YOURPREFIX=<Prefix of your choice (default /usr)> + + curl https://download.qt-project.org/official_releases/qt/5.3/5.3.0/single/qt-everywhere-opensource-src-5.3.0.tar.xz.mirrorlist | grep SHA-256 + +e6f47e69a5ce707452dd4bad1fd1919201a71e88be1b06afe1d302a3935daf1f + + http://qt-mirror.dannhauer.de/official_releases/qt/5.3/5.3.0/single/qt-everywhere-opensource-src-5.3.0.tar.xz + + sha256sum qt-everywhere-opensource-src-5.3.0.tar.xz + + tar -xvmlf qt-everywhere-opensource-src-5.3.0.tar.xz + + cd qt-everywhere-opensource-src-5.3.0/qtbase + +build dependencies have to to be installed at this point, +see ../qtbase/src/plugins/platforms/xcb/README + + ./configure --prefix=$YOURPREFIX \ + -opensource \ + -release -nomake tests -nomake examples -confirm-license \ + -static -no-cups -no-nis -no-icu -no-fontconfig \ + -no-directfb -no-opengl -no-kms -no-eglfs -no-egl -no-openssl -no-glib + nice make -j8 + make install + + curl -O https://polarssl.org/download/polarssl-1.3.7-gpl.tgz + 6beef0281160bf07fefefd6b412dd1ce4c39261cf5300835aef442253f0400e5 polarssl-1.3.7-gpl.tgz + + tar -xf polarssl-1.3.7-gpl.tgz + cd polarssl-1.3.7 + mkdir build + cd build + cmake .. -DCMAKE_C_FLAGS=-fpic -DCMAKE_INSTALL_PREFIX=$YOURPREFIX + make && make test && make install + +To compile the software you can use plain cmake. An out of source build is +highly suggested. For build options see CMakeList.txt + + hg clone https://wald.intevation.org/hg/trustbridge/ + cd trustbridge + mkdir build-linux + cd build-linux + cmake .. -DCMAKE_PREFIX_PATH=$YOURPREFIX + + +For Microsoft Windows +===================== +The Windows variant can be cross compiled on Debian based GNU / Linux systems. +The minimum requirement is debian stable. + +Dependencies on the Host system: + git autoconf automake bash bison bzip2 \ + cmake flex gettext git g++ intltool \ + libffi-dev libtool libltdl-dev libssl-dev \ + libxml-parser-perl make openssl patch perl \ + pkg-config scons sed unzip wget xz-utils autopoint \ + gperf + +Build the windows: + MXEPATH=$YOURPREFIX/win + git clone https://github.com/mxe/mxe.git $MXEPATH + cd $MXEPATH + echo "MXE_TARGETS := i686-w64-mingw32.static" > settings.mk + make polarssl + make qtbase + +Workaround Qt CMake Bugs: + find $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake -name \*.cmake | \ + xargs sed -i 's/\/\([a-z]*\)\.lib/\/lib\1\.a/g' + sed -i 's/^_qt5gui_find_extra_libs.*//' \ + $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake + +Make an NSS build available in the MXE prefix: + # TODO -> Document how to build NSS,.. + cp -r <magic nss folder> $MXEPATH/usr/i686-w64-mingw32.static/ + +Compile the software: + cd trustbridge + mkdir build-windows + cd build-windows + MXETARGET=$MXEPATH/usr/i686-w64-mingw32.static/ + cmake .. \ + -DCMAKE_PREFIX_PATH="$MXETARGET/qt5;$MXETARGET;" \ + -DNSS_INCLUDEDIR="/nss-3.12.7/include;/nss-3.12.7/public/nss" \ + -DNSS_LIBDIR="/nss-3.12.7/lib" \ + -DCMAKE_TOOLCHAIN_FILE="$MXETARGET/share/cmake/mxe-conf.cmake" \ + -DCMAKE_VERBOSE_MAKEFILE=True