-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid.sh
More file actions
executable file
·61 lines (53 loc) · 1.36 KB
/
Copy pathandroid.sh
File metadata and controls
executable file
·61 lines (53 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Build script for android:
# ./android.sh
# compiles ndk and sdk code
# ./android.sh pack
# packs resources into a zip-file so it can be sent to the emulator
# ./android.sh install
# compile and transfer to running emulator
# ./android.sh uninstall
# uninstall package from running emulator
#
# '> /dev/null' is to hide output of pushd and popd
source platform/android/paths.prop
clear
# Pack resources into zip-file
if [ "$1" == "pack" ]
then
mkdir -p platform/android/res/raw/data
zip -r platform/android/res/raw/data tests
#zip -r platform/android/res/raw/data tests
exit
fi
# Uninstall then exit to avoid compile
if [ "$1" == "uninstall" ]
then
pushd ./platform/android > /dev/null
ant $1
popd > /dev/null
exit
fi
# Check if NDK_DIR is valid
if [ ! -f $NDK_DIR/build/core/ndk-common.sh ]
then
echo "Error: correct path variables in platform/android/paths.prop and run android_build.sh"
exit
fi
# creates local.properties
echo
$SDK_DIR/tools/android update project --path `dirname $0`/platform/android
echo
mkdir -p obj/android
cp platform/android/default.properties obj/android/default.properties
# compiles NDK code
echo
pushd $NDK_DIR > /dev/null
make APP=concept-engine
popd > /dev/null
# compiles SDK code
echo
echo "Beginning compile of SDK code..."
pushd ./platform/android > /dev/null
ant $1
popd > /dev/null