-
Notifications
You must be signed in to change notification settings - Fork 20
/
builder_darwin_x86on64_wine
198 lines (179 loc) · 5.48 KB
/
builder_darwin_x86on64_wine
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
#!/bin/bash
cp -a "/root/wine-git" "/root/wine-tools" || exit 1
####### Build Tools
echo "[STAGE 1/12] Configure tools"
cd "/root/wine-tools"
./configure CC="clang" CXX="clang++" --disable-option-checking --disable-tests --without-unwind --enable-win64 >>/dev/null 2>&1 || exit 2
echo "[STAGE 2/12] Make tools"
make __tooldeps__ -j 4 >>/dev/null 2>&1 || exit 3
####### Build wine
mkdir -p "/root/wine-git/wine64-build/"
mkdir -p "/root/wine-git/wine32-build/"
mkdir -p "/root/wine-git/wine32on64-build/"
####### Install VKD3D
#echo "[STAGE 3/11] Installing vkd3d"
#bash "/root/install_vkd3d.sh" "$VKD3D" >>/dev/null 2>&1 || exit 4
### Environment preparation
export LDFLAGS="-Wl,-rpath,@loader_path/../,-rpath,/opt/local/lib,-rpath,/opt/X11/lib"
#### Linux only options to disable
export LINUX_OPTIONS="--without-pulse --without-inotify --without-v4l2 --without-oss --without-udev --without-capi"
cd "/root/wine-git/wine64-build/"
echo "[STAGE 4/12] Configure 64bit"
../configure --host x86_64-apple-darwin17 --enable-win64 --prefix="" --with-wine-tools="/root/wine-tools" --disable-option-checking --disable-tests --without-unwind ${LINUX_OPTIONS} || exit 5
echo "[STAGE 5/12] Make 64 bits"
make -j 4 || exit 6
cd "/root/wine-git/wine32-build/"
echo "[STAGE 6/12] Configure 32bit"
../configure --host i386-apple-darwin17 TARGETFLAGS="-m32" --prefix="" --with-wine-tools="/root/wine-tools" --disable-option-checking --disable-tests --without-unwind ${LINUX_OPTIONS} || exit 7
echo "[STAGE 7/12] Make 32bit"
make -j 4 || exit 8
### Environment preparation
export LDFLAGS="-Wl,-rpath,@loader_path/../../lib64,-rpath,/opt/local/lib,-rpath,/opt/X11/lib"
cd "/root/wine-git/wine32on64-build/"
echo "[STAGE 6/12] Configure 32on64"
../configure --host x86_64-apple-darwin17 --enable-win32on64 --prefix="" --with-wine-tools="/root/wine-tools" --disable-option-checking --disable-tests --disable-winedbg --without-cms --without-gsm --without-gstreamer --without-gphoto --without-unwind --without-vulkan --without-x ${LINUX_OPTIONS} || exit 9
echo "[STAGE 7/12] Make 32on64"
make -j 4 -k || exit 10
echo "[STAGE 8/12] Make install 32bit"
cd "/root/wine-git/wine32-build/"
make install-lib DESTDIR="/root/wine" || exit 11
echo "[STAGE 9/12] Make install 32on64"
cd "/root/wine-git/wine32on64-build/"
make install-lib DESTDIR="/root/wine" || exit 12
echo "[STAGE 10/12] Make install 64bit"
cd "/root/wine-git/wine64-build/"
make install-lib DESTDIR="/root/wine" || exit 13
## Remove all the XQuartz files, not needed and shrink file size!
cd "/opt/local/lib"
rm libGL.1.dylib
rm libGL.dylib
rm libGLESv1_CM.1.dylib
rm libGLESv1_CM.dylib
rm libGLESv2.2.dylib
rm libGLESv2.dylib
rm libGLU.1.dylib
rm libGLU.dylib
rm libICE.6.dylib
rm libICE.dylib
rm libOSMesa.8.dylib
rm libOSMesa.dylib
rm libSM.6.dylib
rm libSM.dylib
rm libX11-xcb.1.dylib
rm libX11-xcb.dylib
rm libX11.6.dylib
rm libX11.dylib
rm libXau.6.dylib
rm libXau.dylib
rm libXcomposite.1.dylib
rm libXcomposite.dylib
rm libXcursor.1.dylib
rm libXcursor.dylib
rm libXdamage.1.dylib
rm libXdamage.dylib
rm libXdmcp.6.dylib
rm libXdmcp.dylib
rm libXext.6.dylib
rm libXext.dylib
rm libXfixes.3.dylib
rm libXfixes.dylib
rm libXft.2.dylib
rm libXft.dylib
rm libXi.6.dylib
rm libXi.dylib
rm libXinerama.1.dylib
rm libXinerama.dylib
rm libXmu.6.dylib
rm libXmu.dylib
rm libXmuu.1.dylib
rm libXmuu.dylib
rm libXrandr.2.dylib
rm libXrandr.dylib
rm libXrender.1.dylib
rm libXrender.dylib
rm libXt.6.dylib
rm libXt.dylib
rm libXv.1.dylib
rm libXv.dylib
rm libXxf86vm.1.dylib
rm libXxf86vm.dylib
rm libcairo-gobject.2.dylib
rm libcairo-gobject.dylib
rm libcairo-script-interpreter.2.dylib
rm libcairo-script-interpreter.dylib
rm libcairo.2.dylib
rm libcairo.dylib
rm libglapi.0.dylib
rm libglapi.dylib
rm libpixman-1.0.dylib
rm libpixman-1.dylib
rm libxcb-composite.0.dylib
rm libxcb-composite.dylib
rm libxcb-damage.0.dylib
rm libxcb-damage.dylib
rm libxcb-dpms.0.dylib
rm libxcb-dpms.dylib
rm libxcb-dri2.0.dylib
rm libxcb-dri2.dylib
rm libxcb-dri3.0.dylib
rm libxcb-dri3.dylib
rm libxcb-glx.0.dylib
rm libxcb-glx.dylib
rm libxcb-present.0.dylib
rm libxcb-present.dylib
rm libxcb-randr.0.dylib
rm libxcb-randr.dylib
rm libxcb-record.0.dylib
rm libxcb-record.dylib
rm libxcb-render.0.dylib
rm libxcb-render.dylib
rm libxcb-res.0.dylib
rm libxcb-res.dylib
rm libxcb-screensaver.0.dylib
rm libxcb-screensaver.dylib
rm libxcb-shape.0.dylib
rm libxcb-shape.dylib
rm libxcb-shm.0.dylib
rm libxcb-shm.dylib
rm libxcb-sync.1.dylib
rm libxcb-sync.dylib
rm libxcb-util.1.dylib
rm libxcb-util.dylib
rm libxcb-xf86dri.0.dylib
rm libxcb-xf86dri.dylib
rm libxcb-xfixes.0.dylib
rm libxcb-xfixes.dylib
rm libxcb-xinerama.0.dylib
rm libxcb-xinerama.dylib
rm libxcb-xinput.0.dylib
rm libxcb-xinput.dylib
rm libxcb-xkb.1.dylib
rm libxcb-xkb.dylib
rm libxcb-xtest.0.dylib
rm libxcb-xtest.dylib
rm libxcb-xv.0.dylib
rm libxcb-xv.dylib
rm libxcb-xvmc.0.dylib
rm libxcb-xvmc.dylib
rm libxcb.1.dylib
rm libxcb.dylib
rm libpython2.7.dylib
## Fixing imports
echo "[STAGE 11/12] Fixing imports"
bash /root/fix_imports.sh "/opt/local" >>/dev/null 2>&1
## Copying libs
echo "[STAGE 12/12] Copying libs"
cp -d /opt/local/lib/*.dylib "/root/wine/lib"
cp -d /opt/local/lib/*.dylib "/root/wine/lib64"
## Make the dylibs 32Bit only
cd "/root/wine/lib/"
rm libMoltenVK.dylib
for file in *.dylib; do
[ ! -L "$file" ] && i386-apple-darwin17-lipo -thin i386 "$file" -o "$file" 2> /dev/null
done
## Make the dylibs 64Bit only
cd "/root/wine/lib64/"
for file in *.dylib; do
[ ! -L "$file" ] && x86_64-apple-darwin17-lipo -thin x86_64 "$file" -o "$file" 2> /dev/null
done
echo "[END]"