andre@0: /** @file INSTALL andre@0: @brief Installation Instructions andre@0: ******************************* andre@0: andre@0: For Debian based GNU / Linux andre@0: ============================ andre@0: Tested development platform: Debian Jessie amd64. andre@0: andre@0: Build dependencies are: andre@0: andre@0: build-essential cmake libqt5core5a qttools5-dev-tools qt5-default \ andre@0: qtbase5-dev qtbase5-dev-tools qttools5-dev inkscape mercurial curl andre@0: andre@0: This document expects the following setup for build and installation. andre@0: It is recommended to set a custom installation prefix to avoid root andre@0: privileges. andre@0: andre@0: export CUSTOM_PREFIX= andre@0: mkdir -p $CUSTOM_PREFIX/bin andre@0: export PATH=$CUSTOM_PREFIX/bin:$PATH andre@0: andre@0: Configure the according Root CA if necessary: andre@0: andre@0: echo "[web]" >> ~/.hgrc andre@0: echo "cacerts=~/wald-ca.pem" >> ~/.hgrc andre@0: curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt > ~/wald-ca.pem andre@0: andre@0: Checkout clickerconvert sources: andre@0: andre@0: hg clone https://wald.intevation.org/hg/clickerconvert/ andre@0: andre@0: Building the Software: andre@0: andre@0: cd retraceit andre@0: mkdir build-native andre@0: cd build-native andre@0: cmake .. -DCMAKE_PREFIX_PATH=$CUSTOM_PREFIX andre@0: andre@0: For Microsoft Windows andre@0: ===================== andre@0: The Windows variant should be cross compiled from a Debian based GNU/Linux andre@0: system. The minimum requirement is Debian stable. andre@0: andre@0: Tested development platform is Debian jessie. andre@0: andre@0: Dependencies on the Host system: andre@0: andre@0: git autoconf automake bash bison bzip2 \ andre@0: cmake flex gettext git g++ intltool \ andre@0: libffi-dev libtool libltdl-dev libssl-dev \ andre@0: libxml-parser-perl make openssl patch perl \ andre@0: pkg-config scons sed unzip curl xz-utils autopoint \ andre@0: gperf ruby libtool qttools5-dev-tools andre@0: andre@0: Under debian you might additionall need: andre@0: andre@0: libtool-bin andre@0: andre@0: Build the windows binaries: andre@0: andre@0: MXEPATH=$CUSTOM_PREFIX/win andre@0: git clone https://github.com/Intevation/mxe.git $MXEPATH andre@0: cd $MXEPATH andre@0: git checkout clickerconvert andre@0: echo "MXE_TARGETS := i686-w64-mingw32.static" > settings.mk andre@0: make qtbase andre@0: andre@0: Add CMAKE_STRIP to the toolchain file: andre@0: andre@0: echo "set(CMAKE_STRIP $MXEPATH/usr/bin/i686-w64-mingw32.static-strip)" >> \ andre@0: "$MXEPATH/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake" andre@0: andre@0: Workaround Qt CMake Bugs: andre@0: andre@0: find $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake -name \*.cmake | \ andre@0: xargs sed -i 's/\/\([a-z]*\)\.lib/\/lib\1\.a/g' andre@0: sed -i 's@^_qt5gui_find_extra_libs.*@@' \ andre@0: $MXEPATH/usr/i686-w64-mingw32.static/qt5/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake andre@0: andre@0: Compile the software (assuming the source code is already checked out. If not andre@0: please refer to the GNU/Linux build documentation how to obtain the source andre@0: code): andre@0: andre@0: cd andre@0: mkdir build-windows andre@0: cd build-windows andre@0: MXETARGET=$MXEPATH/usr/i686-w64-mingw32.static/ andre@0: cmake .. \ andre@0: -DCMAKE_PREFIX_PATH="$MXETARGET/qt5;$MXETARGET;" \ andre@0: -DCMAKE_TOOLCHAIN_FILE="$MXETARGET/share/cmake/mxe-conf.cmake" \ andre@0: -DCMAKE_VERBOSE_MAKEFILE=True andre@0: make andre@0: andre@0: The binary is created under: andre@0: andre@0: build-windows/src/clickerconvert.exe andre@0: andre@0: This binary can be compressed with UPX or directly used. Without further andre@0: dependencies. andre@0: andre@0: For MacOSX andre@0: ========== andre@0: Install the usual development tools / xcode. andre@0: andre@0: Define some paths for the build environment: andre@0: andre@0: export CUSTOM_PREFIX=~/clickerconvert andre@0: andre@0: export PATH=$CUSTOM_PREFIX/bin:$PATH andre@0: export DYLD_LIBRARY_PATH=$CUSTOM_PREFIX/lib:$DYLD_LIBRARY_PATH andre@0: export PKG_CONFIG_PATH=$CUSTOM_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH andre@0: andre@0: Download qt: andre@0: andre@0: 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 andre@0: shasum qt-everywhere-opensource-src-5.3.2.tar.xz andre@0: andre@0: Should match: fb156a87a193c9a7a2fa51efc89660a3b619ace5 andre@0: andre@0: Build and extract: andre@0: andre@0: tar -xf qt-everywhere-opensource-src-5.3.2.tar.xz andre@0: cd qt-everywhere-opensource-src-5.3.2/qtbase andre@0: andre@0: ./configure \ andre@0: -release -nomake tests -nomake examples -confirm-license \ andre@0: -static -no-cups -no-nis -no-icu -no-fontconfig -qt-freetype \ andre@0: -no-directfb -no-kms -no-openssl -no-glib \ andre@0: -no-nis -no-libjpeg -qt-libpng \ andre@0: -qt-zlib -no-gif -no-xinput2 -opensource -confirm-license \ andre@0: -prefix $CUSTOM_PREFIX -no-framework andre@0: andre@0: make -j `sysctl -n hw.ncpu` andre@0: make install andre@0: andre@0: cd .. && \ andre@0: cd qttools/src/designer/src/uitools && \ andre@0: qmake && \ andre@0: make -j `sysctl -n hw.ncpu` && \ andre@0: make install andre@0: andre@0: cd ../../../linguist && \ andre@0: qmake && \ andre@0: make -j `sysctl -n hw.ncpu` && \ andre@0: make install andre@0: andre@0: andre@0: Download mercurial: andre@0: andre@0: wget https://mercurial.selenic.com/mac/binaries/Mercurial-3.4-py2.7-macosx10.10.zip andre@0: shasum Mercurial-3.4-py2.7-macosx10.10.zip andre@0: andre@0: Should match: 1380790ae7f7d8060e937d386be3103c173e450d andre@0: andre@0: unzip Mercurial-3.4-py2.7-macosx10.10.zip andre@0: andre@0: Install the .mpkg andre@0: andre@0: Configure to be usable with wald certificate: andre@0: andre@0: echo "[web]" >> ~/.hgrc andre@0: echo "cacerts=~/wald-ca.pem" >> ~/.hgrc andre@0: curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt > ~/wald-ca.pem andre@0: andre@0: Download cmake: andre@0: curl -O http://www.cmake.org/files/v3.2/cmake-3.2.2-Darwin-x86_64.dmg andre@0: shasum cmake-3.2.2-Darwin-x86_64.dmg andre@0: andre@0: Should match: d0f4172a3c72764f06146e4f949367c8029e71ed andre@0: andre@0: Install the .dmg and add cmake to the path. andre@0: andre@0: export PATH=/Volumes/Macintosh\ HD/Applications/CMake.app/Contents/bin/:$PATH andre@0: andre@0: Now for clickerconvert: andre@0: andre@0: hg clone https://wald.intevation.org/hg/clickerconvert/ andre@0: cd clickerconvert andre@0: mkdir build && cd build andre@0: cmake .. \ andre@0: -DCMAKE_PREFIX_PATH=$CUSTOM_PREFIX \ andre@0: -DCMAKE_INSTALL_PREFIX=$CUSTOM_PREFIX \ andre@0: -DCMAKE_VERBOSE_MAKEFILE=True andre@0: make andre@0: make install andre@0: andre@0: The make install will create a retraceit.app in your $CUSTOM_PREFIX directory. andre@0: This is the deployable application bundle andre@0: andre@0: You can now create a .dmg image for distribution: andre@0: andre@0: mv clickerconvert.app ClickerConvert.app andre@0: hdiutil create -ov -format UDZO -volname RetraceIT -srcfolder ClickerConvert.app \ andre@0: -o ClickerConvert.dmg -imagekey zlib-level=9 andre@0: andre@0: */