2010-12-17 15:43:36 +08:00
|
|
|
# set params
|
2010-12-20 14:17:51 +08:00
|
|
|
ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r4-crystax
|
|
|
|
COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x
|
|
|
|
|
|
|
|
# copy resources
|
|
|
|
|
|
|
|
TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android
|
|
|
|
|
2010-12-20 14:44:38 +08:00
|
|
|
if [ -d $TESTS_ROOT/assets ]; then
|
2010-12-20 14:17:51 +08:00
|
|
|
echo "resources already exist"
|
|
|
|
else
|
2010-12-20 14:35:02 +08:00
|
|
|
mkdir $TESTS_ROOT/assets
|
2010-12-20 14:17:51 +08:00
|
|
|
cp -R $COCOS2DX_ROOT/tests/Res/animations $TESTS_ROOT/assets
|
|
|
|
cp -R $COCOS2DX_ROOT/tests/Res/fonts $TESTS_ROOT/assets
|
|
|
|
cp -R $COCOS2DX_ROOT/tests/Res/Images $TESTS_ROOT/assets
|
|
|
|
cp -R $COCOS2DX_ROOT/tests/Res/TileMaps $TESTS_ROOT/assets
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2010-12-17 15:43:36 +08:00
|
|
|
# build
|
|
|
|
pushd $ANDROID_NDK_ROOT
|
2010-12-20 14:17:51 +08:00
|
|
|
./ndk-build -C $TESTS_ROOT
|
2010-12-17 15:43:36 +08:00
|
|
|
popd
|
|
|
|
|