Mercurial > trustbridge
comparison INSTALL @ 575:ab2d62fe2815
Add build documentation
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 26 May 2014 09:33:18 +0000 |
parents | |
children | 4ccae6acfaec |
comparison
equal
deleted
inserted
replaced
574:e32ae933391f | 575:ab2d62fe2815 |
---|---|
1 Installation Instructions | |
2 ************************* | |
3 | |
4 For Debian based GNU / Linux | |
5 ============================ | |
6 The following commands build qt5 and polarssl which are dependencies of the Software. | |
7 For build dependencies please refer to the Qt documentation | |
8 ( qtbase/src/plugins/platforms/xcb/README ). Polarssl needs cmake and build-essentials. | |
9 | |
10 export YOURPREFIX=<Prefix of your choice (default /usr)> | |
11 | |
12 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 | |
13 | |
14 e6f47e69a5ce707452dd4bad1fd1919201a71e88be1b06afe1d302a3935daf1f | |
15 | |
16 http://qt-mirror.dannhauer.de/official_releases/qt/5.3/5.3.0/single/qt-everywhere-opensource-src-5.3.0.tar.xz | |
17 | |
18 sha256sum qt-everywhere-opensource-src-5.3.0.tar.xz | |
19 | |
20 tar -xvmlf qt-everywhere-opensource-src-5.3.0.tar.xz | |
21 | |
22 cd qt-everywhere-opensource-src-5.3.0/qtbase | |
23 | |
24 build dependencies have to to be installed at this point, | |
25 see ../qtbase/src/plugins/platforms/xcb/README | |
26 | |
27 ./configure --prefix=$YOURPREFIX \ | |
28 -opensource \ | |
29 -release -nomake tests -nomake examples -confirm-license \ | |
30 -static -no-cups -no-nis -no-icu -no-fontconfig \ | |
31 -no-directfb -no-opengl -no-kms -no-eglfs -no-egl -no-openssl -no-glib | |
32 nice make -j8 | |
33 make install | |
34 | |
35 curl -O https://polarssl.org/download/polarssl-1.3.7-gpl.tgz | |
36 6beef0281160bf07fefefd6b412dd1ce4c39261cf5300835aef442253f0400e5 polarssl-1.3.7-gpl.tgz | |
37 | |
38 tar -xf polarssl-1.3.7-gpl.tgz | |
39 cd polarssl-1.3.7 | |
40 mkdir build | |
41 cd build | |
42 cmake .. -DCMAKE_C_FLAGS=-fpic -DCMAKE_INSTALL_PREFIX=$YOURPREFIX | |
43 make && make test && make install | |
44 | |
45 To compile the software you can use plain cmake. An out of source build is | |
46 highly suggested. For build options see CMakeList.txt | |
47 | |
48 hg clone https://wald.intevation.org/hg/trustbridge/ | |
49 cd trustbridge | |
50 mkdir build-linux | |
51 cd build-linux | |
52 cmake .. -DCMAKE_PREFIX_PATH=$YOURPREFIX | |
53 | |
54 | |
55 For Microsoft Windows | |
56 ===================== | |
57 The Windows variant can be cross compiled on Debian based GNU / Linux systems. | |
58 The minimum requirement is debian stable. | |
59 | |
60 Dependencies on the Host system: | |
61 git autoconf automake bash bison bzip2 \ | |
62 cmake flex gettext git g++ intltool \ | |
63 libffi-dev libtool libltdl-dev libssl-dev \ | |
64 libxml-parser-perl make openssl patch perl \ | |
65 pkg-config scons sed unzip wget xz-utils autopoint \ | |
66 gperf | |
67 | |
68 Build the windows: | |
69 MXEPATH=$YOURPREFIX/win | |
70 git clone https://github.com/mxe/mxe.git $MXEPATH | |
71 cd $MXEPATH | |
72 echo "MXE_TARGETS := i686-w64-mingw32.static" > settings.mk | |
73 make polarssl | |
74 make qtbase | |
75 | |
76 Workaround Qt CMake Bugs: | |
77 find $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake -name \*.cmake | \ | |
78 xargs sed -i 's/\/\([a-z]*\)\.lib/\/lib\1\.a/g' | |
79 sed -i 's/^_qt5gui_find_extra_libs.*//' \ | |
80 $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake | |
81 | |
82 Make an NSS build available in the MXE prefix: | |
83 # TODO -> Document how to build NSS,.. | |
84 cp -r <magic nss folder> $MXEPATH/usr/i686-w64-mingw32.static/ | |
85 | |
86 Compile the software: | |
87 cd trustbridge | |
88 mkdir build-windows | |
89 cd build-windows | |
90 MXETARGET=$MXEPATH/usr/i686-w64-mingw32.static/ | |
91 cmake .. \ | |
92 -DCMAKE_PREFIX_PATH="$MXETARGET/qt5;$MXETARGET;" \ | |
93 -DNSS_INCLUDEDIR="/nss-3.12.7/include;/nss-3.12.7/public/nss" \ | |
94 -DNSS_LIBDIR="/nss-3.12.7/lib" \ | |
95 -DCMAKE_TOOLCHAIN_FILE="$MXETARGET/share/cmake/mxe-conf.cmake" \ | |
96 -DCMAKE_VERBOSE_MAKEFILE=True |