forked from electron-userland/electron-builder-binaries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwine.sh
executable file
·319 lines (297 loc) · 9.08 KB
/
wine.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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
#!/usr/bin/env bash
set -e
# custom homebrew prefix and DYLD_FALLBACK_LIBRARY_PATH doesn't work due to unknown reasons on Travis
# homebrew bottle and DYLD_FALLBACK_LIBRARY_PATH doesn't work due to not found library on Travis
# so, we just build it without brew http://mybyways.com/blog/compiling-wine-from-scratch-on-macos-with-retina-mode
# also, we build very minimal wine (~ 15 MB compressed)
WINE_VERSION=2.0.3
LIBPNG_VERSION=1.6.32
# 2.8.1 leads to error - https://forums.gentoo.org/viewtopic-p-8119832.html
FREETYPE_VERSION=2.8
rm -rf /tmp/wine-stage
mkdir -p /tmp/wine-stage/wine
cd /tmp/wine-stage/wine
mkdir usr
mkdir usr/lib
mkdir usr/bin
mkdir usr/include
export TARGET=$(PWD)
export CPPFLAGS="-I$TARGET/usr/include"
export CFLAGS="-O3 -arch i386 -m32 -I$TARGET/usr/include"
export CXXFLAGS="$CFLAGS "
export LDFLAGS=" -arch i386 -L$TARGET/usr/lib"
export PATH="$TARGET/usr/bin:$PATH"
export PKG_CONFIG_PATH="$TARGET/usr/lib/pkgconfig"
cd ..
# libxml required for wix
curl -L http://xmlsoft.org/sources/libxml2-2.9.6.tar.gz | tar xz
cd libxml2-*
./configure --prefix=$TARGET/usr --without-python --without-lzma --disable-dependency-tracking
make -j9
make install
cd ..
curl -L http://ijg.org/files/jpegsrc.v9b.tar.gz | tar xz
cd jpeg-9b
./configure --prefix=$TARGET/usr
make install
cd ..
curl -L http://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG_VERSION/libpng-$LIBPNG_VERSION.tar.gz | tar xz
cd libpng-$LIBPNG_VERSION
./configure --prefix=$TARGET/usr
make install
cd ..
curl -L http://download.savannah.gnu.org/releases/freetype/freetype-$FREETYPE_VERSION.tar.gz | tar xz
cd freetype-$FREETYPE_VERSION
./configure --prefix=$TARGET/usr
make -j9
make install
cd ..
#curl https://dl.winehq.org/wine/source/2.x/wine-$WINE_VERSION.tar.xz | tar xz
curl https://dl.winehq.org/wine/source/2.0/wine-$WINE_VERSION.tar.xz | tar xz
cd wine-$WINE_VERSION
./configure --prefix=$TARGET/usr --disable-win64 --disable-win16 --without-x
make -j9
make install
cd ../wine/usr
# prepare wine home
WINEPREFIX=/tmp/wine-stage/wine/usr/wine-home ./bin/wineboot --init
unlink bin/widl
unlink bin/wrc
unlink bin/wmc
rm -rf share/man
rm -rf share/doc
rm -rf share/gtk-doc
rm -rf include
rm -rf wine-home/drive_c/windows/Installer
rm -rf wine-home/drive_c/windows/Microsoft.NET
rm -rf wine-home/drive_c/windows/mono
rm -rf wine-home/drive_c/windows/system32/gecko
rm -rf wine-home/drive_c/windows/syswow64/gecko
rm -rf wine-home/drive_c/windows/Migration
rm -rf wine-home/drive_c/windows/logs
rm -rf wine-home/drive_c/windows/inf
rm -f wine-home/drive_c/windows/dotnet462.installed.workaround
rm -f wine-home/drive_c/windows/dd_SetupUtility.txt
PATH=./bin:$PATH WINEPREFIX=/tmp/wine-stage/wine/usr/wine-home winetricks -q dotnet462
cd wine-home/drive_c/windows/Microsoft.NET
rm NETFXRepair*
cd assembly/GAC_32
rm -rf PresentationCore
rm -rf Microsoft.VisualBasic.Activities.Compiler
rm -rf CustomMarshalers
rm -rf ISymWrapper
rm -rf Microsoft.Transactions.Bridge.Dtc
rm -rf System.*
cd ../GAC_MSIL
rm -rf System.Web.*
rm -rf Microsoft.Build*
rm -rf AspNetMMCExt
rm -rf Microsoft.JScript
rm -rf Microsoft.VisualBasic*
rm -rf UIAutomation*
rm -rf WindowsFormsIntegration
rm -rf XsdBuildTask
rm -rf XamlBuildTask
rm -rf System.Xaml*
rm -rf System.Workflow*
rm -rf System.Windows*
rm -rf System.Speech
rm -rf Microsoft.Activities.Build
rm -rf Microsoft.VisualC
rm -rf Microsoft.VisualC.STLCLR
rm -rf Microsoft.Workflow.Compiler
rm -rf PresentationBuildTasks
rm -rf PresentationFramework*
rm -rf PresentationUI
rm -rf ReachFramework
rm -rf System.Drawing*
rm -rf System.Design
rm -rf System.Deployment
rm -rf System.ServiceModel*
rm -rf System.Runtime.Serialization.Formatters.Soap
rm -rf System.Runtime.Serialization.Json
rm -rf Microsoft.Windows.ApplicationServer.Applications
rm -rf Microsoft.Transactions.Bridge
rm -rf Microsoft.Data.Entity.Build.Tasks
rm -rf Microsoft.Internal.Tasks.Dataflow
rm -rf System.Activities*
rm -rf System.ComponentModel*
rm -rf System.Data.*
rm -rf System.Linq*
rm -rf System.Net*
rm -rf System.Runtime*
rm -rf System.Reflection*
rm -rf WindowsBase
rm -rf System.Threading*
rm -rf System.ServiceProcess
rm -rf System.ObjectModel
rm -rf System.Messaging
rm -rf System.Management*
rm -rf System.IdentityModel*
rm -rf System.Dynamic*
rm -rf System.DirectoryServices*
rm -rf System.Configuration*
rm -rf System.AddIn*
rm -rf System.Xml.Linq
rm -rf System.Diagnostics*
rm -rf System.Device
rm -rf System.Numerics*
cd Framework
unlink NETFXSBS10.exe
cd v4.0.*
rm -rf WPF
rm *.exe
rm *.exe.config
rm System.Web.*
rm Microsoft.VisualBasic.*
rm -rf MSBuild
rm ngen.*
rm Microsoft.Build.*
rm -rf ASP.NETWebAdminFiles
rm aspnet_*
rm Aspnet_*
rm aspnet.*
rm Aspnet.*
unlink AspNetMMCExt.dll
unlink AdoNetDiag.dll
rm adonetdiag*
unlink CLR-ETW.man
rm System.ServiceModel*
unlink System.Design.dll
unlink System.Windows.Forms.dll
unlink System.Data.Entity.dll
unlink System.Activities.Presentation.dll
unlink System.Windows.Forms.DataVisualization.dll
unlink System.Workflow.ComponentModel.dll
unlink System.Data.Entity.Design.dll
unlink System.IdentityModel.dll
unlink System.Workflow.Activities.dll
unlink System.Deployment.dll
unlink Microsoft.JScript.dll
unlink System.Activities.dll
unlink System.Activities.Core.Presentation.dll
unlink System.Data.Linq.dll
unlink System.Data.Linq.dll
unlink System.Data.Services.dll
unlink System.Drawing.dll
unlink webengine4.dll
unlink System.Data.OracleClient.dll
unlink System.Workflow.Runtime.dll
unlink System.WorkflowServices.dll
unlink System.Data.Services.Client.dll
unlink System.Data.Services.Design.dll
unlink diasymreader.dll
unlink System.Data.SqlXml.dll
unlink System.Xaml.dll
unlink Microsoft.Windows.ApplicationServer.Applications.45.man
unlink System.Runtime.Serialization.dll
unlink System.EnterpriseServices.dll
unlink System.Data.dll
unlink Microsoft.Transactions.Bridge.dll
unlink System.Runtime.Remoting.dll
unlink _ServiceModelEndpointPerfCounters.ini
unlink System.Transactions.dll
unlink System.Messaging.dll
unlink Microsoft.Common.targets
unlink System.Net.dll
unlink System.DirectoryServices.Protocols.dll
unlink System.Net.Http.dll
unlink System.IdentityModel.Services.dll
unlink FileTracker.dll
unlink PerfCounter.dll
unlink peverify.dll
unlink Microsoft.Internal.Tasks.Dataflow.dll
unlink System.Runtime.DurableInstancing.dll
unlink _Networkingperfcounters.ini
unlink System.Xml.Linq.dll
unlink dfdll.dll
unlink System.ServiceModel.Channels.dll
unlink PerfCounters.ini
unlink System.Management.Instrumentation.dll
unlink mscorpehost.dll
unlink System.IdentityModel.Selectors.dll
unlink System.Activities.DurableInstancing.dll
unlink System.Runtime.Serialization.Formatters.Soap.dll
unlink Microsoft.Windows.ApplicationServer.Applications.dll
unlink clretwrc.dll
unlink System.ServiceModel.Internals.dll
unlink _ServiceModelOperationPerfCounters.ini
unlink System.AddIn.dll
unlink System.Numerics.dll
unlink _TransactionBridgePerfCounters.ini
unlink System.ServiceProcess.dll
unlink _SMSvcHostPerfCounters.ini
unlink XamlBuildTask.dll
unlink ServiceModelPerformanceCounters.dll
unlink corperfmonsymbols.ini
unlink mscordacwks.dll
unlink SOS.dll
unlink _ServiceModelServicePerfCounters.ini
unlink EventLogMessages.dll
unlink System.Management.dll
unlink System.configuration.dll
unlink System.ComponentModel.Composition.dll
unlink System.DirectoryServices.AccountManagement.dll
unlink Microsoft.Transactions.Bridge.Dtc.dll
unlink System.ServiceModel.Routing.dll
unlink System.Dynamic.dll
unlink ServiceModelPerformanceCounters.man
unlink CORPerfMonExt.dll
unlink dv_aspnetmmc.chm
unlink System.Drawing.Design.dll
unlink TLBREF.DLL
unlink System.EnterpriseServices.Wrapper.dll
unlink MmcAspExt.dll
unlink System.EnterpriseServices.Thunk.dll
unlink _dataperfcounters_shared12_neutral.ini
unlink CustomMarshalers.dll
unlink fusion.dll
unlink mscorpe.dll
unlink System.Windows.Forms.tlb
unlink System.Windows.Forms.DataVisualization.Design.dll
unlink System.Data.DataSetExtensions.dll
unlink ISymWrapper.dll
unlink XsdBuildTask.dll
unlink _DataOracleClientPerfCounters_shared12_neutral.ini
unlink alink.dll
unlink Microsoft.CSharp.dll
unlink System.DirectoryServices.dll
unlink WorkflowServiceHostPerformanceCounters.dll
unlink Microsoft.JScript.tlb
unlink _Networkingperfcounters_v2.ini
unlink Microsoft.Data.Entity.Build.Tasks.dll
unlink System.AddIn.Contract.dll
unlink System.Net.Http.WebRequest.dll
unlink Microsoft.VisualC.STLCLR.dll
unlink _DataPerfCounters.ini
unlink Microsoft.Activities.Build.dll
unlink System.XML.dll
unlink System.ComponentModel.DataAnnotations.dll
unlink Microsoft.Xaml.targets
unlink MSBuild.rsp
unlink XPThemes.manifest
unlink Microsoft.Data.Entity.targets
unlink Microsoft.Common.OverrideTasks
unlink ngen_service.old.log
unlink System.Drawing.tlb
unlink Workflow.VisualBasic.Targets
unlink System.Configuration.Install.dll
unlink System.Runtime.Caching.dll
unlink System.Diagnostics.Tracing.dll
unlink System.ServiceModel.Http.dll
rm System.Threading.*
unlink System.Collections.Concurrent.dll
unlink System.Xaml.Hosting.dll
unlink System.Resources.ResourceManager.dll
unlink System.ObjectModel.dll
rm System.Reflection.*
rm System.Runtime.*
rm *.sql
rm *.SQL
rm -rf "Temporary ASP.NET Files"
rm -rf SQL
rm -rf MUI
rm -rf MOF
rm -rf Config
rm *.h
rm -rf "1033"