2012-10-05 01:23:07 +08:00
|
|
|
APPNAME="__projectname__"
|
|
|
|
APP_ANDROID_NAME="__packagename__"
|
2013-06-16 19:25:20 +08:00
|
|
|
ANDROID_SDK_ROOT="__androidsdk__"
|
|
|
|
NDK_ROOT="__ndkroot__"
|
|
|
|
COCOS2DX_ROOT="__cocos2dxroot__"
|
2012-10-05 01:23:07 +08:00
|
|
|
|
2013-06-16 19:25:20 +08:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
APP_ROOT="$DIR/.."
|
|
|
|
APP_ANDROID_ROOT="$COCOS2DX_ROOT/$APPNAME/proj.android"
|
2012-10-05 01:23:07 +08:00
|
|
|
|
|
|
|
echo "NDK_ROOT = $NDK_ROOT"
|
2013-06-16 19:25:20 +08:00
|
|
|
echo "ANDROID_SDK_ROOT = $ANDROID_SDK_ROOT"
|
2012-10-05 01:23:07 +08:00
|
|
|
echo "COCOS2DX_ROOT = $COCOS2DX_ROOT"
|
|
|
|
echo "APP_ROOT = $APP_ROOT"
|
|
|
|
echo "APP_ANDROID_ROOT = $APP_ANDROID_ROOT"
|
|
|
|
echo "APP_ANDROID_NAME = $APP_ANDROID_NAME"
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Killing and restarting ${APP_ANDROID_NAME}"
|
|
|
|
echo
|
|
|
|
|
2013-06-16 19:25:20 +08:00
|
|
|
#set -x
|
|
|
|
"${ANDROID_SDK_ROOT}"/platform-tools/adb shell am force-stop "${APP_ANDROID_NAME}"
|
2012-10-05 01:23:07 +08:00
|
|
|
|
|
|
|
NDK_MODULE_PATH="${COCOS2DX_ROOT}":"${COCOS2DX_ROOT}"/cocos2dx/platform/third_party/android/prebuilt \
|
2013-06-16 19:25:20 +08:00
|
|
|
"${NDK_ROOT}"/ndk-gdb \
|
|
|
|
--adb="${ANDROID_SDK_ROOT}"/platform-tools/adb \
|
|
|
|
--verbose \
|
|
|
|
--start \
|
|
|
|
--force
|