Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 77e1f40

Browse files
author
Monte Goulding
committed
Added sdks folder to .gitignore and android external build script to tools
1 parent 33ac968 commit 77e1f40

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,7 @@ xcuserdata/
7474
_build/
7575
_cache/
7676
build/
77+
78+
# SDKs #
79+
#################
80+
sdks/

tools/build-extension-android.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# The folder containing this script
2+
export TOOLS=`dirname $0`
3+
4+
export TRUNK=`cd $TOOLS/..; pwd`
5+
6+
# Global variables needed later
7+
export MODE=release
8+
export DEBUGGABLE_FLAG=false
9+
export DEBUG_FLAG=0
10+
export ANDROID_NDK=$TRUNK/sdks/android-ndk
11+
export ANDROID_SDK=$TRUNK/sdks/android-sdk
12+
13+
# Local variables
14+
export SRCROOT=$1
15+
export JAVA_SDK=`/usr/libexec/java_home`
16+
export JCOUNT=20
17+
export EXTERNAL_NAME=$2
18+
19+
# Path variables
20+
export CLASSPATH="$ANDROID_SDK/platforms/android-8/android.jar"
21+
export NDKBUILD=$ANDROID_NDK/ndk-build
22+
export DSTROOT=$SRCROOT/_build/android/$MODE
23+
export RAWROOT=$SRCROOT/_build/android/$MODE/assets
24+
25+
export JAVAC=$JAVA_SDK/bin/javac
26+
export JAR=$JAVA_SDK/bin/jar
27+
export DX=$ANDROID_SDK/platforms/android-8/tools/dx
28+
export AAPT=$ANDROID_SDK/platforms/android-8/tools/aapt
29+
export APKBUILDER=$ANDROID_SDK/tools/apkbuilder
30+
export ZIPALIGN=$ANDROID_SDK/tools/zipalign
31+
export ADB=$ANDROID_SDK/platform-tools/adb
32+
export AIDL=$ANDROID_SDK/platform-tools/aidl
33+
34+
##########
35+
36+
# Build the native code components
37+
export NDK_PROJECT_PATH=$DSTROOT
38+
echo "Building native code components..."
39+
$NDKBUILD NDK_DEBUG=$DEBUG_FLAG NDK_APP_DEBUGGABLE=$DEBUGGABLE_FLAG NDK_APPLICATION_MK=$SRCROOT/Application.mk -j $JCOUNT -s
40+
if [ $? != 0 ]; then
41+
exit $?
42+
fi
43+
44+
mkdir -p "$SRCROOT/../binaries"
45+
cp "$DSTROOT/libs/armeabi/lib$EXTERNAL_NAME.so" "$SRCROOT/../binaries"
46+
47+
mkdir -p "$SRCROOT/../binaries/Android"
48+
49+
cp "$DSTROOT/libs/armeabi/lib$EXTERNAL_NAME.so" "$SRCROOT/../binaries/Android/External-armeabi"
50+
cd "$SRCROOT/../binaries"
51+
zip -Rm "$EXTERNAL_NAME.lcext" "Android/*"
52+
cd "$TOOLS"

0 commit comments

Comments
 (0)