@@ -11,17 +11,36 @@ build_library="all"
11
11
function usage()
12
12
{
13
13
echo " You should follow the instructions here to build static library for iOS"
14
- echo " If you want to build a fat, you should pass 'all' to --arch parameter."
14
+ echo " "
15
+ echo " ./build_png.sh"
16
+ echo " \t[-h --help] "
17
+ echo " \t--libs=[all | png,lua,tiff,jpeg,webp,zlib etc]"
18
+ echo " \t[--arch | -a]=[all | armv7,arm64,i386,x86_64 etc]"
19
+ echo " \t[--mode | -m]=[release | debug]"
20
+ echo " \t[--list | -l]"
15
21
echo " "
16
22
echo " Sample:"
17
- echo " ./bulid.sh --arch=armv7,arm64 --mode=debug"
18
- echo " You must seperate each arch with comma, otherwise it won't parse correctly. No whitespace is allowed between two arch types."
23
+ echo " \t./bulid.sh --libs=png --arch=armv7,arm64 --mode=debug"
19
24
echo " "
20
- echo " ./build_png.sh"
21
- echo " \t-h --help"
22
- echo " \t--libs=[all | png,lua,tiff,jpeg,webp,zlib,websockets,luajit,freetype2,curl,chipmunk,box2d]"
23
- echo " \t--arch=[all | armv7,arm64,i386,x86_64]"
24
- echo " \t--mode=[release | debug]"
25
+ }
26
+
27
+ function list_all_supported_libraries()
28
+ {
29
+
30
+ # TODO: we need to update the supported libraries and version when we upgrade libraries
31
+ echo " Supported libraries and versions:"
32
+ echo " \t"
33
+ echo " \tcurl 7.26.0"
34
+ echo " \tfreetype 2.5.3"
35
+ echo " \tjpeg 9.0"
36
+ echo " \tlua 1.5.4"
37
+ echo " \tluajit 2.0.1"
38
+ echo " \topenssl 1.0.1.j"
39
+ echo " \tlibpng 1.6.2"
40
+ echo " \ttiff 4.0.3"
41
+ echo " \twebp 0.4.2"
42
+ echo " \twebsockets 1.3"
43
+ echo " \tzlib 1.2.8"
25
44
echo " "
26
45
}
27
46
@@ -30,19 +49,23 @@ while [ "$1" != "" ]; do
30
49
PARAM=` echo $1 | awk -F= ' {print $1}' `
31
50
VALUE=` echo $1 | awk -F= ' {print $2}' `
32
51
case $PARAM in
33
- -h | --help )
52
+ --help | -h )
34
53
usage
35
54
exit
36
55
;;
37
56
--libs)
38
57
build_library=$VALUE
39
58
;;
40
- --arch)
59
+ --arch | -a )
41
60
build_arches=$VALUE
42
61
;;
43
- --mode)
62
+ --mode | -m )
44
63
build_mode=$VALUE
45
64
;;
65
+ --list | -l)
66
+ list_all_supported_libraries
67
+ exit
68
+ ;;
46
69
* )
47
70
echo " ERROR: unknown parameter \" $PARAM \" "
48
71
usage
0 commit comments