summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_android.sh30
-rwxr-xr-xscripts/setup_publish_keys.sh7
2 files changed, 21 insertions, 16 deletions
diff --git a/scripts/build_android.sh b/scripts/build_android.sh
index 836ead59b..4c2ba02bd 100755
--- a/scripts/build_android.sh
+++ b/scripts/build_android.sh
@@ -22,21 +22,26 @@ export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
export JVM_OPTS="-Xmx3200m"
export GRADLE_OPTS='-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
+BUILD_PATH="android-builddir"
+
+[ -d $BUILD_PATH ] || mkdir -p $BUILD_PATH
+pushd $BUILD_PATH
+
# processing xml is messed up a bit after the original introduction of gradle
# so require a useless install of ant here even if using gradle/ninja
echo Run CMake
test -z "$PKG_CONFIG_LIBDIR" && export PKG_CONFIG_LIBDIR="" # Force cmake below to run ignore build host libraries when using pkgconfig.
# Note: If you want to compile against specific target libraries that are searched using pkgconfig, please run this script with variable PKG_CONFIG_LIBDIR set to the appropriate path
-cmake ./ -Dvehicle/gpsd_dbus:BOOL=FALSE -Dsvg2png_scaling:STRING=-1,24,32,48,64,96,128,192,256 -Dsvg2png_scaling_nav:STRING=-1,24,32,48,64,96,128,192,256 -Dsvg2png_scaling_flag:STRING=-1,24,32,64,96 -DXSL_PROCESSING=y -DXSLTS=android -DANDROID=y -DDISABLE_CXX=y || exit 1
+cmake ../ -Dvehicle/gpsd_dbus:BOOL=FALSE -Dsvg2png_scaling:STRING=-1,24,32,48,64,96,128,192,256 -Dsvg2png_scaling_nav:STRING=-1,24,32,48,64,96,128,192,256 -Dsvg2png_scaling_flag:STRING=-1,24,32,64,96 -DXSL_PROCESSING=y -DXSLTS=android -DANDROID=y -DDISABLE_CXX=y || exit 1
echo Process icons
pushd navit/icons
make || exit 32
-rm -rf ../android/res/drawable-nodpi
-mkdir ../android/res/drawable-nodpi
-cp ./*.png ../android/res/drawable-nodpi
-pushd ../android/res/drawable-nodpi
+rm -rf ../../android/res/drawable-nodpi
+mkdir -p ../../android/res/drawable-nodpi
+cp ./*.png ../../android/res/drawable-nodpi
+pushd ../../android/res/drawable-nodpi
rename -f 'y/A-Z/a-z/' ./*.png
popd
popd
@@ -44,10 +49,10 @@ popd
echo Process translations
pushd po
make || exit 64
-rm -rf ../navit/android/res/raw
-mkdir ../navit/android/res/raw
-cp ./*.mo ../navit/android/res/raw
-pushd ../navit/android/res/raw
+rm -rf ../android/res/raw
+mkdir -p ../android/res/raw
+cp ./*.mo ../android/res/raw
+pushd ../android/res/raw
rename -f 'y/A-Z/a-z/' ./*.mo
popd
popd
@@ -56,10 +61,11 @@ popd
echo Process xml config files
make navit_config_xml || exit 96
-pushd navit
rm -rf ./android/assets
mkdir -p ./android/assets
-cp -R config ./android/assets/
+cp -R ./navit/config ./android/assets/
+
+#run gradle from root dir, not $BUILD_PATH
popd
echo Chmod permissions
@@ -72,6 +78,6 @@ echo Build
./gradlew assembleDebug || exit 128
echo Build finished.
-echo APK should be in "navit/android/build/outputs/apk" and can be installed with
+echo APK should be in "build/outputs/apk" and can be installed with
echo ./gradlew installDebug
diff --git a/scripts/setup_publish_keys.sh b/scripts/setup_publish_keys.sh
index 2b1331d8e..b363d9d32 100755
--- a/scripts/setup_publish_keys.sh
+++ b/scripts/setup_publish_keys.sh
@@ -7,8 +7,7 @@ if [[ -n $GOOGLE_KEY ]]; then
fi
if [[ -n $KEY ]]; then
wget "https://github.com/navit-gps/infrastructure-blackbox/raw/master/keyrings/keystore.gpg"
- openssl aes-256-cbc -d -in keystore.gpg -md md5 -k $KEY > ~/.keystore
- keytool -importkeystore -srcstorepass "$STORE_PASS" -deststorepass "$STORE_PASS" -srckeystore ~/.keystore -destkeystore ~/.keystore -deststoretype pkcs12
- keytool -keypasswd -alias $KEY_ALIAS -storepass $STORE_PASS -new $KEY_PASS -keystore ~/.keystore
- rm keystore.gpg
+ openssl aes-256-cbc -d -in keystore.gpg -md md5 -k $KEY > keystore
+ keytool -importkeystore -srcstorepass "$STORE_PASS" -deststorepass "$STORE_PASS" -srckeystore keystore -destkeystore ~/.keystore -deststoretype pkcs12
+ rm keystore.gpg keystore
fi