Skip to content

Commit 45c60b9

Browse files
committed
fix png
1 parent ec32708 commit 45c60b9

File tree

2 files changed

+82
-9
lines changed

2 files changed

+82
-9
lines changed

build/ios/build_luajit.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rm -rf $top_dir/contrib/iPhoneOS-$arch
1818

1919
# build for i386
2020
arch=i386
21-
./build_without_config.sh -a $arch -l $library_name
21+
./build_without_export.sh -a $arch -l $library_name
2222
top_dir=$current_dir/../..
2323

2424
cd $current_dir
@@ -37,10 +37,12 @@ rm -rf $top_dir/contrib/iPhoneOS-$arch
3737
LIPO="xcrun -sdk iphoneos lipo"
3838
STRIP="xcrun -sdk iphoneos strip"
3939

40-
$LIPO -create $library_name/prebuilt/libluajit-armv7.a $library_name/prebuilt/libluajit-i386.a -output $library_name/prebuilt/libluajit.a
40+
$LIPO -create $library_name/prebuilt/lib$library_name-armv7.a \
41+
$library_name/prebuilt/lib$library_name-i386.a \
42+
-output $library_name/prebuilt/libluajit.a
4143

42-
rm $library_name/prebuilt/libluajit-armv7.a
43-
rm $library_name/prebuilt/libluajit-i386.a
44+
rm $library_name/prebuilt/lib$library_name-armv7.a
45+
rm $library_name/prebuilt/lib$library_name-i386.a
4446

4547
#remove debugging info
4648
$STRIP -S $library_name/prebuilt/libluajit.a

build/ios/build_png.sh

Lines changed: 76 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,86 @@
11
current_dir=`pwd`
22
library_name=png
3-
./build.sh -l $library_name
3+
rm -rf $library_name
4+
# build for armv7
5+
arch=armv7
6+
./build.sh -a $arch -l $library_name
47
top_dir=$current_dir/../..
58

69
cd $current_dir
710
mkdir -p $library_name/prebuilt/
811
mkdir -p $library_name/include/
912

10-
cp $top_dir/contrib/arm-linux-gnueabi-armv7a/lib/lib${library_name}.a $library_name/prebuilt/tizen/arm/
11-
cp $top_dir/contrib/arm-linux-gnueabi-armv7a/include/$library_name*.h $library_name/include/tizen/
13+
cp $top_dir/contrib/install-ios-OS/$arch/lib/lib$library_name.a $library_name/prebuilt/lib$library_name-$arch.a
14+
cp -r $top_dir/contrib/install-ios-Os/$arch/include/png*.h $library_name/include/
1215

1316
echo "cleaning up"
14-
rm -rf $top_dir/contrib/arm-linux-gnueabi-armv7a/
15-
rm -rf $top_dir/contrib/tizen-armv7-a
17+
rm -rf $top_dir/contrib/install-ios-OS
18+
rm -rf $top_dir/contrib/iPhoneOS-$arch
19+
20+
# build for i386
21+
arch=i386
22+
./build.sh -s -a $arch -l $library_name
23+
top_dir=$current_dir/../..
24+
25+
cd $current_dir
26+
mkdir -p $library_name/prebuilt/
27+
mkdir -p $library_name/include/
28+
29+
cp $top_dir/contrib/install-ios-Simulator/$arch/lib/lib${library_name}.a $library_name/prebuilt/lib$library_name-$arch.a
30+
31+
echo "cleaning up"
32+
rm -rf $top_dir/contrib/install-ios-Simulator
33+
rm -rf $top_dir/contrib/iPhoneSimulator-$arch
34+
35+
#build for x86_64
36+
arch=x86_64
37+
./build.sh -s -a $arch -l $library_name
38+
top_dir=$current_dir/../..
39+
40+
cd $current_dir
41+
mkdir -p $library_name/prebuilt/
42+
mkdir -p $library_name/include/
43+
44+
cp $top_dir/contrib/install-ios-Simulator/$arch/lib/lib${library_name}.a $library_name/prebuilt/lib$library_name-$arch.a
45+
46+
echo "cleaning up"
47+
rm -rf $top_dir/contrib/install-ios-Simulator/
48+
rm -rf $top_dir/contrib/iPhoneSimulator-$arch
49+
50+
#build for arm64
51+
arch=arm64
52+
./build.sh -a $arch -l $library_name
53+
top_dir=$current_dir/../..
54+
55+
cd $current_dir
56+
mkdir -p $library_name/prebuilt/
57+
mkdir -p $library_name/include/
58+
59+
cp $top_dir/contrib/install-ios-OS/$arch/lib/lib${library_name}.a $library_name/prebuilt/lib$library_name-$arch.a
60+
61+
echo "cleaning up"
62+
rm -rf $top_dir/contrib/install-ios-OS
63+
rm -rf $top_dir/contrib/iPhoneOS-$arch
64+
65+
66+
#strip & create fat library
67+
LIPO="xcrun -sdk iphoneos lipo"
68+
STRIP="xcrun -sdk iphoneos strip"
69+
70+
$LIPO -create $library_name/prebuilt/lib$library_name-armv7.a \
71+
$library_name/prebuilt/lib$library_name-i386.a \
72+
$library_name/prebuilt/lib$library_name-arm64.a \
73+
$library_name/prebuilt/lib$library_name-x86_64.a \
74+
-output $library_name/prebuilt/libluajit.a
75+
76+
# rm $library_name/prebuilt/lib$library_name-armv7.a
77+
# rm $library_name/prebuilt/lib$library_name-i386.a
78+
# rm $library_name/prebuilt/lib$library_name-arm64.a
79+
# rm $library_name/prebuilt/lib$library_name-x86_64.a
80+
81+
82+
#remove debugging info
83+
$STRIP -S $library_name/prebuilt/libluajit.a
84+
$LIPO -info $library_name/prebuilt/libluajit.a
85+
86+

0 commit comments

Comments
 (0)