fix scripts to build with ndk r15c,

cache dependancies so we are not hitting github often
update android dependancies to latest and compile.
./android-build-freerdp.sh --ndk ~/Programming/android-ndk-r15c --relWithDebug --jpeg
Still an error compiling openh264
This commit is contained in:
Mathew 2018-11-09 15:20:52 +13:00
parent 9400bdccdb
commit 2ff19597dc
13 changed files with 49 additions and 46 deletions

View File

@ -1,13 +1,13 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
compileSdkVersion = 28
buildToolsVersion = "28.0.3"
defaultConfig {
applicationId "com.freerdp.afreerdp"
minSdkVersion 14
targetSdkVersion 27
minSdkVersion 21
targetSdkVersion 28
vectorDrawables.useSupportLibrary = true
versionCode = 14
versionName = rootProject.ext.versionName
@ -16,7 +16,7 @@ android {
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
storePassword RELEASE_KEY_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
storeType "jks"
@ -37,5 +37,5 @@ android {
}
dependencies {
compile project(':freeRDPCore')
implementation project(':freeRDPCore')
}

View File

@ -6,7 +6,7 @@ if (file.canRead()) {
}
if (!hasProperty('RELEASE_STORE_FILE')) {
ext.RELEASE_STORE_FILE=''
ext.RELEASE_STORE_FILE='nokeyfile'
}
if (!hasProperty('RELEASE_KEY_ALIAS')) {
ext.RELEASE_KEY_ALIAS=''
@ -43,7 +43,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

View File

@ -1,12 +1,12 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
compileSdkVersion = 28
buildToolsVersion = "28.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
targetSdkVersion 28
vectorDrawables.useSupportLibrary = true
versionCode = 14
versionName = rootProject.ext.versionName
@ -25,7 +25,7 @@ android {
}
dependencies {
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:support-vector-drawable:27.0.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
}

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

View File

@ -1133,9 +1133,6 @@ if( APPLE )
mark_as_advanced( CMAKE_INSTALL_NAME_TOOL )
endif()
# Force set compilers because standard identification works badly for us
include( CMakeForceCompiler )
CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
if( ANDROID_COMPILER_IS_CLANG )
set( CMAKE_C_COMPILER_ID Clang )
endif()
@ -1147,7 +1144,6 @@ else()
endif()
set( CMAKE_C_HAS_ISYSROOT 1 )
set( CMAKE_C_COMPILER_ABI ELF )
CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
if( ANDROID_COMPILER_IS_CLANG )
set( CMAKE_CXX_COMPILER_ID Clang)
endif()

View File

@ -26,4 +26,4 @@ BUILD_SRC=$SRC_DIR/build
CMAKE_BUILD_TYPE=Release
BUILD_ARCH="armeabi armeabi-v7a x86 mips"
BUILD_ARCH="armeabi-v7a x86"

View File

@ -26,4 +26,4 @@ BUILD_SRC=$SRC_DIR/build
CMAKE_BUILD_TYPE=Release
BUILD_ARCH="arm64-v8a x86_64 mips64"
BUILD_ARCH="arm64-v8a x86_64"

View File

@ -4,7 +4,7 @@ SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]}")
SCRIPT_PATH=$(realpath "$SCRIPT_PATH")
if [ -z $BUILD_ARCH ]; then
BUILD_ARCH="armeabi armeabi-v7a mips mips64 x86 x86_64 arm64-v8a"
BUILD_ARCH="armeabi-v7a x86 x86_64 arm64-v8a"
fi
if [ -z $NDK_TARGET ]; then
@ -204,22 +204,31 @@ function common_update {
echo "Invalid arguments to update function $@"
exit 1
fi
SCM_URL=$1
SCM_TAG=$2
BUILD_SRC=$3
echo "Preparing checkout..."
BASE=$(pwd)
if [[ ! -d $3 ]];
CACHE=$SCRIPT_PATH/../cache
common_run mkdir -p $CACHE
TARFILE="$CACHE/$SCM_TAG.tar.gz"
if [[ ! -f "$TARFILE" ]];
then
common_run mkdir -p $3
common_run cd $3
common_run git clone $1 $3
common_run wget -O "$TARFILE" "$SCM_URL/archive/$SCM_TAG.tar.gz"
fi
if [[ -d $BUILD_SRC ]];
then
common_run rm -rf $BUILD_SRC
fi
common_run mkdir -p $BUILD_SRC
common_run cd $BUILD_SRC
common_run tar zxf "$TARFILE" --strip 1
common_run cd $BASE
common_run cd $3
common_run git fetch
common_run git reset --hard HEAD
common_run git checkout $2
common_run cd $BASE
}
function common_clean {

View File

@ -83,7 +83,8 @@ CMAKE_CMD_ARGS="-DANDROID_NDK=$ANDROID_NDK \
-DANDROID_NATIVE_API_LEVEL=android-${NDK_TARGET} \
-DCMAKE_TOOLCHAIN_FILE=$SRC_DIR/cmake/AndroidToolchain.cmake \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DFREERDP_EXTERNAL_PATH=$BUILD_DST"
-DFREERDP_EXTERNAL_PATH=$BUILD_DST \
-DCMAKE_MAKE_PROGRAM=make"
BASE=$(pwd)
for ARCH in $BUILD_ARCH
@ -97,7 +98,7 @@ do
--src $BUILD_SRC/jpeg --dst $BUILD_DST \
--ndk $ANDROID_NDK \
--arch $ARCH \
--target $NDK_TARGET \
--target $NDK_TARGET \
--tag $JPEG_TAG
fi
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_JPEG=ON"
@ -112,7 +113,7 @@ do
--src $BUILD_SRC/openh264 --dst $BUILD_DST \
--ndk $ANDROID_NDK \
--arch $ARCH \
--target $NDK_TARGET \
--target $NDK_TARGET \
--tag $OPENH264_TAG
fi
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_OPENH264=ON"

View File

@ -1,5 +1,5 @@
#!/bin/bash
SCM_URL=https://github.com/akallabeth/jpeg8d.git
SCM_URL=https://github.com/akallabeth/jpeg8d
SCM_TAG=master
source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh
@ -25,8 +25,8 @@ function build {
echo "Building architectures $BUILD_ARCH..."
BASE=$(pwd)
common_run cd $BUILD_SRC
common_run $NDK_BUILD V=1 APP_ABI="${BUILD_ARCH}" -j clean
common_run $NDK_BUILD V=1 APP_ABI="${BUILD_ARCH}" -j
common_run $NDK_BUILD V=1 APP_ABI="${BUILD_ARCH}" NDK_TOOLCHAIN_VERSION=4.9 -j clean
common_run $NDK_BUILD V=1 APP_ABI="${BUILD_ARCH}" NDK_TOOLCHAIN_VERSION=4.9 -j
common_run cd $BASE
}
@ -34,7 +34,6 @@ function build {
common_parse_arguments $@
common_check_requirements
common_update $SCM_URL $SCM_TAG $BUILD_SRC
common_clean $BUILD_DST
build

View File

@ -10,7 +10,7 @@ function build {
common_run cd $BUILD_SRC
PATH=$ANDROID_NDK:$PATH
MAKE="make PATH=$PATH ENABLEPIC=Yes OS=android NDKROOT=$ANDROID_NDK TARGET=android-$2 NDKLEVEL=$2 ARCH=$1 -j libraries"
common_run git clean -xdf
common_run export QUIET_AR="$CCACHE "
common_run export QUIET_ASM="$CCACHE "
common_run export QUIET_CC="$CCACHE "
@ -27,7 +27,7 @@ function build {
common_parse_arguments $@
common_check_requirements
common_update $SCM_URL $SCM_TAG $BUILD_SRC
common_clean $BUILD_DST
for ARCH in $BUILD_ARCH
do

View File

@ -45,10 +45,9 @@ function build {
BASE=$(pwd)
DST_DIR=$BUILD_DST/$DST_PREFIX
common_run cd $BUILD_SRC
common_run git clean -xdf
common_run ./Configure --config=$SCRIPT_PATH/openssl-mips64.conf --openssldir=$DST_DIR $CONFIG no-shared
common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" depend
common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" build_libs
common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" -j depend
common_run make CALC_VERSIONS="SHLIB_COMPAT=; SHLIB_SOVER=" -j build_libs
if [ ! -d $DST_DIR ];
then
@ -64,7 +63,6 @@ function build {
common_parse_arguments $@
common_check_requirements
common_update $SCM_URL $SCM_TAG $BUILD_SRC
common_clean $BUILD_DST
ORG_PATH=$PATH
for ARCH in $BUILD_ARCH

View File

@ -14,7 +14,7 @@ WITH_OPENH264=0
WITH_OPENSSL=1
BUILD_DEPS=1
DEPS_ONLY=0
NDK_TARGET=21
NDK_TARGET=26
JPEG_TAG=master
OPENH264_TAG=v1.7.0
@ -26,4 +26,4 @@ BUILD_SRC=$SRC_DIR/build
CMAKE_BUILD_TYPE=Debug
BUILD_ARCH="armeabi armeabi-v7a x86 mips arm64-v8a x86_64 mips64"
BUILD_ARCH="armeabi-v7a x86 arm64-v8a x86_64"