From fa325aeca0769536a7f8b4bbe7731543bf87e405 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 22 Dec 2018 09:13:20 -0800 Subject: Android: allow running android-build-wrapper without building This way we can use it to fetch dependencies we need up front. Signed-off-by: Dirk Hohndel --- packaging/android/android-build-wrapper.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packaging/android/android-build-wrapper.sh b/packaging/android/android-build-wrapper.sh index 999cca221..65ea17198 100755 --- a/packaging/android/android-build-wrapper.sh +++ b/packaging/android/android-build-wrapper.sh @@ -17,6 +17,23 @@ exec 1> >(tee ./build.log) 2>&1 USE_X=$(case $- in *x*) echo "-x" ;; esac) +# deal with the command line arguments +while [[ $# -gt 0 ]] ; do + arg="$1" + case $arg in + -prep-only) + # only download the dependencies, don't build + PREP_ONLY="1" + ;; + *) + echo "Unknown command line argument $arg" + echo "Usage: $0 [-prep-only]" + exit 1 + ;; + esac + shift +done + # these are the current versions for Qt, Android SDK & NDK: source subsurface/packaging/android/variables.sh @@ -111,6 +128,10 @@ fi # patch the cmake / Qt5.7.1 incompatibility mentioned above sed -i 's/set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)/# set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)/' Qt/"${LATEST_QT}"/android_armv7/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake +if [ ! -z $PREP_ONLY ] ; then + exit 0 +fi + if [ ! -d subsurface/libdivecomputer/src ] ; then pushd subsurface git submodule init -- cgit v1.2.3-70-g09d2