Merge pull request #5008 from wintersandroid/master

Android library build script fixes, and Android thread lock on remote disconnect.
This commit is contained in:
akallabeth
2018-11-20 12:14:28 +01:00
committed by GitHub
14 changed files with 52 additions and 47 deletions

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"