-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy patharch.sh
131 lines (100 loc) · 2.05 KB
/
arch.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
#!/bin/sh
#Remove arch
cd Framework
clean="$1"
echo "$clean"
function removeAFN() {
echo "remove AFN"
rm AF*.o
rm *+AF*.o
}
function removeSD() {
echo "remove SD"
rm SD*.o
rm NSData+ImageContentType.o
rm UIImage+GIF.o
rm UIImage+MultiFormat.o
rm UIView+WebCacheOperation.o
rm -rf UIImage+WebP.o
rm -rf UIImage+ForceDecode.o
rm -rf NSImage+WebCache.o
rm -rf MKAnnotationView+WebCache.o
rm -rf UIButton+WebCache.o
rm -rf UIImageView+HighlightedWebCache.o
rm -rf UIImageView+WebCache.o
rm -rf UIView+WebCache.o
rm -rf FLAnimatedImageView+WebCache.o
}
function removeLuaView {
echo "remove LuaView"
rm -rf JUFL*.o
rm -rf l*.o
rm -rf Layout.o
rm -rf LuaView.o
rm -rf LuaViewCore.o
rm -rf *+LuaView.o
rm -rf print.o
rm -rf UIScrollView+LVRefresh.o
rm -rf UIView+JUFLXNode.o
rm -rf LV*.o
rm -rf VPLuaViewSDK-dummy.o
}
function removeZipArchive {
echo "remove ZipArchive"
rm -rf aes_ni.o
rm -rf aescrypt.o
rm -rf aeskey.o
rm -rf aestab.o
rm -rf entropy.o
rm -rf crypt.o
rm -rf fileenc.o
rm -rf hmac.o
rm -rf ioapi_buf.o
rm -rf ioapi_mem.o
rm -rf ioapi.o
rm -rf mztools.o
rm -rf minishared.o
rm -rf prng.o
rm -rf pwd2key.o
rm -rf sha1.o
rm -rf SSZipArchive-dummy.o
rm -rf SSZipArchive.o
rm -rf unzip.o
rm -rf zip.o
}
function removeLuaScriptManager {
echo "remove VPUPLuaScriptManager"
rm -rf VPUPLuaScriptManager.o
}
if [ "$clean" != "" ]; then
rm -rf i386
rm -rf x86_64
rm -rf armv7
rm -rf arm64
rm -rf output
exit
fi
archs=("i386" "x86_64" "armv7" "arm64")
for i in {0..3}
do
echo "${archs["$i"]} processing"
arch=${archs["$i"]}
mkdir "$arch"
echo "lipo thin"
lipo VideoOS -thin "$arch" -output "$arch"/VideoOS
mkdir "$arch"/archieve
cd "$arch"/archieve
echo "ar -x .a"
ar -x ../VideoOS
removeAFN
removeSD
# removeLuaView
# removeZipArchive
echo "libtool build"
libtool -static *.o -o ../VideoOS
cd ../../
done
mkdir output
lipo -create i386/VideoOS x86_64/VideoOS armv7/VideoOS arm64/VideoOS -output output/VideoOS
cd ..
exit