axmol/template/android/build_native.sh

30 lines
589 B
Bash
Raw Normal View History

# set params
2011-12-20 16:50:39 +08:00
NDK_ROOT=__ndkroot__
COCOS2DX_ROOT=__cocos2dxroot__
GAME_ROOT=$COCOS2DX_ROOT/__projectname__
GAME_ANDROID_ROOT=$GAME_ROOT/android
2011-08-23 17:17:09 +08:00
RESOURCE_ROOT=$GAME_ROOT/Resources
# make sure assets is exist
if [ -d $GAME_ANDROID_ROOT/assets ]; then
rm -rf $GAME_ANDROID_ROOT/assets
fi
mkdir $GAME_ANDROID_ROOT/assets
# copy resources
for file in $RESOURCE_ROOT/*
do
if [ -d $file ]; then
cp -rf $file $GAME_ANDROID_ROOT/assets
fi
if [ -f $file ]; then
cp $file $GAME_ANDROID_ROOT/assets
fi
done
# build
2011-12-20 16:50:39 +08:00
$NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT $*