axmol/tests/test.android/build_native.sh

31 lines
545 B
Bash
Raw Normal View History

# set params
ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5
2010-12-20 14:17:51 +08:00
COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x
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
# build
pushd $ANDROID_NDK_ROOT
./ndk-build -C $TESTS_ROOT $*
popd