2011-08-19 13:07:50 +08:00
|
|
|
#!/bin/bash
|
2010-12-17 15:43:36 +08:00
|
|
|
# set params
|
2011-11-23 11:02:18 +08:00
|
|
|
ANDROID_NDK_ROOT=/cygdrive/d/programe/android/ndk/android-ndk-r6b
|
2011-11-17 14:34:41 +08:00
|
|
|
COCOS2DX_ROOT=/cygdrive/e/cocos2d-x
|
2010-12-20 14:17:51 +08:00
|
|
|
TESTS_ROOT=$COCOS2DX_ROOT/tests/test.android
|
|
|
|
|
2011-01-19 16:00:19 +08:00
|
|
|
# make sure assets is exist
|
2011-01-21 15:45:55 +08:00
|
|
|
if [ -d $TESTS_ROOT/assets ]; then
|
|
|
|
rm -rf $TESTS_ROOT/assets
|
2011-01-19 16:00:19 +08:00
|
|
|
fi
|
|
|
|
|
2011-01-21 15:45:55 +08:00
|
|
|
mkdir $TESTS_ROOT/assets
|
|
|
|
|
2011-01-19 16:00:19 +08:00
|
|
|
# copy resources
|
2011-01-21 15:45:55 +08:00
|
|
|
for file in $COCOS2DX_ROOT/tests/Res/*
|
|
|
|
do
|
|
|
|
if [ -d $file ]; then
|
|
|
|
cp -rf $file $TESTS_ROOT/assets
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f $file ]; then
|
|
|
|
cp $file $TESTS_ROOT/assets
|
|
|
|
fi
|
|
|
|
done
|
2010-12-20 14:17:51 +08:00
|
|
|
|
2011-07-27 11:51:19 +08:00
|
|
|
# remove test_image_rgba4444.pvr.gz
|
|
|
|
rm -f $TESTS_ROOT/assets/Images/test_image_rgba4444.pvr.gz
|
2010-12-20 14:17:51 +08:00
|
|
|
|
2011-08-19 13:07:50 +08:00
|
|
|
#build
|
2010-12-17 15:43:36 +08:00
|
|
|
pushd $ANDROID_NDK_ROOT
|
2011-03-01 19:53:39 +08:00
|
|
|
./ndk-build -C $TESTS_ROOT $*
|
2010-12-17 15:43:36 +08:00
|
|
|
popd
|
|
|
|
|