diff options
author | mvglasow <michael -at- vonglasow.com> | 2021-02-06 23:17:16 +0200 |
---|---|---|
committer | jkoan <jkoan@users.noreply.github.com> | 2021-02-21 11:38:50 +0100 |
commit | d98dfad72ce0d591921f1040d6e2519cdcf42673 (patch) | |
tree | db38aeee92a9b5b9dca8cb7cc6b5f4ce94fe2864 /scripts | |
parent | eb8bf6dc4a4318621af2586ce0bb6b8d92d91933 (diff) | |
download | navit-d98dfad72ce0d591921f1040d6e2519cdcf42673.tar.gz |
Fix:build:Reduce source tree pollution by Android build
CMake output now moved to android-builddir
Generated XML, PNG and translations still get written to source tree
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_android.sh | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/scripts/build_android.sh b/scripts/build_android.sh index 836ead59b..e4065531e 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 ../../../navit/android/res/drawable-nodpi +mkdir ../../../navit/android/res/drawable-nodpi +cp ./*.png ../../../navit/android/res/drawable-nodpi +pushd ../../../navit/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 ../../navit/android/res/raw +mkdir ../../navit/android/res/raw +cp ./*.mo ../../navit/android/res/raw +pushd ../../navit/android/res/raw rename -f 'y/A-Z/a-z/' ./*.mo popd popd @@ -56,10 +61,13 @@ popd echo Process xml config files make navit_config_xml || exit 96 -pushd navit +pushd ../navit rm -rf ./android/assets mkdir -p ./android/assets -cp -R config ./android/assets/ +cp -R ../$BUILD_PATH/navit/config ./android/assets/ +popd + +#run gradle from root dir, not $BUILD_PATH popd echo Chmod permissions |