-
Notifications
You must be signed in to change notification settings - Fork 52
/
build-ios-sdk.sh
213 lines (159 loc) · 11.8 KB
/
build-ios-sdk.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#!/bin/sh
rm -rf ./publish/nativetools/template/ios/LayaRuntime-iOS
mkdir ./publish/nativetools/template/ios/LayaRuntime-iOS
mkdir ./publish/nativetools/template/ios/LayaRuntime-iOS/libs
#—————————————————————merge static lib————————————————————————
rm -f conch/libconch.a
rm -rf armv7a
rm -rf armv64
rm -rf i386
rm -rf x86_64
mkdir armv7a
mkdir armv64
mkdir i386
mkdir x86_64
lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBulletDynamics.a -o armv7a/libBulletDynamics.a
lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBulletDynamics.a -o armv64/libBulletDynamics.a
lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBulletDynamics.a -o i386/libBulletDynamics.a
lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBulletDynamics.a -o x86_64/libBulletDynamics.a
lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBulletCollision.a -o armv7a/libBulletCollision.a
lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBulletCollision.a -o armv64/libBulletCollision.a
lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBulletCollision.a -o i386/libBulletCollision.a
lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBulletCollision.a -o x86_64/libBulletCollision.a
lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libLinearMath.a -o armv7a/libLinearMath.a
lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libLinearMath.a -o armv64/libLinearMath.a
lipo -extract i386 ./ThirdParty/bullet/lib/ios/libLinearMath.a -o i386/libLinearMath.a
lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libLinearMath.a -o x86_64/libLinearMath.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBullet3Collision.a -o armv7a/libBullet3Collision.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBullet3Collision.a -o armv64/libBullet3Collision.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBullet3Collision.a -o i386/libBullet3Collision.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBullet3Collision.a -o x86_64/libBullet3Collision.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBullet2FileLoader.a -o armv7a/libBullet2FileLoader.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBullet2FileLoader.a -o armv64/libBullet2FileLoader.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBullet2FileLoader.a -o i386/libBullet2FileLoader.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBullet2FileLoader.a -o x86_64/libBullet2FileLoader.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBullet3Geometry.a -o armv7a/libBullet3Geometry.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBullet3Geometry.a -o armv64/libBullet3Geometry.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBullet3Geometry.a -o i386/libBullet3Geometry.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBullet3Geometry.a -o x86_64/libBullet3Geometry.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBullet3Common.a -o armv7a/libBullet3Common.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBullet3Common.a -o armv64/libBullet3Common.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBullet3Common.a -o i386/libBullet3Common.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBullet3Common.a -o x86_64/libBullet3Common.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBullet3OpenCL_clew.a -o armv7a/libBullet3OpenCL_clew.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBullet3OpenCL_clew.a -o armv64/libBullet3OpenCL_clew.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBullet3OpenCL_clew.a -o i386/libBullet3OpenCL_clew.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBullet3OpenCL_clew.a -o x86_64/libBullet3OpenCL_clew.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBulletInverseDynamics.a -o armv7a/libBulletInverseDynamics.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBulletInverseDynamics.a -o armv64/libBulletInverseDynamics.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBulletInverseDynamics.a -o i386/libBulletInverseDynamics.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBulletInverseDynamics.a -o x86_64/libBulletInverseDynamics.a
#lipo -extract armv7 ./ThirdParty/bullet/lib/ios/libBulletSoftBody.a -o armv7a/libBulletSoftBody.a
#lipo -extract arm64 ./ThirdParty/bullet/lib/ios/libBulletSoftBody.a -o armv64/libBulletSoftBody.a
#lipo -extract i386 ./ThirdParty/bullet/lib/ios/libBulletSoftBody.a -o i386/libBulletSoftBody.a
#lipo -extract x86_64 ./ThirdParty/bullet/lib/ios/libBulletSoftBody.a -o x86_64/libBulletSoftBody.a
lipo -extract armv7 ./ThirdParty/freetype/lib/ios/libfreetype.a -o armv7a/libfreetype.a
lipo -extract arm64 ./ThirdParty/freetype/lib/ios/libfreetype.a -o armv64/libfreetype.a
lipo -extract i386 ./ThirdParty/freetype/lib/ios/libfreetype.a -o i386/libfreetype.a
lipo -extract x86_64 ./ThirdParty/freetype/lib/ios/libfreetype.a -o x86_64/libfreetype.a
lipo -extract armv7 ./ThirdParty/jpeg-turbo/lib/ios/libjpeg.a -o armv7a/libjpeg.a
lipo -extract arm64 ./ThirdParty/jpeg-turbo/lib/ios/libjpeg.a -o armv64/libjpeg.a
lipo -extract i386 ./ThirdParty/jpeg-turbo/lib/ios/libjpeg.a -o i386/libjpeg.a
lipo -extract x86_64 ./ThirdParty/jpeg-turbo/lib/ios/libjpeg.a -o x86_64/libjpeg.a
lipo -extract armv7 ./ThirdParty/jpeg-turbo/lib/ios/libturbojpeg.a -o armv7a/libturbojpeg.a
lipo -extract arm64 ./ThirdParty/jpeg-turbo/lib/ios/libturbojpeg.a -o armv64/libturbojpeg.a
lipo -extract i386 ./ThirdParty/jpeg-turbo/lib/ios/libturbojpeg.a -o i386/libturbojpeg.a
lipo -extract x86_64 ./ThirdParty/jpeg-turbo/lib/ios/libturbojpeg.a -o x86_64/libturbojpeg.a
lipo -extract armv7 ./ThirdParty/png/lib/ios/libpng.a -o armv7a/libpng.a
lipo -extract arm64 ./ThirdParty/png/lib/ios/libpng.a -o armv64/libpng.a
lipo -extract i386 ./ThirdParty/png/lib/ios/libpng.a -o i386/libpng.a
lipo -extract x86_64 ./ThirdParty/png/lib/ios/libpng.a -o x86_64/libpng.a
lipo -extract armv7 ./ThirdParty/websockets/lib/ios/libwebsockets.a -o armv7a/libwebsockets.a
lipo -extract arm64 ./ThirdParty/websockets/lib/ios/libwebsockets.a -o armv64/libwebsockets.a
lipo -extract i386 ./ThirdParty/websockets/lib/ios/libwebsockets.a -o i386/libwebsockets.a
lipo -extract x86_64 ./ThirdParty/websockets/lib/ios/libwebsockets.a -o x86_64/libwebsockets.a
lipo -extract armv7 ./ThirdParty/zip/lib/ios/libzip.a -o armv7a/libzip.a
lipo -extract arm64 ./ThirdParty/zip/lib/ios/libzip.a -o armv64/libzip.a
lipo -extract i386 ./ThirdParty/zip/lib/ios/libzip.a -o i386/libzip.a
lipo -extract x86_64 ./ThirdParty/zip/lib/ios/libzip.a -o x86_64/libzip.a
lipo -extract armv7 ./ThirdParty/ogg/lib/ios/libogg.a -o armv7a/libogg.a
lipo -extract arm64 ./ThirdParty/ogg/lib/ios/libogg.a -o armv64/libogg.a
lipo -extract i386 ./ThirdParty/ogg/lib/ios/libogg.a -o i386/libogg.a
lipo -extract x86_64 ./ThirdParty/ogg/lib/ios/libogg.a -o x86_64/libogg.a
lipo -extract armv7 ./ThirdParty/ogg/lib/ios/libvorbis.a -o armv7a/libvorbis.a
lipo -extract arm64 ./ThirdParty/ogg/lib/ios/libvorbis.a -o armv64/libvorbis.a
lipo -extract i386 ./ThirdParty/ogg/lib/ios/libvorbis.a -o i386/libvorbis.a
lipo -extract x86_64 ./ThirdParty/ogg/lib/ios/libvorbis.a -o x86_64/libvorbis.a
lipo -extract armv7 ./ThirdParty/ogg/lib/ios/libvorbisfile.a -o armv7a/libvorbisfile.a
lipo -extract arm64 ./ThirdParty/ogg/lib/ios/libvorbisfile.a -o armv64/libvorbisfile.a
lipo -extract i386 ./ThirdParty/ogg/lib/ios/libvorbisfile.a -o i386/libvorbisfile.a
lipo -extract x86_64 ./ThirdParty/ogg/lib/ios/libvorbisfile.a -o x86_64/libvorbisfile.a
lipo -extract armv7 ./ThirdParty/zlib/lib/ios/libz.a -o armv7a/libz.a
lipo -extract arm64 ./ThirdParty/zlib/lib/ios/libz.a -o armv64/libz.a
lipo -extract i386 ./ThirdParty/zlib/lib/ios/libz.a -o i386/libz.a
lipo -extract x86_64 ./ThirdParty/zlib/lib/ios/libz.a -o x86_64/libz.a
lipo -extract armv7 ./ThirdParty/curl/lib/ios/libcurl.a -o armv7a/libcurl.a
lipo -extract arm64 ./ThirdParty/curl/lib/ios/libcurl.a -o armv64/libcurl.a
lipo -extract i386 ./ThirdParty/curl/lib/ios/libcurl.a -o i386/libcurl.a
lipo -extract x86_64 ./ThirdParty/curl/lib/ios/libcurl.a -o x86_64/libcurl.a
lipo -extract armv7 ./ThirdParty/openssl/lib/ios/libssl.a -o armv7a/libssl.a
lipo -extract arm64 ./ThirdParty/openssl/lib/ios/libssl.a -o armv64/libssl.a
lipo -extract i386 ./ThirdParty/openssl/lib/ios/libssl.a -o i386/libssl.a
lipo -extract x86_64 ./ThirdParty/openssl/lib/ios/libssl.a -o x86_64/libssl.a
lipo -extract armv7 ./ThirdParty/openssl/lib/ios/libcrypto.a -o armv7a/libcrypto.a
lipo -extract arm64 ./ThirdParty/openssl/lib/ios/libcrypto.a -o armv64/libcrypto.a
lipo -extract i386 ./ThirdParty/openssl/lib/ios/libcrypto.a -o i386/libcrypto.a
lipo -extract x86_64 ./ThirdParty/openssl/lib/ios/libcrypto.a -o x86_64/libcrypto.a
#lipo -extract armv7 ./ThirdParty/tpg/lib/ios/libTPGDec.a -o armv7a/libTPGDec.a
#lipo -extract arm64 ./ThirdParty/tpg/lib/ios/libTPGDec.a -o armv64/libTPGDec.a
#lipo -extract i386 ./ThirdParty/tpg/lib/ios/libTPGDec.a -o i386/libTPGDec.a
#lipo -extract x86_64 ./ThirdParty/tpg/lib/ios/libTPGDec.a -o x86_64/libTPGDec.a
#lipo -extract armv7 ./ThirdParty/tpg/lib/ios/liblibYUV.a -o armv7a/liblibYUV.a
#lipo -extract arm64 ./ThirdParty/tpg/lib/ios/liblibYUV.a -o armv64/liblibYUV.a
#lipo -extract i386 ./ThirdParty/tpg/lib/ios/liblibYUV.a -o i386/liblibYUV.a
#lipo -extract x86_64 ./ThirdParty/tpg/lib/ios/liblibYUV.a -o x86_64/liblibYUV.a
cp ./Conch/libs/ios/libcommon.a armv64/libcommon.a
#lipo -extract armv7 ./Conch/libs/ios/libcommon.a -o armv7a/libcommon.a
#lipo -extract arm64 ./Conch/libs/ios-sim/libcommon.a -o armv64/libcommon.a
#lipo -extract i386 ./Conch/libs/ios-sim/libcommon.a -o i386/libcommon.a
lipo -extract x86_64 ./Conch/libs/ios-sim/libcommon.a -o x86_64/libcommon.a
cp ./Conch/libs/ios/librender.a armv64/librender.a
#lipo -extract armv7 ./Conch/libs/ios/librender.a -o armv7a/librender.a
#lipo -extract arm64 ./Conch/libs/ios-sim/librender.a -o armv64/librender.a
#lipo -extract i386 ./Conch/libs/ios-sim/librender.a -o i386/librender.a
lipo -extract x86_64 ./Conch/libs/ios-sim/librender.a -o x86_64/librender.a
cp ./Conch/libs/ios/libconchRuntime.a armv64/libconchRuntime.a
#lipo -extract armv7 ./Conch/libs/ios/libconchRuntime.a -o armv7a/libconchRuntime.a
#lipo -extract arm64 ./Conch/libs/ios-sim/libconchRuntime.a -o armv64/libconchRuntime.a
#lipo -extract i386 ./Conch/libs/ios-sim/libconchRuntime.a -o i386/libconchRuntime.a
lipo -extract x86_64 ./Conch/libs/ios-sim/libconchRuntime.a -o x86_64/libconchRuntime.a
#lipo -extract armv7 ./Conch/libs/ios/libwebglPlus.a -o armv7a/libwebglPlus.a
#lipo -extract arm64 ./Conch/libs/ios/libwebglPlus.a -o armv64/libwebglPlus.a
#lipo -extract i386 ./Conch/libs/ios-sim/libwebglPlus.a -o i386/libwebglPlus.a
#lipo -extract x86_64 ./Conch/libs/ios-sim/libwebglPlus.a -o x86_64/libwebglPlus.a
#cd armv7a
#libtool -static *.a -o libconch.a
#cd ..
cd armv64
libtool -static *.a -o libconch.a
cd ..
#cd i386
#libtool -static *.a -o libconch.a
#cd ..
cd x86_64
libtool -static *.a -o libconch.a
cd ..
#lipo -create x86_64/libconch.a i386/libconch.a armv7a/libconch.a armv64/libconch.a -output ./publish/nativetools/template/ios/LayaRuntime-iOS/libs/libconch.a
lipo -create x86_64/libconch.a armv64/libconch.a -output ./publish/nativetools/template/ios/LayaRuntime-iOS/libs/libconch.a
#rm -rf armv7a
#rm -rf armv64
#rm -rf i386
#rm -rf x86_64
#—————————————————————copy .h————————————————————————
rm -rf ./publish/nativetools/template/ios/LayaRuntime-iOS/include
mkdir ./publish/nativetools/template/ios/LayaRuntime-iOS/include
cp -rf ./Conch/include/conchRuntime/ ./publish/nativetools/template/ios/LayaRuntime-iOS/include
#—————————————————————resource————————————————————————
rm -rf ./publish/nativetools/template/ios/LayaRuntime-iOS/resource
mkdir ./publish/nativetools/template/ios/LayaRuntime-iOS/resource
cp -rf ./Conch/build/conch/proj.ios/resource ./publish/nativetools/template/ios/LayaBox/