comparison INSTALL @ 0:49cd5cc0b072

Initial commit of project template (based on RetraceIT)
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 07 Mar 2016 17:35:09 +0100
parents
children 4926d626fe15
comparison
equal deleted inserted replaced
-1:000000000000 0:49cd5cc0b072
1 /** @file INSTALL
2 @brief Installation Instructions
3 *******************************
4
5 For Debian based GNU / Linux
6 ============================
7 Tested development platform: Debian Jessie amd64.
8
9 Build dependencies are:
10
11 build-essential cmake libqt5core5a qttools5-dev-tools qt5-default \
12 qtbase5-dev qtbase5-dev-tools qttools5-dev inkscape mercurial curl
13
14 This document expects the following setup for build and installation.
15 It is recommended to set a custom installation prefix to avoid root
16 privileges.
17
18 export CUSTOM_PREFIX=<Prefix of your choice (default /usr)>
19 mkdir -p $CUSTOM_PREFIX/bin
20 export PATH=$CUSTOM_PREFIX/bin:$PATH
21
22 Configure the according Root CA if necessary:
23
24 echo "[web]" >> ~/.hgrc
25 echo "cacerts=~/wald-ca.pem" >> ~/.hgrc
26 curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt > ~/wald-ca.pem
27
28 Checkout clickerconvert sources:
29
30 hg clone https://wald.intevation.org/hg/clickerconvert/
31
32 Building the Software:
33
34 cd retraceit
35 mkdir build-native
36 cd build-native
37 cmake .. -DCMAKE_PREFIX_PATH=$CUSTOM_PREFIX
38
39 For Microsoft Windows
40 =====================
41 The Windows variant should be cross compiled from a Debian based GNU/Linux
42 system. The minimum requirement is Debian stable.
43
44 Tested development platform is Debian jessie.
45
46 Dependencies on the Host system:
47
48 git autoconf automake bash bison bzip2 \
49 cmake flex gettext git g++ intltool \
50 libffi-dev libtool libltdl-dev libssl-dev \
51 libxml-parser-perl make openssl patch perl \
52 pkg-config scons sed unzip curl xz-utils autopoint \
53 gperf ruby libtool qttools5-dev-tools
54
55 Under debian you might additionall need:
56
57 libtool-bin
58
59 Build the windows binaries:
60
61 MXEPATH=$CUSTOM_PREFIX/win
62 git clone https://github.com/Intevation/mxe.git $MXEPATH
63 cd $MXEPATH
64 git checkout clickerconvert
65 echo "MXE_TARGETS := i686-w64-mingw32.static" > settings.mk
66 make qtbase
67
68 Add CMAKE_STRIP to the toolchain file:
69
70 echo "set(CMAKE_STRIP $MXEPATH/usr/bin/i686-w64-mingw32.static-strip)" >> \
71 "$MXEPATH/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake"
72
73 Workaround Qt CMake Bugs:
74
75 find $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake -name \*.cmake | \
76 xargs sed -i 's/\/\([a-z]*\)\.lib/\/lib\1\.a/g'
77 sed -i 's@^_qt5gui_find_extra_libs.*@@' \
78 $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake
79
80 Compile the software (assuming the source code is already checked out. If not
81 please refer to the GNU/Linux build documentation how to obtain the source
82 code):
83
84 cd <Path-to-retraceit-source>
85 mkdir build-windows
86 cd build-windows
87 MXETARGET=$MXEPATH/usr/i686-w64-mingw32.static/
88 cmake .. \
89 -DCMAKE_PREFIX_PATH="$MXETARGET/qt5;$MXETARGET;" \
90 -DCMAKE_TOOLCHAIN_FILE="$MXETARGET/share/cmake/mxe-conf.cmake" \
91 -DCMAKE_VERBOSE_MAKEFILE=True
92 make
93
94 The binary is created under:
95
96 build-windows/src/clickerconvert.exe
97
98 This binary can be compressed with UPX or directly used. Without further
99 dependencies.
100
101 For MacOSX
102 ==========
103 Install the usual development tools / xcode.
104
105 Define some paths for the build environment:
106
107 export CUSTOM_PREFIX=~/clickerconvert
108
109 export PATH=$CUSTOM_PREFIX/bin:$PATH
110 export DYLD_LIBRARY_PATH=$CUSTOM_PREFIX/lib:$DYLD_LIBRARY_PATH
111 export PKG_CONFIG_PATH=$CUSTOM_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
112
113 Download qt:
114
115 curl -O http://qt-mirror.dannhauer.de/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.xz
116 shasum qt-everywhere-opensource-src-5.3.2.tar.xz
117
118 Should match: fb156a87a193c9a7a2fa51efc89660a3b619ace5
119
120 Build and extract:
121
122 tar -xf qt-everywhere-opensource-src-5.3.2.tar.xz
123 cd qt-everywhere-opensource-src-5.3.2/qtbase
124
125 ./configure \
126 -release -nomake tests -nomake examples -confirm-license \
127 -static -no-cups -no-nis -no-icu -no-fontconfig -qt-freetype \
128 -no-directfb -no-kms -no-openssl -no-glib \
129 -no-nis -no-libjpeg -qt-libpng \
130 -qt-zlib -no-gif -no-xinput2 -opensource -confirm-license \
131 -prefix $CUSTOM_PREFIX -no-framework
132
133 make -j `sysctl -n hw.ncpu`
134 make install
135
136 cd .. && \
137 cd qttools/src/designer/src/uitools && \
138 qmake && \
139 make -j `sysctl -n hw.ncpu` && \
140 make install
141
142 cd ../../../linguist && \
143 qmake && \
144 make -j `sysctl -n hw.ncpu` && \
145 make install
146
147
148 Download mercurial:
149
150 wget https://mercurial.selenic.com/mac/binaries/Mercurial-3.4-py2.7-macosx10.10.zip
151 shasum Mercurial-3.4-py2.7-macosx10.10.zip
152
153 Should match: 1380790ae7f7d8060e937d386be3103c173e450d
154
155 unzip Mercurial-3.4-py2.7-macosx10.10.zip
156
157 Install the .mpkg
158
159 Configure to be usable with wald certificate:
160
161 echo "[web]" >> ~/.hgrc
162 echo "cacerts=~/wald-ca.pem" >> ~/.hgrc
163 curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt > ~/wald-ca.pem
164
165 Download cmake:
166 curl -O http://www.cmake.org/files/v3.2/cmake-3.2.2-Darwin-x86_64.dmg
167 shasum cmake-3.2.2-Darwin-x86_64.dmg
168
169 Should match: d0f4172a3c72764f06146e4f949367c8029e71ed
170
171 Install the .dmg and add cmake to the path.
172
173 export PATH=/Volumes/Macintosh\ HD/Applications/CMake.app/Contents/bin/:$PATH
174
175 Now for clickerconvert:
176
177 hg clone https://wald.intevation.org/hg/clickerconvert/
178 cd clickerconvert
179 mkdir build && cd build
180 cmake .. \
181 -DCMAKE_PREFIX_PATH=$CUSTOM_PREFIX \
182 -DCMAKE_INSTALL_PREFIX=$CUSTOM_PREFIX \
183 -DCMAKE_VERBOSE_MAKEFILE=True
184 make
185 make install
186
187 The make install will create a retraceit.app in your $CUSTOM_PREFIX directory.
188 This is the deployable application bundle
189
190 You can now create a .dmg image for distribution:
191
192 mv clickerconvert.app ClickerConvert.app
193 hdiutil create -ov -format UDZO -volname RetraceIT -srcfolder ClickerConvert.app \
194 -o ClickerConvert.dmg -imagekey zlib-level=9
195
196 */
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)