aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile36
-rw-r--r--README.md78
-rw-r--r--config/config.mk5
-rw-r--r--scripts/build-apk.sh6
-rwxr-xr-xscripts/compile_androidviper.sh40
-rwxr-xr-xscripts/init.sh10
-rwxr-xr-xscripts/init_qt.sh81
-rw-r--r--scripts/install_script.sh55
-rwxr-xr-xscripts/update.sh6
9 files changed, 253 insertions, 64 deletions
diff --git a/Makefile b/Makefile
index 80a93fc3..c2b5e20f 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ DISTILLERY_VERSION=2.0
default.target: help
-all: init_depend install-all
+all: init_depend install-all init_qt
##############################################################
# Variables
@@ -108,6 +108,8 @@ install-all: install-directories ${modules}
init_depend:
./scripts/init.sh ${ABI} ${DISTILLERY_INSTALL_DIR};
+init_qt:
+ ./scripts/init_qt.sh
android_metis:
./scripts/compile_androidmetis.sh
android_metis_debug:
@@ -116,6 +118,10 @@ android_iget:
./scripts/compile_androidiget.sh
android_iget_debug:
./scripts/compile_androidiget.sh DEBUG
+android_viper:
+ ./scripts/compile_androidviper.sh
+android_iget_debug:
+ ./scripts/compile_androidviper.sh DEBUG
curl-clean:
@rm -rf external/curl
@@ -125,29 +131,29 @@ curl-clean:
@rm -rf external/libcurl_android/jni/libcurl/lib
@rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libcurl*
@rm -rf ${DISTILLERY_INSTALL_DIR}/include/curl
-
+
boost-clean:
@rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libboost*
- @rm -rf ${DISTILLERY_INSTALL_DIR}/include/boost
-
+ @rm -rf ${DISTILLERY_INSTALL_DIR}/include/boost
+
openssl-clean:
@rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libssl.*
- @rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libcrypto.*
+ @rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libcrypto.*
@rm -rf ${DISTILLERY_INSTALL_DIR}/include/openssl
@rm -rf external/openssl-1.0.2k*
@rm -rf external/crystax-ndk-10.3.2/sources/openssl/1.0.2k
-
+
crystax-clean:
@rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libxrystax.*
-
+
event-clean:
@rm -rf external/libevent
@rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libevent*
@rm -rf ${DISTILLERY_INSTALL_DIR}/include/event2
-
+
crystaxndk-clean:
@rm -rf external/crystax-ndk*
-
+
xml2-clean:
@rm -rf external/libxml2
@rm -rf external/libxml2_android/obj
@@ -208,7 +214,11 @@ libdash-clean:
@rm -rf ${DISTILLERY_INSTALL_DIR}/lib/libdash.*
@rm -rf ${DISTILLERY_INSTALL_DIR}/include/libdash
-all-clean: dependencies-clean cframework-clean ccnxlibs-clean sb-forwarder-clean libicnet-clean
+qt-clean:
+ @rm -rf qt/*
+ @rm -rf ${DISTILLERY_BUILD_DIR}/qtav
+
+all-clean: dependencies-clean cframework-clean ccnxlibs-clean sb-forwarder-clean libicnet-clean qt-clean
update:
./scripts/update.sh
@@ -240,9 +250,9 @@ help:
@echo "all-clean - Clean all files and libs"
@echo "android_metis - Build metis apk for android"
@echo "android_metis_debug - Build metis apk for android in debug mode"
- @echo "android_iget - Build iGet apk for android apk in debug mode"
+ @echo "android_iget - Build iGet apk for android apk in debug mode"
@echo "android_iget_debug - Build iGet apk for android apk"
-
+
${DISTILLERY_STAMP}: ${REBUILD_DEPENDS}
touch $@
@@ -252,4 +262,4 @@ install-directories:
@mkdir -p ${DISTILLERY_INSTALL_DIR}/bin
-.PHONY: dependencies
+.PHONY: dependencies \ No newline at end of file
diff --git a/README.md b/README.md
index c60b1d4d..58f14085 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,4 @@
-#############################################################################
-# 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.
-##############################################################################
-
-Android SDK
+##Android SDK
This is the CCNx Distillery software distribution for Android. It is in charge of pulling
together all the necessary modules to build a full CCNx software suite for Android.
@@ -73,7 +58,7 @@ make all
The CCNx software will be installed in androidSdk/usr
-To compile Metis for android app (ccnxandroidmetis)
+To compile Metis for android app (ccnxandroidmetis)
```
make android_metis
@@ -111,35 +96,38 @@ execute. You will basically want to download all the sources and compile.
Here's a short summary:
-- `make update` - git pull the different modules to the head of master"
-- `make all` - Download sdk, ndk and dependencies, configure, compile and install all software in DISTILLERY_INSTALL_DIR"
-- `make init_depend` - Download sdk, ndk and dependencies, compile and install all dependencies in DISTILLERY_INSTALL"
-- `make install-all` - Configure, compile and install all software in DISTILLERY_INSTALL_DIR"
-- `curl-clean` - Clean curl files and libs"
-- `boost-clean` - Clean boost files and libs"
-- `openssl-clean` - Clean opennssl files and libs"
-- `crystax-clean` - Clean crystax files and libs"
-- `event-clean` - Clean libevent files and libs"
-- `crystaxndk-clean` - Clean crystax ndk files"
-- `xml2-clean` - Clean libxml2 files and libs"
-- `dependencies-clean` - Clean all dependencies files and libs"
-- `sdk-clean` - Clean sdk files"
-- `ndk-clean` - Clean ndk files"
-- `cmake-clean` - Clean cmake files"
-- `androidsdk-clean` - Clean sdk, ndk and cmake files"
-- `cframework-clean` - Clean cframework (libparc and longbow) files and libs"
-- `ccnxlibs-clean` - Clean ccnxlibs files and libs"
-- `sb-forwarder-clean` - Clean sb-forwarder (metis) files and libs"
-- `libicnet-clean` - Clean libicnet files and libs"
-- `libdash-clean` - Clean libdash files and libs"
-- `all-clean` - Clean all files and libs"
-- `android_metis` - Build metis apk for android"
-- `android_metis_debug` - Build metis apk for android in debug mode"
-- `android_iget` - Build iGet apk for android apk in debug mode"
-- `android_iget_debug` - Build iGet apk for android apk"
+- `make update` - git pull the different modules to the head of master
+- `make all` - Download sdk, ndk, qt environment and dependencies, configure, compile and install all software in DISTILLERY_INSTALL_DIR
+- `make init_depend` - Download sdk, ndk and dependencies, compile and install all dependencies in DISTILLERY_INSTALL
+- `make init_qt` - Download qt environnment, compile and install all dependencies in DISTILLERY_ROOT/qt
+- `make install-all` - Configure, compile and install all software in DISTILLERY_INSTALL_DIR
+- `curl-clean` - Clean curl files and libs
+- `boost-clean` - Clean boost files and libs
+- `openssl-clean` - Clean opennssl files and libs
+- `crystax-clean` - Clean crystax files and libs
+- `event-clean` - Clean libevent files and libs
+- `crystaxndk-clean` - Clean crystax ndk files
+- `xml2-clean` - Clean libxml2 files and libs
+- `dependencies-clean` - Clean all dependencies files and libs
+- `sdk-clean` - Clean sdk files
+- `ndk-clean` - Clean ndk files
+- `cmake-clean` - Clean cmake files
+- `androidsdk-clean` - Clean sdk, ndk and cmake files
+- `cframework-clean` - Clean cframework (libparc and longbow) files and libs
+- `ccnxlibs-clean` - Clean ccnxlibs files and libs
+- `sb-forwarder-clean` - Clean sb-forwarder (metis) files and libs
+- `libicnet-clean` - Clean libicnet files and libs
+- `libdash-clean` - Clean libdash files and libs
+- `qt-clean` - Clean qt environment files and libs
+- `all-clean` - Clean all files and libs
+- `android_metis` - Build metis apk for android
+- `android_metis_debug` - Build metis apk for android in debug mode
+- `android_iget` - Build iGet apk for android
+- `android_iget_debug` - Build iGet apk for android in debug mode
+- `android_viper` - Build Viper apk for android
+- `android_iget_debug` - Build Viper apk for android in debug mode
## Configuration ##
-Distillery can be configured in multiple ways. Please check the config directory (specifically `config/config.mk`) for more information.
-
+Distillery can be configured in multiple ways. Please check the config directory (specifically `config/config.mk`) for more information. \ No newline at end of file
diff --git a/config/config.mk b/config/config.mk
index a1e38dab..808ffc1a 100644
--- a/config/config.mk
+++ b/config/config.mk
@@ -102,4 +102,7 @@ CCNX_COMPILE_ENVIRONMENT=-DCMAKE_TOOLCHAIN_FILE=${DISTILLERY_ROOT_DIR}/config/co
OPEN_SSL_DIR=-DOPENSSL_ROOT_DIR=${DISTILLERY_INSTALL_DIR}
LIBEVENT_ROOT=${DISTILLERY_INSTALL_DIR}
export ABI=armeabi-v7a
-
+export QT_HOME=${DISTILLERY_ROOT_DIR}/qt/Qt
+export ANDROID_ARCH=armv7
+export DISTILLERY_BUILD_DIR
+export DISTILLERY_INSTALL_DIR
diff --git a/scripts/build-apk.sh b/scripts/build-apk.sh
index 4f7e22fc..e8298a28 100644
--- a/scripts/build-apk.sh
+++ b/scripts/build-apk.sh
@@ -7,7 +7,7 @@ SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )
APT_PATH=`which apt-get` || true
apt_get=${APT_PATH:-"/usr/local/bin/apt-get"}
-BUILD_TOOLS="build-essential automake libconfig9 libtool lib32stdc++6 lib32z1 unzip default-jdk cmake"
+BUILD_TOOLS="p7zip-full build-essential automake libconfig9 libtool lib32stdc++6 lib32z1 unzip default-jdk libx11-xcb-dev libfontconfig1 libgl1-mesa-dev cmake"
# Parameters:
# $1 = Distribution [Trusty / CentOS]
@@ -172,4 +172,8 @@ make android_metis
# Compile iget
make android_iget
+# Compile viper
+make android_viper
+
+mv build/viper/viper-armv7//build/outputs/apk/viper-armv7-release-signed.apk iget_android/app/build/outputs/apk/
popd
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
diff --git a/scripts/init.sh b/scripts/init.sh
index 78a0b430..7e3d8ccb 100755
--- a/scripts/init.sh
+++ b/scripts/init.sh
@@ -89,6 +89,10 @@ if [ ! -d libicnet ]; then
echo "libicnet not found"
git clone -b libicnet/master https://gerrit.fd.io/r/cicn libicnet
fi
+if [ ! -d viper ]; then
+ echo "viper not found"
+ git clone -b viper/master https://gerrit.fd.io/r/cicn viper
+fi
cd ../
@@ -133,7 +137,7 @@ if [ ! -d ${INSTALLATION_DIR}/include/boost ]; then
fi
echo "Copy libcrystax in workspace"
-cp -n crystax-ndk-10.3.2/sources/crystax/libs/${ABI}/libcrystax.* ${INSTALLATION_DIR}/lib/
+cp crystax-ndk-10.3.2/sources/crystax/libs/${ABI}/libcrystax.* ${INSTALLATION_DIR}/lib/
echo "Create libevent"
@@ -195,4 +199,6 @@ if [ ! -d ${INSTALLATION_DIR}/include/libxml ]; then
cp -rf jni/libxml2/include/* ${INSTALLATION_DIR}/include/
cp -f obj/local/${ABI}/libxml2.a ${INSTALLATION_DIR}/lib/
cd ..
-fi \ No newline at end of file
+fi
+
+cd ..
diff --git a/scripts/init_qt.sh b/scripts/init_qt.sh
new file mode 100755
index 00000000..93cefd3a
--- /dev/null
+++ b/scripts/init_qt.sh
@@ -0,0 +1,81 @@
+ #############################################################################
+ # 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
+
+set -e
+
+if [ "$ARCH" == "x86" ]; then
+ echo "Qt is not available for x86 systems"
+ exit 1
+fi
+
+mkdir -p qt
+cd qt
+
+if [ ! -d ${QT_HOME} ]; then
+ if [ "$OS" == "darwin" ]; then
+ if [ ! -f qt-opensource-mac-x64-android-5.7.1.dmg ]; then
+ wget http://download.qt.io/archive/qt/5.7/5.7.1/qt-opensource-mac-x64-android-5.7.1.dmg
+ fi
+ VOLUME=$(hdiutil attach qt-opensource-mac-x64-android-5.7.1.dmg | tail -1 | awk '{print $3}')
+ $VOLUME/qt-opensource-mac-x64-android-5.7.1.app/Contents/MacOS/qt-opensource-mac-x64-android-5.7.1 --script ../scripts/install_script.sh -platform minimal --verbose
+ diskutil unmount $VOLUME
+ else
+ if [ ! -f qt-opensource-linux-x64-android-5.7.1.run ]; then
+ wget http://download.qt.io/archive/qt/5.7/5.7.1/qt-opensource-linux-x64-android-5.7.1.run
+ chmod +x qt-opensource-linux-x64-android-5.7.1.run
+ fi
+ ./qt-opensource-linux-x64-android-5.7.1.run --script ../scripts/install_script.sh -platform minimal --verbose
+ fi
+fi
+
+cp -f $DISTILLERY_INSTALL_DIR/lib/lib* ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/
+if [ ! -d ${QT_HOME}/5.7/android_${ANDROID_ARCH}/include/boost ]; then
+ for folder in $(ls -d $DISTILLERY_INSTALL_DIR/include/*/); do
+ ln -s $folder ${QT_HOME}/5.7/android_${ANDROID_ARCH}/include/
+ done
+fi
+
+if [ ! -f ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/libavcodec.so -o ! -f ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/libavfilter.so -o ! -f ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/libavformat.so -o ! -f ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/libavutil.so -o ! -f ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/libswresample.so -o ! -f ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/libswscale.so ]; then
+ if [ ! -f ffmpeg-3.1.4-android.7z ]; then
+ wget https://downloads.sourceforge.net/project/qtav/depends/FFmpeg/android/ffmpeg-3.1.4-android.7z
+ fi
+ 7z x ffmpeg-3.1.4-android.7z -offmpeg
+ cp ffmpeg/ffmpeg-3.1.4-android-armv7a/lib/lib* ${QT_HOME}/5.7/android_${ANDROID_ARCH}/lib/
+ cp -r ffmpeg/ffmpeg-3.1.4-android-armv7a/include/* ${QT_HOME}/5.7/android_${ANDROID_ARCH}/include/
+fi
+
+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
+if [ ! -d ${QT_HOME}/5.7/android_${ANDROID_ARCH}/include/QtAV ]; then
+ git clone https://github.com/wang-bin/QtAV.git
+ cd QtAV
+ mkdir -p ${DISTILLERY_BUILD_DIR}/qtav
+ cd ${DISTILLERY_BUILD_DIR}/qtav
+ ${QT_HOME}/5.7/android_${ANDROID_ARCH}/bin/qmake -r -spec android-g++ ${DISTILLERY_ROOT_DIR}/qt/QtAV/QtAV.pro
+ make
+ make install INSTALL_ROOT=android
+ sh sdk_install.sh
+fi
+cd ${DISTILLERY_ROOT_DIR}
diff --git a/scripts/install_script.sh b/scripts/install_script.sh
new file mode 100644
index 00000000..b160b3c6
--- /dev/null
+++ b/scripts/install_script.sh
@@ -0,0 +1,55 @@
+function Controller() {
+ installer.autoRejectMessageBoxes();
+ installer.installationFinished.connect(function() {
+ gui.clickButton(buttons.NextButton);
+ })
+}
+
+Controller.prototype.WelcomePageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.CredentialsPageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.IntroductionPageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.TargetDirectoryPageCallback = function()
+{
+gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.environmentVariable("QT_HOME"));
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ComponentSelectionPageCallback = function() {
+ var widget = gui.currentPageWidget();
+
+ widget.selectAll();
+
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.LicenseAgreementPageCallback = function() {
+ gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.StartMenuDirectoryPageCallback = function() {
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.ReadyForInstallationPageCallback = function()
+{
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.FinishedPageCallback = function() {
+var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
+if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
+ checkBoxForm.launchQtCreatorCheckBox.checked = false;
+}
+ gui.clickButton(buttons.FinishButton);
+}
+
diff --git a/scripts/update.sh b/scripts/update.sh
index e169cd2f..e34a6261 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -28,5 +28,7 @@ git pull
cd ../..
cd src/libicnet
git pull
-cd ../..
-
+cd ../..
+cd src/viper
+git pull
+cd ../.. \ No newline at end of file