forked from cocos2d/cocos2d-x
-
Notifications
You must be signed in to change notification settings - Fork 6
/
make-all-linux-project.sh
executable file
·130 lines (109 loc) · 4.7 KB
/
make-all-linux-project.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/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/
OUTPUT_RELEASE=$COCOS2DX20_TRUNK/lib/linux/Release/
check_make_result()
{
if [ 0 != $? ]; then
exit 1
fi
}
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
fi
done
mkdir -p $OUTPUT_DEBUG
mkdir -p $OUTPUT_RELEASE
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux debug
check_make_result
cp $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a $OUTPUT_DEBUG
rm $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a
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
rm $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux clean
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux debug
check_make_result
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_DEBUG
rm $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux clean
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux release
check_make_result
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_RELEASE
rm $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux clean
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux debug
check_make_result
cp $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so $OUTPUT_DEBUG
rm $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so
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
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux debug
check_make_result
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_DEBUG
rm $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux release
check_make_result
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_RELEASE
rm $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so
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
rm $COCOS2DX20_TRUNK/scripting/lua/proj.linux/liblua.so
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
rm $COCOS2DX20_TRUNK/scripting/lua/proj.linux/liblua.so
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux debug
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Cpp/TestCpp/proj.linux release
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux debug
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Cpp/HelloCpp/proj.linux release
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux debug
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Lua/TestLua/proj.linux release
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux debug
check_make_result
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux clean
make -C $COCOS2DX20_TRUNK/samples/Lua/HelloLua/proj.linux release
check_make_result