summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoseph Herlant <aerostitch@users.noreply.github.com>2018-05-24 06:01:16 -0700
committerjkoan <jkoan@users.noreply.github.com>2018-05-24 15:01:16 +0200
commit2523dd28f42214ddf83367873b3163225045df3c (patch)
tree526972dcff39caca70d887bf3184f8796e2accba /scripts
parent01f62133c96e24b8b7df516007d7ef62af3a5759 (diff)
downloadnavit-2523dd28f42214ddf83367873b3163225045df3c.tar.gz
change:ci:rename ci folder to scripts (#593)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/basic_upload_apks.py82
-rw-r--r--scripts/build.sh14
-rw-r--r--scripts/build_android.sh34
-rw-r--r--scripts/build_android_x86.sh41
-rw-r--r--scripts/build_linux.sh48
-rw-r--r--scripts/build_tomtom_minimal.sh69
-rw-r--r--scripts/build_tomtom_plugin.sh140
-rw-r--r--scripts/build_win32.sh10
-rw-r--r--scripts/build_wince.sh22
-rw-r--r--scripts/dbus_tests.py52
-rw-r--r--scripts/docker/tomtom/Dockerfile106
-rw-r--r--scripts/docker/tomtom/README.md7
-rw-r--r--scripts/docker/tomtom/entrypoint.sh3
-rw-r--r--scripts/docker/tomtom/tomtom.cache5
-rw-r--r--scripts/generate_contributors.sh52
-rw-r--r--scripts/import_translations.sh47
-rw-r--r--scripts/merge_i18n_update.sh12
-rw-r--r--scripts/pointer-64.pngbin0 -> 1733 bytes
-rw-r--r--scripts/publish.sh35
-rw-r--r--scripts/run_linux_tests.sh66
-rw-r--r--scripts/setup_android.sh45
-rw-r--r--scripts/setup_common_requirements.sh4
-rw-r--r--scripts/setup_tomtom_requirements.sh167
-rw-r--r--scripts/setup_wince.sh6
-rw-r--r--scripts/update_download_center.sh106
-rw-r--r--scripts/update_doxygen.sh15
-rw-r--r--scripts/xdotools.sh99
27 files changed, 1287 insertions, 0 deletions
diff --git a/scripts/basic_upload_apks.py b/scripts/basic_upload_apks.py
new file mode 100644
index 000000000..b4b439536
--- /dev/null
+++ b/scripts/basic_upload_apks.py
@@ -0,0 +1,82 @@
+#!/usr/bin/python
+#
+# Copyright 2014 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the 'License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Uploads an apk to the beta track."""
+
+import argparse
+import sys
+from apiclient import sample_tools
+from oauth2client import client
+
+TRACK = 'beta' # Can be 'alpha', beta', 'production' or 'rollout'
+
+# Declare command-line flags.
+argparser = argparse.ArgumentParser(add_help=False)
+argparser.add_argument('package_name',
+ help='The package name. Example: com.android.sample')
+argparser.add_argument('apk_file',
+ nargs='?',
+ default='test.apk',
+ help='The path to the APK file to upload.')
+
+
+def main(argv):
+ # Authenticate and construct service.
+ service, flags = sample_tools.init(
+ argv,
+ 'androidpublisher',
+ 'v2',
+ __doc__,
+ __file__, parents=[argparser],
+ scope='https://www.googleapis.com/auth/androidpublisher')
+
+ # Process flags and read their values.
+ package_name = flags.package_name
+ apk_file = flags.apk_file
+
+ try:
+ edit_request = service.edits().insert(body={}, packageName=package_name)
+ result = edit_request.execute()
+ edit_id = result['id']
+
+ apk_response = service.edits().apks().upload(
+ editId=edit_id,
+ packageName=package_name,
+ media_body=apk_file).execute()
+
+ print 'Version code %d has been uploaded' % apk_response['versionCode']
+
+ track_response = service.edits().tracks().update(
+ editId=edit_id,
+ track=TRACK,
+ packageName=package_name,
+ body={u'versionCodes': [apk_response['versionCode']]}).execute()
+
+ print 'Track %s is set for version code(s) %s' % (
+ track_response['track'], str(track_response['versionCodes']))
+
+ commit_request = service.edits().commit(
+ editId=edit_id, packageName=package_name).execute()
+
+ print 'Edit "%s" has been committed' % (commit_request['id'])
+
+ except client.AccessTokenRefreshError:
+ print ('The credentials have been revoked or expired, please re-run the '
+ 'application to re-authorize')
+
+if __name__ == '__main__':
+ main(sys.argv)
+
diff --git a/scripts/build.sh b/scripts/build.sh
new file mode 100644
index 000000000..536ab7781
--- /dev/null
+++ b/scripts/build.sh
@@ -0,0 +1,14 @@
+set -e
+
+echo "$# build script (s) to run"
+
+for i in $(seq 1 $#); do
+ eval s=\$$i
+ echo "Starting build script #$i : $s"
+ if [ ! -z $CIRCLE_ARTIFACTS ]; then
+ set -o pipefail
+ bash -e $s 2>&1 | tee $CIRCLE_ARTIFACTS/${i}.log
+ else
+ bash -e $s
+ fi
+done
diff --git a/scripts/build_android.sh b/scripts/build_android.sh
new file mode 100644
index 000000000..bf992fd2c
--- /dev/null
+++ b/scripts/build_android.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+set -e
+
+apt-get update && apt-get install -y wget
+
+export ARCH="arm"
+export START_PATH=~/
+export SOURCE_PATH=$START_PATH"/"${CIRCLE_PROJECT_REPONAME}"/"
+export CMAKE_FILE=$SOURCE_PATH"/Toolchain/arm-eabi.cmake"
+export ANDROID_NDK=~/android-ndk-r11c
+export ANDROID_NDK_BIN=$ANDROID_NDK"/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin"
+export ANDROID_SDK="/usr/local/android-sdk-linux/"
+export ANDROID_SDK_PLATFORM_TOOLS=$ANDROID_SDK"/platform-tools"
+export PATH=$ANDROID_NDK_BIN:$ANDROID_SDK_PLATFORM_TOOLS:$PATH
+export BUILD_PATH=android-${ARCH}
+
+export ANDROID_SDK_HOME=/opt/android-sdk-linux
+export ANDROID_HOME=/opt/android-sdk-linux
+export PATH=${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools:/opt/tools
+
+wget -nv -c http://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
+[ -d ~/android-ndk-r11c ] || unzip -q -d ~ android-ndk-r11c-linux-x86_64.zip
+
+[ -d $BUILD_PATH ] || mkdir -p $BUILD_PATH
+pushd $BUILD_PATH
+
+android list targets
+
+cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain/arm-eabi.cmake -DCACHE_SIZE='(20*1024*1024)' -DAVOID_FLOAT=1 -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DANDROID_API_VERSION=25 -DANDROID_NDK_API_VERSION=19 ../
+
+make -j $(nproc --all)
+
+make -j $(nproc --all) apkg-release && mv navit/android/bin/Navit-release-unsigned.apk navit/android/bin/navit-$CIRCLE_SHA1-${ARCH}-release-unsigned.apk || exit 1
+make -j $(nproc --all) apkg && mv navit/android/bin/Navit-debug.apk navit/android/bin/navit-$CIRCLE_SHA1-${ARCH}-debug.apk || exit 1
diff --git a/scripts/build_android_x86.sh b/scripts/build_android_x86.sh
new file mode 100644
index 000000000..6e84bc4e1
--- /dev/null
+++ b/scripts/build_android_x86.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -e
+
+apt-get update && apt-get install -y wget
+
+export ARCH="x86"
+export START_PATH=~/
+export SOURCE_PATH=$START_PATH"/"${CIRCLE_PROJECT_REPONAME}"/"
+export CMAKE_FILE=$SOURCE_PATH"/Toolchain/i686-android.cmake"
+export ANDROID_NDK=~/android-ndk-r11c
+export ANDROID_NDK_BIN=$ANDROID_NDK"/toolchains/x86-4.9/prebuilt/linux-x86_64/bin"
+export ANDROID_SDK="/usr/local/android-sdk-linux/"
+export ANDROID_SDK_PLATFORM_TOOLS=$ANDROID_SDK"/platform-tools"
+export PATH=$ANDROID_NDK_BIN:$ANDROID_SDK_PLATFORM_TOOLS:$PATH
+export BUILD_PATH=android-${ARCH}
+
+export ANDROID_SDK_HOME=/opt/android-sdk-linux
+export ANDROID_HOME=/opt/android-sdk-linux
+export PATH=${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools:/opt/tools
+
+
+wget -nv -c http://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
+[ -d ~/android-ndk-r11c ] || unzip -q -d ~ android-ndk-r11c-linux-x86_64.zip
+
+[ -d $BUILD_PATH ] || mkdir -p $BUILD_PATH
+pushd $BUILD_PATH
+
+android list targets
+
+cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain/i686-android.cmake -DAVOID_FLOAT=1 -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DANDROID_API_VERSION=25 -DANDROID_NDK_API_VERSION=19 -DDISABLE_CXX=1 -DDISABLE_QT=1 ..
+make -j $(nproc --all)
+
+if [[ "${CIRCLE_BRANCH}" == "master" ]]; then
+ make -j $(nproc --all) apkg-release && mv navit/android/bin/Navit-release-unsigned.apk navit/android/bin/navit-$CIRCLE_SHA1-${ARCH}-release-unsigned.apk || exit 1
+else
+ make -j $(nproc --all) apkg && mv navit/android/bin/Navit-debug.apk navit/android/bin/navit-$CIRCLE_SHA1-${ARCH}-debug.apk || exit 1
+fi
+
+echo
+echo "Build leftovers :"
+find .
diff --git a/scripts/build_linux.sh b/scripts/build_linux.sh
new file mode 100644
index 000000000..f84d247af
--- /dev/null
+++ b/scripts/build_linux.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+set -e
+
+COVERITY_VERSION="2017.07"
+BUILD_PATH="linux"
+
+cmake_opts="-Dgraphics/qt_qpainter:BOOL=FALSE -Dgui/qml:BOOL=FALSE -DSVG2PNG:BOOL=FALSE -DSAMPLE_MAP=n -Dgraphics/gtk_drawing_area:BOOL=TRUE"
+
+[ -d $BUILD_PATH ] || mkdir -p $BUILD_PATH
+pushd $BUILD_PATH
+
+if [[ "${CIRCLE_PROJECT_USERNAME}" == "navit-gps" && "${CIRCLE_BRANCH}" == "trunk" ]]; then
+ # If we are building the official trunk code, push an update to coverity
+ curl \
+ -X POST --data "token=${COVERITY_TOKEN}&project=${CIRCLE_PROJECT_USERNAME}" \
+ -o /tmp/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz -s \
+ https://scan.coverity.com/download/linux64
+
+ tar xfz /tmp/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz --no-same-owner -C /usr/local/share/
+ export PATH=/usr/local/share/cov-analysis-linux64-${COVERITY_VERSION}/bin:$PATH
+
+ cmake ${cmake_opts} ../
+ cov-build --dir cov-int make -j $(nproc --all)
+ tar czvf navit.tgz cov-int
+
+ curl --form token=$COVERITY_TOKEN \
+ --form email=$COVERITY_EMAIL \
+ --form file=@navit.tgz \
+ --form version="${CIRCLE_BRANCH}-$CIRCLE_SHA1" \
+ --form description="${CIRCLE_BRANCH}-$CIRCLE_SHA1" \
+ https://scan.coverity.com/builds?project=$CIRCLE_PROJECT_USERNAME
+
+ make package
+
+ # Then update the translation template on launchpad
+ sed -i '/INTEGER/d' po/navit.pot
+ cp po/navit.pot $CIRCLE_ARTIFACTS/
+ curl "https://translations.launchpad.net/navit/${CIRCLE_BRANCH}/+translations-upload" -H "$lp_cookie" -H "Referer: https://translations.launchpad.net/navit/${CIRCLE_BRANCH}/+translations-upload" -F file=@po/navit.pot | grep title
+
+else
+ cmake ${cmake_opts} ../
+ make -j $(nproc --all)
+ make package
+fi
+
+if [[ "$CIRCLE_ARTIFACTS" != "" ]]; then
+ cp -r navit/icons $CIRCLE_ARTIFACTS
+fi
diff --git a/scripts/build_tomtom_minimal.sh b/scripts/build_tomtom_minimal.sh
new file mode 100644
index 000000000..a178b9733
--- /dev/null
+++ b/scripts/build_tomtom_minimal.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+# this builds navit for tomtom
+# in case you want to build a plugin for tomtom use build_tomtom_plugin.sh instead
+# in case you want to build a standalone system
+# https://github.com/george-hopkins/opentom
+# https://github.com/gefin/opentom
+
+set -e
+
+export ARCH=arm-linux
+export TOMTOM_SDK_DIR=/opt/tomtom-sdk
+mkdir -p $TOMTOM_SDK_DIR >/dev/null 2>&1 || export TOMTOM_SDK_DIR=$HOME/tomtom-sdk
+export PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
+export PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
+export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
+export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
+export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
+export CC=$ARCH-gcc
+export CXX=$ARCH-g++
+export LD=$ARCH-ld
+export NM="$ARCH-nm -B"
+export AR=$ARCH-ar
+export RANLIB=$ARCH-ranlib
+export STRIP=$ARCH-strip
+export OBJCOPY=$ARCH-objcopy
+export LN_S="ln -s"
+export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
+JOBS=$(nproc --all)
+
+mkdir -p build
+pushd build
+cmake ../ -DCMAKE_INSTALL_PREFIX=$PREFIX -DFREETYPE_INCLUDE_DIRS=$PREFIX/include/freetype2/ -Dsupport/gettext_intl=TRUE \
+-DHAVE_API_TOMTOM=TRUE -DXSLTS=tomtom -DAVOID_FLOAT=TRUE -Dmap/mg=FALSE -DUSE_PLUGINS=0 -DCMAKE_TOOLCHAIN_FILE=../Toolchain/$ARCH.cmake \
+-DDISABLE_QT=ON -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n
+make -j$JOBS
+make install
+
+# creating directories
+OUT_PATH="/tmp/tomtom/sdcard"
+[ -d $OUT_PATH ] && rm -rf $OUT_PATH
+mkdir -p $OUT_PATH/navit/bin
+mkdir -p $OUT_PATH/navit/share/fonts
+mkdir -p $OUT_PATH/navit/share/icons
+mkdir -p $OUT_PATH/navit/share/maps
+mkdir -p $OUT_PATH/navit/share/locale
+
+# navit executable
+cp navit/navit $OUT_PATH/navit/bin
+
+# fonts
+cp -r ../navit/fonts/*.ttf $OUT_PATH/navit/share/fonts
+
+# images and xml
+cp $PREFIX/share/navit/icons/*16.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/*32.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/*48.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/*64.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/nav*.* $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/country*.png $OUT_PATH/navit/share/icons
+cd ..
+cp $PREFIX/share/navit/navit.xml ./tomtom480.xml
+
+# locale
+cp -r $PREFIX/share/locale $OUT_PATH/navit/share/locale
+
+
+cd $OUT_PATH
+mkdir /output
+zip -r /output/navitom_minimal.zip navit
diff --git a/scripts/build_tomtom_plugin.sh b/scripts/build_tomtom_plugin.sh
new file mode 100644
index 000000000..51a15f815
--- /dev/null
+++ b/scripts/build_tomtom_plugin.sh
@@ -0,0 +1,140 @@
+#!/bin/sh
+# this builds a plugin for tomtom
+# in case you want to build a standalone system
+# https://github.com/george-hopkins/opentom
+# https://github.com/gefin/opentom
+
+set -e
+
+export ARCH=arm-linux
+cp Toolchain/$ARCH.cmake /tmp
+
+# toolchain
+export TOMTOM_SDK_DIR=/opt/tomtom-sdk
+mkdir -p $TOMTOM_SDK_DIR >/dev/null 2>&1 || export TOMTOM_SDK_DIR=$HOME/tomtom-sdk
+export PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
+export PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
+export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
+export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
+export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
+export CC=$ARCH-gcc
+export CXX=$ARCH-g++
+export LD=$ARCH-ld
+export NM="$ARCH-nm -B"
+export AR=$ARCH-ar
+export RANLIB=$ARCH-ranlib
+export STRIP=$ARCH-strip
+export OBJCOPY=$ARCH-objcopy
+export LN_S="ln -s"
+export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
+JOBS=$(nproc --all)
+
+echo "Jobs"
+echo $JOBS
+
+# espeak
+pushd /tmp
+# this one includes the precompiled voices
+wget -nv -c http://freefr.dl.sourceforge.net/project/espeak/espeak/espeak-1.48/espeak-1.48.04-source.zip
+unzip espeak-1.48.04-source.zip
+pushd espeak-1.48.04-source
+sed -i "s/PREFIX=\/usr//g" src/Makefile
+sed -i "s/DATADIR=\/usr\/share\/espeak-data/DATADIR=~\/share\/espeak-data/g" src/Makefile
+sed -i "s/AUDIO = portaudio/#AUDIO = portaudio/g" src/Makefile
+sed -i "s/-fvisibility=hidden//g" src/Makefile
+cat src/Makefile
+make -C src
+pushd src
+make install
+popd # src
+popd # espeak-*
+popd # /tmp
+
+
+# navit
+mkdir -p build
+pushd build
+cmake ../ -DCMAKE_INSTALL_PREFIX=$PREFIX -DFREETYPE_INCLUDE_DIRS=$PREFIX/include/freetype2/ -Dsupport/gettext_intl=TRUE \
+-DHAVE_API_TOMTOM=TRUE -DXSLTS=tomtom -DAVOID_FLOAT=TRUE -Dmap/mg=FALSE -DUSE_PLUGINS=0 -DCMAKE_TOOLCHAIN_FILE=/tmp/$ARCH.cmake \
+-DDISABLE_QT=ON -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n
+make -j$JOBS
+make install
+
+# creating directories
+OUT_PATH="/tmp/tomtom/sdcard"
+[ -d $OUT_PATH ] && rm -rf $OUT_PATH
+mkdir -p $OUT_PATH/navit/bin
+mkdir -p $OUT_PATH/navit/lib
+mkdir -p $OUT_PATH/navit/sdl
+mkdir -p $OUT_PATH/navit/ts
+mkdir -p $OUT_PATH/navit/share/fonts
+mkdir -p $OUT_PATH/navit/share/icons
+mkdir -p $OUT_PATH/navit/share/maps
+mkdir -p $OUT_PATH/navit/share/locale
+
+cp $PREFIX/lib/libfreetype.so.6 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libSDL-1.2.so.0 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libSDL_image-1.2.so.0 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libfreetype.so.6 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libgio-2.0.so $OUT_PATH/navit/lib
+cp $PREFIX/lib/libglib-2.0.so $OUT_PATH/navit/lib/libglib-2.0.so.0
+cp $PREFIX/lib/libgmodule-2.0.so $OUT_PATH/navit/lib/libgmodule-2.0.so.0
+cp $PREFIX/lib/libgobject-2.0.so $OUT_PATH/navit/lib/libgobject-2.0.so.0
+cp $PREFIX/lib/libgthread-2.0.so $OUT_PATH/navit/lib/libgthread-2.0.so.0
+cp $PREFIX/lib/libpng16.so.16 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libts-1.0.so.0 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libxml2.so.2 $OUT_PATH/navit/lib
+cp $PREFIX/lib/libz.so.1 $OUT_PATH/navit/lib
+cp $TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/lib/libstdc++.so.5 $OUT_PATH/navit/lib
+cp $PREFIX/etc/ts.conf $OUT_PATH/navit/ts
+
+# flite
+# cp $PREFIX/bin/flite* bin/
+
+# http://forum.navit-project.org/viewtopic.php?f=17&t=568
+arm-linux-gcc -O2 -I$PREFIX/include -I$PREFIX/usr/include ../contrib/tomtom/espeakdsp.c -o $OUT_PATH/navit/bin/espeakdsp
+
+# SDL testvidinfo
+cp $PREFIX/usr/bin/testvidinfo $OUT_PATH/navit/sdl
+
+# navit executable and wrapper
+cp $PREFIX/bin/navit $OUT_PATH/navit/bin
+cp ../contrib/tomtom/navit-wrapper $OUT_PATH/navit/bin/navit-wrapper
+
+# fonts
+cp -r ../navit/fonts/*.ttf $OUT_PATH/navit/share/fonts
+
+# ts
+cp -r $PREFIX/lib/ts $OUT_PATH/navit/lib/
+cp $PREFIX/bin/ts_* $OUT_PATH/navit/ts/
+
+# images and xml
+cp $PREFIX/share/navit/icons/*16.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/*32.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/*48.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/*64.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/nav*.* $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/icons/country*.png $OUT_PATH/navit/share/icons
+cp $PREFIX/share/navit/navit.xml ./tomtom480.xml
+
+
+# locale
+cp -r $PREFIX/share/locale $OUT_PATH/navit/share/locale
+
+# espeak
+cp -r ~/share/espeak-data $OUT_PATH/navit/share/
+cp $PREFIX/bin/espeak $OUT_PATH/navit/bin/
+cp $PREFIX/lib/libespeak.so.1 $OUT_PATH/navit/lib
+
+# add a menu button
+cp -r ../contrib/tomtom/SDKRegistry/ $OUT_PATH/
+cp -r ../contrib/tomtom/ts $OUT_PATH/
+
+convert $PREFIX/share/icons/hicolor/128x128/apps/navit.png -type truecolor -crop 100x100+12+28 -resize 48x48 $OUT_PATH/SDKRegistry/navit.bmp
+convert -background none ../navit/icons/tomtom_plus.svg -resize 80x80 $OUT_PATH/navit/share/icons/tomtom_plus_80_80.png
+convert -background none ../navit/icons/tomtom_minus.svg -resize 80x80 $OUT_PATH/navit/share/icons/tomtom_minus_80_80.png
+
+
+cd $OUT_PATH
+mkdir /output
+zip -r /output/navitom_plugin.zip navit SDKRegistry ts
diff --git a/scripts/build_win32.sh b/scripts/build_win32.sh
new file mode 100644
index 000000000..26315ccd6
--- /dev/null
+++ b/scripts/build_win32.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+apt-get update && apt-get install -y mingw32 mingw32-binutils mingw32-runtime default-jdk nsis libsaxonb-java
+
+mkdir win32
+pushd win32
+cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DXSLTS=windows -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ && make -j $(nproc --all) && make -j $(nproc --all) package
+popd
+
+cp win32/*.exe $CIRCLE_ARTIFACTS/
diff --git a/scripts/build_wince.sh b/scripts/build_wince.sh
new file mode 100644
index 000000000..6e0514e1c
--- /dev/null
+++ b/scripts/build_wince.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+mkdir wince && cd wince
+cmake ../ -DCMAKE_TOOLCHAIN_FILE=Toolchain/arm-mingw32ce.cmake -DXSLTS=windows -DCACHE_SIZE=10485760 -Dsvg2png_scaling:STRING=16,32 -Dsvg2png_scaling_nav:STRING=32 -Dsvg2png_scaling_flag=16 -DSAMPLE_MAP=y
+make
+
+mkdir output
+cp navit/navit.exe output/
+cp navit/navit.xml output/
+cp -r locale/ output/
+cp -r navit/icons/ output
+mkdir output/maps
+cp navit/maps/*.bin output/maps
+cp navit/maps/*.xml output/maps
+rm -rf output/icons/CMakeFiles/ icons/cmake_install.cmake
+
+cd output/
+zip -r navit.zip .
+
+cd ../..
+bash ./navit/script/cabify.sh wince/output/navit.cab wince/
diff --git a/scripts/dbus_tests.py b/scripts/dbus_tests.py
new file mode 100644
index 000000000..fe343da32
--- /dev/null
+++ b/scripts/dbus_tests.py
@@ -0,0 +1,52 @@
+import glob
+import dbus
+from dbus import glib
+import gobject
+import sys
+import os
+import time
+from subprocess import call
+from junit_xml import TestSuite, TestCase
+
+
+gobject.threads_init()
+
+glib.init_threads()
+
+bus = dbus.SessionBus()
+
+navit_object = bus.get_object("org.navit_project.navit", # Connection name
+ "/org/navit_project/navit/default_navit" ) # Object's path
+
+iface = dbus.Interface(navit_object, dbus_interface="org.navit_project.navit.navit")
+junit_directory=sys.argv[1]
+if not os.path.exists(junit_directory):
+ os.makedirs(junit_directory)
+
+tests=[]
+start_time = time.time()
+test_cases = TestCase("zoom (factor) expected 512", '', time.time() - start_time, '', '')
+iface.zoom(-2)
+zoom=iface.get_attr("zoom")[1]
+if zoom !=512 :
+ test_cases.add_failure_info('zoom level mismatch. Got '+str(zoom)+', expected 512')
+tests.append(test_cases)
+
+test_cases = TestCase("zoom (factor) expected 1024", '', time.time() - start_time, '', '')
+iface.zoom(-2)
+zoom=iface.get_attr("zoom")[1]
+if zoom !=1024 :
+ test_cases.add_failure_info('zoom level mismatch. Got '+str(zoom)+', expected 1024')
+tests.append(test_cases)
+
+test_cases = TestCase("zoom via set_attr expected 512", '', time.time() - start_time, '', '')
+iface.set_attr("zoom", 512)
+zoom=iface.get_attr("zoom")[1]
+if zoom !=512 :
+ test_cases.add_failure_info('zoom level mismatch. Got '+str(zoom)+', expected 512')
+tests.append(test_cases)
+
+ts = [TestSuite("Navit dbus tests", tests)]
+
+with open(junit_directory+'dbus.xml', 'w+') as f:
+ TestSuite.to_file(f, ts, prettyprint=False)
diff --git a/scripts/docker/tomtom/Dockerfile b/scripts/docker/tomtom/Dockerfile
new file mode 100644
index 000000000..adddbdbf8
--- /dev/null
+++ b/scripts/docker/tomtom/Dockerfile
@@ -0,0 +1,106 @@
+FROM ubuntu:14.04
+
+RUN apt-get update && apt-get install -y libglib2.0-dev git autogen autoconf libtool imagemagick zip \
+ wget build-essential gettext cmake \
+ && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+RUN dpkg --add-architecture i386 && apt-get update \
+ && apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 \
+ && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+ENV ARCH=arm-linux
+ENV TOMTOM_SDK_DIR=/opt/tomtom-sdk
+ENV PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
+ENV PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
+ENV CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
+ENV CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
+ENV LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
+ENV CC=$ARCH-gcc
+ENV CXX=$ARCH-g++
+ENV LD=$ARCH-ld
+ENV NM="$ARCH-nm -B"
+ENV AR=$ARCH-ar
+ENV RANLIB=$ARCH-ranlib
+ENV STRIP=$ARCH-strip
+ENV OBJCOPY=$ARCH-objcopy
+ENV LN_S="ln -s"
+ENV PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
+RUN mkdir -p $TOMTOM_SDK_DIR
+
+RUN wget -nv -c https://github.com/navit-gps/dependencies/raw/master/tomtom/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -P /tmp \
+ && tar xzf /tmp/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -C $TOMTOM_SDK_DIR \
+ && rm /tmp/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz
+
+# zlib
+RUN wget -nv -c http://zlib.net/zlib-1.2.11.tar.gz -P /tmp && cd /tmp/ \
+ && tar xzf zlib-1.2.11.tar.gz && cd zlib-1.2.11 \
+ && ./configure --prefix=$PREFIX && make && make install \
+ && rm -rf /tmp/zlib-1.2.11 /tmp/zlib-1.2.11.tar.gz
+
+# libxml
+RUN wget -nv -c http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz -P /tmp && cd /tmp/ \
+ && tar xzf libxml2-2.7.8.tar.gz && cd libxml2-2.7.8/ \
+ && ./configure --prefix=$PREFIX --host=$ARCH --without-python && make && make install \
+ && rm -rf /tmp/libxml2-2.7.8/ /tmp/libxml2-2.7.8.tar.gz
+
+# libpng
+RUN wget -nv -c https://github.com/navit-gps/dependencies/raw/master/tomtom/libpng-1.6.29.tar.gz -P /tmp && cd /tmp/ \
+ && tar xzf libpng-1.6.29.tar.gz && cd libpng-1.6.29/ \
+ && ./configure --prefix=$PREFIX --host=$ARCH && make && make install \
+ && rm -rf /tmp/libpng-1.6.29/ /tmp/libpng-1.6.29.tar.gz
+
+# Freetype
+RUN wget -nv -c http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.tar.gz -P /tmp && cd /tmp/ \
+ && tar xzf freetype-2.5.0.tar.gz && cd freetype-2.5.0 \
+ && ./configure --prefix=$PREFIX --host=$ARCH && make && make install \
+ && rm -rf /tmp/freetype-2.5.0 /tmp/freetype-2.5.0.tar.gz
+
+# freetype-config --cflags
+
+# glib
+
+# chmod a-w tomtom.cache
+COPY tomtom.cache /tmp/
+
+RUN wget -nv -c http://ftp.gnome.org/pub/gnome/sources/glib/2.25/glib-2.25.17.tar.gz -P /tmp && cd /tmp / \
+ && tar xzf glib-2.25.17.tar.gz && cd glib-2.25.17 \
+ && mv /tmp/tomtom.cache . \
+ && ./configure --prefix=$PREFIX --host=$ARCH --cache-file=tomtom.cache \
+ && sed -i "s|cp xgen-gmc gmarshal.c |cp xgen-gmc gmarshal.c \&\& sed -i \"s\|g_value_get_schar\|g_value_get_char\|g\" gmarshal.c |g" gobject/Makefile \
+ && make && make install \
+ && rm -rf /tmp/glib-2.25.17 /tmp/glib-2.25.17.tar.gz
+
+# tslib
+RUN git clone https://github.com/playya/tslib-svn.git /tmp/tslib-svn && cd /tmp/tslib-svn/ \
+ && sed -i "s|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g" configure.ac \
+ && sed -i "119i\#ifdef EVIOCGRAB" plugins/input-raw.c \
+ && sed -i "124i\#endif" plugins/input-raw.c \
+ && sed -i "290i\#ifdef EVIOCGRAB" plugins/input-raw.c \
+ && sed -i "294i\#endif" plugins/input-raw.c \
+ && sed -i "s|# module_raw h3600|module_raw h3600|g" etc/ts.conf \
+ && ./autogen.sh && ./configure --prefix=$PREFIX --host=$ARCH \
+ && make && make install \
+ && rm -rf /tmp/tslib-svn/
+
+# SDL
+RUN wget -nv -c http://www.libsdl.org/release/SDL-1.2.15.tar.gz -P /tmp && cd /tmp/ \
+ && tar xzf SDL-1.2.15.tar.gz && cd SDL-1.2.15 \
+ && wget -nv -c http://tracks.yaina.de/source/sdl-fbcon-notty.patch \
+ && patch -p0 -i sdl-fbcon-notty.patch \
+ && ./configure --prefix=$PREFIX --host=$ARCH \
+ --disable-esd --disable-cdrom --disable-joystick --disable-video-x11 \
+ --disable-x11-vm --disable-dga --disable-video-x11-dgamouse \
+ --disable-video-x11-xv --disable-video-x11-xinerama --disable-video-directfb \
+ --enable-video-fbcon --disable-audio CFLAGS="$CFLAGS -DFBCON_NOTTY" \
+ && make && make install \
+ && cd test && ./configure --prefix=$PREFIX --host=$ARCH \
+ && make testvidinfo && cp testvidinfo $PREFIX/usr/bin/ \
+ && rm -rf /tmp/SDL-1.2.15 /tmp/SDL-1.2.15.tar.gz
+
+# sdl image
+RUN wget -nv -c http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz -P /tmp/ && cd /tmp/ \
+ && tar xzf SDL_image-1.2.12.tar.gz && cd SDL_image-1.2.12 \
+ && ./configure --prefix=$PREFIX --host=$ARCH && make && make install \
+ && rm -rf /tmp/SDL_image-1.2.12 /tmp/SDL_image-1.2.12.tar.gz
+
+COPY entrypoint.sh /
+CMD bash /entrypoint.sh
diff --git a/scripts/docker/tomtom/README.md b/scripts/docker/tomtom/README.md
new file mode 100644
index 000000000..badaf2707
--- /dev/null
+++ b/scripts/docker/tomtom/README.md
@@ -0,0 +1,7 @@
+This is the code used to build the image available at https://hub.docker.com/r/navit/tomtom-build-image/
+
+If you want to build and use that image locally, you can do the following:
+docker build . -t navit/tomtom-build-image
+docker run -ti -v /tmp:/output navit/tomtom-build-image /bin/bash /entrypoint.sh
+
+The resulting build will be in your /tmp/ folder.
diff --git a/scripts/docker/tomtom/entrypoint.sh b/scripts/docker/tomtom/entrypoint.sh
new file mode 100644
index 000000000..e8f7eabf3
--- /dev/null
+++ b/scripts/docker/tomtom/entrypoint.sh
@@ -0,0 +1,3 @@
+git clone https://github.com/navit-gps/navit.git
+cd navit
+bash scripts/build_tomtom_minimal.sh
diff --git a/scripts/docker/tomtom/tomtom.cache b/scripts/docker/tomtom/tomtom.cache
new file mode 100644
index 000000000..ea2cb3faf
--- /dev/null
+++ b/scripts/docker/tomtom/tomtom.cache
@@ -0,0 +1,5 @@
+glib_cv_long_long_format=ll
+glib_cv_stack_grows=no
+glib_cv_uscore=no
+ac_cv_func_posix_getgrgid_r=yes
+ac_cv_func_posix_getpwuid_r=yes
diff --git a/scripts/generate_contributors.sh b/scripts/generate_contributors.sh
new file mode 100644
index 000000000..b957d486d
--- /dev/null
+++ b/scripts/generate_contributors.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+set -e
+
+# ###########################################################################################################
+# This script generates a AUTHORS file in the current directory based on the
+# output of the git log command. It splits the contributors in 2 groups:
+# * The "active contributors" are the contributors that authored commits over the last 2 years
+# * The "retired contributors" are the contributors that have authored commits but not over the last 2 years
+# Note: it uses git's mailmap functionnality to get a clean list of users
+# ###########################################################################################################
+
+declare -A CONTRIBUTORS=()
+declare -a authors=()
+TWO_YEARS_AGO=`date +%s --date="2 years ago"`
+retiredTitleWritten=false
+
+git log --encoding=utf-8 --full-history --date=short --use-mailmap "--format=format:%ad;%aN" |
+{
+ echo "# Active contributors:" > AUTHORS
+ while read -r line; do
+ IFS=';'; arrLine=($line); unset IFS;
+ author=${arrLine[1]}
+ commitDate=`date +%s --date="${arrLine[0]}"`
+
+ # Exclude circleci
+ if [[ $author =~ [Cc]ircle\s*[Cc][Ii] ]]; then
+ continue
+ fi
+
+ # indicates that the commits are now older than 2 years so we print the
+ # sorted list of active contributors and reset the authors array
+ if [ "$retiredTitleWritten" = false ]; then
+ if [ $TWO_YEARS_AGO -ge $commitDate ]; then
+ IFS=$'\n' sorted=($(sort <<<"${authors[*]}"))
+ printf "%s\n" "${sorted[@]}" >> AUTHORS
+ authors=()
+ echo -e "\n# Retired contributors:" >> AUTHORS
+ retiredTitleWritten=true
+ fi
+ fi
+
+ # using the map as an easy way to check if the author has already been listed
+ if [ -z "${CONTRIBUTORS[${author}]}" ]; then
+ CONTRIBUTORS[${author}]=${arrLine[0]}
+ authors+=("${author}")
+ fi
+ done
+ # We are still in the subprocess scope so we can print the sorted list of
+ # retired contributors
+ IFS=$'\n' sorted=($(sort <<<"${authors[*]}"))
+ printf "%s\n" "${sorted[@]}" >> AUTHORS
+}
diff --git a/scripts/import_translations.sh b/scripts/import_translations.sh
new file mode 100644
index 000000000..6c18ffa91
--- /dev/null
+++ b/scripts/import_translations.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+set -e
+
+# Let's check if there is files in the import queue
+[ -d po/import_queue/ ] || exit 0
+
+# Let's fix the headers of the .po files in the import queue
+for i in po/import_queue/*.po; do
+ b=`basename $i`;
+ po=${b#*-};
+ code=${po%.*}
+ git checkout -b i18n/$code
+ lname=`head -n1 ${i} | sed 's/# \(.*\) translation.\{0,1\} for navit/\1/'`
+ if [[ $lname == "" ]]; then
+ echo "Cannot find the language name in the header of $i"
+ exit 1
+ fi
+ d=`date +"%Y"`
+ echo "# ${lname} translations for navit" > po/${po}.header
+ echo "# Copyright (C) 2006-${d} The Navit Team" >> po/${po}.header
+ echo "# This file is distributed under the same license as the navit package." >> po/${po}.header
+ echo "# Many thanks to the contributors of this translation:" >> po/${po}.header
+ # Build a clean list of the contributors
+ IFS=$'\n'
+ echo "Downloading https://translations.launchpad.net/navit/trunk/+pots/navit/${code}/+details"
+ contributors=`wget -q https://translations.launchpad.net/navit/trunk/+pots/navit/${code}/+details -O - | egrep '^ <a href=".+?" class="sprite person">'`
+ for user in $contributors; do
+ url=`echo $user|cut -d'"' -f2`
+ name=`echo $user|cut -d'>' -f2|cut -d'<' -f1`
+ echo "# $name $url" >> po/${po}.header
+ done
+ echo '' >> po/${po}.header
+ echo 'msgid ""' >> po/${po}.header
+
+ # We remove two tags that just generate noise
+ sed -i '/X-Launchpad-Export-Date/d' ${i}
+ sed -i '/X-Generator/d' ${i}
+ sed -i '/POT-Creation-Date/d' ${i}
+
+ # Let's put the translation from launchpad without the header
+ mv po/${po}.header po/${po}.in
+ sed '1,/msgid ""/ d' ${i} >> po/${po}.in
+
+ git add po/${po}.in && rm $i
+ git commit -m "Updated ${lname} translation from launchpad" po/${po}.in
+ git push --set-upstream origin i18n/${code}
+done
diff --git a/scripts/merge_i18n_update.sh b/scripts/merge_i18n_update.sh
new file mode 100644
index 000000000..5fb42d56e
--- /dev/null
+++ b/scripts/merge_i18n_update.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+message=`git log -1 --pretty=%B`
+git config --global user.name "CircleCI"
+git config --global user.email circleci@navit-project.org
+git rebase trunk
+git checkout trunk
+git pull
+git merge --squash ${CIRCLE_BRANCH}
+git commit -m "${message}"
+git push
diff --git a/scripts/pointer-64.png b/scripts/pointer-64.png
new file mode 100644
index 000000000..904f6878d
--- /dev/null
+++ b/scripts/pointer-64.png
Binary files differ
diff --git a/scripts/publish.sh b/scripts/publish.sh
new file mode 100644
index 000000000..17b5fbf18
--- /dev/null
+++ b/scripts/publish.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+if [ -z $CI ];then
+ echo "This Script needs to be run by CI"
+fi
+if [ -z $CIRCLECI ];then
+ echo "This Script needs to be run on CircleCI"
+fi
+if [[ "${CIRCLE_PROJECT_USERNAME}" != "navit-gps" || "${CIRCLE_BRANCH}" != "trunk" ]]; then
+ echo "Only trunk on navit-gps may upload to the Play Store"
+ exit 0
+fi
+
+set -e
+
+ARCH="arm"
+BINPATH="android-arm/navit/android/bin"
+
+export PATH="/opt/android-sdk-linux/build-tools/25.0.1/":$PATH
+
+cd ~/
+git clone git@github.com:navit-gps/infrastructure-blackbox.git
+cd infrastructure-blackbox/keyrings/
+openssl aes-256-cbc -d -in keystore.gpg -k $KEY > ~/.keystore
+openssl aes-256-cbc -d -in client_secrets.gpg -k $KEY > /root/project/scripts/client_secrets.json
+openssl aes-256-cbc -d -in androidpublisher.gpg -k $KEY > /root/project/androidpublisher.dat
+cd ~/project
+
+pip install google-api-python-client
+
+jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -storepass $SP $BINPATH/navit-$CIRCLE_SHA1-${ARCH}-release-unsigned.apk $key_name
+
+zipalign 4 $BINPATH/navit-$CIRCLE_SHA1-${ARCH}-release-unsigned.apk $BINPATH/navit-$CIRCLE_SHA1-${ARCH}-release-signed.apk
+apksigner verify -v $BINPATH/navit-$CIRCLE_SHA1-${ARCH}-release-signed.apk
+python ~/project/scripts/basic_upload_apks.py org.navitproject.navit $BINPATH/navit-$CIRCLE_SHA1-${ARCH}-release-signed.apk --noauth_local_webserver
diff --git a/scripts/run_linux_tests.sh b/scripts/run_linux_tests.sh
new file mode 100644
index 000000000..ff91bed6b
--- /dev/null
+++ b/scripts/run_linux_tests.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+linux_test () {
+ # create logs dir
+ mkdir $CIRCLE_ARTIFACTS/logs_${1}
+
+ #run instance of navit and remember pid
+ ./navit >$CIRCLE_ARTIFACTS/logs_${1}/stdout.txt 2>$CIRCLE_ARTIFACTS/logs_${1}/stderr.txt &
+ pid=$!
+
+ # give navit time to come up
+ sleep 5
+
+ # screen shot root window
+ import -window root $CIRCLE_ARTIFACTS/logs_${1}/default.png
+
+ # run tests on X11
+ bash ~/navit/scripts/xdotools.sh ${1}
+
+ # python ~/navit/scripts/dbus_tests.py $CIRCLE_TEST_REPORTS/
+ # dbus-send --print-reply --session --dest=org.navit_project.navit /org/navit_project/navit/default_navit org.navit_project.navit.navit.quit
+
+ # kill navit instance
+ kill $pid
+}
+
+set -e
+
+pushd ~/linux-bin/navit/
+
+# prepare environment by getting a map of berkley
+cat > maps/berkeley.xml << EOF
+<map type="binfile" data="\$NAVIT_SHAREDIR/maps/berkeley.bin" />
+EOF
+wget http://sd-55475.dedibox.fr/berkeley.bin -O maps/berkeley.bin
+
+# back up config
+cp navit.xml navit.xml.bak
+
+# run gtk test
+sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml
+sed -i -e 's@name="Demo" profilename="car" enabled="no" @name="Demo" profilename="car" enabled="yes" follow="1" refresh="1"@' navit.xml
+sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml
+sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml
+linux_test gtk_drawing_area
+
+# restore config
+cp navit.xml.bak navit.xml
+# run qt5 qwidget test
+sed -i -e 's@graphics type="gtk_drawing_area"@graphics type="qt5" w="792" h="547" qt5_widget="qwidget"@' navit.xml
+sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml
+sed -i -e 's@name="Demo" profilename="car" enabled="no" @name="Demo" profilename="car" enabled="yes" follow="1" refresh="1"@' navit.xml
+sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml
+sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml
+linux_test qt5_widget
+
+# restore config
+cp navit.xml.bak navit.xml
+# run qt5 qml test
+sed -i -e 's@graphics type="gtk_drawing_area"@graphics type="qt5" w="792" h="547" qt5_widget="qml"@' navit.xml
+sed -i -e 's@name="Local GPS" profilename="car" enabled="yes" active="1"@name="Local GPS" profilename="car" enabled="no" active="0"@' navit.xml
+sed -i -e 's@name="Demo" profilename="car" enabled="no" @name="Demo" profilename="car" enabled="yes" follow="1" refresh="1"@' navit.xml
+sed -i -e 's@type="internal" enabled@type="internal" fullscreen="1" font_size="350" enabled@' navit.xml
+sed -i -e 's@libbinding_dbus.so" active="no"@libbinding_dbus.so" active="yes"@' navit.xml
+linux_test qt5_qml
+
diff --git a/scripts/setup_android.sh b/scripts/setup_android.sh
new file mode 100644
index 000000000..fee29613b
--- /dev/null
+++ b/scripts/setup_android.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -e
+
+apt-get update && apt-get install -y software-properties-common
+add-apt-repository -y ppa:openjdk-r/ppa
+apt-get update && apt-get install -y openjdk-8-jdk wget expect curl libsaxonb-java ant ca-certificates python-pip
+apt-get remove -y openjdk-7-jre-headless
+
+export ANDROID_SDK_HOME=/opt/android-sdk-linux
+export ANDROID_HOME=/opt/android-sdk-linux
+
+cd /opt && wget -q https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz -O android-sdk.tgz
+cd /opt && tar -xvzf android-sdk.tgz --no-same-owner
+cd /opt && rm -f android-sdk.tgz
+
+export PATH=${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools:/opt/tools
+
+echo y | android update sdk --no-ui --all --filter platform-tools | grep 'package installed'
+
+# This is only an workaround to make sure the platform tools are installed
+if [ ! -d ${ANDROID_SDK_HOME}/platform-tools ] && [ -f ${ANDROID_SDK_HOME}/temp/platform-tools_r26.0.2-linux.zip ]; then
+ if [ "$(md5sum ${ANDROID_SDK_HOME}/temp/platform-tools_r26.0.2-linux.zip | cut -d" " -f1)" == "ef952bb31497f7535e061ad0e712bed8" ]; then
+ cd ${ANDROID_SDK_HOME} && unzip ${ANDROID_SDK_HOME}/temp/platform-tools_r26.0.2-linux.zip
+ fi
+fi
+
+#RUN echo y | android update sdk --no-ui --all --filter extra-android-support | grep 'package installed'
+
+echo y | android update sdk --no-ui --all --filter android-25 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter android-24 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter android-23 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter android-18 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter android-16 | grep 'package installed'
+
+echo y | android update sdk --no-ui --all --filter build-tools-25.0.3 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-25.0.2 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-25.0.1 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-25.0.0 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-24.0.3 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-24.0.2 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-24.0.1 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-23.0.3 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-23.0.2 | grep 'package installed'
+echo y | android update sdk --no-ui --all --filter build-tools-23.0.1 | grep 'package installed'
+
diff --git a/scripts/setup_common_requirements.sh b/scripts/setup_common_requirements.sh
new file mode 100644
index 000000000..6343194bb
--- /dev/null
+++ b/scripts/setup_common_requirements.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+
+apt-get update && apt-get install -y wget unzip cmake build-essential gettext librsvg2-bin util-linux git ssh
diff --git a/scripts/setup_tomtom_requirements.sh b/scripts/setup_tomtom_requirements.sh
new file mode 100644
index 000000000..98d6de3cd
--- /dev/null
+++ b/scripts/setup_tomtom_requirements.sh
@@ -0,0 +1,167 @@
+#!/bin/sh
+# this builds navit for tomtom
+
+set -e
+
+# install additional packages to build TT evitonment and navit
+apt-get install -y libglib2.0-dev git autogen autoconf libtool zip
+dpkg --add-architecture i386
+apt-get update
+apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386
+
+#remove disturbing build artefact for second run
+rm -f /opt/tomtom-sdk/gcc-3.3.4_glibc-2.3.2/arm-linux/sys-root/bin//glib-genmarshal
+
+export ARCH=arm-linux
+cp Toolchain/$ARCH.cmake /tmp
+
+# toolchain
+export TOMTOM_SDK_DIR=/opt/tomtom-sdk
+mkdir -p $TOMTOM_SDK_DIR >/dev/null 2>&1 || export TOMTOM_SDK_DIR=$HOME/tomtom-sdk
+export PREFIX=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/$ARCH/sys-root
+export PATH=$TOMTOM_SDK_DIR/gcc-3.3.4_glibc-2.3.2/bin:$PREFIX/bin/:$PATH
+export CFLAGS="-O2 -I$PREFIX/include -I$PREFIX/usr/include"
+export CPPFLAGS="-I$PREFIX/include -I$PREFIX/usr/include"
+export LDFLAGS="-L$PREFIX/lib -L$PREFIX/usr/lib"
+export CC=$ARCH-gcc
+export CXX=$ARCH-g++
+export LD=$ARCH-ld
+export NM="$ARCH-nm -B"
+export AR=$ARCH-ar
+export RANLIB=$ARCH-ranlib
+export STRIP=$ARCH-strip
+export OBJCOPY=$ARCH-objcopy
+export LN_S="ln -s"
+export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig
+JOBS=$(nproc --all)
+
+echo "Jobs"
+echo $JOBS
+
+mkdir -p ~/tomtom_assets
+
+if ! [ -e "~/tomtom_assets/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz" ]
+ then
+ wget -nv -c https://github.com/navit-gps/dependencies/raw/master/tomtom/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -P ~/tomtom_assets
+fi
+
+if ! test -f "~/tomtom_assets/libpng-1.6.29.tar.gz"
+then
+ wget -nv -c https://github.com/navit-gps/dependencies/raw/master/tomtom/libpng-1.6.29.tar.gz -P ~/tomtom_assets
+fi
+
+# toolchain
+cd /tmp
+mkdir -p $TOMTOM_SDK_DIR
+tar xzf ~/tomtom_assets/toolchain_redhat_gcc-3.3.4_glibc-2.3.2-20060131a.tar.gz -C $TOMTOM_SDK_DIR
+
+
+# zlib
+cd /tmp
+wget -nv -c http://zlib.net/zlib-1.2.11.tar.gz
+tar xzf zlib-1.2.11.tar.gz
+cd zlib-1.2.11
+./configure --prefix=$PREFIX
+make -j$JOBS
+make install
+
+# libxml
+cd /tmp/
+wget -nv -c http://xmlsoft.org/sources/libxml2-2.7.8.tar.gz
+tar xzf libxml2-2.7.8.tar.gz
+cd libxml2-2.7.8/
+./configure --prefix=$PREFIX --host=$ARCH --without-python
+make -j$JOBS
+make install
+
+# libpng
+cd /tmp/
+tar xzf ~/tomtom_assets/libpng-1.6.29.tar.gz
+cd libpng-1.6.29/
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+
+cd /tmp
+wget -nv -c http://download.savannah.gnu.org/releases/freetype/freetype-2.5.0.tar.gz
+tar xzf freetype-2.5.0.tar.gz
+cd freetype-2.5.0
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+freetype-config --cflags
+
+# glib
+cd /tmp
+wget -nv -c http://ftp.gnome.org/pub/gnome/sources/glib/2.25/glib-2.25.17.tar.gz
+tar xzf glib-2.25.17.tar.gz
+cd glib-2.25.17
+cat > tomtom.cache << EOF
+glib_cv_long_long_format=ll
+glib_cv_stack_grows=no
+glib_cv_uscore=no
+ac_cv_func_posix_getgrgid_r=yes
+ac_cv_func_posix_getpwuid_r=yes
+EOF
+chmod a-w tomtom.cache
+./configure --prefix=$PREFIX --host=$ARCH --cache-file=tomtom.cache
+sed -i "s|cp xgen-gmc gmarshal.c |cp xgen-gmc gmarshal.c \&\& sed -i \"s\|g_value_get_schar\|g_value_get_char\|g\" gmarshal.c |g" gobject/Makefile
+make -j$JOBS
+make install
+
+
+# tslib
+cd /tmp
+rm -rf tslib-svn
+git clone https://github.com/playya/tslib-svn.git
+cd tslib-svn
+sed -i "s|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g" configure.ac
+sed -i "119i\#ifdef EVIOCGRAB" plugins/input-raw.c
+sed -i "124i\#endif" plugins/input-raw.c
+sed -i "290i\#ifdef EVIOCGRAB" plugins/input-raw.c
+sed -i "294i\#endif" plugins/input-raw.c
+sed -i "s|# module_raw h3600|module_raw h3600|g" etc/ts.conf # tomtom go 710
+./autogen.sh
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+
+cd /tmp
+wget -nv -c http://www.libsdl.org/release/SDL-1.2.15.tar.gz
+tar xzf SDL-1.2.15.tar.gz
+cd SDL-1.2.15
+wget -nv -c http://tracks.yaina.de/source/sdl-fbcon-notty.patch
+patch -p0 -i sdl-fbcon-notty.patch
+./configure --prefix=$PREFIX --host=$ARCH \
+ --disable-esd --disable-cdrom --disable-joystick --disable-video-x11 \
+ --disable-x11-vm --disable-dga --disable-video-x11-dgamouse \
+ --disable-video-x11-xv --disable-video-x11-xinerama --disable-video-directfb \
+ --enable-video-fbcon --disable-audio CFLAGS="$CFLAGS -DFBCON_NOTTY"
+make -j$JOBS
+make install
+
+# sdl test utilities
+cd test
+./configure --prefix=$PREFIX --host=$ARCH
+make testvidinfo
+cp testvidinfo $PREFIX/usr/bin/
+
+# to find sdl-config
+export PATH=$PREFIX/bin:$PATH
+
+# sdl image
+cd /tmp
+wget -nv -c http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
+tar xzf SDL_image-1.2.12.tar.gz
+cd SDL_image-1.2.12
+./configure --prefix=$PREFIX --host=$ARCH
+make -j$JOBS
+make install
+
+
+# in the end we only want Navit locale
+rm -r $PREFIX/share/locale
+
diff --git a/scripts/setup_wince.sh b/scripts/setup_wince.sh
new file mode 100644
index 000000000..0169c447c
--- /dev/null
+++ b/scripts/setup_wince.sh
@@ -0,0 +1,6 @@
+#/bin/bash
+set -e
+
+mkdir -p /var/lib/apt/lists/partial
+apt-get update
+apt-get install -y git-core
diff --git a/scripts/update_download_center.sh b/scripts/update_download_center.sh
new file mode 100644
index 000000000..34d4a95de
--- /dev/null
+++ b/scripts/update_download_center.sh
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+
+#############################################
+############# Functions #############
+#############################################
+
+cleanup(){
+ if [ -d $TMP_DIR ]; then
+ rm -rf $TMP_DIR
+ fi
+}
+
+#############################################
+############# Functions END #############
+#############################################
+
+echo "Check the requirements"
+
+if [ -z $CI ];then
+ echo "This Script needs to be run by CI"
+fi
+if [ -z $CIRCLECI ];then
+ echo "This Script needs to be run on CircleCI"
+fi
+if [[ "${CIRCLE_PROJECT_USERNAME}" != "navit-gps" || "${CIRCLE_BRANCH}" != "trunk" ]]; then
+ echo "Only trunk on navit-gps may upload to the Download Center"
+ exit 0
+fi
+
+#############################################
+
+echo "Setting up all Variables"
+
+UUID=${RANDOM}-${RANDOM}-${RANDOM}-${RANDOM}
+TMP_DIR=$(mktemp -d)
+CIRCLECI_API_BASE="https://circleci.com/api/v1.1/"
+NAVIT_DOWNLOAD_CENTER_REPO="git@github.com:navit-gps/download-center"
+
+# To keep it generic
+CVS_TYPE="github"
+REPONAME=$CIRCLE_PROJECT_REPONAME
+USERNAME=$CIRCLE_PROJECT_USERNAME
+BUILD_NUM=$CIRCLE_BUILD_NUM
+JOB_NAME=$CIRCLE_JOB
+
+# Build all api urls
+URL_BUILD_ARTIFACTS="${CIRCLECI_API_BASE}project/${CVS_TYPE}/${USERNAME}/${REPONAME}/${BUILD_NUM}/artifacts"
+echo "Artifact URL: $URL_BUILD_ARTIFACTS"
+
+#############################################
+
+echo "Setup trap for cleanup"
+trap cleanup EXIT
+
+#############################################
+
+echo "Init Git Repo"
+export GIT_TERMINAL_PROMPT=0
+cd $TMP_DIR
+mkdir -p ~/.ssh/
+ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
+git clone $NAVIT_DOWNLOAD_CENTER_REPO $UUID
+if [ ! -d $UUID/_data/$JOB_NAME ]; then
+ mkdir -p $UUID/_data/$JOB_NAME
+fi
+cd $UUID/_data/$JOB_NAME
+
+#############################################
+
+echo "Download metadata of this build"
+wget --no-check-certificate $URL_BUILD_ARTIFACTS -O ${BUILD_NUM}.json
+RC=$?
+if [ $RC -ne 0 ]; then
+ echo "wget artifacts download failed"
+ exit 1
+fi
+
+#############################################
+
+echo "Push update to ${NAVIT_DOWNLOAD_CENTER_REPO}"
+git config --global push.default simple
+git config user.name "Circle CI"
+git config user.email "circleci@navit-project.org"
+git add ${BUILD_NUM}.json
+git commit -m "add:artifacts:Add artifacts for build #${BUILD_NUM} with SHA1:${CIRCLE_SHA1}"
+git push
+RC=$?
+if [ $RC -ne 0 ]; then
+ exit 0
+else
+ echo "Push to ${NAVIT_DOWNLOAD_CENTER_REPO} was not successful update repo and try again..."
+ for NUM in {1..10}; do
+ echo "Retry #${NUM} to push to github"
+ git pull
+ git push
+ RC=$?
+ if [ $RC -eq 0 ]; then
+ exit 0
+ fi
+ sleep $(($RANDOM%5)) # sleep between 1 and 5 seconds
+ done
+fi
+
+echo "Failed to push to github"
+exit 100
diff --git a/scripts/update_doxygen.sh b/scripts/update_doxygen.sh
new file mode 100644
index 000000000..7a76f1fd1
--- /dev/null
+++ b/scripts/update_doxygen.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+mkdir -p ~/.ssh/
+ssh-keyscan github.com >> ~/.ssh/known_hosts
+git clone -b gh-pages git@github.com:navit-gps/navit.git /root/navit-doc
+cd /root/navit-doc
+git config --global push.default simple
+git config user.name "Circle CI"
+git config user.email "circleci@navit-project.org"
+rsync -vrtza --exclude '.git' --delete /root/project/doc/html/ /root/navit-doc/
+echo "" > .nojekyll
+echo "doxygen.navit-project.org" > CNAME
+git add .
+git commit -am "update:doc:Doxygen update for commit ${CIRCLE_SHA1} [ci skip]" || true
+git push
diff --git a/scripts/xdotools.sh b/scripts/xdotools.sh
new file mode 100644
index 000000000..a8fc6dea3
--- /dev/null
+++ b/scripts/xdotools.sh
@@ -0,0 +1,99 @@
+#!/bin/sh
+set -e
+sudo apt-get install xdotool
+# Use xinput test 4 when running x11vnc on the circleci server to find mouse coordinates
+
+FRAME_DIR=$CIRCLE_ARTIFACTS/logs_${1}/frames
+LOGS_DIR=$CIRCLE_ARTIFACTS/logs_${1}
+
+[ -d $FRAME_DIR/ ] || mkdir $FRAME_DIR/
+
+event=0
+
+send_event (){
+ file=`printf "%05d\n" $event`
+
+ import -window root $FRAME_DIR/tmp.png
+ if [[ "$1" == "mousemove" ]]; then
+ composite -gravity NorthWest -geometry +$2+$3 ~/navit/scripts/pointer-64.png $FRAME_DIR/tmp.png $FRAME_DIR/${file}.png
+ else
+ mv $FRAME_DIR/tmp.png $FRAME_DIR/${file}.png
+ fi
+ event=$((event+1))
+ xdotool $@
+ sleep 1
+}
+
+
+# Center the view
+send_event key KP_Enter # Open main menu
+send_event key Down # Select 'Actions'
+send_event key KP_Enter # Validate
+send_event key Down # Scroll to 'Bookmarks'
+send_event key Right # Scroll to 'Former destinations'
+send_event key Right # Select 'Town'
+send_event key KP_Enter # Validate
+# Send 'Berk'
+send_event key b
+send_event key e
+send_event key r
+send_event key k
+send_event key Down # Highlight search area
+send_event key Down # Highlight first result
+send_event key KP_Enter # Validate
+
+# Set the position
+send_event mousemove 482 318 click 1 # Open main menu, clicking on a somewhat random position on the map
+send_event key Down # Select 'Actions'
+send_event key KP_Enter # Validate
+send_event key Down # Scroll to 'Bookmarks'
+send_event key Right # Scroll to 'Former destinations'
+send_event key Right # Select current coordinates
+send_event key KP_Enter # Validate
+
+# Set a destination
+send_event key KP_Enter # Open main menu
+send_event key Down # Select 'Actions'
+send_event key KP_Enter # Validate
+send_event key Down # Scroll to 'Bookmarks'
+send_event key Right # Scroll to 'Former destinations'
+send_event key Right # Select 'Town'
+send_event key KP_Enter # Validate
+# Send 'oakl'
+send_event key o
+send_event key a
+send_event key k
+send_event key l
+send_event key Down # Highlight search area
+send_event key Down # Highlight first result
+send_event key KP_Enter # Validate
+
+# Switch to 3d view
+send_event key KP_Enter # Open main menu
+send_event key Down # Select 'Actions'
+send_event key Right # Select 'Settings'
+send_event key KP_Enter # Validate
+send_event key Down # Select 'Display'
+send_event key KP_Enter # Validate
+send_event key Down # Scroll to 'Layout'
+send_event key Right # Scroll to 'Fullscreen'
+send_event key Right # Select '3d'
+send_event key KP_Enter # Validate
+# Send 'Berk'
+
+# capture 5 seconds of usage
+for i in `seq 99994 99999`; do
+ import -window root $FRAME_DIR/${i}.png
+ sleep 1
+done
+
+# Quit
+send_event key KP_Enter # Open main menu
+send_event key Down # Select 'Actions'
+send_event key Down # Select 'Route'
+send_event key Right # Select 'About'
+send_event key Right # Select 'Quit'
+send_event key KP_Enter # Validate
+
+# Assemble the gif
+convert -delay 100 -loop 0 $FRAME_DIR/*.png $LOGS_DIR/town_search.gif