axmol/HelloWorld/Linux/postCompiled.sh

37 lines
804 B
Bash
Raw Normal View History

#!/bin/bash
#arguments
#1 is the config name
#2 is the project name
2011-10-19 14:21:39 +08:00
#3 is the cocos2dx sdk base folder
originRes="Resource"
2011-10-19 14:21:39 +08:00
if [ $# -lt 3 ]; then
echo "usage sh postCompiled.sh confi-gname project-name cocos2dx-root"
exit
fi
2011-10-19 14:21:39 +08:00
if [ ! -d "../../android/libs" ];then
mkdir ../../android/libs
fi
2011-10-19 14:21:39 +08:00
if [ ! -d "../../android/libs/armeabi" ];then
mkdir ../../android/libs/armeabi
fi
#move game lib into android/libs/armeabi
cp -f lib$2.so ../../android/libs/armeabi/
#move cocos2d lib into android/libs/armeabi
cp -f $3/cocos2dx/proj.linux/$1/lib*.so ../../android/libs/armeabi/
cp -f $3/CocosDenshion/proj.linux/$1/lib*.so ../../android/libs/armeabi/
#link the resource folder
2011-10-19 14:21:39 +08:00
if [ -d ../../android/assets ];then
exit
fi
echo `pwd`/../../$originRes
ln -s `pwd`/../../$originRes ../../android/assets