add prj_env for android
authorBen Doumenc <bdoumenc@gmail.com>
Sun, 5 May 2013 15:32:49 +0000 (17:32 +0200)
committerBen Doumenc <bdoumenc@gmail.com>
Sun, 5 May 2013 15:32:49 +0000 (17:32 +0200)
android/prj_env [new file with mode: 0644]

diff --git a/android/prj_env b/android/prj_env
new file mode 100644 (file)
index 0000000..ae90c8d
--- /dev/null
@@ -0,0 +1,38 @@
+
+export PATH=$PATH:$PRJ_DIR/android-sdk-linux/tools:$PRJ_DIR/android-sdk-linux/platform-tools
+export ANDROIDSDK=$PRJ_DIR/android-sdk-linux/
+export ANDROIDNDK=$PRJ_DIR/android-ndk-r8/
+export ANDROIDNDKVER=r8
+export ANDROIDAPI=9
+
+
+function cdApp() {
+    cd $APP_PATH
+}
+
+function loadApp() {
+    export APP_NAME=`basename $PRJ_DIR`
+    export APP_PATH=$PRJ_DIR
+    cdApp
+}
+
+function buildInstall() {
+    pushd $APP_PATH > /dev/null 2>&1
+    ant debug && adb install -r bin/$APP_NAME-debug.apk
+    popd 2>&1
+}
+
+function cleanBuildInstall() {
+    pushd $APP_PATH > /dev/null 2>&1
+    ant clean && buildInstall
+    popd 2>&1
+}
+
+function logAll() {
+    adb logcat
+}
+
+function logApp() {
+    adb logcat -s $APP_NAME
+}
+