view INSTALL @ 90:c3000fa6ca56

Add back button to subfolder selection dialog
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 19 Jun 2015 14:27:56 +0200
parents 6965fb5db4b7
children 788b5f239571
line wrap: on
line source
/** @file INSTALL
@brief Installation Instructions
*******************************

For Debian based GNU / Linux
============================
Tested development platform: Ubuntu 14.4 amd64.

Build dependencies are:

    build-essential cmake libqt5core5a qttools5-dev-tools qt5-default \
    qtbase5-dev qtbase5-dev-tools qttools5-dev inkscape mercurial curl

This document expects the following setup for build and installation.
It is recommended to set a custom installation prefix to avoid root
privileges.

    export CUSTOM_PREFIX=<Prefix of your choice (default /usr)>
    mkdir -p $CUSTOM_PREFIX/bin
    export PATH=$CUSTOM_PREFIX/bin:$PATH

Configure the according Root CA if necessary:

    echo "[web]" >> ~/.hgrc
    echo "cacerts=~/wald-ca.pem" >>  ~/.hgrc
    curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt > ~/wald-ca.pem

Checkout retraceit sources:

    hg clone https://wald.intevation.org/hg/retraceit/

Building the Software:

    cd retraceit
    mkdir build-native
    cd build-native
    cmake .. -DCMAKE_PREFIX_PATH=$CUSTOM_PREFIX

For Microsoft Windows
=====================
The Windows variant should be cross compiled from a Debian based GNU/Linux
system. The minimum requirement is Debian stable.

Tested development platform is Ubuntu 14.4

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 curl xz-utils autopoint \
    gperf ruby libtool qttools5-dev-tools

Under debian you might additionall need:

    libtool-bin

Build the windows binaries:

    MXEPATH=$CUSTOM_PREFIX/win
    git clone https://github.com/Intevation/mxe.git $MXEPATH
    cd $MXEPATH
    git checkout retraceit
    echo "MXE_TARGETS := i686-w64-mingw32.static" > settings.mk
    make qtbase

Add CMAKE_STRIP to the toolchain file:

    echo "set(CMAKE_STRIP $MXEPATH/usr/bin/i686-w64-mingw32.static-strip)" >> \
        "$MXEPATH/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake"

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

Compile the software (assuming the source code is already checked out. If not
please refer to the GNU/Linux build documentation how to obtain the source
code):

    cd <Path-to-retraceit-source>
    mkdir build-windows
    cd build-windows
    MXETARGET=$MXEPATH/usr/i686-w64-mingw32.static/
    cmake .. \
        -DCMAKE_PREFIX_PATH="$MXETARGET/qt5;$MXETARGET;" \
        -DCMAKE_TOOLCHAIN_FILE="$MXETARGET/share/cmake/mxe-conf.cmake" \
        -DCMAKE_VERBOSE_MAKEFILE=True
    make

The binary is created under:

    build-windows/src/retraceit.exe

This binary can be compressed with UPX or directly used. Without further
dependencies.

For MacOSX
==========
Install the usual development tools / xcode.

Define some paths for the build environment:

    export CUSTOM_PREFIX=~/retraceit

    export PATH=$CUSTOM_PREFIX/bin:$PATH
    export DYLD_LIBRARY_PATH=$CUSTOM_PREFIX/lib:$DYLD_LIBRARY_PATH
    export PKG_CONFIG_PATH=$CUSTOM_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

Download qt:

    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
    shasum qt-everywhere-opensource-src-5.3.2.tar.xz

Should match: fb156a87a193c9a7a2fa51efc89660a3b619ace5

Build and extract:

    tar -xf qt-everywhere-opensource-src-5.3.2.tar.xz
    cd qt-everywhere-opensource-src-5.3.2/qtbase

    ./configure \
       -release  -nomake tests  -nomake examples  -confirm-license \
       -static -no-cups -no-nis -no-icu -no-fontconfig -qt-freetype \
       -no-directfb -no-kms -no-openssl -no-glib \
       -no-nis -no-libjpeg -qt-libpng \
       -qt-zlib -no-gif -no-xinput2 -opensource -confirm-license \
       -prefix $CUSTOM_PREFIX -no-framework

    make -j `sysctl -n hw.ncpu`
    make install

    cd .. && \
    cd qttools/src/designer/src/uitools && \
    qmake && \
    make -j `sysctl -n hw.ncpu` && \
    make install

    cd ../../../linguist && \
    qmake && \
    make -j `sysctl -n hw.ncpu` && \
    make install


Download mercurial:

    wget https://mercurial.selenic.com/mac/binaries/Mercurial-3.4-py2.7-macosx10.10.zip
    shasum Mercurial-3.4-py2.7-macosx10.10.zip

Should match: 1380790ae7f7d8060e937d386be3103c173e450d

    unzip  Mercurial-3.4-py2.7-macosx10.10.zip

Install the .mpkg

Configure to be usable with wald certificate:

    echo "[web]" >> ~/.hgrc
    echo "cacerts=~/wald-ca.pem" >>  ~/.hgrc
    curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt > ~/wald-ca.pem

Download cmake:
    curl -O http://www.cmake.org/files/v3.2/cmake-3.2.2-Darwin-x86_64.dmg
    shasum cmake-3.2.2-Darwin-x86_64.dmg

Should match: d0f4172a3c72764f06146e4f949367c8029e71ed

Install the .dmg and add cmake to the path.

    export PATH=/Volumes/Macintosh\ HD/Applications/CMake.app/Contents/bin/:$PATH

Now for retraceit:

    hg clone https://wald.intevation.org/hg/retraceit/
    cd retraceit
    mkdir build && cd build
    cmake .. \
        -DCMAKE_PREFIX_PATH=$CUSTOM_PREFIX \
        -DCMAKE_INSTALL_PREFIX=$CUSTOM_PREFIX \
        -DCMAKE_VERBOSE_MAKEFILE=True
    make
    make install

The make install will create a retraceit.app in your $CUSTOM_PREFIX directory.
This is the deployable application bundle

You can now create a .dmg image for distribution:

    mv retraceit.app RetraceIT.app
    hdiutil create -ov -format UDZO -volname RetraceIT -srcfolder RetraceIT.app \
        -o RetraceIT.dmg -imagekey zlib-level=9

*/
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)