diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build-apk.sh | 6 | ||||
-rwxr-xr-x | scripts/compile_androidviper.sh | 40 | ||||
-rwxr-xr-x | scripts/init.sh | 10 | ||||
-rwxr-xr-x | scripts/init_qt.sh | 81 | ||||
-rw-r--r-- | scripts/install_script.sh | 55 | ||||
-rwxr-xr-x | scripts/update.sh | 6 |
6 files changed, 193 insertions, 5 deletions
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 |