mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
Android build script updatee
* Remove JPEG build support (deprecated) * Add sha256 check to tar/git checkout * Update default dependency versions
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
# If you require support for older NDK API levels,
|
||||
# create seperate configurations for each NDK API level
|
||||
# and architecture you want to support.
|
||||
WITH_JPEG=0
|
||||
WITH_OPENH264=0
|
||||
WITH_OPENSSL=1
|
||||
WITH_FFMPEG=1
|
||||
@@ -18,10 +17,12 @@ DEPS_ONLY=0
|
||||
NDK_TARGET=21
|
||||
WITH_MEDIACODEC=1
|
||||
|
||||
JPEG_TAG=master
|
||||
OPENH264_TAG=v2.2.0
|
||||
OPENSSL_TAG=openssl-1.1.1o
|
||||
OPENH264_TAG=v2.3.1
|
||||
OPENH264_HASH=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
|
||||
OPENSSL_TAG=openssl-1.1.1q
|
||||
OPENSSL_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
FFMPEG_TAG=n4.4.1
|
||||
FFMPEG_HASH=82b43cc67296bcd01a59ae6b327cdb50121d3a9e35f41a30de1edd71bb4a6666
|
||||
|
||||
SRC_DIR=$SCRIPT_PATH/..
|
||||
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
# If you require support for older NDK API levels,
|
||||
# create seperate configurations for each NDK API level
|
||||
# and architecture you want to support.
|
||||
WITH_JPEG=0
|
||||
WITH_OPENH264=1
|
||||
WITH_OPENSSL=1
|
||||
WITH_FFMPEG=1
|
||||
@@ -18,10 +17,12 @@ DEPS_ONLY=0
|
||||
NDK_TARGET=21
|
||||
WITH_MEDIACODEC=1
|
||||
|
||||
JPEG_TAG=master
|
||||
OPENH264_TAG=v2.2.0
|
||||
OPENSSL_TAG=openssl-1.1.1o
|
||||
OPENH264_TAG=v2.3.1
|
||||
OPENH264_HASH=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
|
||||
OPENSSL_TAG=openssl-1.1.1q
|
||||
OPENSSL_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
FFMPEG_TAG=n4.4.1
|
||||
FFMPEG_HASH=82b43cc67296bcd01a59ae6b327cdb50121d3a9e35f41a30de1edd71bb4a6666
|
||||
|
||||
SRC_DIR=$SCRIPT_PATH/..
|
||||
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -x
|
||||
|
||||
SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]}")
|
||||
SCRIPT_PATH=$(realpath "$SCRIPT_PATH")
|
||||
@@ -73,6 +73,8 @@ function common_help {
|
||||
echo " SCM_URL=$SCM_URL"
|
||||
echo " --tag The SCM branch or tag to check out"
|
||||
echo " SCM_TAG=$SCM_TAG"
|
||||
echo " --hash The SCM commit or hash to check out"
|
||||
echo " SCM_HASH=$SCM_HASH"
|
||||
echo " --clean Clean the destination before build"
|
||||
echo " --help Display this help"
|
||||
exit 0
|
||||
@@ -140,6 +142,11 @@ function common_parse_arguments {
|
||||
shift
|
||||
;;
|
||||
|
||||
--hash)
|
||||
SCM_HASH="$2"
|
||||
shift
|
||||
;;
|
||||
|
||||
--clean)
|
||||
CLEAN_BUILD_DIR=1
|
||||
shift
|
||||
@@ -193,6 +200,12 @@ function common_check_requirements {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $SCM_HASH ]];
|
||||
then
|
||||
echo "SCM HASH not defined! Define SCM_HASH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $NDK_TARGET ]];
|
||||
then
|
||||
echo "Android platform NDK_TARGET not defined"
|
||||
@@ -230,7 +243,7 @@ function common_check_requirements {
|
||||
}
|
||||
|
||||
function common_update {
|
||||
if [ $# -ne 3 ];
|
||||
if [ $# -ne 4 ];
|
||||
then
|
||||
echo "Invalid arguments to update function $@"
|
||||
exit 1
|
||||
@@ -238,6 +251,7 @@ function common_update {
|
||||
SCM_URL=$1
|
||||
SCM_TAG=$2
|
||||
BUILD_SRC=$3
|
||||
SCM_HASH=$4
|
||||
|
||||
echo "Preparing checkout..."
|
||||
BASE=$(pwd)
|
||||
@@ -245,12 +259,14 @@ function common_update {
|
||||
common_run mkdir -p $CACHE
|
||||
TARFILE="$CACHE/$SCM_TAG.tar.gz"
|
||||
|
||||
|
||||
if [[ ! -f "$TARFILE" ]];
|
||||
then
|
||||
common_run wget -O "$TARFILE" "$SCM_URL/$SCM_TAG.tar.gz"
|
||||
fi
|
||||
|
||||
echo "$SCM_HASH $TARFILE" > $TARFILE.sha256sum
|
||||
common_run sha256sum -c $TARFILE.sha256sum
|
||||
|
||||
if [[ -d $BUILD_SRC ]];
|
||||
then
|
||||
common_run rm -rf $BUILD_SRC
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
SCM_URL=https://github.com/FFmpeg/FFmpeg/archive
|
||||
SCM_TAG=n4.4.1
|
||||
SCM_HASH=82b43cc67296bcd01a59ae6b327cdb50121d3a9e35f41a30de1edd71bb4a6666
|
||||
|
||||
OLD_PATH=$PATH
|
||||
|
||||
@@ -135,7 +136,7 @@ function build {
|
||||
# Run the main program.
|
||||
common_parse_arguments $@
|
||||
common_check_requirements
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC $SCM_HASH
|
||||
|
||||
HOST_PKG_CONFIG_PATH=`command -v pkg-config`
|
||||
if [ -z ${HOST_PKG_CONFIG_PATH} ]; then
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
JPEG_TAG=master
|
||||
OPENH264_TAG=master
|
||||
OPENSSL_TAG=openssl-1.1.1n
|
||||
OPENH264_TAG=v2.3.1
|
||||
OPENH264_HASH=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
|
||||
OPENSSL_TAG=openssl-1.1.1q
|
||||
OPENSSL_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
FFMPEG_TAG=n4.4.1
|
||||
FFMPEG_HASH=82b43cc67296bcd01a59ae6b327cdb50121d3a9e35f41a30de1edd71bb4a6666
|
||||
|
||||
WITH_JPEG=0
|
||||
WITH_OPENH264=0
|
||||
WITH_OPENSSL=0
|
||||
WITH_FFMPEG=0
|
||||
@@ -32,10 +33,6 @@ do
|
||||
SRC_DIR="$2"
|
||||
shift
|
||||
;;
|
||||
--jpeg)
|
||||
WITH_JPEG=1
|
||||
shift
|
||||
;;
|
||||
--openh264)
|
||||
WITH_OPENH264=1
|
||||
shift
|
||||
@@ -108,21 +105,6 @@ BASE=$(pwd)
|
||||
for ARCH in $BUILD_ARCH
|
||||
do
|
||||
# build dependencies.
|
||||
if [ $WITH_JPEG -ne 0 ];
|
||||
then
|
||||
if [ $BUILD_DEPS -ne 0 ];
|
||||
then
|
||||
common_run bash $SCRIPT_PATH/android-build-jpeg.sh \
|
||||
--src $BUILD_SRC/jpeg --dst $BUILD_DST \
|
||||
--ndk $ANDROID_NDK \
|
||||
--arch $ARCH \
|
||||
--target $NDK_TARGET \
|
||||
--tag $JPEG_TAG
|
||||
fi
|
||||
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_JPEG=ON"
|
||||
else
|
||||
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_JPEG=OFF"
|
||||
fi
|
||||
if [ $WITH_OPENH264 -ne 0 ];
|
||||
then
|
||||
if [ -z "$ANDROID_NDK_OPENH264" ]
|
||||
@@ -140,7 +122,8 @@ do
|
||||
--ndk "$ANDROID_NDK_OPENH264" \
|
||||
--arch $ARCH \
|
||||
--target $NDK_TARGET \
|
||||
--tag $OPENH264_TAG
|
||||
--tag $OPENH264_TAG \
|
||||
--hash $OPENH264_HASH
|
||||
fi
|
||||
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_OPENH264=ON"
|
||||
else
|
||||
@@ -164,7 +147,8 @@ do
|
||||
--ndk "$ANDROID_NDK" \
|
||||
--arch $ARCH \
|
||||
--target $NDK_TARGET \
|
||||
--tag $FFMPEG_TAG
|
||||
--tag $FFMPEG_TAG \
|
||||
--hash $FFMPEG_HASH
|
||||
fi
|
||||
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_FFMPEG=ON -DWITH_SWCALE=ON"
|
||||
else
|
||||
@@ -179,8 +163,9 @@ do
|
||||
--sdk "$ANDROID_SDK" \
|
||||
--ndk $ANDROID_NDK \
|
||||
--arch $ARCH \
|
||||
--target $NDK_TARGET \
|
||||
--tag $OPENSSL_TAG
|
||||
--target $NDK_TARGET \
|
||||
--tag $OPENSSL_TAG \
|
||||
--hash $OPENSSL_HASH
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCM_URL=https://github.com/akallabeth/jpeg8d/archive
|
||||
SCM_TAG=master
|
||||
|
||||
source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh
|
||||
|
||||
function usage {
|
||||
echo $0 [arguments]
|
||||
echo "\tThe script checks out the OpenH264 git repository"
|
||||
echo "\tto a local source directory, builds and installs"
|
||||
echo "\tthe library for all architectures defined to"
|
||||
echo "\tthe destination directory."
|
||||
echo ""
|
||||
echo "\t[-s|--source-dir <path>]"
|
||||
echo "\t[-d|--destination-dir <path>]"
|
||||
echo "\t[-a|--arch <architectures>]"
|
||||
echo "\t[-t|--tag <tag or branch>]"
|
||||
echo "\t[--scm-url <url>]"
|
||||
echo "\t[--ndk <android NDK path>]"
|
||||
echo "\t[--sdk <android SDK path>]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
function build {
|
||||
echo "Building architectures $BUILD_ARCH..."
|
||||
BASE=$(pwd)
|
||||
common_run cd $BUILD_SRC
|
||||
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
|
||||
}
|
||||
|
||||
# Run the main program.
|
||||
common_parse_arguments $@
|
||||
common_check_requirements
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC
|
||||
|
||||
build
|
||||
|
||||
common_copy $BUILD_SRC $BUILD_DST
|
||||
common_copy $BUILD_SRC $BUILD_DST/"${BUILD_ARCH}"
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
SCM_URL=https://github.com/cisco/openh264/archive
|
||||
SCM_TAG=master
|
||||
SCM_TAG=v2.3.1
|
||||
SCM_HASH=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
|
||||
|
||||
source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh
|
||||
|
||||
@@ -26,7 +27,7 @@ function build {
|
||||
# Run the main program.
|
||||
common_parse_arguments $@
|
||||
common_check_requirements
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC $SCM_HASH
|
||||
|
||||
|
||||
for ARCH in $BUILD_ARCH
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCM_URL=https://www.openssl.org/source
|
||||
SCM_TAG=master
|
||||
SCM_TAG=OpenSSL_1_1_1q
|
||||
SCM_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
|
||||
COMPILER=4.9
|
||||
|
||||
@@ -43,7 +44,7 @@ function build {
|
||||
# Run the main program.
|
||||
common_parse_arguments $@
|
||||
common_check_requirements
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC
|
||||
common_update $SCM_URL $SCM_TAG $BUILD_SRC $SCM_HASH
|
||||
|
||||
ORG_PATH=$PATH
|
||||
for ARCH in $BUILD_ARCH
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
# If you require support for older NDK API levels,
|
||||
# create seperate configurations for each NDK API level
|
||||
# and architecture you want to support.
|
||||
WITH_JPEG=0
|
||||
WITH_OPENH264=0
|
||||
WITH_OPENSSL=1
|
||||
WITH_FFMPEG=1
|
||||
@@ -18,10 +17,12 @@ DEPS_ONLY=0
|
||||
NDK_TARGET=23
|
||||
WITH_MEDIACODEC=1
|
||||
|
||||
JPEG_TAG=master
|
||||
OPENH264_TAG=v2.2.0
|
||||
OPENSSL_TAG=openssl-1.1.1o
|
||||
OPENH264_TAG=v2.3.1
|
||||
OPENH264_HASH=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
|
||||
OPENSSL_TAG=openssl-1.1.1q
|
||||
OPENSSL_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
FFMPEG_TAG=n4.4.1
|
||||
FFMPEG_HASH=82b43cc67296bcd01a59ae6b327cdb50121d3a9e35f41a30de1edd71bb4a6666
|
||||
|
||||
SRC_DIR=$SCRIPT_PATH/..
|
||||
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
# If you require support for older NDK API levels,
|
||||
# create seperate configurations for each NDK API level
|
||||
# and architecture you want to support.
|
||||
WITH_JPEG=0
|
||||
WITH_OPENH264=0
|
||||
WITH_OPENSSL=1
|
||||
WITH_FFMPEG=0
|
||||
@@ -18,10 +17,12 @@ DEPS_ONLY=0
|
||||
NDK_TARGET=21
|
||||
WITH_MEDIACODEC=1
|
||||
|
||||
JPEG_TAG=master
|
||||
OPENH264_TAG=v2.2.0
|
||||
OPENSSL_TAG=openssl-1.1.1o
|
||||
OPENH264_TAG=v2.3.1
|
||||
OPENH264_HASH=453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32
|
||||
OPENSSL_TAG=openssl-1.1.1q
|
||||
OPENSSL_HASH=d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
|
||||
FFMPEG_TAG=n4.4.1
|
||||
FFMPEG_HASH=82b43cc67296bcd01a59ae6b327cdb50121d3a9e35f41a30de1edd71bb4a6666
|
||||
|
||||
SRC_DIR=$SCRIPT_PATH/..
|
||||
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
|
||||
|
||||
Reference in New Issue
Block a user