axmol/HelloWorld/android/build_native.sh

34 lines
640 B
Bash
Raw Normal View History

2010-12-18 18:23:31 +08:00
# set params
ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r5
2010-12-18 18:23:31 +08:00
COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x
2010-12-20 14:17:51 +08:00
HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld/android
2011-01-21 15:45:55 +08:00
# make sure assets is exist
if [ -d $HELLOWORLD_ROOT/assets ]; then
2011-01-21 15:45:55 +08:00
rm -rf $HELLOWORLD_ROOT/assets
2010-12-20 14:17:51 +08:00
fi
2011-01-21 15:45:55 +08:00
mkdir $HELLOWORLD_ROOT/assets
# copy resources
for file in $COCOS2DX_ROOT/HelloWorld/Resource/*
do
if [ -d $file ]; then
cp -rf $file $HELLOWORLD_ROOT/assets
fi
if [ -f $file ]; then
cp $file $HELLOWORLD_ROOT/assets
fi
done
# to enable lua
ENABLE_LUA=true
export ENABLE_LUA
2010-12-18 18:23:31 +08:00
# build
pushd $ANDROID_NDK_ROOT
./ndk-build -C $HELLOWORLD_ROOT $*
2010-12-18 18:23:31 +08:00
popd