Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (22 sloc) 549 Bytes
# set params
COCOS2DX_ROOT=../libs/cocos2dx
GAME_ROOT=../
GAME_ANDROID_ROOT=$GAME_ROOT/android
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
$ANDROID_NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT $*