Skip to content

Commit 01ba361

Browse files
committed
add --list option to ios/build.sh
1 parent 04c8e8a commit 01ba361

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

build/ios/build.sh

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,36 @@ build_library="all"
1111
function usage()
1212
{
1313
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]"
1521
echo ""
1622
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"
1924
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"
2544
echo ""
2645
}
2746

@@ -30,19 +49,23 @@ while [ "$1" != "" ]; do
3049
PARAM=`echo $1 | awk -F= '{print $1}'`
3150
VALUE=`echo $1 | awk -F= '{print $2}'`
3251
case $PARAM in
33-
-h | --help)
52+
--help | -h)
3453
usage
3554
exit
3655
;;
3756
--libs)
3857
build_library=$VALUE
3958
;;
40-
--arch)
59+
--arch | -a)
4160
build_arches=$VALUE
4261
;;
43-
--mode)
62+
--mode | -m)
4463
build_mode=$VALUE
4564
;;
65+
--list | -l)
66+
list_all_supported_libraries
67+
exit
68+
;;
4669
*)
4770
echo "ERROR: unknown parameter \"$PARAM\""
4871
usage

0 commit comments

Comments
 (0)