aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/compile_androidviper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/compile_androidviper.sh')
-rwxr-xr-xscripts/compile_androidviper.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/compile_androidviper.sh b/scripts/compile_androidviper.sh
new file mode 100755
index 00000000..215fecee
--- /dev/null
+++ b/scripts/compile_androidviper.sh
@@ -0,0 +1,40 @@
+ #############################################################################
+ # Copyright (c) 2017 Cisco and/or its affiliates.
+ # 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.
+ ##############################################################################
+
+#!/bin/bash
+
+export ANDROID_HOME=${SDK}
+export ANDROID_NDK_HOST=${OS}-${ARCH}
+export ANDROID_NDK_PLATFORM=android-23
+export ANDROID_NDK_ROOT=${NDK}
+export ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabi
+export ANDROID_NDK_TOOLCHAIN_VERSION=4.9
+export ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi
+export ANDROID_SDK_ROOT=${SDK}
+export ANDROID_API_VERSION=android-23
+export PATH=$PATH:${ANDROID_HOME}/tools:${JAVA_HOME}/bin
+echo $QT_HOME
+cd ${DISTILLERY_ROOT_DIR}
+mkdir -p ${DISTILLERY_BUILD_DIR}/viper
+cd ${DISTILLERY_BUILD_DIR}/viper
+${QT_HOME}/5.7/android_${ANDROID_ARCH}/bin/qmake -r -spec android-g++ ${DISTILLERY_ROOT_DIR}/src/viper/viper.pro
+make
+make install INSTALL_ROOT=viper-${ANDROID_ARCH}
+if [ "$1" == "DEBUG" ]; then
+ ${QT_HOME}/5.7/android_${ANDROID_ARCH}/bin/androiddeployqt --output viper-${ANDROID_ARCH} --verbose --input android-libviper.so-deployment-settings.json --gradle --android-platform android-23 --stacktrace --debug --target android-23 --debug --sign ${DISTILLERY_ROOT_DIR}/src/viper/android/viper.keystore viper --storepass icn_viper
+else
+ ${QT_HOME}/5.7/android_${ANDROID_ARCH}/bin/androiddeployqt --output viper-${ANDROID_ARCH} --verbose --input android-libviper.so-deployment-settings.json --gradle --android-platform android-23 --stacktrace --debug --target android-23 --release --sign ${DISTILLERY_ROOT_DIR}/src/viper/android/viper.keystore viper --storepass icn_viper
+fi
+cd .. \ No newline at end of file