Skip to content

Commit c333fe5

Browse files
committed
[[ Prebuilts ]] Add android API subplatform to prebuilt archive filename
1 parent 76f00d2 commit c333fe5

File tree

7 files changed

+16
-13
lines changed

7 files changed

+16
-13
lines changed

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def guess_android_build_tools(sdkdir):
412412

413413
def validate_android_tools(opts):
414414
if opts['ANDROID_NDK_VERSION'] is None:
415-
opts['ANDROID_NDK_VERSION'] = 'r17'
415+
opts['ANDROID_NDK_VERSION'] = 'r15'
416416

417417
ndk_ver = opts['ANDROID_NDK_VERSION']
418418
if opts['ANDROID_PLATFORM'] is None:

docs/development/build-android.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Extract both the NDK and SDK to a suitable directory, e.g. `~/android/toolchain`
2222
mkdir -p ~/android/toolchain/android-sdk-linux
2323
cd ~/android/toolchain
2424

25-
wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip
25+
wget https://dl.google.com/android/repository/android-ndk-r15-linux-x86_64.zip
2626
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
2727

28-
unzip android-ndk-r17-linux-x86_64.zip
28+
unzip android-ndk-r15-linux-x86_64.zip
2929

3030
pushd android-sdk-linux
3131
unzip tools_r25.2.3-linux.zip
@@ -41,15 +41,15 @@ Update the SDK:
4141
Create a standalone toolchain (this simplifies setting up the build environment):
4242

4343
````bash
44-
android-ndk-r17/build/tools/make_standalone_toolchain.py \
44+
android-ndk-r15/build/tools/make_standalone_toolchain.py \
4545
--arch arm --api 26 \
4646
--install-dir ${HOME}/android/toolchain/standalone
4747
````
4848

4949
Add a couple of symlinks to allow the engine configuration script to find the Android toolchain:
5050

5151
````bash
52-
ln -s android-ndk-r17 android-ndk
52+
ln -s android-ndk-r15 android-ndk
5353
ln -s android-sdk-linux android-sdk
5454
````
5555

@@ -80,9 +80,9 @@ LINK="${BINDIR}/${TRIPLE}-clang ${COMMON_FLAGS} -fuse-ld=bfd"
8080
AR="${BINDIR}/${TRIPLE}-ar"
8181

8282
# Android platform information
83-
ANDROID_NDK_VERSION=r17
83+
ANDROID_NDK_VERSION=r15
8484
ANDROID_PLATFORM=android-26
85-
ANDROID_NDK=${TOOLCHAIN}/android-ndk-r17
85+
ANDROID_NDK=${TOOLCHAIN}/android-ndk-r15
8686
ANDROID_SDK=${TOOLCHAIN}/android-sdk-linux
8787
ANDROID_BUILD_TOOLS=27.0.3
8888
ANDROID_LIB_PATH=${TOOLCHAIN}/standalone/${TRIPLE}/lib

prebuilt/build-libraries.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ mkdir -p "${OUTPUT_DIR}"
1616
export PLATFORM=$1
1717
export ARCH=$2
1818

19-
#only ios subplatforms are used
20-
if [ "${PLATFORM}" = "ios" ] ; then
19+
#only ios and android subplatforms are used
20+
if [ "${PLATFORM}" == "ios" ] || [ "${PLATFORM}" == "android" ] ; then
2121
export SUBPLATFORM=$3
2222
else
2323
export SUBPLATFORM=

prebuilt/fetch-libraries.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ LIBS_emscripten=( ICU )
1717

1818
SUBPLATFORMS_ios=(iPhoneSimulator8.2 iPhoneSimulator9.2 iPhoneSimulator10.2 iPhoneSimulator11.2 iPhoneSimulator11.4 iPhoneOS9.2 iPhoneOS10.2 iPhoneOS11.2 iPhoneOS11.4)
1919
SUBPLATFORMS_win32=(v140_static_debug v140_static_release)
20+
SUBPLATFORMS_android=(api26)
2021

2122
# Fetch settings
2223
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)

prebuilt/package-libs.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ function doPackage {
4747
source "scripts/ios.inc"
4848
queryiOS "${SUBPLATFORM}"
4949
local PACKAGE_SUBPLATFORM="${SUBPLATFORM_NAME}${VERSION}"
50+
elif [ "${PLATFORM}" == "android" ] ; then
51+
local PACKAGE_SUBPLATFORM="${SUBPLATFORM}"
5052
else
5153
local PACKAGE_SUBPLATFORM=
5254
fi
@@ -138,8 +140,8 @@ function doPackage {
138140
PLATFORM=$1
139141
ARCH=$2
140142

141-
#only ios subplatforms are used
142-
if [ "${PLATFORM}" = "ios" ] ; then
143+
#only ios and android subplatforms are used
144+
if [ "${PLATFORM}" == "ios" ] || [ "${PLATFORM}" == "android" ] ; then
143145
SUBPLATFORM=$3
144146
else
145147
SUBPLATFORM=

prebuilt/scripts/build-icu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function buildICU {
8282

8383
# Utility for displaying platform name
8484
if [ ! -z "${SUBPLATFORM}" ] ; then
85-
local NAME="${PLATFORM}/${SUBPLATFORM}/${ARCH}"
85+
local NAME="${PLATFORM}/${ARCH}/${SUBPLATFORM}"
8686
local PLATFORM_NAME=${SUBPLATFORM}
8787
else
8888
local NAME="${PLATFORM}/${ARCH}"

prebuilt/scripts/build-openssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function buildOpenSSL {
6767

6868
# Utility for displaying platform name
6969
if [ ! -z "${SUBPLATFORM}" ] ; then
70-
local NAME="${PLATFORM}/${SUBPLATFORM}/${ARCH}"
70+
local NAME="${PLATFORM}/${ARCH}/${SUBPLATFORM}"
7171
local PLATFORM_NAME=${SUBPLATFORM}
7272
else
7373
local NAME="${PLATFORM}/${ARCH}"

0 commit comments

Comments
 (0)