Skip to content

Commit 67493fc

Browse files
committed
Build scripts for the Android C++ Play Games samples.
Change-Id: I7629ab67e3158e4a66bc2357fb8ee902fc542c56
1 parent 1b1d4f8 commit 67493fc

32 files changed

+238
-2471
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
bin/
2+
build.xml
3+
gen/
4+
libs/
5+
local.properties
6+
obj/
7+
.settings/

samples-android/CollectAllTheStarsNative/.classpath

Lines changed: 0 additions & 9 deletions
This file was deleted.

samples-android/CollectAllTheStarsNative/build.sh

100644100755
Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
#!/bin/sh
2+
set -eua
23

3-
#setup build mode
4-
mode=$1
5-
if [ -z $1 ] ; then
6-
echo “Default build mode: debug”
7-
mode=debug
8-
fi
9-
10-
#build library project
11-
echo “Switching to google-play-services_lib”
12-
13-
pushd ../../google-play-services_lib/
14-
android update lib-project --path .
15-
ant $mode
16-
popd
17-
18-
#Create ant
19-
echo “Updating ANT build settings”
20-
android update project --path .
21-
22-
#Execute ndk-build && ant
23-
ndk-build
24-
ant $mode
4+
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
pushd "${script_dir}"
6+
source ../build_sample.sh
257

samples-android/CollectAllTheStarsNative/jni/Application.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
APP_PLATFORM := android-11
2-
APP_ABI := armeabi-v7a
3-
#APP_ABI := all
2+
APP_ABI := armeabi armeabi-v7a x86
43

54
APP_STL := c++_static
65

Binary file not shown.

samples-android/CollectAllTheStarsNative/proguard-project.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

samples-android/CollectAllTheStarsNative/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
# Project target.
1414
target=android-19
15-
android.library.reference.1=../../../../gpg-cpp-samples/google-play-services_lib
15+
android.library.reference.1=${gpg.lib}

samples-android/README.build

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Use build.sh to recursively build all samples.
2+
3+
The build script depends on the following environment variables to be set:
4+
ANDROID_HOME to the path where the Android SDK is installed
5+
NDK_ROOT to the path where the Android NDK is installed
6+
NDK_MODULE_PATH to the location of the Play Games cpp libraries.
7+
8+
Note: NDK_MODULE_PATH should point one directory *above* where
9+
you've installed gpg-cpp-sdk. This variable is used by ndk-build to locate
10+
all installed modules, not just the Google Play Games library.
11+

samples-android/TbmpSkeletonNative/.classpath

Lines changed: 0 additions & 9 deletions
This file was deleted.

samples-android/TbmpSkeletonNative/build.sh

100644100755
Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
#!/bin/sh
2+
set -eua
23

3-
#setup build mode
4-
mode=$1
5-
if [ -z $1 ] ; then
6-
echo “Default build mode: debug”
7-
mode=debug
8-
fi
9-
10-
#build library project
11-
echo “Switching to google-play-services_lib”
12-
13-
pushd ../../google-play-services_lib/
14-
android update lib-project --path .
15-
ant $mode
16-
popd
17-
18-
#Create ant
19-
echo “Updating ANT build settings”
20-
android update project --path .
21-
22-
#Execute ndk-build && ant
23-
ndk-build
24-
ant $mode
4+
declare -r script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
pushd "${script_dir}"
6+
source ../build_sample.sh
257

0 commit comments

Comments
 (0)