axmol/HelloWorld/android/build_native.sh

23 lines
612 B
Bash
Raw Normal View History

2010-12-18 18:23:31 +08:00
# set params
ANDROID_NDK_ROOT=/cygdrive/e/android-ndk-r4-crystax
COCOS2DX_ROOT=/cygdrive/d/Work7/cocos2d-x
2010-12-20 14:17:51 +08:00
# copy resources
HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld/android
if [ -d $HELLOWORLD_ROOT/assets ]; then
2010-12-20 14:17:51 +08:00
echo "resources already exist"
else
2010-12-20 14:35:02 +08:00
mkdir $HELLOWORLD_ROOT/assets
2010-12-20 14:17:51 +08:00
cp $COCOS2DX_ROOT/HelloWorld/Resource/CloseNormal.png $HELLOWORLD_ROOT/assets
cp $COCOS2DX_ROOT/HelloWorld/Resource/CloseSelected.png $HELLOWORLD_ROOT/assets
cp $COCOS2DX_ROOT/HelloWorld/Resource/HelloWorld.png $HELLOWORLD_ROOT/assets
fi
2010-12-18 18:23:31 +08:00
# build
pushd $ANDROID_NDK_ROOT
2010-12-20 14:17:51 +08:00
./ndk-build -C $HELLOWORLD_ROOT
2010-12-18 18:23:31 +08:00
popd