VER_LIBUSB=1.0.19
VER_PYTHON=3.3.3
VER_BOOST=1.57.0
-VER_QT=5.3.1
+VER_QT=5.4.1
VER_NDK=10d
VER_SDK=23.0.2
+VER_AND_BT=22.0.1 # android build tools version
+VER_AND_API=16 # target android API version
SF_MIRROR=download.sourceforge.net
$WGET http://dl.google.com/android/android-sdk_r$VER_SDK-linux.tgz
tar xfz android-sdk_r$VER_SDK-linux.tgz
cd android-sdk-linux
- ./tools/android update sdk --no-ui --filter platform-tools,build-tools-21.1.2,android-8,android-10,android-11,android-14,android-16
+ ./tools/android update sdk --no-ui --filter platform-tools,build-tools-$VER_AND_BT,android-$VER_AND_API
cd ..
exit
SYSROOT=
else
STANDALONE_TOOLCHAIN=
- NATIVE_API_LEVEL=16
+ NATIVE_API_LEVEL=$VER_AND_API
SYSROOT_DIR=${ANDROID_NDK}/platforms/android-${NATIVE_API_LEVEL}/arch-${TARGET_ARCH%eabi*}
if [ ! -d "$SYSROOT_DIR" ]; then
echo >&2 "Can't build with NDK toolchain; sysroot $SYSROOT_DIR is missing"
exit 0
fi
-if [ -z "$ANDROID_SDK" -o \
- ! -d "$ANDROID_SDK"/platforms/android-8 -o \
- ! -d "$ANDROID_SDK"/platforms/android-10 -o \
- ! -d "$ANDROID_SDK"/platforms/android-11 -o \
- ! -d "$ANDROID_SDK"/platforms/android-14 -o \
- ! -d "$ANDROID_SDK"/platforms/android-16 ]; then
- echo "Android SDK with platforms 8 10 11 14 16 not available, not building PulseView."
+if [ -z "$ANDROID_SDK" -o ! -d "$ANDROID_SDK"/platforms/android-$VER_AND_API ]; then
+ echo "Android SDK with platform $VER_AND_API not available, not building PulseView."
exit 0
fi
tar xfz qt-everywhere-opensource-src-${VER_QT}.tar.gz
cd qt-everywhere-opensource-src-${VER_QT}
patch -p1 < ../../android-qt.patch
-CC= CXX= ./configure --prefix="$PREFIX" -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-sdk "$ANDROID_SDK" -android-ndk "$ANDROID_NDK" -android-ndk-host "$NDK_HOST" -android-arch "$TARGET_ARCH" -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtlocation -skip qtconnectivity -opensource -confirm-license -silent
+CC= CXX= ./configure \
+ --prefix="$PREFIX" \
+ -developer-build \
+ -xplatform android-g++ \
+ -nomake tests \
+ -nomake examples \
+ -android-sdk "$ANDROID_SDK" \
+ -android-ndk "$ANDROID_NDK" \
+ -android-ndk-host "$NDK_HOST" \
+ -android-arch "$TARGET_ARCH" \
+ -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" \
+ -skip qttranslations \
+ -skip qtwebkit \
+ -skip qtserialport \
+ -skip qtwebkit-examples \
+ -skip qtlocation \
+ -skip qtconnectivity \
+ -opensource -confirm-license -silent
+export ANDROID_API_VERSION=android-$VER_AND_API
+export ANDROID_BUILD_TOOLS_REVISION=$VER_AND_BT
make module-qtbase module-qtandroidextras module-qtsvg module-qtimageformats $PARALLEL $V
make install $V
cd ..
$GIT_CLONE git://sigrok.org/sigrok-androidutils
cd sigrok-androidutils
./autogen.sh
-./configure $C --with-android-sdk="${ANDROID_SDK}"
+./configure $C --with-android-sdk="${ANDROID_SDK}" --with-android-platform=android-$VER_AND_API
make $PARALLEL $V
make install $V
cd ..
make install $V
${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so
cd android
-"${ANDROID_SDK}/tools/android" update project -p . -t android-14 -n PulseView
+"${ANDROID_SDK}/tools/android" update project -p . -t android-$VER_AND_API -n PulseView
ant debug
cd ../..
-