-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid_setup.sh
More file actions
executable file
·43 lines (36 loc) · 1.14 KB
/
Copy pathandroid_setup.sh
File metadata and controls
executable file
·43 lines (36 loc) · 1.14 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
#!/bin/bash
# Creates files requred by the android build system
# Working dir must be the same as the script
source platform/android/paths.prop
clear
if [ -f $SDK_DIR/tools/android ]
then
echo "SDK_DIR: $SDK_DIR"
else
tput bold
echo "Error: SDK_DIR does not contain the path to Android SDK"
echo "Open platform/android/paths.prop and setup correct paths to the SDK"
tput sgr0
exit
fi
if [ -f $NDK_DIR/build/core/ndk-common.sh ]
then
echo "NDK_DIR: $NDK_DIR"
else
tput bold
echo "Error: NDK_DIR does not contain the path to Android NDK"
echo "Open platform/android/paths.prop and setup correct paths to the NDK"
tput sgr0
exit
fi
# updates sdk path in local.properties
echo
$SDK_DIR/tools/android update project --path `pwd`/platform/android
#create an application folder in NDK/apps/concept-engine
if [ ! -d $NDK_DIR/apps/concept-engine ]
then
mkdir $NDK_DIR/apps/concept-engine
fi
cp platform/android/Application.mk $NDK_DIR/apps/concept-engine/Application.mk
ESC_PATH=$(echo `pwd`|sed -e 's/\(\/\|\\\|&\)/\\&/g')
perl -pi -e 's/REPLACE_ME/'$ESC_PATH'/g' $NDK_DIR/apps/concept-engine/Application.mk