2011-09-23 09:56:30 +08:00
|
|
|
#!/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
|
2011-09-23 09:56:30 +08:00
|
|
|
|
|
|
|
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"
|
2011-09-23 09:56:30 +08:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2011-10-19 14:21:39 +08:00
|
|
|
if [ ! -d "../../android/libs" ];then
|
2011-09-23 09:56:30 +08:00
|
|
|
mkdir ../../android/libs
|
|
|
|
fi
|
|
|
|
|
2011-10-19 14:21:39 +08:00
|
|
|
if [ ! -d "../../android/libs/armeabi" ];then
|
2011-09-23 09:56:30 +08:00
|
|
|
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
|
2011-09-23 09:56:30 +08:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo `pwd`/../../$originRes
|
|
|
|
ln -s `pwd`/../../$originRes ../../android/assets
|
|
|
|
|