2012-08-02 13:02:59 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
TXTCOLOR_DEFAULT="\033[0;m"
|
|
|
|
TXTCOLOR_RED="\033[0;31m"
|
|
|
|
TXTCOLOR_GREEN="\033[0;32m"
|
|
|
|
|
|
|
|
COCOS2DX20_TRUNK=`pwd`
|
|
|
|
OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/Debug/
|
2012-09-19 03:42:57 +08:00
|
|
|
OUTPUT_RELEASE=$COCOS2DX20_TRUNK/lib/linux/Release/
|
2012-08-02 13:02:59 +08:00
|
|
|
|
|
|
|
check_make_result()
|
|
|
|
{
|
|
|
|
if [ 0 != $? ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-01-22 17:23:05 +08:00
|
|
|
DEPENDS='libx11-dev'
|
|
|
|
DEPENDS+=' libxmu-dev'
|
|
|
|
DEPENDS+=' libglu1-mesa-dev'
|
|
|
|
DEPENDS+=' libgl2ps-dev'
|
|
|
|
DEPENDS+=' libxi-dev'
|
|
|
|
DEPENDS+=' libglfw-dev'
|
|
|
|
DEPENDS+=' g++'
|
|
|
|
DEPENDS+=' libzip-dev'
|
|
|
|
DEPENDS+=' libcurl4-gnutls-dev'
|
|
|
|
DEPENDS+=' libfontconfig1-dev'
|
|
|
|
DEPENDS+=' libsqlite3-dev'
|
|
|
|
DEPENDS+=' libglew-dev'
|
|
|
|
|
|
|
|
for i in $DEPENDS; do
|
|
|
|
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $i | grep "install ok installed")
|
|
|
|
echo Checking for $i: $PKG_OK
|
|
|
|
if [ "" == "$PKG_OK" ]; then
|
|
|
|
echo -e $TXTCOLOR_GREEN"No $i. Setting up $i, please enter your password:"$TXTCOLOR_DEFAULT
|
|
|
|
sudo apt-get --force-yes --yes install $i
|
2012-08-02 13:02:59 +08:00
|
|
|
fi
|
2013-01-22 17:23:05 +08:00
|
|
|
done
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-21 13:34:05 +08:00
|
|
|
mkdir -p $OUTPUT_DEBUG
|
|
|
|
mkdir -p $OUTPUT_RELEASE
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-19 03:42:57 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux debug
|
2012-08-02 13:02:59 +08:00
|
|
|
check_make_result
|
2012-08-02 13:19:40 +08:00
|
|
|
cp $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a $OUTPUT_DEBUG
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-19 03:42:57 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux release
|
|
|
|
check_make_result
|
|
|
|
cp $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a $OUTPUT_RELEASE
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a
|
2012-09-19 03:42:57 +08:00
|
|
|
|
|
|
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux debug
|
2012-08-02 13:02:59 +08:00
|
|
|
check_make_result
|
2012-08-02 13:19:40 +08:00
|
|
|
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_DEBUG
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-19 03:42:57 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux release
|
2012-08-02 13:02:59 +08:00
|
|
|
check_make_result
|
2012-09-19 03:42:57 +08:00
|
|
|
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_RELEASE
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-19 03:42:57 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux debug
|
2012-08-02 13:02:59 +08:00
|
|
|
check_make_result
|
2012-09-19 03:42:57 +08:00
|
|
|
cp $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so $OUTPUT_DEBUG
|
|
|
|
rm $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-19 03:42:57 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux release
|
|
|
|
check_make_result
|
|
|
|
cp $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so $OUTPUT_RELEASE
|
|
|
|
rm $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-19 03:42:57 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux debug
|
2012-08-02 13:02:59 +08:00
|
|
|
check_make_result
|
2012-09-19 03:42:57 +08:00
|
|
|
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_DEBUG
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so
|
2012-09-19 03:42:57 +08:00
|
|
|
|
|
|
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux release
|
2012-08-02 13:02:59 +08:00
|
|
|
check_make_result
|
2012-09-19 03:42:57 +08:00
|
|
|
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_RELEASE
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-09-26 20:51:41 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/scripting/lua/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/scripting/lua/proj.linux debug
|
|
|
|
check_make_result
|
|
|
|
cp $COCOS2DX20_TRUNK/scripting/lua/proj.linux/liblua.so $OUTPUT_DEBUG
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/scripting/lua/proj.linux/liblua.so
|
2012-09-26 20:51:41 +08:00
|
|
|
|
|
|
|
make -C $COCOS2DX20_TRUNK/scripting/lua/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/scripting/lua/proj.linux release
|
|
|
|
check_make_result
|
|
|
|
cp $COCOS2DX20_TRUNK/scripting/lua/proj.linux/liblua.so $OUTPUT_RELEASE
|
2012-12-22 08:14:15 +08:00
|
|
|
rm $COCOS2DX20_TRUNK/scripting/lua/proj.linux/liblua.so
|
2012-09-26 20:51:41 +08:00
|
|
|
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux debug
|
2012-09-21 13:34:05 +08:00
|
|
|
check_make_result
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux release
|
2012-09-21 13:34:05 +08:00
|
|
|
check_make_result
|
|
|
|
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux debug
|
2012-09-21 14:35:41 +08:00
|
|
|
check_make_result
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux release
|
2012-09-21 14:35:41 +08:00
|
|
|
check_make_result
|
2012-09-26 20:51:41 +08:00
|
|
|
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux debug
|
2012-09-26 20:51:41 +08:00
|
|
|
check_make_result
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux release
|
2012-09-26 20:51:41 +08:00
|
|
|
check_make_result
|
|
|
|
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux debug
|
2012-09-26 20:51:41 +08:00
|
|
|
check_make_result
|
2012-12-22 08:14:15 +08:00
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux clean
|
|
|
|
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux release
|
2012-09-26 20:51:41 +08:00
|
|
|
check_make_result
|
|
|
|
|