default.target: help
-all: init_depend install-all
+all: init_depend install-all init_qt
##############################################################
# Variables
init_depend:
./scripts/init.sh ${ABI} ${DISTILLERY_INSTALL_DIR};
+init_qt:
+ ./scripts/init_qt.sh
android_metis:
./scripts/compile_androidmetis.sh
android_metis_debug:
./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
@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
@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
@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 $@
@mkdir -p ${DISTILLERY_INSTALL_DIR}/bin
-.PHONY: dependencies
+.PHONY: dependencies
\ No newline at end of file
-#############################################################################
-# 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.
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
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
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
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]
# 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
--- /dev/null
+ #############################################################################
+ # 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
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 ../
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"
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 ..
--- /dev/null
+ #############################################################################
+ # 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}
--- /dev/null
+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);
+}
+
cd ../..
cd src/libicnet
git pull
-cd ../..
-
+cd ../..
+cd src/viper
+git pull
+cd ../..
\ No newline at end of file