Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: tools/valgrind/wine_memcheck/winetricks

Issue 6541014: Remove Wine + Valgrind code since nobody is working on it.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/valgrind/wine_memcheck/suppressions.txt ('k') | tools/wine_valgrind/chrome_tests.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2 # Quick and dirty script to download and install various
3 # redistributable runtime libraries
4 #
5 # Current maintainers: Austin English, Dan Kegel
6 # Copyright 2007, 2008, 2009, 2010 Google (Dan Kegel, dank@kegel.com)
7 # Copyright 2008, 2009, 2010 Austin English (austinenglish@gmail.com)
8 # Thanks to Detlef Riekenberg for lots of updates
9 # Thanks to Saulius Krasuckas for corrections and suggestions
10 # Thanks to Erik Inge Bolsø for several patches
11 # Thanks to Hugh Perkins for the directplay patch
12 # Please report problems at http://code.google.com/p/winezeug/issues
13 # See also http://wiki.winehq.org/winetricks
14 #
15 # Note to contributors: please avoid gnu extensions in this shell script,
16 # as it has to run on MacOSX and Solaris, too. A good book on the topic is
17 # "Portable Shell Programming" by Bruce Blinn
18
19 #---- Constants -------------------------------------------------
20
21 # Name of this version of winetricks (YYYYMMDD)
22 VERSION=20100201
23
24 early_wine()
25 {
26 WINEDLLOVERRIDES=mshtml= $WINE "$@"
27 }
28
29 # Default values for important settings if not already in environment.
30 # These settings should not need editing here.
31 case "$OS" in
32 "Windows_NT")
33 # Cheezy fix for getting rid of double slashes when running cygwin in wine
34 case $HOME in
35 /) HOME="" ;;
36 esac
37 WINE=""
38 WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
39 DRIVE_C="C:/"
40 XXXPATH=cygpath
41 ;;
42 *)
43 WINE=${WINE:-wine}
44 WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
45 DRIVE_C="$WINEPREFIX/drive_c"
46 XXXPATH="early_wine winepath"
47 ;;
48 esac
49
50 # Internal variables; these locations are not too important
51 WINETRICKS_CACHE="$HOME/winetrickscache"
52 # Default to hiding the directory, by popular demand
53 test -d "$WINETRICKS_CACHE" || WINETRICKS_CACHE=$HOME/.winetrickscache
54 WINETRICKS_CACHE_WIN="`$XXXPATH -w $WINETRICKS_CACHE | tr '\012' ' ' | sed 's/ $ //'`"
55 WINETRICKS_TMP="$DRIVE_C"/winetrickstmp
56 WINETRICKS_TMP_WIN='c:\winetrickstmp'
57 mkdir -p $WINETRICKS_TMP
58
59 # Overridden for windows
60 ISO_MOUNT_ROOT=/mnt/winetricks
61
62 WINDIR="$DRIVE_C/windows"
63
64 # Which sourceforge mirror to use. Rotate based on time, since
65 # their mirror picker sometimes persistantly sends you to a broken
66 # mirror.
67 case `date +%S` in
68 *[01]) SOURCEFORGE=http://internap.dl.sourceforge.net/sourceforge ;;
69 *[23]) SOURCEFORGE=http://easynews.dl.sourceforge.net/sourceforge ;;
70 *) SOURCEFORGE=http://downloads.sourceforge.net;;
71 esac
72
73 #---- Functions -------------------------------------------------
74
75 # Check for known desktop environments
76 # Set variable DE to the desktop environment's name, lowercase
77 detectDE() {
78 if [ x"$KDE_FULL_SESSION" = x"true" ]
79 then
80 DE=kde
81 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]
82 then
83 DE=gnome
84 elif [ x"$DISPLAY" != x"" ]
85 then
86 DE=x
87 else
88 DE=none
89 fi
90 }
91
92 warn() {
93 echo "$@"
94
95 test "$GUI" = 1 || return
96
97 # For some reason, nulls were showing up in $@?!, causing truncated output i n zenity
98 msg="`echo $@ | tr '\000' ' '`"
99 case $DE in
100 gnome) zenity --error --title=Winetricks --text="$msg" --no-wrap;;
101 kde) kdialog --title Winetricks --error "$msg" ;;
102 x) xmessage -title Winetricks -center " Error: $msg " ;;
103 esac
104 }
105
106 die() {
107 warn "$@"
108
109 exit 1
110 }
111
112 # Abort if user doesn't own the given directory (or its parent, if it doesn't ex ist yet)
113 die_if_user_not_dirowner() {
114 if test -d "$1"
115 then
116 checkdir="$1"
117 else
118 # fixme: quoting problem?
119 checkdir=`dirname "$1"`
120 fi
121 nuser=`id -u`
122 nowner=`ls -l -n -d -L "$checkdir" | awk '{print $3}'`
123 if test x$nuser != x$nowner
124 then
125 die "You (`id -un`) don't own $checkdir. Don't run winetricks as another user!"
126 fi
127 }
128
129 #----------------------------------------------------------------
130
131 usage() {
132 set +x
133 # WARNING: do not use single quote in any package description; that breaks t he gui menu.
134 echo "Usage: $0 [options] package [package] ..."
135 echo "This script can help you prepare your system for Windows applications"
136 echo "that mistakenly assume all users' systems have all the needed"
137 echo "redistributable runtime libraries or fonts."
138 echo "Some options require the Linux 'cabextract' program."
139 echo ""
140 echo "Options:"
141 echo " -q quiet. You must have already agreed to the EULAs."
142 echo " -v verbose"
143 echo " -V display Version"
144 echo "Packages:"
145 echo " art2kmin MS Access 2007 runtime"
146 echo " atmlib Adobe Type Manager. Needed for Adobe CS4"
147 echo " autohotkey Autohotkey (open source gui scripting language)"
148 echo " cmake CMake, the cross-platform, open-source build system"
149 echo " colorprofile Standard RGB color profile"
150 echo " comctl32 MS common controls 5.80"
151 echo " comctl32.ocx MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6"
152 echo " controlpad MS ActiveX Control Pad"
153 echo " corefonts MS Arial, Courier, Times fonts"
154 echo " cygwin Unix apps for Windows (needed by some build scripts)"
155 echo " d3dx9 MS d3dx9_??.dll (from DirectX 9 user redistributable)"
156 echo " d3dx10 MS d3dx10_??.dll (from DirectX user redistributable)"
157 echo " dcom98 MS DCOM (ole32, oleaut32); requires Windows 98 license, but does not check for one"
158 echo " dinput8 MS dinput8.dll (from DirectX 9 user redistributable)"
159 echo " dirac0.8 the obsolete Dirac 0.8 directshow filter"
160 echo " directplay MS DirectPlay (from DirectX 9 user redistributable)"
161 echo " directx9 MS DirectX 9 user redistributable (not recommended! use d3dx9 instead)"
162 echo " directx9-beta MS DirectX 9 user redistributable - beta verb (not reco mmended! use d3dx9 instead)"
163 echo " divx divx video codec"
164 echo " dotnet11 MS .NET 1.1 (requires Windows license, but does not che ck for one)"
165 # Doesn't work yet, don't make it public
166 # echo " dotnet11sdk MS .NET Framework SDK Version 1.1 (requires Windows li cense, but does not check for one; may not work yet)"
167 echo " dotnet20 MS .NET 2.0 (requires Windows license, but does not che ck for one)"
168 # Doesn't work yet, don't make it public
169 # echo " dotnet20sdk MS .NET Framework SDK Version 2.0 (requires Windows li cense, but does not check for one, may not work yet)"
170 echo " dotnet20sp2 MS .NET 2.0 sp2 (requires Windows license, but does not check for one)"
171 echo " dotnet30 MS .NET 3.0 (requires Windows license, but does not che ck for one, might not work yet)"
172 echo " droid Droid fonts (on LCD, looks better with fontsmooth-rgb)"
173 echo " ffdshow ffdshow video codecs"
174 echo " firefox Firefox web browser"
175 echo " flash Adobe Flash Player ActiveX and firefox plugins"
176 echo " fm20 MS Forms 2.0 Object Library"
177 echo " fontfix Fix bad fonts which cause crash in some apps (e.g. .net )."
178 echo " fontsmooth-bgr Enables subpixel smoothing for BGR LCDs"
179 echo " fontsmooth-disable Disables font smoothing"
180 echo " fontsmooth-gray Enables grayscale font smoothing"
181 echo " fontsmooth-rgb Enables subpixel smoothing for RGB LCDs"
182 echo " gdiplus MS gdiplus.dll"
183 echo " gecko-dbg The HTML rendering Engine (Mozilla), with debugging sym bols"
184 echo " gecko The HTML rendering Engine (Mozilla)"
185 echo " hosts Adds empty C:\windows\system32\drivers\etc\{hosts,servi ces} files"
186 echo " icodecs Intel Codecs (Indeo)"
187 echo " ie6 Microsoft Internet Explorer 6.0"
188 echo " ie7 Microsoft Internet Explorer 7.0"
189 echo " jet40 MS Jet 4.0 Service Pack 8"
190 echo " kde KDE for Windows installer"
191 echo " liberation Red Hat Liberation fonts (Sans, Serif, Mono)"
192 echo " mdac25 MS MDAC 2.5: Microsoft ODBC drivers, etc."
193 echo " mdac27 MS MDAC 2.7"
194 echo " mdac28 MS MDAC 2.8"
195 echo " mfc40 MS mfc40 (Microsoft Foundation Classes from Visual C++ 4)"
196 echo " mfc42 MS mfc42 (same as vcrun6 below)"
197 echo " mingw-gdb GDB for MinGW"
198 echo " mingw Minimalist GNU for Windows, including GCC for Windows!"
199 echo " mono20 mono-2.0.1"
200 echo " mono22 mono-2.2"
201 echo " mono24 mono-2.4"
202 echo " mozillabuild Mozilla build environment"
203 echo " mpc Media Player Classic"
204 echo " mshflxgd MS Hierarchical Flex Grid Control"
205 echo " msi2 MS Installer 2.0"
206 echo " msls31 MS Line Services 3.1 (needed by native riched?)"
207 echo " msmask MS Masked Edit Control"
208 echo " mspaint MS Paint (gotta draw stick figures somehow...)"
209 echo " msscript MS Script Control"
210 echo " msxml3 MS XML version 3"
211 echo " msxml4 MS XML version 4"
212 echo " msxml6 MS XML version 6"
213 echo " ogg ogg filters/codecs: flac, theora, speex, vorbis, schroe dinger"
214 echo " ole2 MS 16 bit OLE"
215 echo " openwatcom Open Watcom C/C++ compiler (can compile win16 code!)"
216 echo " pdh MS pdh.dll (Performance Data Helper)"
217 echo " physx NVIDIA/AGEIA PhysX runtime"
218 echo " psdk2003 MS Platform SDK 2003"
219 echo " psdkvista MS Vista SDK (does not install yet)"
220 echo " psdkwin7 MS Windows 7 SDK (installing just headers and c++ compi ler works)"
221 echo " python26 Python 2.6.2 (and pywin32)"
222 echo " python-comtypes Python 0.6.1-1 comtypes package"
223 echo " quicktime72 Apple Quicktime 7.2"
224 echo " riched20 MS riched20 and riched32"
225 echo " riched30 MS riched30"
226 echo " richtx32 MS Rich TextBox Control 6.0"
227 echo " shockwave Adobe Shockwave Player"
228 echo " tahoma MS Tahoma font (not part of corefonts)"
229 echo " urlmon MS urlmon.dll"
230 echo " usp10 MS usp10.dll (Uniscribe)"
231 echo " vb2run MS Visual Basic 2 runtime"
232 echo " vb3run MS Visual Basic 3 runtime"
233 echo " vb4run MS Visual Basic 4 runtime"
234 echo " vb5run MS Visual Basic 5 runtime"
235 echo " vb6run MS Visual Basic 6 Service Pack 6 runtime"
236 echo " vc2005express MS Visual C++ 2005 Express"
237 echo " vc2005expresssp1 MS Visual C++ 2005 Express SP1 (does not work yet)"
238 echo " vc2005sp1 MS Visual C++ 2005 Service Pack 1 and ATL fix (install trial 1st)"
239 echo " vc2005hotfix MS Visual C++ 2005 hotfixes (install sp1 1st)"
240 echo " vc2005trial MS Visual C++ 2005 Trial"
241 echo " vcrun2003 MS Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)"
242 echo " vcrun2005 MS Visual C++ 2005 sp1 libraries (mfc80,msvcp80,msvcr80 )"
243 echo " vcrun2008 MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)"
244 echo " vcrun6 MS Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcrt)"
245 echo " vcrun6sp6 MS Visual C++ 6 sp6 libraries (mfc42, msvcp60, msvcrt; 64 MB download)"
246 echo " vjrun20 MS Visual J# 2.0 SE libraries (requires dotnet20)"
247 echo " vlc VLC media player"
248 echo " wenquanyi WenQuanYi CJK font (on LCD looks better with fontsmooth -rgb)"
249 echo " wininet MS wininet.dll (requires Windows license, but does not check for one)"
250 echo " wme9 MS Windows Media Encoder 9 (requires Windows license, b ut does not check for one)"
251 echo " wmp10 MS Windows Media Player 10 (requires Windows license, b ut does not check for one)"
252 echo " wmp9 MS Windows Media Player 9 (requires Windows license, bu t does not check for one)"
253 echo " wsh56js MS Windows scripting 5.6, jscript only, no cscript"
254 echo " wsh56 MS Windows Scripting Host 5.6"
255 echo " wsh56vb MS Windows scripting 5.6, vbscript only, no cscript"
256 echo " xact MS XACT Engine (x3daudio?_?.dll, xactengine?_?.dll)"
257 echo " xvid xvid video codec"
258 echo "Pseudopackages:"
259 echo " allfonts All listed fonts (corefonts, tahoma, liberation)"
260 echo " allcodecs All listed codecs (xvid, ffdshow, icodecs)"
261 echo " ddr=gdi Set DirectDrawRenderer to GDI (default)"
262 echo " ddr=opengl Set DirectDrawRenderer to OpenGL"
263 echo " fakeie6 Set registry to claim IE6sp1 is installed"
264 echo " glsl-disable Disable GLSL use by Wine Direct3D"
265 echo " glsl-enable Enable GLSL use by Wine Direct3D (default)"
266 echo " heapcheck Enable heap checking"
267 echo " multisampling=enabled Enable Direct3D multisampling"
268 echo " multisampling=disabled Disable Direct3D multisampling (default)"
269 echo " native_mdac Override odbc32, odbccp32 and oledb32"
270 echo " native_oleaut32 Override oleaut32"
271 echo " nocrashdialog Disable the graphical crash dialog"
272 echo " orm=backbuffer Registry tweak: OffscreenRenderingMode=backbuffer"
273 echo " orm=fbo Registry tweak: OffscreenRenderingMode=fbo (default)"
274 echo " orm=pbuffer Registry tweak: OffscreenRenderingMode=pbuffer"
275 echo " rtlm=auto Set RenderTargetLockMode to auto (default)"
276 echo " rtlm=disabled Set RenderTargetLockMode to disabled"
277 echo " rtlm=readdraw Set RenderTargetLockMode to readdraw"
278 echo " rtlm=readtex Set RenderTargetLockMode to readtex"
279 echo " rtlm=texdraw Set RenderTargetLockMode to texdraw"
280 echo " rtlm=textex Set RenderTargetLockMode to textex"
281 echo " sandbox Sandbox the wineprefix - remove links to ~"
282 echo " sound=alsa Set sound driver to ALSA"
283 echo " sound=audioio Set sound driver to AudioIO"
284 echo " sound=coreaudio Set sound driver to CoreAudio"
285 echo " sound=esound Set sound driver to Esound"
286 echo " sound=jack Set sound driver to Jack"
287 echo " sound=nas Set sound driver to Nas"
288 echo " sound=oss Set sound driver to OSS"
289 echo " sound=disabled Disable sound"
290 echo " nt40 Set windows version to nt40"
291 echo " win98 Set windows version to Windows 98"
292 echo " win2k Set windows version to Windows 2000"
293 echo " winxp Set windows version to Windows XP"
294 echo " vista Set windows version to Windows Vista"
295 echo " winver= Set windows version to default (winxp)"
296 echo " volnum Rename drive_c to harddiskvolume0 (needed by some insta llers)"
297 }
298
299 #----------------------------------------------------------------
300 # Trivial GUI just to handle case where user tries running without commandline
301
302 kde_showmenu() {
303 title="$1"
304 shift
305 text="$1"
306 shift
307 col1name="$1"
308 shift
309 col2name="$1"
310 shift
311 while test $# -gt 0
312 do
313 args="$args $1 $1 off"
314 shift
315 done
316 kdialog --title "$title" --separate-output --checklist "$text" $args
317 }
318
319 x_showmenu() {
320 title="$1"
321 shift
322 text="$1"
323 shift
324 col1name="$1"
325 shift
326 col2name="$1"
327 shift
328 if test $# -gt 0
329 then
330 args="$1"
331 shift
332 fi
333 while test $# -gt 0
334 do
335 args="$args,$1"
336 shift
337 done
338 (echo "$title"; echo ""; echo "$text") | \
339 xmessage -print -file - -buttons "Cancel,$args" | sed 's/Cancel//'
340 }
341
342 showmenu()
343 {
344 case $DE in
345 kde) kde_showmenu "$@" ;;
346 gnome|x) x_showmenu "$@" ;;
347 none) usage 1>&2; exit 1;;
348 esac
349 }
350
351 dogui()
352 {
353 if [ $DE = gnome ]
354 then
355 echo "zenity --title 'Select a package to install' --text 'Install?' --l ist --checklist --column '' --column Package --column Description --height 440 - -width 600 \\" > "$WINETRICKS_TMP"/zenity.sh
356 usage | grep '^ [a-z]' | sed 's/^ \([^ ]*\) *\(.*\)/FALSE "\1" '"'\2'/" | sed 's/$/ \\/' >> $WINETRICKS_TMP/zenity.sh
357 todo="`sh "$WINETRICKS_TMP"/zenity.sh | tr '|' ' '`"
358 else
359 packages=`usage | awk '/^ [a-z]/ {print $1}'`
360 todo="`showmenu "winetricks" "Select a package to install" "Install?" "P ackage" $packages`"
361 fi
362
363 if test "$todo"x = x
364 then
365 exit 0
366 fi
367 }
368
369 #----- Helpers ------------------------------------------------
370
371 # Execute with error checking
372 try() {
373 # "VAR=foo try cmd" fails to put VAR in the environment
374 # with some versions of bash if try is a shell function?!
375 # Adding this explicit export works around it.
376 export WINEDLLOVERRIDES
377 echo Executing "$@"
378 # Mark executable - needed if running on windows vista
379 case "$1" in
380 *.exe) chmod +x "$1" || true
381 cmd /c "$@"
382 ;;
383 *)
384 "$@"
385 ;;
386 esac
387 status=$?
388 if test $status -ne 0
389 then
390 die "Note: command '$@' returned status $status. Aborting."
391 fi
392 }
393
394 try_regedit() {
395 # on windows, doesn't work without cmd /c
396 case "$OS" in
397 "Windows_NT") cmdc="cmd /c";;
398 *) unset cmdc
399 esac
400
401 try early_wine $cmdc regedit "$@"
402 }
403
404 regedit() {
405 die oops, bug, please report
406 }
407
408 # verify an sha1sum
409 verify_sha1sum() {
410 wantsum=$1
411 file=$2
412
413 gotsum=`$SHA1SUM < $file | sed 's/ .*//'`
414 if [ "$gotsum"x != "$wantsum"x ]
415 then
416 die "sha1sum mismatch! Rename $file and try again."
417 fi
418 }
419
420 # Download a file
421 # Usage: package url [sha1sum [filename]]
422 # Caches downloads in winetrickscache/$package
423 download() {
424 if [ "$4"x != ""x ]
425 then
426 file="$4"
427 else
428 file=`basename "$2"`
429 fi
430 cache="$WINETRICKS_CACHE/$1"
431 mkdir -p "$cache"
432 if test ! -f "$cache/$file"
433 then
434 cd "$cache"
435 # Mac folks tend to have curl rather than wget
436 # On Mac, 'which' doesn't return good exit status
437 # Need to jam in --header "Accept-Encoding: gzip,deflate" else
438 # redhat.com decompresses liberation-fonts.tar.gz!
439 if [ -x "`which wget`" ]
440 then
441 # Use -nd to insulate ourselves from people who set -x in WGETRC
442 # [*] --retry-connrefused works around the broken sf.net mirroring
443 # system when downloading corefonts
444 # [*] --read-timeout is useful on the adobe server that doesn't
445 # close the connection unless you tell it to (control-C or closing
446 # the socket)
447 try wget -O "$file" -nd -c --read-timeout=300 --retry-connrefused --h eader "Accept-Encoding: gzip,deflate" "$2"
448 else
449 # curl doesn't get filename from the location given by the server!
450 # fortunately, we know it
451 try curl -L -o "$file" -C - --header "Accept-Encoding: gzip,deflate" "$2"
452 fi
453 # Need to decompress .exe's that are compressed, else cygwin fails
454 # Only affects cygwin, so don't barf if 'file' not installed
455 FILE=`which file`
456 case $FILE-$file in
457 /*-*.exe)
458 case `file $file` in
459 *gzip*) mv $file $file.gz; gunzip < $file.gz > $file;;
460 esac
461 esac
462
463 cd "$olddir"
464 fi
465 if [ "$3"x != ""x ]
466 then
467 verify_sha1sum $3 "$cache/$file"
468 fi
469 }
470
471 set_winver() {
472 echo "Setting Windows version to $1"
473 cat > "$WINETRICKS_TMP"/set-winver.reg <<_EOF_
474 REGEDIT4
475
476 [HKEY_CURRENT_USER\Software\Wine]
477 "Version"="$1"
478
479 _EOF_
480 try_regedit "$WINETRICKS_TMP_WIN"\\set-winver.reg
481 }
482
483 set_app_winver() {
484 app="$1"
485 version="$2"
486 echo "Setting $app to $version mode"
487 (
488 echo REGEDIT4
489 echo ""
490 echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$app]"
491 echo "\"Version\"=\"$version\""
492 ) > "$WINETRICKS_TMP"/set-winver.reg
493
494 try_regedit "$WINETRICKS_TMP_WIN"\\set-winver.reg
495 rm "$WINETRICKS_TMP"/set-winver.reg
496 }
497
498 set_ddr() {
499 echo "Setting DirectDrawRenderer to $1"
500 cat > "$WINETRICKS_TMP"/set-ddr.reg <<_EOF_
501 REGEDIT4
502
503 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
504 "DirectDrawRenderer"="$1"
505
506 _EOF_
507 try_regedit "$WINETRICKS_TMP"/set-ddr.reg
508 }
509 set_orm() {
510 echo "Setting OffscreenRenderingMode to $1"
511 cat > "$WINETRICKS_TMP"/set-orm.reg <<_EOF_
512 REGEDIT4
513
514 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
515 "OffscreenRenderingMode"="$1"
516
517 _EOF_
518 try_regedit "$WINETRICKS_TMP_WIN"\\set-orm.reg
519 }
520
521 set_rtlm() {
522 echo "Setting RenderTargetLockMode to $1"
523 cat > "$WINETRICKS_TMP"/set-rtlm.reg <<_EOF_
524 REGEDIT4
525
526 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
527 "RenderTargetLockMode"="$1"
528
529 _EOF_
530 try_regedit "$WINETRICKS_TMP"/set-rtlm.reg
531 }
532
533 set_multisampling() {
534 echo "Setting Multisampling to $1"
535 cat > "$WINETRICKS_TMP"/set-multi.reg <<_EOF_
536 REGEDIT4
537
538 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
539 "Multisampling"="$1"
540
541 _EOF_
542 try_regedit "$WINETRICKS_TMP"/set-multi.reg
543 }
544
545 set_sound_driver() {
546 echo "Setting sound driver to $1"
547 cat > "$WINETRICKS_TMP"/set-sound.reg <<_EOF_
548 REGEDIT4
549
550 [HKEY_CURRENT_USER\Software\Wine\Drivers]
551 "Audio"="$1"
552
553 _EOF_
554 try_regedit "$WINETRICKS_TMP_WIN"\\set-sound.reg
555 }
556
557 disable_crashdialog() {
558 echo "Disabling graphical crash dialog"
559 cat > "$WINETRICKS_TMP"/crashdialog.reg <<_EOF_
560 REGEDIT4
561
562 [HKEY_CURRENT_USER\Software\Wine\WineDbg]
563 "ShowCrashDialog"=dword:00000000
564
565 _EOF_
566 try_regedit "$WINETRICKS_TMP_WIN"\\crashdialog.reg
567 }
568
569 sandbox() {
570 # remove symlinks
571 try rm "$WINEPREFIX/drive_c/users/$USER/Desktop"
572 try rm "$WINEPREFIX/drive_c/users/$USER/My Documents"
573 try rm "$WINEPREFIX/drive_c/users/$USER/My Music"
574 try rm "$WINEPREFIX/drive_c/users/$USER/My Pictures"
575 try rm "$WINEPREFIX/drive_c/users/$USER/My Videos"
576 # create replacement directories
577 try mkdir "$WINEPREFIX/drive_c/users/$USER/Desktop"
578 try mkdir "$WINEPREFIX/drive_c/users/$USER/My Documents"
579 try mkdir "$WINEPREFIX/drive_c/users/$USER/My Music"
580 try mkdir "$WINEPREFIX/drive_c/users/$USER/My Pictures"
581 try mkdir "$WINEPREFIX/drive_c/users/$USER/My Videos"
582 }
583
584 unset_winver() {
585 echo "Clearing Windows version back to default"
586 cat > "$WINETRICKS_TMP"/unset-winver.reg <<_EOF_
587 REGEDIT4
588
589 [HKEY_CURRENT_USER\Software\Wine]
590 "Version"=-
591
592 _EOF_
593 try_regedit "$WINETRICKS_TMP_WIN"\\unset-winver.reg
594 }
595
596 override_dlls() {
597 mode=$1
598 shift
599 echo Using $mode override for following DLLs: $@
600 cat > "$WINETRICKS_TMP"/override-dll.reg <<_EOF_
601 REGEDIT4
602
603 [HKEY_CURRENT_USER\Software\Wine\DllOverrides]
604 _EOF_
605 while test "$1" != ""
606 do
607 case "$1" in
608 comctl32)
609 rm -rf "$WINDIR"/winsxs/manifests/x86_microsoft.windows.common-contro ls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
610 ;;
611 esac
612 echo "\"$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/override-dll.reg
613 shift
614 done
615
616 try_regedit "$WINETRICKS_TMP_WIN"\\override-dll.reg
617 rm "$WINETRICKS_TMP"/override-dll.reg
618 }
619
620 override_app_dlls() {
621 app=$1
622 shift
623 mode=$1
624 shift
625 echo Using $mode override for following DLLs when running $app: $@
626 (
627 echo REGEDIT4
628 echo ""
629 echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$app\\DllOverrides]"
630 ) > "$WINETRICKS_TMP"/override-dll.reg
631
632 while test "$1" != ""
633 do
634 case "$1" in
635 comctl32)
636 rm -rf "$WINDIR"/winsxs/manifests/x86_microsoft.windows.common-contro ls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
637 ;;
638 esac
639 echo "\"$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/override-dll.reg
640 shift
641 done
642
643 try_regedit "$WINETRICKS_TMP_WIN"\\override-dll.reg
644 rm "$WINETRICKS_TMP"/override-dll.reg
645 }
646
647 register_font() {
648 file=$1
649 shift
650 font=$1
651 #echo "Registering $file as $font"
652 cat > "$WINETRICKS_TMP"/register-font.reg <<_EOF_
653 REGEDIT4
654
655 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts]
656 "$font"="$file"
657 _EOF_
658 # too verbose
659 try_regedit "$WINETRICKS_TMP_WIN"\\register-font.reg
660 }
661
662 append_path() {
663 # Prepend $1 to the windows path in the registry. Caller must use single qu otes and double backslashes in argument.
664 NEW_PATH="$1"
665 WIN_PATH="`WINEDEBUG= $WINE cmd.exe /c echo "%PATH%" | sed 's,\\\\,\\\\\\\\, g'`"
666
667 cat > "$WINETRICKS_TMP"/path.reg <<_EOF_
668 REGEDIT4
669
670 [HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Enviro nment]
671 _EOF_
672 echo '"PATH"="'"$NEW_PATH;$WIN_PATH\"" | sed "s/\\\\/\\\\\\\\/g" >> "$WINETR ICKS_TMP"/path.reg
673
674 try_regedit "$WINETRICKS_TMP_WIN"\\path.reg
675 rm -f "$WINETRICKS_TMP"/path.reg
676 }
677
678 #----- common download for several verbs
679
680 helper_directx_dl() {
681 # Aug 2009 DirectX 9c User Redistributable
682 # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=04 ac064b-00d1-474e-b7b1-442d8712d553
683 download . http://download.microsoft.com/download/B/7/9/B79FC9D7-47B8-48B7-A 75E-101DEBEB5AB4/directx_aug2009_redist.exe 563b96a3d78d6038d10428f23954f083320b 4019
684
685 DIRECTX_NAME=directx_aug2009_redist.exe
686 }
687
688 #----- One function per package, in alphabetical order ----------
689
690 load_art2kmin() {
691 # See http://www.microsoft.com/downloads/details.aspx?familyid=d9ae78d9-9dc6 -4b38-9fa6-2c745a175aed&displaylang=en
692 download . http://download.microsoft.com/download/D/2/A/D2A2FC8B-0447-491C-A 5EF-E8AA3A74FB98/AccessRuntime.exe 571811b7536e97cf4e4e53bbf8260cddd69f9b2d
693 cd "$WINETRICKS_CACHE"
694 try $WINE AccessRuntime.exe $WINETRICKS_QUIET
695 cd "$olddir"
696 }
697
698 #----------------------------------------------------------------
699
700 load_atmlib() {
701 # http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1-749F-49F 4-8010-297BD6CA33A0&displaylang=en
702 # FIXME: This is a huge download for a single dll.
703 download . http://download.microsoft.com/download/E/6/A/E6A04295-D2A8-40D0-A 0C5-241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4fa8
704 cd "$WINETRICKS_TMP"
705 try cabextract "$WINETRICKS_CACHE"/W2KSP4_EN.EXE i386/atmlib.dl_
706 try cp atmlib.dll "$WINDIR"/system32
707 try rm -rf i386
708 cd "$olddir"
709 }
710
711 #----------------------------------------------------------------
712
713 load_autohotkey() {
714 download . http://www.autohotkey.net/programs/AutoHotkey104805_Install.exe 1 3e5a9ca6d5b7705f1cd02560c3af4d38b1904fc
715 try $WINE "$WINETRICKS_CACHE"/AutoHotkey104805_Install.exe $WINETRICKS_S
716 }
717
718 #----------------------------------------------------------------
719
720 load_cc580() {
721 # http://www.microsoft.com/downloads/details.aspx?familyid=6f94d31a-d1e0-465 8-a566-93af0d8d4a1e
722 download . http://download.microsoft.com/download/platformsdk/redist/5.80.26 14.3600/w9xnt4/en-us/cc32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde
723
724 try $WINE "$WINETRICKS_CACHE"/cc32inst.exe "/T:$winetricks_tmp_win" /c $WINE TRICKS_QUIET
725 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINDIR"/temp "$WINETRICKS_TMP"/comct l32.exe
726 try $WINE "$WINDIR"/temp/x86/50ComUpd.Exe "/T:$winetricks_tmp_win" /c $WINET RICKS_QUIET
727 try cp "$WINETRICKS_TMP"/comcnt.dll "$WINDIR"/system32/comctl32.dll
728
729 override_dlls native,builtin comctl32
730
731 # some builtin apps don't like native comctl32
732 override_app_dlls winecfg.exe builtin comctl32
733 override_app_dlls explorer.exe builtin comctl32
734 override_app_dlls iexplore.exe builtin comctl32
735 }
736
737 #----------------------------------------------------------------
738
739 load_cmake() {
740 download . http://www.cmake.org/files/v2.6/cmake-2.6.4-win32-x86.exe 00bd502 423546b8bce19ffc180ea78e0e2f396cf
741 try $WINE "$WINETRICKS_CACHE"/cmake-2.6.4-win32-x86.exe
742 }
743
744 #----------------------------------------------------------------
745
746 load_comctl32ocx() {
747 # http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D0-41C 1-BB14-64662F5F62FE
748 download . http://download.microsoft.com/download/3/a/5/3a5925ac-e779-4b1c-b b01-af67dc2f96fc/VisualBasic6-KB896559-v1-ENU.exe f52cf2034488235b37a1da837d1c40 eb2a1bad84
749
750 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/VisualBa sic6-KB896559-v1-ENU.exe
751 try cp "$WINETRICKS_TMP"/mscomctl.ocx "$WINDIR"/system32/mscomctl.ocx
752 try cp "$WINETRICKS_TMP"/comctl32.ocx "$WINDIR"/system32/comctl32.ocx
753 try $WINE regsvr32 comctl32.ocx
754 try $WINE regsvr32 mscomctl.ocx
755 }
756
757 #----------------------------------------------------------------
758
759 load_colorprofile() {
760 download . http://download.microsoft.com/download/whistler/hwdev1/1.0/wxp/en -us/ColorProfile.exe 6b72836b32b343c82d0760dff5cb51c2f47170eb
761 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ ColorProfile.exe
762 mkdir -p "$WINDIR"/system32/spool/drivers/color
763 try cp -f "$WINETRICKS_TMP/sRGB Color Space Profile.icm" "$WINDIR"/system32/ spool/drivers/color
764 }
765
766 #----------------------------------------------------------------
767
768 load_controlpad() {
769 # http://msdn.microsoft.com/en-us/library/ms968493.aspx
770 # Fixes error "Failed to load UniText..."
771 load_wsh56
772 download . http://download.microsoft.com/download/activexcontrolpad/install/ 4.0.0.950/win98mexp/en-us/setuppad.exe 8921e0f52507ca6a373c94d222777c750fb48af7
773 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/setuppad.ex e
774 echo "If setup says 'Unable to start DDE ...', press Ignore"
775 try $WINE "$WINETRICKS_TMP"/setup $WINETRICKS_QUIET_T
776 }
777
778 #----------------------------------------------------------------
779
780 load_corefonts() {
781 # See http://corefonts.sf.net
782 # TODO: let user pick mirror,
783 # see http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec for how
784 # TODO: add more fonts
785
786 # Added More Fonts (see msttcorefonts)
787 # [*] Pointed download locations to sites that actually contained the
788 # fonts to download (as of 04-03-2008)
789 #download . $SOURCEFORGE/corefonts/andale32.exe c4db8cbe42c566d12468f5fdad38 c43721844c69
790 download . $SOURCEFORGE/corefonts/arial32.exe 6d75f8436f39ab2da5c31ce651b744 3b4ad2916e
791 download . $SOURCEFORGE/corefonts/arialb32.exe d45cdab84b7f4c1efd6d1b369f50e d0390e3d344
792 download . $SOURCEFORGE/corefonts/comic32.exe 2371d0327683dcc5ec1684fe7c275a 8de1ef9a51
793 download . $SOURCEFORGE/corefonts/courie32.exe 06a745023c034f88b4135f5e294fe ce1a3c1b057
794 download . $SOURCEFORGE/corefonts/georgi32.exe 90e4070cb356f1d811acb943080bf 97e419a8f1e
795 download . $SOURCEFORGE/corefonts/impact32.exe 86b34d650cfbbe5d3512d49d2545f 7509a55aad2
796 download . $SOURCEFORGE/corefonts/times32.exe 20b79e65cdef4e2d7195f84da20249 9e3aa83060
797 download . $SOURCEFORGE/corefonts/trebuc32.exe 50aab0988423efcc9cf21fac7d64d 534d6d0a34a
798 download . $SOURCEFORGE/corefonts/verdan32.exe f5b93cedf500edc67502f11657812 3618c64a42a
799 download . $SOURCEFORGE/corefonts/webdin32.exe 2fb4a42c53e50bc70707a7b3c57ba f62ba58398f
800
801 # Natively installed versions of these fonts will cause the installers
802 # to exit silently. Because there are apps out there that depend on the
803 # files being present in the Windows font directory we use cabextract
804 # to obtain the files and register the fonts by hand.
805
806 # Andale needs a FontSubstitutes entry
807 # try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/andale32. exe
808
809 # Display EULA
810 test x"$WINETRICKS_QUIET" = x"" || try $WINE "$WINETRICKS_CACHE"/arial32.exe $WINETRICKS_QUIET
811
812 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/arial32. exe
813 try cp -f "$WINETRICKS_TMP"/Arial*.TTF "$winefontsdir"
814 register_font Arial.TTF "Arial (TrueType)"
815 register_font Arialbd.TTF "Arial Bold (TrueType)"
816 register_font Arialbi.TTF "Arial Bold Italic (TrueType)"
817 register_font Ariali.TTF "Arial Italic (TrueType)"
818
819 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/arialb32 .exe
820 try cp -f "$WINETRICKS_TMP"/AriBlk.TTF "$winefontsdir"
821 register_font AriBlk.TTF "Arial Black (TrueType)"
822
823 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/comic32. exe
824 try cp -f "$WINETRICKS_TMP"/Comic*.TTF "$winefontsdir"
825 register_font Comic.TTF "Comic Sans MS (TrueType)"
826 register_font Comicbd.TTF "Comic Sans MS Bold (TrueType)"
827
828 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/courie32 .exe
829 try cp -f "$WINETRICKS_TMP"/cour*.ttf "$winefontsdir"
830 register_font Cour.TTF "Courier New (TrueType)"
831 register_font CourBD.TTF "Courier New Bold (TrueType)"
832 register_font CourBI.TTF "Courier New Bold Italic (TrueType)"
833 register_font Couri.TTF "Courier New Italic (TrueType)"
834
835 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/georgi32 .exe
836 try cp -f "$WINETRICKS_TMP"/Georgia*.TTF "$winefontsdir"
837 register_font Georgia.TTF "Georgia (TrueType)"
838 register_font Georgiab.TTF "Georgia Bold (TrueType)"
839 register_font Georgiaz.TTF "Georgia Bold Italic (TrueType)"
840 register_font Georgiai.TTF "Georgia Italic (TrueType)"
841
842 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/impact32 .exe
843 try cp -f "$WINETRICKS_TMP"/Impact.TTF "$winefontsdir"
844 register_font Impact.TTF "Impact (TrueType)"
845
846 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/times32. exe
847 try cp -f "$WINETRICKS_TMP"/Times*.TTF "$winefontsdir"
848 register_font Times.TTF "Times New Roman (TrueType)"
849 register_font Timesbd.TTF "Times New Roman Bold (TrueType)"
850 register_font Timesbi.TTF "Times New Roman Bold Italic (TrueType)"
851 register_font Timesi.TTF "Times New Roman Italic (TrueType)"
852
853 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/trebuc32 .exe
854 try cp -f "$WINETRICKS_TMP"/trebuc*.ttf "$winefontsdir"
855 register_font Trebuc.TTF "Trebucet MS (TrueType)"
856 register_font Trebucbd.TTF "Trebucet MS Bold (TrueType)"
857 register_font Trebucbi.TTF "Trebucet MS Bold Italic (TrueType)"
858 register_font Trebucit.TTF "Trebucet MS Italic (TrueType)"
859
860 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/verdan32 .exe
861 try cp -f "$WINETRICKS_TMP"/Verdana*.TTF "$winefontsdir"
862 register_font Verdana.TTF "Verdana (TrueType)"
863 register_font Verdanab.TTF "Verdana Bold (TrueType)"
864 register_font Verdanaz.TTF "Verdana Bold Italic (TrueType)"
865 register_font Verdanai.TTF "Verdana Italic (TrueType)"
866
867 try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/webdin32 .exe
868 try cp -f "$WINETRICKS_TMP"/Webdings.TTF "$winefontsdir"
869 register_font Webdings.TTF "Webdings (TrueType)"
870 }
871
872 #----------------------------------------------------------------
873
874 load_cygwin() {
875 # See http://bugs.winehq.org/show_bug.cgi?id=21206
876 # Current is 1.7, but that doesn't install on wine, so jump through
877 # hoops to get 1.5
878 #download cygwin http://cygwin.com/setup.exe fdc9379ed58231cddd25bb7b4484266 81a3dd3c3
879 # this is some random verison of cygwin's setup from mid-2009, before the ch ange that wine couldn't handle.
880 download cygwin http://kegel.com/cygwin/1.5/setup.exe 5cfb8ebe4f385b0fcffa04 d22d607ec75ea05180
881 mkdir -p "$DRIVE_C"/cygpkgs
882 # If you happen to have saved your cygpkgs directory, unpack it now
883 test -f "$WINETRICKS_CACHE/cygwin/cygpkgs.tgz" && (cd "$DRIVE_C"; gunzip -dc "$WINETRICKS_CACHE/cygwin/cygpkgs.tgz" | tar -xf -)
884 cp "$WINETRICKS_CACHE/cygwin/setup.exe" "$DRIVE_C"/cygpkgs
885 cd "$DRIVE_C"/cygpkgs
886 warn "Paste in ftp://www.fruitbat.org/pub/cygwin/circa/2009/09/08/111037 as the repo url for now, until bug 21206 is fixed"
887 # -X option is insecure, but we have to use it because fruitbat.org didn't a rchive .sig files :-(
888 try $WINE setup.exe -X
889 cd "$olddir"
890 }
891
892 #----------------------------------------------------------------
893
894 load_d3dx9() {
895 helper_directx_dl
896
897 # Kinder, less invasive directx - only extract and override d3dx9_??.dll
898 cabextract -d "$WINETRICKS_TMP" -L -F '*d3dx9*x86*' "$WINETRICKS_CACHE"/$DIR ECTX_NAME
899 for x in `ls "$WINETRICKS_TMP"/*.cab`
900 do
901 cabextract -d "$WINDIR"/system32 -L -F '*.dll' "$x"
902 done
903
904 # For now, not needed, but when Wine starts preferring our builtin dll over native it will be.
905 override_dlls native d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 d 3dx9_30
906 override_dlls native d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d 3dx9_37
907 override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42
908 }
909
910 #----------------------------------------------------------------
911
912 load_d3dx10() {
913 helper_directx_dl
914
915 # Kinder, less invasive directx10 - only extract and override d3dx10_??.dll
916 cabextract -d "$WINETRICKS_TMP" -L -F '*d3dx10*x86*' "$WINETRICKS_CACHE"/$DI RECTX_NAME
917 for x in `ls "$WINETRICKS_TMP"/*.cab`
918 do
919 cabextract -d "$WINDIR"/system32 -L -F '*.dll' "$x"
920 done
921
922 # For now, not needed, but when Wine starts preferring our builtin dll over native it will be.
923 override_dlls native d3dx10_33 d3dx10_34 d3dx10_35 d3dx10_36 d3dx10_37
924 override_dlls native d3dx10_38 d3dx10_39 d3dx10_40 d3dx10_41 d3dx10_42
925 }
926
927 #----------------------------------------------------------------
928 load_dinput8() {
929 helper_directx_dl
930
931 cabextract -d "$WINETRICKS_TMP" -L -F 'dxnt.cab' "$WINETRICKS_CACHE"/$DIRECT X_NAME
932 cabextract -d "$WINDIR"/system32 -L -F 'dinput8.dll' "$WINETRICKS_TMP/dxnt.c ab"
933
934 try $WINE regsvr32 dinput8
935
936 override_dlls native dinput8
937 }
938
939 #----------------------------------------------------------------
940
941 load_dirac08() {
942 download . http://codecpack.nl/dirac_dsfilter_080.exe aacfcddf6b2636de5f0a50 422ba9155e395318af
943 try $WINE "$WINETRICKS_CACHE"/dirac_dsfilter_080.exe $WINETRICKS_SILENT
944 }
945
946 #----------------------------------------------------------------
947
948 load_directplay() {
949 helper_directx_dl
950
951 cabextract -d "$WINETRICKS_TMP" -L -F dxnt.cab "$WINETRICKS_CACHE"/$DIRECTX_ NAME
952 cabextract -d "$WINDIR"/system32 -L -F 'dplaysvr.exe' "$WINETRICKS_TMP/dxnt. cab"
953 cabextract -d "$WINDIR"/system32 -L -F 'dplayx.dll' "$WINETRICKS_TMP/dxnt.ca b"
954 cabextract -d "$WINDIR"/system32 -L -F 'dpnet.dll' "$WINETRICKS_TMP/dxnt.cab "
955 cabextract -d "$WINDIR"/system32 -L -F 'dpnhpast.dll' "$WINETRICKS_TMP/dxnt. cab"
956 cabextract -d "$WINDIR"/system32 -L -F 'dpwsockx.dll' "$WINETRICKS_TMP/dxnt. cab"
957
958 try $WINE regsvr32 dplayx.dll
959 try $WINE regsvr32 dpnet.dll
960 try $WINE regsvr32 dpnhpast.dll
961
962 override_dlls native dplayx dpnet dpnhpast dpwsockx
963 }
964
965 #----------------------------------------------------------------
966
967 load_directx9() {
968 helper_directx_dl
969
970 # Stefan suggested that, when installing, one should override as follows:
971 # 1) use builtin wintrust (we don't run native properly somehow?)
972 # 2) disable mscoree (else if it's present some module misbehaves?)
973 # 3) override native any directx DLL whose Wine version doesn't register its elf well yet
974 # For #3, I have no idea which DLLs don't register themselves well yet,
975 # so I'm just listing a few of the basic ones. Let's whittle that
976 # list down as soon as we can.
977 echo "You probably shouldn't be using this. It's VERY invasive."
978 echo "Use 'winetricks d3dx9' instead."
979
980 # Setting windows version to win2k apparently crashes the installer on OS X. ..
981 # See http://code.google.com/p/winezeug/issues/detail?id=71
982 if [ "`uname -s`" = "Darwin" ]
983 then
984 set_winver winxp
985 else
986 set_winver $DIRECTX_WINDOWS
987 fi
988
989 WINEDLLOVERRIDES="wintrust=b,mscoree=,ddraw,d3d8,d3d9,dsound,dinput=n" \
990 try $WINE "$WINETRICKS_CACHE"/$DIRECTX_NAME /t:"$WINETRICKS_TMP_WIN" $WIN ETRICKS_QUIET
991
992 # How many of these do we really need?
993 # We should probably remove most of these...?
994 override_dlls native d3dim d3drm d3dx8 d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d 3dx9_28 d3dx9_29
995 override_dlls native d3dx9_30 d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d 3dx9_36 d3dx9_37
996 override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 d3dxof
997 override_dlls native dciman32 ddrawex devenum dmband dmcompos dmime dmloader dmscript dmstyle
998 override_dlls native dmsynth dmusic dmusic32 dnsapi dplay dplayx dpnaddr dpn et dpnhpast dpnlobby
999 override_dlls native dswave dxdiagn mscoree msdmo qcap quartz streamci
1000 override_dlls builtin d3d8 d3d9 dinput dinput8 dsound
1001
1002 # Should be below, but fails on Wine when used silently.
1003 #if [ $WINETRICKS_QUIET ]
1004 #then
1005 # try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe /silent
1006 #else
1007 # try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe
1008 #fi
1009
1010 try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe
1011
1012 unset_winver
1013 }
1014
1015 #----------------------------------------------------------------
1016
1017 load_divx() {
1018 # 6.8.2: 02203fdc4dddd13e789c39b22902837da31d2a1d ?
1019 # 6.8.2: e36bf87c1675d0cf9169839bc0cd8f866b9db026 as of 4 Jun 2008 as http:/ /download.divx.com/divx/DivXInstaller.exe
1020 # 6.8.3: f4f4387ef89316aea440a29f3e24c1f1945e14af as of 20 Jun 2008 as http: //download.divx.com/divx/abt/b1/DivXInstaller.exe
1021 # 6.8.4: c5fcb1465a1bb24d1c104c2588fdb6706d1e1476 as of 10 Jul 2008 as http: //download.divx.com/divx/abt/b1/DivXInstaller.exe
1022 # 6.8.4: d28a2b041f4af45d22c4dedfe7608f2958cf997d as of 23 Aug 2008 as http: //download.divx.com/divx/DivXInstaller.exe
1023
1024 # 7.? 4d91ef90ae26a6088851560c4263ef0cdbf09123 as of 22 Mar 2009 as http://d ownload.divx.com/divx/DivXInstaller.exe
1025 # 7.0.? 19c9ba3104025d1fab335e405e7f411dfbbcb477 as of 28 May 2009 as http:/ /download.divx.com/divx/DivXInstaller.exe
1026 # 7.0.? 786aef0f421df5e7358d2d740d9911f9afd055de as of 24 June 2009 as http: //download.divx.com/divx/DivXInstaller.exe
1027 # 7.0.? ad420bf8bf72e924e658c9c6ad6bba76b848fb79 as of 23 Sep 2009 as http:/ /download.divx.com/divx/DivXInstaller.exe
1028 # 7.0.? 3385aa8f6ba64ae32e06f651bbbea247bcc1a44d as of 12 Dec 2009 as http:/ /download.divx.com/divx/DivXInstaller.exe
1029
1030 download divx-7 http://download.divx.com/divx/DivXInstaller.exe 3385aa8f6ba6 4ae32e06f651bbbea247bcc1a44d
1031
1032 try $WINE "$WINETRICKS_CACHE"/divx-7/DivXInstaller
1033 }
1034
1035 #----------------------------------------------------------------
1036
1037 load_dcom98() {
1038 # Install native dcom per http://wiki.winehq.org/NativeDcom
1039 # to avoid http://bugs.winehq.org/show_bug.cgi?id=4228
1040 # See http://www.microsoft.com/downloads/details.aspx?familyid=08b1ac1b-7a11 -43e8-b59d-0867f9bdda66
1041 download . http://download.microsoft.com/download/d/1/3/d13cd456-f0cf-4fb2-a 17f-20afc79f8a51/DCOM98.EXE aff002bd03f17340b2bef2e6b9ea8e3798e9ccc1
1042
1043 # Pick win98 so we can install native dcom
1044 set_winver win98
1045
1046 # Avoid "err:setupapi:SetupDefaultQueueCallbackA copy error 5 ..."
1047 # Those messages are suspect, probably shouldn't be err's.
1048 rm -f "$WINDIR"/system32/ole32.dll
1049 rm -f "$WINDIR"/system32/olepro32.dll
1050 rm -f "$WINDIR"/system32/oleaut32.dll
1051 rm -f "$WINDIR"/system32/rpcrt4.dll
1052
1053 # Normally only need to override ole32, but overriding advpack
1054 # as well gets us the correct exit status.
1055 WINEDLLOVERRIDES="ole32,advpack=n" try $WINE "$WINETRICKS_CACHE"/DCOM98.EXE $WINETRICKS_QUIET
1056
1057 # Set native DCOM by default for all apps (ok, this might be overkill)
1058 override_dlls native,builtin ole32 oleaut32 rpcrt4
1059
1060 # but not for a few builtin apps that don't like it
1061 override_app_dlls explorer.exe builtin ole32 oleaut32 rpcrt4
1062 override_app_dlls iexplore.exe builtin ole32 oleaut32 rpcrt4
1063 override_app_dlls services.exe builtin ole32 oleaut32 rpcrt4
1064 override_app_dlls wineboot.exe builtin ole32 oleaut32 rpcrt4
1065 override_app_dlls winedevice.exe builtin ole32 oleaut32 rpcrt4
1066
1067 # and undo version win98
1068 unset_winver
1069 }
1070
1071 #----------------------------------------------------------------
1072
1073 load_dotnet11() {
1074 DOTNET_INSTALL_DIR="$WINDIR/Microsoft.NET/Framework/v1.1.4322"
1075
1076 # If this is just a dependency check, don't re-install
1077 if test $PACKAGE != dotnet11 && test -d "$DOTNET_INSTALL_DIR"
1078 then
1079 echo "prerequisite dotnet11 already installed, skipping"
1080 return
1081 fi
1082
1083 # need corefonts, else installer crashes
1084 load_corefonts
1085
1086 # http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-484 2-8157-034D1E7CF3A3
1087 download dotnet11 http://download.microsoft.com/download/a/a/c/aac39226-8825 -44ce-90e3-bf8203e74006/dotnetfx.exe 16a354a2207c4c8846b617cbc78f7b7c1856340e
1088 if [ $WINETRICKS_QUIET ]
1089 then
1090 try $WINE "$WINETRICKS_CACHE"/dotnet11/dotnetfx.exe /q /C:"install /q"
1091 else
1092 try $WINE "$WINETRICKS_CACHE"/dotnet11/dotnetfx.exe
1093 fi
1094 }
1095
1096 #----------------------------------------------------------------
1097
1098 load_dotnet11sdk() {
1099 load_dotnet11
1100
1101 warn "Installer hangs at end... not sure if it works fully."
1102 # http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-3647-407 0-9F41-A333C6B9181D
1103 download dotnet11sdk http://download.microsoft.com/download/5/2/0/5202f918-3 06e-426d-9637-d7ee26fbe507/setup.exe 9509b14924bcaf84a7780de3f6ad7894004c3450
1104 cd "$WINETRICKS_CACHE"/dotnet11sdk
1105 try $WINE setup.exe
1106 cd "$olddir"
1107 }
1108
1109 #----------------------------------------------------------------
1110
1111 load_dotnet20() {
1112 load_fontfix
1113
1114 # If this is just a dependency check, don't re-install
1115 if test $PACKAGE != dotnet20 && test -f "$WINDIR"/system32/l_intl.nls
1116 then
1117 echo "prerequisite dotnet20 already installed, skipping"
1118 return
1119 fi
1120 warn "Instaling .net 2.0 runtime. Can take several minutes. See http://wik i.winehq.org/MicrosoftDotNet for tips."
1121
1122 # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57
1123 test -d "$WINDIR/gecko" || test -d "$WINDIR/system32/gecko" || load_gecko
1124 set_winver win2k
1125 # See http://kegel.com/wine/l_intl-sh.txt for how l_intl.nls was generated
1126 download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408 a361ac2659fa249
1127 try cp -f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/"
1128
1129 # http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0 d-8edd-aab15c5e04f5
1130 download dotnet20 http://download.microsoft.com/download/5/6/7/567758a3-759e -473e-bf8f-52154438565a/dotnetfx.exe a3625c59d7a2995fb60877b5f5324892a1693b2a
1131 if [ "$WINETRICKS_QUIET"x = ""x ]
1132 then
1133 try $WINE "$WINETRICKS_CACHE"/dotnet20/dotnetfx.exe
1134 else
1135 try $WINE "$WINETRICKS_CACHE"/dotnet20/dotnetfx.exe /q /c:"install.exe /q "
1136 fi
1137 unset_winver
1138 }
1139 #----------------------------------------------------------------
1140
1141 load_dotnet20sp2() {
1142 warn "Instaling .net 2.0 runtime. Can take several minutes. See http://wik i.winehq.org/MicrosoftDotNet for tips."
1143
1144 # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57
1145 test -d "$WINDIR/gecko" || test -d "$WINDIR/system32/gecko" || load_gecko
1146 #set_winver win2k
1147 # See http://kegel.com/wine/l_intl-sh.txt for how l_intl.nls was generated
1148 download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408 a361ac2659fa249
1149 try cp -f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/"
1150
1151 # http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB 5-9B1D-10E506DA9D0F
1152 download dotnet20 http://download.microsoft.com/download/c/6/e/c6e88215-0178 -4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe 22d776d4d204863105a5db99e8b8888be23c6 1a7
1153 if [ "$WINETRICKS_QUIET"x = ""x ]
1154 then
1155 try $WINE "$WINETRICKS_CACHE"/dotnet20/NetFx20SP2_x86.exe
1156 else
1157 try $WINE "$WINETRICKS_CACHE"/dotnet20/NetFx20SP2_x86.exe /q /c:"install. exe /q"
1158 fi
1159 unset_winver
1160 }
1161
1162 #----------------------------------------------------------------
1163
1164 load_dotnet20sdk() {
1165 load_dotnet20
1166
1167 # http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-3647-407 0-9F41-A333C6B9181D
1168 download dotnet20sdk http://download.microsoft.com/download/c/4/b/c4b15d7d-6 f37-4d5a-b9c6-8f07e7d46635/setup.exe 4e4b1072b5e65e855358e2028403f2dc52a62ab4
1169 cd "$WINETRICKS_CACHE"/dotnet20sdk
1170 try $WINE setup.exe
1171 cd "$olddir"
1172 }
1173
1174 #----------------------------------------------------------------
1175
1176 load_dotnet30() {
1177 # If this is just a dependency check, don't re-install
1178 if test $PACKAGE != dotnet30 && test -d "$WINDIR/Microsoft.NET/Framework/v3. 0/Microsoft .NET Framework 3.0"
1179 then
1180 echo "prerequisite dotnet30 already installed, skipping"
1181 return
1182 fi
1183
1184 warn "Instaling .net 3.0 runtime. Can take 15-30 minutes. See http://wiki. winehq.org/MicrosoftDotNet for tips."
1185 load_dotnet20
1186
1187 # http://msdn.microsoft.com/en-us/netframework/bb264589.aspx
1188 download dotnet30 http://download.microsoft.com/download/3/F/0/3F0A922C-F239 -4B9B-9CB0-DF53621C57D9/dotnetfx3.exe f3d2c3c7e4c0c35450cf6dab1f9f2e9e7ff50039
1189
1190 # AF's workaround to avoid long pause
1191 LANGPACKS_BASE_PATH="${WINDIR}/SYSMSICache/Framework/v3.0"
1192 test -d "${LANGPACKS_BASE_PATH}" || mkdir -p "${LANGPACKS_BASE_PATH}"
1193 for lang in ar cs da de el es fi fr he it jp ko nb nl pl pt-BR pt-PT ru \
1194 sv tr zh-CHS zh-CHT
1195 do
1196 ln -sf "${WINDIR}/system32/spupdsvc.exe" "${LANGPACKS_BASE_PATH}/dotnetfx 3langpack${lang}.exe"
1197 done
1198
1199 if [ "$WINETRICKS_QUIET"x = ""x ]
1200 then
1201 try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe
1202 else
1203 try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe /q /c:"install.exe / q"
1204 fi
1205 }
1206
1207 #----------------------------------------------------------------
1208
1209 load_dotnet35() {
1210 warn "This does not work yet, see bug 20110"
1211
1212 # According to AF's recipe, installing dotnet30 first works around msi bugs
1213 load_dotnet30
1214
1215 # http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E3 5-B531-508D977D32A6
1216 download dotnet35 http://download.microsoft.com/download/6/0/f/60fc5854-3cb8 -4892-b6db-bd4f42510f28/dotnetfx35.exe
1217
1218 # See also http://blogs.msdn.com/astebner/archive/2008/07/17/8745415.aspx
1219 cd "$DRIVE_C"
1220 cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/dotnet35/dotnetfx35.exe
1221 cd wcu/dotNetFramework
1222 try $WINE dotNetFx35setup.exe /lang:ENU
1223 }
1224
1225 #----------------------------------------------------------------
1226
1227 do_droid() {
1228 download . ${DROID_URL}$1';hb=HEAD' $3 $1
1229 try cp -f "$WINETRICKS_CACHE"/$1 "$winefontsdir"
1230 register_font $1 "$2"
1231 }
1232
1233 load_droid() {
1234 # See http://en.wikipedia.org/wiki/Droid_(font)
1235 DROID_URL='http://android.git.kernel.org/?p=platform/frameworks/base.git;a=b lob_plain;f=data/fonts/'
1236
1237 do_droid DroidSans-Bold.ttf "Droid Sans Bold" ada4e79c592f3c5 4546b7587b48f2b232d95ce2f
1238 do_droid DroidSansFallback.ttf "Droid Sans Fallback" 2f8a266389a8e22 f68f402b775731eec6b760334
1239 do_droid DroidSansJapanese.ttf "Droid Sans Japanese" b3a248c11692aa8 8a30eb25df425b8910fe05dc5
1240 do_droid DroidSansMono.ttf "Droid Sans Mono" f0815c6f36c72be 1d0f2f5e2b82fa85c8bf95655
1241 do_droid DroidSans.ttf "Droid Sans" da5b3c7758a2c8f bc4775beb69d7150493c7d312
1242 do_droid DroidSerif-BoldItalic.ttf "Droid Serif Bold Italic" c1602dc11bf0f71 31aec21c7c3888195ad78e486
1243 do_droid DroidSerif-Bold.ttf "Droid Serif Bold" d7896b9c0723299 553e95a00d27cbe52f7515c8c
1244 do_droid DroidSerif-Italic.ttf "Droid Serif Italic" 117941be102c8f3 8a86a70ebccaecb8078f7027e
1245 do_droid DroidSerif-Regular.ttf "Droid Serif" 7f243858e496ed1 bb1faca9f3a7bbe52defcbb5d
1246 }
1247
1248 #----------------------------------------------------------------
1249
1250 # Fake IE per workaround in http://bugs.winehq.org/show_bug.cgi?id=3453
1251 # Just the first registry key works for most apps.
1252 # The App Paths part is required by a few apps, like Quickbooks Pro;
1253 # see http://windowsxp.mvps.org/ie/qbooks.htm
1254 set_fakeie6() {
1255
1256 cat > "$WINETRICKS_TMP"/fakeie6.reg <<"_EOF_"
1257 REGEDIT4
1258
1259 [HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer]
1260 "Version"="6.0.2900.2180"
1261
1262 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE .EXE]
1263 _EOF_
1264
1265 echo -n '@="' >>"$WINETRICKS_TMP"/fakeie6.reg
1266 echo -n "${programfilesdir_win}" | sed "s/\\\\/\\\\\\\\/" >>"$WINETRICKS_TMP "/fakeie6.reg
1267 echo '\\\\Internet Explorer\\\\iexplore.exe"' >>"$WINETRICKS_TMP"/fakeie6.re g
1268
1269 echo -n '"PATH"="' >>"$WINETRICKS_TMP"/fakeie6.reg
1270 echo -n "${programfilesdir_win}" | sed "s/\\\\/\\\\\\\\/" >>"$WINETRICKS_TMP "/fakeie6.reg
1271 echo '\\\\Internet Explorer"' >>"$WINETRICKS_TMP"/fakeie6.reg
1272
1273 try_regedit "$WINETRICKS_TMP_WIN"\\fakeie6.reg
1274
1275 # On old wineprefixes iexplore.exe is not created. Create a fake dll using
1276 # shdocvw.dll that should have similar VERSIONINFO.
1277 if [ ! -f "$programfilesdir_unix/Internet Explorer/iexplore.exe" ]
1278 then
1279 echo "You have an old wineprefix without iexplore.exe. Will create a fak e now"
1280 if [ ! -d "$programfilesdir_unix/Internet Explorer/iexplore.exe" ]
1281 then
1282 try mkdir "$programfilesdir_unix/Internet Explorer";
1283 fi
1284 try cp -f "$WINDIR/system32/shdocvw.dll" "$programfilesdir_unix/Internet Explorer/iexplore.exe"
1285 fi
1286 }
1287
1288 #----------------------------------------------------------------
1289
1290 load_firefox() {
1291 download . "http://releases.mozilla.org//pub/mozilla.org/firefox/releases/3. 5.6/win32/en-US/Firefox%20Setup%203.5.6.exe" d27779d9dca25d032ceaafd3da9df165112 1f8bd "Firefox Setup 3.5.6.exe"
1292 if [ "$WINETRICKS_QUIET"x = ""x ]
1293 then
1294 try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.5.6.exe"
1295 else
1296 try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.5.6.exe" -ms
1297 fi
1298 }
1299
1300 #----------------------------------------------------------------
1301
1302 load_ffdshow() {
1303 # ffdshow
1304 download . $SOURCEFORGE/ffdshow-tryout/ffdshow_beta5_rev2033_20080705_clsid. exe 6da6837e2f400923ff5294a6591a88a3eee5ee40
1305 try $WINE "$WINETRICKS_CACHE"/ffdshow_beta5_rev2033_20080705_clsid.exe $WINE TRICKS_SILENT
1306 }
1307
1308 #----------------------------------------------------------------
1309
1310 load_flash() {
1311 # www.adobe.com/products/flashplayer/
1312
1313 # Active X plugin
1314 # http://blogs.adobe.com/psirt/2008/03/preparing_for_april_flash_play.html
1315 # http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/ins tall_flash_player_active_x.msi
1316 # 2008-04-01: old version sha1sum f4dd1c0c715b791db2c972aeba90d3b78372996a
1317 # 2008-04-18: new version sha1sum 04ac79c4f1eb1e1ca689f27fa71f12bb5cd11cc2
1318 # Version 10 http://fpdownload.macromedia.com/get/flashplayer/current/instal l_flash_player_ax.exe
1319 # 2008-11-27: 10 sha1sum 7f6850ae815e953311bb94a8aa9d226f97a646dd
1320 # 2009-02-27: sha1sum 86745020a25edc9695a1a6a4d59eae375665a0b3
1321 # 2009-07-31: sha1sum 11a81ad1b19344c28b1e1249169f15dfbd2a04f5
1322 # 2009-12-09: sha1sum f4ec0e95099e354fd01cd3bb27c202f54932dc70
1323
1324 download . http://fpdownload.macromedia.com/get/flashplayer/current/install_ flash_player_ax.exe f4ec0e95099e354fd01cd3bb27c202f54932dc70
1325 try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe $WINETRICKS_S
1326
1327 # Mozilla / Firefox plugin
1328 # 2008-07-22: sha1sum 1e6f7627784a5b791e99ae9ad63133dc11c7940b
1329 # 2008-11-27: sha1sum 20ec0300a8cae19105c903a7ec6c0801e016beb0
1330 # 2009-02-27: sha1sum 770db9ad471ffd4357358bc16ff0bb6c98d71e5d
1331 # 2009-07-31: sha1sum 9590fb87cc33d3a3a1f2f42a1918f06b9f0fd88d
1332 # 2009-12-09: sha1sum ccb4811b1cc26721c4abb2e5a080868acdee7b87
1333
1334 download . http://fpdownload.macromedia.com/get/flashplayer/current/install_ flash_player.exe ccb4811b1cc26721c4abb2e5a080868acdee7b87
1335 try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe $WINETRICKS_S
1336 }
1337
1338 #----------------------------------------------------------------
1339
1340 load_fontfix() {
1341 # some versions of ukai.ttf and uming.ttf crash .net and picasa
1342 # See http://bugs.winehq.org/show_bug.cgi?id=7098#c9
1343 # Could fix globally, but that needs root, so just fix for wine
1344 if test -f /usr/share/fonts/truetype/arphic/ukai.ttf
1345 then
1346 gotsum=`$SHA1SUM < /usr/share/fonts/truetype/arphic/ukai.ttf | sed 's/ . *//'`
1347 # FIXME: do all affected versions of the font have same sha1sum as Gutsy ? Seems unlikely.
1348 if [ "$gotsum"x = "96e1121f89953e5169d3e2e7811569148f573985"x ]
1349 then
1350 download . https://launchpadlibrarian.net/1499628/ttf-arphic-ukai_0. 1.20060108.orig.tar.gz 92e577602d71454a108968e79ab667451f3602a2
1351 cd "$WINETRICKS_TMP/"
1352 gunzip -dc "$WINETRICKS_CACHE/ttf-arphic-ukai_0.1.20060108.orig.tar. gz" | tar -xf -
1353 try mv ttf-arphic-ukai-0.1.20060108/*.ttf "$winefontsdir"
1354 cd "$olddir"
1355 fi
1356 fi
1357
1358 if test -f /usr/share/fonts/truetype/arphic/uming.ttf
1359 then
1360 gotsum=`$SHA1SUM < /usr/share/fonts/truetype/arphic/uming.ttf | sed 's/ .*//'`
1361 if [ "$gotsum"x = "2a4f4a69e343c21c24d044b2cb19fd4f0decc82c"x ]
1362 then
1363 download . https://launchpadlibrarian.net/1564410/ttf-arphic-uming_0 .1.20060108.orig.tar.gz 1439cdd731906e9e5311f320c2cb33262b24ef91
1364 cd "$WINETRICKS_TMP/"
1365 gunzip -dc "$WINETRICKS_CACHE/ttf-arphic-uming_0.1.20060108.orig.tar .gz" | tar -xf -
1366 try mv ttf-arphic-uming-0.1.20060108/*.ttf "$winefontsdir"
1367 cd "$olddir"
1368 fi
1369 fi
1370
1371 # Focht says Samyak is bad news, and font substitution isn't a good workarou nd.
1372 # I've seen psdkwin7 setup crash because of this; the symptom was a messageb ox saying
1373 # SDKSetup encountered an error: The type initializer for 'Microsoft.WizardF ramework.WizardSettings' threw an exception
1374 # and WINEDEBUG=+relay,+seh shows an exception very quickly after
1375 # Call KERNEL32.CreateFileW(0c83b36c L"Z:\\USR\\SHARE\\FONTS\\TRUETYPE\\TTF- ORIYA-FONTS\\SAMYAK-ORIYA.TTF",80000000,00000001,00000000,00000003,00000080,0000 0000) ret=70d44091
1376 if xlsfonts 2>/dev/null | egrep -i "samyak|oriya"
1377 then
1378 die "Please uninstall the Samyak/Oriya font, e.g. 'sudo dpkg -r ttf-oriy a-fonts', then log out and log in again. That font causes strange crashes in .n et programs."
1379 fi
1380 }
1381
1382 #----------------------------------------------------------------
1383 load_fs_disable() {
1384 cat > "$WINETRICKS_TMP"/fs_disable.reg <<_EOF_
1385 REGEDIT4
1386
1387 [HKEY_CURRENT_USER\Control Panel\Desktop]
1388 "FontSmoothing"="0"
1389 "FontSmoothingGamma"=dword:00000578
1390 "FontSmoothingOrientation"=dword:00000001
1391 "FontSmoothingType"=dword:00000000
1392
1393 _EOF_
1394 try_regedit "$WINETRICKS_TMP_WIN"\\fs_disable.reg
1395 }
1396 #----------------------------------------------------------------
1397 load_fs_grayscale() {
1398 cat > "$WINETRICKS_TMP"/fs_grayscale.reg <<_EOF_
1399
1400 REGEDIT4
1401
1402 [HKEY_CURRENT_USER\Control Panel\Desktop]
1403 "FontSmoothing"="2"
1404 "FontSmoothingGamma"=dword:00000578
1405 "FontSmoothingOrientation"=dword:00000001
1406 "FontSmoothingType"=dword:00000001
1407
1408 _EOF_
1409 try_regedit "$WINETRICKS_TMP_WIN"\\fs_grayscale.reg
1410 }
1411 #----------------------------------------------------------------
1412 load_fs_bgr() {
1413 cat > "$WINETRICKS_TMP"/fs_bgr.reg <<_EOF_
1414
1415 REGEDIT4
1416
1417 [HKEY_CURRENT_USER\Control Panel\Desktop]
1418 "FontSmoothing"="2"
1419 "FontSmoothingGamma"=dword:00000578
1420 "FontSmoothingOrientation"=dword:00000000
1421 "FontSmoothingType"=dword:00000002
1422
1423 _EOF_
1424 try_regedit "$WINETRICKS_TMP_WIN"\\fs_bgr.reg
1425 }
1426 #----------------------------------------------------------------
1427 load_fs_rgb() {
1428 cat > "$WINETRICKS_TMP"/fs_rgb.reg <<_EOF_
1429
1430 REGEDIT4
1431
1432 [HKEY_CURRENT_USER\Control Panel\Desktop]
1433 "FontSmoothing"="2"
1434 "FontSmoothingGamma"=dword:00000578
1435 "FontSmoothingOrientation"=dword:00000001
1436 "FontSmoothingType"=dword:00000002
1437
1438 _EOF_
1439 try_regedit "$WINETRICKS_TMP_WIN"\\fs_rgb.reg
1440 }
1441 #----------------------------------------------------------------
1442
1443 load_gecko() {
1444 # Load the HTML rendering Engine (Gecko)
1445 # FIXME: shouldn't this code be in some script installed
1446 # as part of Wine instead of in winetricks?
1447 # (e.g. we hardcode gecko's url here, but it's normally
1448 # only hardcoded in wine.inf, and fetched from the registry thereafter,
1449 # so we're adding a maintenance burden here.)
1450 case `$WINE --version` in
1451 wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
1452 GECKO_DIR="$WINDIR"
1453 GECKO_VERSION=0.1.0
1454 GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56
1455 ;;
1456 wine-1.1.1[234]*)
1457 GECKO_DIR="$WINDIR"
1458 GECKO_VERSION=0.9.0
1459 GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09
1460 ;;
1461 wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
1462 GECKO_DIR="$WINDIR"
1463 GECKO_VERSION=0.9.1
1464 GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8
1465 ;;
1466 *)
1467 GECKO_DIR="$WINDIR/system32"
1468 GECKO_VERSION=1.0.0
1469 GECKO_ARCH=-x86
1470 GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01
1471 ;;
1472 esac
1473
1474 if test ! -f "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab
1475 then
1476 # FIXME: busted if using curl!
1477 download . "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSI ON$GECKO_ARCH.cab" \
1478 $GECKO_SHA1SUM wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab
1479 fi
1480
1481 cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_
1482 REGEDIT4
1483
1484 [HKEY_CURRENT_USER\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
1485 _EOF_
1486
1487 printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg
1488 case $GECKO_VERSION in
1489 0.*)
1490 printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
1491 sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg
1492 ;;
1493 1.*)
1494 printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' |
1495 sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg
1496 ;;
1497 esac
1498
1499 # extract the files
1500 mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
1501 cd "$GECKO_DIR/gecko/$GECKO_VERSION"
1502 try cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko-$GECKO_V ERSION$GECKO_ARCH.cab
1503 cd "$olddir"
1504
1505 # set install-path
1506 try_regedit "$WINETRICKS_TMP_WIN"\\geckopath.reg
1507
1508 # register the dll, since it was disabled before
1509 try $WINE regsvr32 mshtml
1510 }
1511
1512 #----------------------------------------------------------------
1513
1514 load_gecko_dbg() {
1515 # Load the HTML rendering Engine (Gecko), with debugging symbols
1516 # FIXME: shouldn't this code be in some script installed
1517 # as part of Wine instead of in winetricks?
1518 # (e.g. we hardcode gecko's url here, but it's normally
1519 # only hardcoded in wine.inf, and fetched from the registry thereafter,
1520 # so we're adding a maintenance burden here.)
1521 case `$WINE --version` in
1522 wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11)
1523 die "There isn't a gecko debug build for your Wine version."
1524 ;;
1525 wine-1.1.1[234]*)
1526 GECKO_DIR="$WINDIR"
1527 GECKO_VERSION=0.9.0
1528 GECKO_SHA1SUM=23e354a82d7b7e61a6abe0384cc44669fbf92f86
1529 ;;
1530 wine-1.1.1[56789]*|wine-1.1.2[0123456]*)
1531 GECKO_DIR="$WINDIR"
1532 GECKO_VERSION=0.9.1
1533 GECKO_SHA1SUM=a9b58d3330f8c78524fe4683f348302bfce96ff4
1534 ;;
1535 *)
1536 GECKO_DIR="$WINDIR/system32"
1537 GECKO_VERSION=1.0.0
1538 GECKO_ARCH=-x86
1539 GECKO_SHA1SUM=2de16b443826295f646cd5d54313ca421fd71210
1540 ;;
1541 esac
1542
1543 if test ! -f "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.ca b
1544 then
1545 # FIXME: busted if using curl!
1546 download . "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSI ON$GECKO_ARCH-dbg.cab" $GECKO_SHA1SUM wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.c ab
1547 fi
1548
1549 cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_
1550 REGEDIT4
1551
1552 [HKEY_CURRENT_USER\\Software\\Wine\\MSHTML\\$GECKO_VERSION]
1553 _EOF_
1554
1555 printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg
1556 if [ ! "$GECKO_VERSION" = "1.0.0" ]
1557 then
1558 printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | sed "s/\\ \\/\\\\\\\\/g" >>"$WINETRICKS_TMP"/geckopath.reg
1559 else
1560 printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | sed "s/\\\\/\\\\\\\\/g" >>"$WINETRICKS_TMP"/geckopath.reg
1561 fi
1562
1563 # extract the files
1564 mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION"
1565 cd "$GECKO_DIR/gecko/$GECKO_VERSION"
1566 try cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko-$GECKO_V ERSION$GECKO_ARCH-dbg.cab
1567 cd "$olddir"
1568
1569 # set install-path
1570 try_regedit "$WINETRICKS_TMP_WIN"\\geckopath.reg
1571
1572 # register the dll, since it was disabled before
1573 try $WINE regsvr32 mshtml
1574 }
1575
1576 #----------------------------------------------------------------
1577
1578 load_gdiplus() {
1579 # http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D4 1-933C-BE590FEAA05A&displaylang=en
1580 download . http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a 362-1957be2f24e1/WindowsXP-KB975337-x86-ENU.exe b9a84bc3de92863bba1f5eb1d5984465 67fbc646
1581 try $WINE "$WINETRICKS_CACHE"/WindowsXP-KB975337-x86-ENU.exe /extract:$WINET RICKS_TMP_WIN $WINETRICKS_QUIET
1582 # And then make it globally available.
1583 try cp "$WINETRICKS_TMP/asms/10/msft/windows/gdiplus/gdiplus.dll" "$WINDIR"/ system32/
1584
1585 # For some reason, native,builtin isn't good enough...?
1586 override_dlls native gdiplus
1587 }
1588
1589 #----------------------------------------------------------------
1590
1591 load_glsl_disable() {
1592 echo "Disabling GLSL"
1593 cat > "$WINETRICKS_TMP"/disableglsl.reg <<_EOF_
1594 REGEDIT4
1595
1596 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
1597 "UseGLSL"="disabled"
1598
1599 _EOF_
1600 try_regedit "$WINETRICKS_TMP_WIN"\\disableglsl.reg
1601 }
1602
1603 #----------------------------------------------------------------
1604
1605 load_glsl_enable() {
1606 echo "Enabling GLSL"
1607 cat > "$WINETRICKS_TMP"/enableglsl.reg <<_EOF_
1608 REGEDIT4
1609
1610 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
1611 "UseGLSL"="enabled"
1612
1613 _EOF_
1614 try_regedit "$WINETRICKS_TMP_WIN"\\enableglsl.reg
1615 }
1616
1617 #----------------------------------------------------------------
1618
1619 load_hosts() {
1620 # Create fake system32\drivers\etc\hosts and system32\drivers\etc\services f iles.
1621 # The hosts file is used to map network names to IP addresses without DNS.
1622 # The services file is used map service names to network ports.
1623 # Some apps depend on these files, but they're not implemented in wine.
1624 # Fortunately, empty files in the correct location satisfy those apps.
1625 # See http://bugs.winehq.org/show_bug.cgi?id=12076
1626 mkdir -p "$WINDIR"/system32/drivers/etc
1627 touch "$WINDIR"/system32/drivers/etc/hosts
1628 touch "$WINDIR"/system32/drivers/etc/services
1629 }
1630
1631 #----------------------------------------------------------------
1632
1633 set_heapcheck() {
1634 cat > "$WINETRICKS_TMP"/heapcheck.reg <<_EOF_
1635 REGEDIT4
1636
1637 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager]
1638 "GlobalFlag"=dword:00200030
1639
1640 _EOF_
1641 try_regedit "$WINETRICKS_TMP_WIN"\\heapcheck.reg
1642 }
1643
1644 #----------------------------------------------------------------
1645
1646 load_icodecs() {
1647 # http://downloadcenter.intel.com/Detail_Desc.aspx?strState=LIVE&ProductID=3 55&DwnldID=2846
1648 download . ftp://download.intel.com/support/createshare/camerapack/codinstl. exe 2c5d64f472abe3f601ce352dcca75b4f02996f8a
1649 try $WINE "$WINETRICKS_CACHE"/codinstl.exe
1650 # Work around bug in codec's installer?
1651 # http://support.britannica.com/other/touchthesky/win/issues/TSTUw_150.htm
1652 # http://appdb.winehq.org/objectManager.php?sClass=version&iId=7091
1653 try $WINE regsvr32 ir50_32.dll
1654 }
1655
1656 #----------------------------------------------------------------
1657 load_ie6() {
1658 load_msls31
1659
1660 # Unregister Wine IE
1661 try $WINE iexplore -unregserver
1662
1663 # Change the override to the native so we are sure we use and register them
1664 override_dlls native,builtin iexplore.exe itircl itss jscript mlang mshtml m simtf shdoclc shdocvw shlwapi urlmon
1665
1666 # Remove the fake dlls, if any
1667 mv "$programfilesdir_unix"/"Internet Explorer"/iexplore.exe "$programfilesdi r_unix"/"Internet Explorer"/iexplore.exe.bak
1668 for dll in itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi u rlmon
1669 do
1670 test -f "$WINDIR"/system32/$dll.dll &&
1671 mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak
1672 done
1673
1674 # The installer doesn't want to install iexplore.exe in XP mode.
1675 set_winver win2k
1676
1677 # Workaround a IE6 Installer bug, not Wine's fault
1678 # See http://bugs.winehq.org/show_bug.cgi?id=5409
1679 # Actual value downloaded doesn't matter
1680 rm -f "$WINETRICKS_CACHE"/ie6sites.dat
1681 download . http://www.microsoft.com/windows/ie/ie6sp1/download/rtw/x86/ie6si tes.dat
1682
1683 # Install
1684 download . http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT4 2KMeXP/EN-US/ie6setup.exe f3ab61a785eb9611fa583612e83f3b69377f2cef
1685
1686 # Workaround http://bugs.winehq.org/show_bug.cgi?id=21009
1687 # See also http://code.google.com/p/winezeug/issues/detail?id=78
1688 rm -f "$WINDIR"/system32/browseui.dll "$WINDIR"/system32/inseng.dll
1689
1690 # Silent install recipe from:
1691 # http://www.axonpro.sk/japo/info/MS/SILENT%20INSTALL/Unattended-Silent%20In stallation%20Switches%20for%20Windows%20Apps.htm
1692 if [ $WINETRICKS_QUIET ]
1693 then
1694 $WINE "$WINETRICKS_CACHE"/ie6setup.exe /q:a /r:n /c:"ie6wzd /S:""#e"" /q :a /r:n"
1695 else
1696 $WINE "$WINETRICKS_CACHE"/ie6setup.exe
1697 fi
1698 # IE6 exits with 194 to signal a reboot
1699 status=$?
1700 case $status in
1701 0|194) ;;
1702 *) die ie6 installation failed
1703 esac
1704
1705 # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
1706 # FIXME: whittle down this list
1707 cd "$WINDIR"/system32/
1708 for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
1709 dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \
1710 imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \
1711 mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \
1712 msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
1713 ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
1714 rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
1715 shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \
1716 wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
1717 plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx
1718 do
1719 $WINE regsvr32 /i $i > /dev/null 2>&1
1720 done
1721
1722 # Set windows version back to user's default. Leave at win2k for better rend ering (is there a bug for that?)
1723 unset_winver
1724
1725 # try $WINE "$programfilesdir_unix"/"Internet Explorer"/IEXPLORE.EXE http:// www.winehq.org
1726 }
1727
1728 #----------------------------------------------------------------
1729
1730 load_ie7() {
1731 # Unregister Wine IE
1732 try $WINE iexplore -unregserver
1733
1734 # Change the override to the native so we are sure we use and register them
1735 override_dlls native,builtin iexplore.exe itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon xmllite
1736
1737 # Bundled updspapi cannot work on wine
1738 override_dlls builtin updspapi
1739
1740 # Remove the fake dlls from the existing WINEPREFIX
1741 for dll in itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon
1742 do
1743 test -f "$WINDIR"/system32/$dll.dll &&
1744 mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak
1745 done
1746
1747 # See http://bugs.winehq.org/show_bug.cgi?id=16013
1748 # Find instructions to create this file in dlls/wintrust/tests/crypt.c
1749 download . http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetes t.cat ac8f50dd54d011f3bb1dd79240dae9378748449f
1750
1751 # Put a dummy catalog file in place
1752 mkdir -p "$WINDIR"/system32/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
1753 try cp -f "$WINETRICKS_CACHE"/winetest.cat "$WINDIR"/system32/catroot/\{f750 e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
1754
1755 # Install
1756 download . http://download.microsoft.com/download/3/8/8/38889DC1-848C-4BF2-8 335-86C573AD86D9/IE7-WindowsXP-x86-enu.exe d39b89c360fbaa9706b5181ae4718100687a5 326
1757 if [ $WINETRICKS_QUIET ]
1758 then
1759 $WINE "$WINETRICKS_CACHE"/IE7-WindowsXP-x86-enu.exe /quiet
1760 else
1761 $WINE "$WINETRICKS_CACHE"/IE7-WindowsXP-x86-enu.exe
1762 fi
1763
1764 # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
1765 # FIXME: whittle down this list
1766 cd "$WINDIR"/system32/
1767 for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
1768 dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \
1769 imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \
1770 mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \
1771 msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
1772 ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
1773 rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
1774 shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \
1775 wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
1776 plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx
1777 do
1778 $WINE regsvr32 /i $i > /dev/null 2>&1
1779 done
1780
1781 # Seeing is believing
1782 if [ "$WINETRICKS_QUIET" = "" ]
1783 then
1784 warn "Starting ie7. To start it later, use the command $WINE '${program filesdir_win}\\\\Internet Explorer\\\\iexplore'"
1785 $WINE "${programfilesdir_win}\\Internet Explorer\\iexplore" http://www.m icrosoft.com/windows/internet-explorer/ie7/ > /dev/null 2>&1 &
1786 else
1787 warn "To start ie7, use the command $WINE '${programfilesdir_win}\\\\Int ernet Explorer\\\\iexplore'"
1788 fi
1789 }
1790
1791 #----------------------------------------------------------------
1792
1793 load_jet40() {
1794 # http://support.microsoft.com/kb/239114
1795 # See also http://bugs.winehq.org/show_bug.cgi?id=6085
1796 download . http://download.microsoft.com/download/4/3/9/4393c9ac-e69e-458d-9 f6d-2fe191c51469/jet40sp8_9xnt.exe 8cd25342030857969ede2d8fcc34f3f7bcc2d6d4
1797 try $WINE "$WINETRICKS_CACHE"/jet40sp8_9xnt.exe $WINETRICKS_QUIET
1798 }
1799
1800 #----------------------------------------------------------------
1801
1802 load_kde() {
1803 download . http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-instal ler-gui-0.9.6-5.exe f612945e094390d7bc0e4f8840d308ef2b00f86e
1804 mkdir -p "$programfilesdir_unix/kde"
1805 try cp "$WINETRICKS_CACHE"/kdewin-installer-gui-0.9.6-5.exe "$programfilesdi r_unix/kde"
1806 cd "$programfilesdir_unix/kde"
1807 try $WINE "$programfilesdir_win\\kde\\kdewin-installer-gui-0.9.6-5.exe"
1808 cd "$olddir"
1809 }
1810
1811 #----------------------------------------------------------------
1812
1813 load_liberation() {
1814 # http://www.redhat.com/promo/fonts/
1815 case `uname -s` in
1816 SunOS|Solaris)
1817 echo "If you get 'ERROR: Certificate verification error for fedorahosted.o rg: unable to get local issuer certificate':"
1818 echo "Then you need to add Verisign root certificates to your local keysto re."
1819 echo "OpenSolaris users, see: http://www.linuxtopia.org/online_books/opens olaris_2008/SYSADV1/html/swmgrpatchtasks-14.html"
1820 echo "Or edit winetricks' download function, and add '--no-check-certifica te' to the command."
1821 ;;
1822 esac
1823
1824 download . https://fedorahosted.org/releases/l/i/liberation-fonts/liberation -fonts-1.04.tar.gz 097882c92e3260742a3dc3bf033792120d8635a3
1825 cd "$WINETRICKS_TMP"
1826 gunzip -dc "$WINETRICKS_CACHE"/liberation-fonts-1.04.tar.gz | tar -xf -
1827 mv liberation-fonts-1.04/*.ttf "$winefontsdir"
1828 rm -rf "$WINETRICKS_TMP"/*
1829 cd "$olddir"
1830 }
1831
1832 #----------------------------------------------------------------
1833
1834 set_native_mdac() {
1835 # Set those overrides globally so user programs get MDAC's odbc
1836 # instead of wine's unixodbc
1837 override_dlls native,builtin odbc32 odbccp32 oledb32
1838 }
1839
1840 #----------------------------------------------------------------
1841
1842 load_mdac25() {
1843 download mdac25 http://download.microsoft.com/download/e/e/4/ee4fe9ee-6fa1-4 ab6-ab8c-fe1769f4edcf/mdac_typ.exe 09e974a5dbebaaa08c7985a4a1126886dc05fd87
1844 set_native_mdac
1845 set_winver nt40
1846 if [ $WINETRICKS_QUIET ]
1847 then
1848 try $WINE "$WINETRICKS_CACHE"/mdac25/mdac_typ.exe /q /C:"setup /QNT"
1849 else
1850 try $WINE "$WINETRICKS_CACHE"/mdac25/mdac_typ.exe
1851 fi
1852 unset_winver
1853 }
1854
1855 #----------------------------------------------------------------
1856
1857 load_mdac27() {
1858 download mdac27 http://download.microsoft.com/download/3/b/f/3bf74b01-16ba-4 72d-9a8c-42b2b4fa0d76/mdac_typ.exe f68594d1f578c3b47bf0639c46c11c5da161feee
1859 set_native_mdac
1860 set_winver win2k
1861 if [ $WINETRICKS_QUIET ]
1862 then
1863 try $WINE "$WINETRICKS_CACHE"/mdac27/mdac_typ.exe /q /C:"setup /QNT"
1864 else
1865 try $WINE "$WINETRICKS_CACHE"/mdac27/mdac_typ.exe
1866 fi
1867 unset_winver
1868 }
1869
1870 #----------------------------------------------------------------
1871
1872 load_mdac28() {
1873 download mdac28 http://download.microsoft.com/download/c/d/f/cdfd58f1-3973-4 c51-8851-49ae3777586f/MDAC_TYP.EXE 91bd59f0b02b67f3845105b15a0f3502b9a2216a
1874 set_native_mdac
1875 set_winver win98
1876 if [ $WINETRICKS_QUIET ]
1877 then
1878 try $WINE "$WINETRICKS_CACHE"/mdac28/mdac_typ.exe /q /C:"setup /QNT"
1879 else
1880 try $WINE "$WINETRICKS_CACHE"/mdac28/mdac_typ.exe
1881 fi
1882 unset_winver
1883 }
1884
1885 #----------------------------------------------------------------
1886
1887 load_mfc40() {
1888 # See http://support.microsoft.com/kb/122244
1889 download . http://download.microsoft.com/download/ole/ole2v/3.5/w351/en-us/o le2v.exe c6cac71f32405ccb09c6f375e0738e6e13f073e4
1890 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ ole2v.exe
1891 try cp -f "$WINETRICKS_TMP"/MFC40.DLL "$WINDIR"/system32/
1892
1893 rm -rf "$WINETRICKS_TMP"/*
1894 }
1895
1896 #----------------------------------------------------------------
1897
1898 load_mingw_min() {
1899 # If this is just a dependency check, don't re-install
1900 if test $PACKAGE != mingw_min && test $PACKAGE != mingw && test $PACKAGE != mingw-min && test -f "$DRIVE_C"/MinGW/bin/gcc.exe
1901 then
1902 echo "prerequisite mingw_min already installed, skipping"
1903 return
1904 fi
1905
1906 # See http://mingw.org/wiki/Getting_Started
1907 download . http://sourceforge.net/projects/mingw/files/GNU%20Binutils/binuti ls-2.19.1-mingw32-bin.tar.gz 1ab72f3af3fe96d08c3c9bff60c47913704d5774
1908 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc -core-4.4.0-mingw32-bin.tar.gz b88b8f3644ca0cdf2c41cd03f820bf7823a8eabb
1909 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc -core-4.4.0-mingw32-dll.tar.gz 0372ecf4caf75d0d9fe4a7739ca234f1a3de831b
1910 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gmp -4.2.4-mingw32-dll.tar.gz a14dd928382f093f67cb3cd57c140625b1b265bb
1911 download . http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/libi conv-1.13.1-1-mingw32-dll-2.tar.lzma 5b60ce4d9ec9cf91aee437915a2469b915e1235f
1912 download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingw rt-3.16-mingw32-dev.tar.gz 770ff5001989d8a9a1ec4f3621d8f264a24e178f
1913 download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingw rt-3.16-mingw32-dll.tar.gz b8032e97c79e16a3c540043f0f39821df1531ae9
1914 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/mpf r-2.4.1-mingw32-dll.tar.gz 43b7ecb2c0c785c44321ff6c4376f51375713a7b
1915 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/pth reads-w32-2.8.0-mingw32-dll.tar.gz f922f8c0c42921fd4482a3d2e6f779d6384040c1
1916 download . http://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20M S-Windows/w32api-3.13-mingw32-dev.tar.gz 5eb7d8ec0fe032a92bea3a2c8282a78df2f1793 c
1917
1918 mkdir "$DRIVE_C"/MinGW
1919 cd "$DRIVE_C"/MinGW
1920 gzip -d -c "$WINETRICKS_CACHE"/binutils-2.19.1-mingw32-bin.tar.gz | tar x
1921 gzip -d -c "$WINETRICKS_CACHE"/mingwrt-3.16-mingw32-dev.tar.gz | tar x
1922 gzip -d -c "$WINETRICKS_CACHE"/mingwrt-3.16-mingw32-dll.tar.gz | tar x
1923 gzip -d -c "$WINETRICKS_CACHE"/w32api-3.13-mingw32-dev.tar.gz | tar x
1924 gzip -d -c "$WINETRICKS_CACHE"/gmp-4.2.4-mingw32-dll.tar.gz | tar x
1925 lzma -d -c "$WINETRICKS_CACHE"/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma | ta r x
1926 gzip -d -c "$WINETRICKS_CACHE"/mpfr-2.4.1-mingw32-dll.tar.gz | tar x
1927 gzip -d -c "$WINETRICKS_CACHE"/pthreads-w32-2.8.0-mingw32-dll.tar.gz | tar x
1928 gzip -d -c "$WINETRICKS_CACHE"/gcc-core-4.4.0-mingw32-bin.tar.gz | tar x
1929 gzip -d -c "$WINETRICKS_CACHE"/gcc-core-4.4.0-mingw32-dll.tar.gz | tar x
1930
1931 append_path 'C:\\MinGW\\bin'
1932 }
1933
1934 #----------------------------------------------------------------
1935
1936 load_mingw_gdb() {
1937 # See http://mingw.org/wiki/Getting_Started
1938 load_mingw_min
1939
1940 download . $SOURCEFORGE/mingw/GNU%20Source-Level%20Debugger/GDB-7.0/gdb-7.0- 2-mingw32-bin.tar.gz a560cb0e3980d0ed853994c84038260212f58925
1941
1942 cd "$DRIVE_C"/MinGW
1943 gzip -d -c "$WINETRICKS_CACHE"/gdb-7.0-2-mingw32-bin.tar.gz | tar x
1944 }
1945
1946 #----------------------------------------------------------------
1947
1948 load_mono20() {
1949 # Load Mono, have it handle all .net requests
1950 download . ftp://ftp.novell.com/pub/mono/archive/2.0.1/windows-installer/1/ mono-2.0.1-gtksharp-2.10.4-win32-1.exe ccb67ac41b59522846e47d0c423836b9d334c088
1951 try $WINE "$WINETRICKS_CACHE"/mono-2.0.1-gtksharp-2.10.4-win32-1.exe $WINETR ICKS_SILENT
1952
1953 cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_
1954 REGEDIT4
1955
1956 [HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727]
1957 "Install"=dword:00000001
1958 "SP"=dword:00000001
1959
1960 [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0]
1961 "4322"="3706-4322"
1962 _EOF_
1963 try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg
1964 rm -f "$WINETRICKS_TMP"/mono_2.0.reg
1965 }
1966
1967 #----------------------------------------------------------------
1968
1969 load_mono22() {
1970 # Load Mono, have it handle all .net requests
1971 download . ftp://ftp.novell.com/pub/mono/archive/2.2/windows-installer/5/mo no-2.2-gtksharp-2.12.7-win32-5.exe be977dfa9c49deea1be02ba4a2228e343f1e5840
1972 try $WINE "$WINETRICKS_CACHE"/mono-2.2-gtksharp-2.12.7-win32-5.exe $WINETRIC KS_SILENT
1973
1974 # FIXME: what should this be for mono 2.2?
1975 cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_
1976 REGEDIT4
1977
1978 [HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727]
1979 "Install"=dword:00000001
1980 "SP"=dword:00000001
1981
1982 [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0]
1983 "4322"="3706-4322"
1984 _EOF_
1985 try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg
1986 rm -f "$WINETRICKS_TMP"/mono_2.0.reg
1987 }
1988
1989 #----------------------------------------------------------------
1990
1991 load_mono24() {
1992 # Load Mono, have it handle all .net requests
1993 download . http://ftp.novell.com/pub/mono/archive/2.4.2.3/windows-installer /3/mono-2.4.2.3-gtksharp-2.12.9-win32-3.exe 4f0d051bcedd7668e63c12903310be0ea38f 9654
1994 try $WINE "$WINETRICKS_CACHE"/mono-2.4.2.3-gtksharp-2.12.9-win32-3.exe $WINE TRICKS_SILENT
1995
1996 # FIXME: what should this be for mono 2.4?
1997 cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_
1998 REGEDIT4
1999
2000 [HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727]
2001 "Install"=dword:00000001
2002 "SP"=dword:00000001
2003
2004 [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0]
2005 "4322"="3706-4322"
2006 _EOF_
2007 try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg
2008 rm -f "$WINETRICKS_TMP"/mono_2.0.reg
2009 }
2010
2011 #----------------------------------------------------------------
2012
2013 load_mozillabuild() {
2014 download . http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/Mo zillaBuildSetup-1.4.exe
2015 try $WINE "$WINETRICKS_CACHE"/MozillaBuildSetup-1.4.exe $WINETRICKS_S
2016 }
2017
2018 #----------------------------------------------------------------
2019
2020 load_mpc() {
2021 download . $SOURCEFORGE/guliverkli2/Media%20Player%20Classic/6.4.9.1/mplayer c_20090706.zip 9b8e06a3997a786dccfb5739e0cc1a34f17905b6
2022 mkdir -p "$programfilesdir_unix/Media Player Classic"
2023 cd "$programfilesdir_unix/Media Player Classic"
2024 try unzip "$WINETRICKS_CACHE"/mplayerc_20090706.zip
2025
2026 append_path "$programfilesdir_win"'\\Media Player Classic'
2027
2028 cd "$olddir"
2029 warn "MPC now available as $programfilesdir_win\Media Player Classic\mplayer c.exe"
2030 }
2031
2032 #----------------------------------------------------------------
2033
2034 load_msi2() {
2035 # Install native msi per http://wiki.winehq.org/NativeMsi
2036 # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CE BBACD8-C094-4255-B702-DE3BB768148F
2037 download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
2038
2039 # Pick win98 so we can install native msi
2040 set_winver win98
2041
2042 # Avoid "err:setupapi:SetupDefaultQueueCallbackA copy error 5 ..."
2043 rm -f "$WINDIR"/system32/msi.dll
2044 rm -f "$WINDIR"/system32/msiexec.exe
2045
2046 WINEDLLOVERRIDES="msi,msiexec.exe=n" try $WINE "$WINETRICKS_CACHE"/InstMSIA. exe $WINETRICKS_QUIET
2047
2048 override_dlls native,builtin msi msiexec.exe
2049
2050 # and undo version win98
2051 unset_winver
2052 }
2053
2054 #----------------------------------------------------------------
2055
2056 load_mshflxgd() {
2057 # http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx
2058 # orig: 5f9c7a81022949bfe39b50f2bbd799c448bb7377
2059 # Jan 2009: 7ad74e589d5eefcee67fa14e65417281d237a6b6
2060 # May 2009: bd8aa796e16e5f213414af78931e0379d9cbe292
2061 download . http://activex.microsoft.com/controls/vb6/MSHFLXGD.CAB bd8aa796e 16e5f213414af78931e0379d9cbe292
2062 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/MSHFLXGD.CA B
2063 try cp -f "$WINETRICKS_TMP"/[Mm][Ss][Hh][Ff][Ll][Xx][Gg][Dd].[Oo][Cc][Xx] "$ WINDIR"/system32
2064 }
2065
2066 #----------------------------------------------------------------
2067
2068 load_msls31() {
2069 # Install native Microsoft Line Services (needed by e-Sword, possibly only w hen using native riched20)
2070 download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
2071 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.ex e
2072 try cp -f "$WINETRICKS_TMP"/msls31.dll "$WINDIR"/system32
2073 }
2074
2075 #----------------------------------------------------------------
2076
2077 load_msmask() {
2078 # http://msdn.microsoft.com/en-us/library/11405hcf(VS.71).aspx
2079 # http://bugs.winehq.org/show_bug.cgi?id=2934
2080 # old: 3c6b26f68053364ea2e09414b615dbebafb9d5c3
2081 # May 2009: 30e55679e4a13fe4d9620404476f215f93239292
2082 download . http://activex.microsoft.com/controls/vb6/MSMASK32.CAB 30e55679e 4a13fe4d9620404476f215f93239292
2083 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/MSMASK32.CA B
2084 try cp -f "$WINETRICKS_TMP"/[Mm][Ss][Mm][Aa][Ss][Kk]32.[Oo][Cc][Xx] "$WINDIR "/system32/msmask32.ocx
2085 try $WINE regsvr32 msmask32.ocx
2086 }
2087
2088 #----------------------------------------------------------------
2089
2090 load_mspaint() {
2091 # http://helpforlinux.blogspot.com/2008/12/run-ms-paint-in-linux.html
2092 download . http://download.microsoft.com/download/winntwks40/paint/1/nt4/en- us/paintnt.exe a22c4e367ef9d2cd23f0a8ae8d9ebff5bc1e8a0b
2093 try unzip "$WINETRICKS_CACHE"/paintnt.exe -d "$WINDIR"
2094 warn "Paint is now installed to $WINDIR/MSPAINT.EXE"
2095 }
2096
2097 #----------------------------------------------------------------
2098
2099 load_msscript() {
2100 # http://msdn.microsoft.com/scripting/scriptcontrol/x86/sct10en.exe
2101 # http://www.microsoft.com/downloads/details.aspx?familyid=d7e31492-2595-49e 6-8c02-1426fec693ac
2102 download . http://download.microsoft.com/download/d/2/a/d2a7430c-6d5b-48e9- 96c4-3c751be7bffe/sct10en.exe fd9f2f23357ab11ae70682d6864f7e9f188adf2a
2103 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/sct10en.exe
2104 try cp -f "$WINETRICKS_TMP"/msscript.ocx "$WINDIR"/system32
2105 try $WINE regsvr32 msscript.ocx
2106 }
2107
2108 #----------------------------------------------------------------
2109
2110 load_msxml3() {
2111 # Service Pack 5
2112 #download http://download.microsoft.com/download/a/5/e/a5e03798-2454-4d4b-89 a3-4a47579891d8/msxml3.msi
2113 # Service Pack 7
2114 download . http://download.microsoft.com/download/8/8/8/888f34b7-4f54-4f06-8 dac-fa29b19f33dd/msxml3.msi d4c2178dfb807e1a0267fce0fd06b8d51106d913
2115 # http://bugs.winehq.org/show_bug.cgi?id=7849 fixed since 0.9.37
2116 override_dlls native,builtin msxml3
2117 try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml3.msi $WINETRICKS_QUIET
2118 }
2119
2120 #----------------------------------------------------------------
2121
2122 load_msxml4() {
2123 # If this is just a dependency check, don't re-install
2124 if test $PACKAGE != msxml4 && test -f "$WINDIR"/system32/msxml4.dll
2125 then
2126 echo "prerequisite msxml4 already installed, skipping"
2127 return
2128 fi
2129 # MS06-071: http://www.microsoft.com/downloads/details.aspx?familyid=24B7D14 1-6CDF-4FC4-A91B-6F18FE6921D4
2130 # download . http://download.microsoft.com/download/e/2/e/e2e92e52-210b-4774 -8cd9-3a7a0130141d/msxml4-KB927978-enu.exe d364f9fe80c3965e79f6f64609fc253dfeb69 c25
2131 # MS07-042: http://www.microsoft.com/downloads/details.aspx?FamilyId=021E12F 5-CB46-43DF-A2B8-185639BA2807
2132 # download . http://download.microsoft.com/download/9/4/2/9422e6b6-08ee-49cb -9f05-6c6ee755389e/msxml4-KB936181-enu.exe 73d75d7b41f8a3d49f272e74d4f73bb5e82f1 acf
2133 # SP3 (2009): http://www.microsoft.com/downloads/details.aspx?familyid=7F6C0 CB4-7A5E-4790-A7CF-9E139E6819C0
2134 download msxml4sp3 http://download.microsoft.com/download/A/2/D/A2D8587D-002 7-4217-9DAD-38AFDB0A177E/msxml.msi aa70c5c1a7a069af824947bcda1d9893a895318b
2135
2136 try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml4sp3/msxml.msi $WINETRICKS_QUI ET
2137 }
2138
2139 #----------------------------------------------------------------
2140
2141 load_msxml6() {
2142 # If this is just a dependency check, don't re-install
2143 if test $PACKAGE != msxml6 && test -f "$WINDIR"/system32/msxml6.dll
2144 then
2145 echo "prerequisite msxml6 already installed, skipping"
2146 return
2147 fi
2148
2149 # http://www.microsoft.com/downloads/details.aspx?FamilyID=993c0bcf-3bcf-400 9-be21-27e85e1857b1
2150 # download . http://download.microsoft.com/download/2/e/0/2e01308a-e17f-4bf9 -bf48-161356cf9c81/msxml6.msi 2308743ddb4cb56ae910e461eeb3eab0a9e58058
2151 # Service Pack 1
2152 # http://www.microsoft.com/downloads/details.aspx?familyid=D21C292C-368B-4CE 1-9DAB-3E9827B70604
2153 download . http://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-b b39-4694b5b3006f/msxml6_x86.msi
2154
2155 try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml6_x86.msi $WINETRICKS_QUIET
2156 }
2157
2158 #----------------------------------------------------------------
2159
2160 load_ogg() {
2161 # flac, ogg, speex, vorbis, ogm source, ogg source
2162 download . http://cross-lfs.org/~mlankhorst/oggcodecs_0.81.2.exe c9d10a8f1b6 5b9f3824e227333d66247e14fad4c
2163 #try $WINE "$WINETRICKS_CACHE"/oggcodecs_0.81.2.exe $WINETRICKS_QUIET
2164 # oh, and the new schroedinger direct show filter, too
2165 # see following URLs for more info
2166 # http://www.diracvideo.org/
2167 # http://cross-lfs.org/~mlankhorst/direct-schro.txt
2168 # http://www.diracvideo.org/git?p=direct-schro.git;a=summary
2169 # Requires wine-1.1.1
2170 download . http://cross-lfs.org/~mlankhorst/direct-schro.dll
2171 try cp "$WINETRICKS_CACHE"/direct-schro.dll "$WINDIR"/system32/direct-schro. dll
2172 # This is currently broken. Maarten's not sure why.
2173 try $WINE regsvr32 direct-schro.dll
2174 }
2175
2176 #----------------------------------------------------------------
2177
2178 load_ole2() {
2179 # http://support.microsoft.com/kb/123087/EN-US/
2180 download . http://download.microsoft.com/download/win31/update/2.03/win/en-u s/ww1116.exe b803991c40f387464b61f606536b7c98a88245d2
2181 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ ww1116.exe
2182 set_winver win31
2183 cd "$WINETRICKS_TMP"
2184 try $WINE setup.exe
2185 cd "$olddir"
2186 unset_winver
2187
2188 override_dlls native,builtin COMPOBJ.DLL OLE2CONV.DLL OLE2DISP.DLL OLE2.DLL
2189 override_dlls native,builtin OLE2NLS.DLL OLE2PROX.DLL STORAGE.DLL TYPELIB.DL L
2190 }
2191
2192 #----------------------------------------------------------------
2193
2194 load_openwatcom() {
2195 # http://www.openwatcom.org
2196 download . "http://ftp.openwatcom.org/ftp/open-watcom-c-win32-1.8.exe" 44afd 1fabfdf0374f614f054824e60ac560f9dc0
2197 if [ $WINETRICKS_QUIET ]
2198 then
2199 # Options documented at http://bugzilla.openwatcom.org/show_bug.cgi?id=8 98
2200 # But they don't seem to work on wine, so jam them into setup.inf
2201 # Pick smallest installation that supports 16 bit C and C++
2202 cd "$WINETRICKS_TMP"
2203 cp "$WINETRICKS_CACHE"/open-watcom-c-win32-1.8.exe .
2204 unzip open-watcom-c-win32-1.8.exe setup.inf
2205 sed -i 's/tools16=.*/tools16=true/' setup.inf
2206 zip -f open-watcom-c-win32-1.8.exe
2207 try $WINE open-watcom-c-win32-1.8.exe -s
2208 cd "$olddir"
2209 else
2210 try $WINE "$WINETRICKS_CACHE"/open-watcom-c-win32-1.8.exe
2211 fi
2212 if test ! -f "$DRIVE_C"/WATCOM/binnt/wcc.exe
2213 then
2214 warn "c:/watcom/binnt/wcc.exe not found; you probably didn't select 16 b it tools, and won't be able to buld win16test"
2215 fi
2216 }
2217
2218 #----------------------------------------------------------------
2219
2220 load_pdh() {
2221 # http://support.microsoft.com/kb/284996
2222 download . http://download.microsoft.com/download/platformsdk/Redist/5.0.219 5.2668/NT4/EN-US/pdhinst.exe f42448660def8cd7f42b34aa7bc7264745f4425e
2223 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/pdhinst.exe
2224 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_TMP"/pd h.exe
2225 try cp -f "$WINETRICKS_TMP"/x86/Pdh.Dll "$WINDIR"/system32/pdh.dll
2226 }
2227
2228 #----------------------------------------------------------------
2229
2230 load_physx()
2231 {
2232 # http://www.nvidia.com/object/physx_9.09.0814.html
2233 download . http://us.download.nvidia.com/Windows/9.09.0814/PhysX_9.09.0814_S ystemSoftware.exe e19f7c3385a4a68e7acb85301bb4d2d0d1eaa1e2
2234 try $WINE "$WINETRICKS_CACHE"/PhysX_9.09.0814_SystemSoftware.exe $WINETRICKS _QUIET
2235 }
2236
2237 #----------------------------------------------------------------
2238
2239 load_psdk2003()
2240 {
2241 load_vcrun6
2242
2243 # Note: aborts on 64 bit windows with dialog saying "don't run on WoW"
2244 # http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-496 9-ace8-e4c0c0716adb
2245 download psdk2003 http://download.microsoft.com/download/f/a/d/fad9efde-8627 -4e7a-8812-c351ba099151/PSDK-x86.exe 5c7dc2e1eb902b376d7797cc383fefdfc64ff9c9
2246 echo "This can take up to an hour."
2247 cd "$WINETRICKS_CACHE"/psdk2003
2248 try $WINE PSDK-x86.exe
2249 cd "$olddir"
2250 }
2251
2252 #----------------------------------------------------------------
2253
2254 load_psdkvista()
2255 {
2256 # http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-496 9-ace8-e4c0c0716adb
2257 warn "Vista SDK doesn't work yet as of wine-1.1.28"
2258 load_dotnet20
2259 download psdkvista download.microsoft.com/download/c/a/1/ca145d10-e254-475c- 85f9-1439f4cd2a9e/Setup.exe 756c21a7fc9b831f7200f3f44ae55cc7689e8063
2260 #chmod +x "$WINETRICKS_CACHE"/psdkvista/Setup.exe
2261 cd "$WINETRICKS_CACHE"/psdkvista
2262 try $WINE Setup.exe
2263 cd "$olddir"
2264 }
2265
2266 #----------------------------------------------------------------
2267
2268 load_psdkwin7()
2269 {
2270 # http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-433 0-a63e-1fd44e0e2505&displaylang=en
2271 warn "When given a choice, select only C++ compilers and headers, the other options don't work yet."
2272 load_vcrun6
2273 load_vcrun2008
2274 load_dotnet20
2275
2276 # don't have a working unattended recipe. Maybe we'll have to
2277 # do an autohotkey script until msft gets its act together:
2278 # http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/c053b616-7 d5b-405d-9841-ec465a8e21d5
2279 download psdkwin7 http://download.microsoft.com/download/7/A/B/7ABD2203-C472 -4036-8BA0-E505528CCCB7/winsdk_web.exe a01dcc67a38f461e80ea649edf1353f306582507
2280 cd "$WINETRICKS_CACHE"/psdkwin7
2281 try $WINE winsdk_web.exe
2282 cd "$olddir"
2283 }
2284
2285 #----------------------------------------------------------------
2286
2287 load_python26() {
2288
2289 # If this is just a dependency check, don't re-install
2290 if test $PACKAGE != python26 && test -f "$WINEPREFIX"/drive_c/Python26/pytho n.exe
2291 then
2292 echo "prerequisite python26 already installed, skipping"
2293 return
2294 fi
2295
2296 download . http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi 2d1503b0e 8b7e4c72a276d4d9027cf4856b208b8
2297 download . $SOURCEFORGE/project/pywin32/pywin32/Build%20214/pywin32-214.win3 2-py2.6.exe eca58f29b810d8e3e7951277ebb3e35ac35794a3
2298 cd "$WINETRICKS_CACHE"
2299 try $WINE msiexec /i python-2.6.2.msi ALLUSERS=1 $WINETRICKS_QUIET
2300 # FIXME: unzip this instead of running it if quiet install?
2301 try $WINE pywin32-214.win32-py2.6.exe
2302 cd "$olddir"
2303 }
2304
2305 #----------------------------------------------------------------
2306
2307 load_python_comtypes() {
2308
2309 load_python26
2310
2311 download . $SOURCEFORGE/project/comtypes/comtypes/0.6.1/comtypes-0.6.1-1.zip 814318cdae0ab2471a9cd500847bf12f4df9a57c
2312 cd "$WINETRICKS_CACHE"
2313 try unzip comtypes-0.6.1-1.zip
2314 cd comtypes-0.6.1
2315 try $WINE "C:\Python26\python.exe" setup.py install
2316 cd "$olddir"
2317 }
2318
2319 #----------------------------------------------------------------
2320
2321 load_quicktime72() {
2322 echo "Quicktime needs gdiplus..."
2323 load_gdiplus
2324
2325 # http://www.apple.com/support/downloads/quicktime72forwindows.html
2326 download quicktime72 'http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/pr oduct=14402&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe' bb89981f10cf21 de57b9453e53cf81b9194271a9
2327 unset QUICKTIME_QUIET
2328 if test "$WINETRICKS_QUIET"x != x
2329 then
2330 QUICKTIME_QUIET="/qn" # ISSETUPDRIVEN=0
2331 fi
2332 # set vista mode to inhibit directdraw overlay use that blacks the screen
2333 set_winver vista
2334 try $WINE "$WINETRICKS_CACHE"/quicktime72/QuickTimeInstaller.exe ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRunFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_RE QUIRED=No $QUICKTIME_QUIET > /dev/null 2>&1
2335 if test "$WINETRICKS_QUIET"x = x
2336 then
2337 echo "You probably want to select Advanced / Safe Mode in the Quicktime control panel"
2338 try $WINE control "$programfilesdir_win\\QuickTime\\QTSystem\\QuickTime. cpl"
2339 fi
2340
2341 unset_winver
2342 # user might want to set vista mode himself, or run
2343 # wine control ".wine/drive_c/Program Files/QuickTime/QTSystem/QuickTime.cp l"
2344 # and pick Advanced / Safe Mode (gdi only).
2345 # We could probably force that by overwriting QuickTime.qtp
2346 # (probably in Program Files/QuickTime/QTSystem/QuickTime.qtp)
2347 # but the format isn't known, so we'd have to override all other settings, t oo.
2348 }
2349
2350 #----------------------------------------------------------------
2351
2352 volnum() {
2353 case "$OS" in
2354 "Windows_NT")
2355 return
2356 ;;
2357 esac
2358
2359 # Recent Microsoft installers are often based on "windows package manager", see
2360 # http://support.microsoft.com/kb/262841 and
2361 # http://www.microsoft.com/technet/prodtechnol/windowsserver2003/deployment/ winupdte.mspx
2362 # These installers check the drive name, and if it doesn't start with 'hardd isk',
2363 # they complain "Unable to find a volume for file extraction", see
2364 # http://bugs.winehq.org/show_bug.cgi?id=5351
2365 # You may be able to work around this by using the installer's /x or /extrac t switch,
2366 # but renaming drive_c to "harddiskvolume0" lets you just run the installer as normal.
2367
2368 if test ! -d "$WINEPREFIX"/harddiskvolume0/
2369 then
2370 ln -s drive_c "$WINEPREFIX"/harddiskvolume0
2371 rm "$WINEPREFIX"/dosdevices/c:
2372 ln -s ../harddiskvolume0 "$WINEPREFIX"/dosdevices/c:
2373 echo "Renamed drive_c to harddiskvolume0"
2374 else
2375 echo "drive_c already named harddiskvolume0"
2376 fi
2377 }
2378
2379 #----------------------------------------------------------------
2380
2381 load_riched20() {
2382 # http://support.microsoft.com/?kbid=249973
2383 download . http://download.microsoft.com/download/winntsp/Patch/RTF/NT4/EN-U S/Q249973i.EXE f0b7663f15dbd31410435483ba832318c7a70470
2384 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/Q249973i.EX E
2385 try cp -f "$WINETRICKS_TMP"/riched??.dll "$WINDIR"/system32
2386 override_dlls native,builtin riched20 riched32
2387
2388 rm -rf "$WINETRICKS_TMP"/*
2389 }
2390
2391 #----------------------------------------------------------------
2392
2393 load_riched30() {
2394 # http://www.novell.com/documentation/nm1/readmeen_web/readmeen_web.html#Akx 3j64
2395 # claims that Groupwise Messenger's View / Text Size command
2396 # only works with riched30, and recommends getting it by installing
2397 # msi 2, which just happens to come with riched30 version of riched20
2398 # (though not with a corresponding riched32, which might be a problem)
2399 # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CE BBACD8-C094-4255-B702-DE3BB768148F
2400 download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
2401 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.ex e
2402 try cp -f "$WINETRICKS_TMP"/riched20.dll "$WINDIR"/system32
2403 override_dlls native,builtin riched20
2404
2405 rm -rf "$WINETRICKS_TMP"/*
2406 }
2407
2408 #----------------------------------------------------------------
2409
2410 load_richtx32() {
2411 download . http://activex.microsoft.com/controls/vb6/richtx32.cab da404b566d f3ad74fe687c39404a36c3e7cadc07
2412 try cabextract "$WINETRICKS_CACHE"/richtx32.cab -d "$WINDIR"/system32 -F Ric hTx32.Ocx
2413 try $WINE regsvr32 RichTx32.ocx
2414 }
2415
2416 #----------------------------------------------------------------
2417
2418 load_shockwave() {
2419 # Not silent enough, use msi instead
2420 #download . http://fpdownload.macromedia.com/get/shockwave/default/english/w in95nt/latest/Shockwave_Installer_Full.exe 840e34e9b067cf247bfa9092665b8966158f3 8e3
2421 #try $WINE "$WINETRICKS_CACHE"/Shockwave_Installer_Full.exe $WINETRICKS_S
2422 # old sha1sum: 6a91a9da4b54c3fdc97130a15e1a173117e5f4ff
2423 # 2009-07-31 sha1sum: 0bb506ef67a268e8d3fb6c7ce556320ee10b9da5
2424 # 2009-12-13 sha1sum: d35649883bf13cb1a86f5650e1050d15533ac0f4
2425 # 2010-01-23 sha1sum: 4a837d238c28c5f345d73f105711f20c6d059273
2426
2427 download . http://fpdownload.macromedia.com/get/shockwave/default/english/wi n95nt/latest/sw_lic_full_installer.msi 4a837d238c28c5f345d73f105711f20c6d059273
2428 try $WINE msiexec /i "$WINETRICKS_CACHE"/sw_lic_full_installer.msi $WINETRIC KS_QUIET
2429 }
2430
2431 #----------------------------------------------------------------
2432
2433 load_tahoma() {
2434 # The tahoma and tahomabd fonts are needed by e.g. Steam
2435
2436 download . http://download.microsoft.com/download/office97pro/fonts/1/w95/en -us/tahoma32.exe 888ce7b7ab5fd41f9802f3a65fd0622eb651a068
2437 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/tahoma32.ex e
2438 try cp -f "$WINETRICKS_TMP"/Tahoma.TTF "$winefontsdir"/tahoma.ttf
2439 try cp -f "$WINETRICKS_TMP"/Tahomabd.TTF "$winefontsdir"/tahomabd.ttf
2440 chmod +w "$winefontsdir"/tahoma*.ttf
2441 rm -rf "$WINETRICKS_TMP"/*
2442 }
2443
2444 #----------------------------------------------------------------
2445
2446 load_urlmon() {
2447 # This is an updated urlmon from IE 6.0
2448 # See http://www.microsoft.com/downloads/details.aspx?familyid=85BB441A-5BB1 -4A82-86EC-A249AF287513
2449 # (Works for Dolphin Smalltalk, see http://bugs.winehq.org/show_bug.cgi?id=8 258)
2450 download . http://download.microsoft.com/download/8/2/0/820faffc-3ea0-4914-b ca3-584235964ded/Q837251.exe bcc79b92ac3c06c4de3692672c3d70bdd36be892
2451 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE/Q837251.exe"
2452 try cp -f "$WINETRICKS_TMP"/URLMON.DLL "$WINDIR"/system32/urlmon.dll
2453 override_dlls native,builtin urlmon
2454 }
2455
2456 load_usp10() {
2457 # http://www.microsoft.com/downloads/details.aspx?familyid=cebbacd8-c094-425 5-b702-de3bb768148f
2458 download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
2459 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.ex e
2460 try cp -f "$WINETRICKS_TMP"/usp10.dll "$WINDIR"/system32
2461 override_dlls native,builtin usp10
2462 }
2463
2464 #----------------------------------------------------------------
2465
2466 load_vb2run() {
2467 # Not referenced on MS web anymore. But the old Microsoft Software Library F TP still has it.
2468 # See ftp://ftp.microsoft.com/Softlib/index.txt
2469 download . ftp://ftp.microsoft.com/Softlib/MSLFILES/VBRUN200.EXE ac0568b73ee 375408778e9b505df995f79ab907e
2470 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ VBRUN200.EXE
2471 try cp -f "$WINETRICKS_TMP/VBRUN200.DLL" "$WINDIR"/system32/
2472
2473 }
2474
2475 #----------------------------------------------------------------
2476
2477 load_vb3run() {
2478 # See http://support.microsoft.com/kb/196285
2479 download . http://download.microsoft.com/download/vb30/utility/1/w9xnt4/en-u s/vb3run.exe 518fcfefde9bf680695cadd06512efadc5ac2aa7
2480 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ vb3run.exe
2481 try cp -f "$WINETRICKS_TMP/Vbrun300.dll" "$WINDIR"/system32/
2482
2483 }
2484
2485 #----------------------------------------------------------------
2486
2487 load_vb4run() {
2488 # See http://support.microsoft.com/kb/196286
2489 download . http://download.microsoft.com/download/vb40ent/sample27/1/w9xnt4/ en-us/vb4run.exe 83e968063272e97bfffd628a73bf0ff5f8e1023b
2490 try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ vb4run.exe
2491 try cp -f "$WINETRICKS_TMP/Vb40032.dll" "$WINDIR"/system32/
2492 try cp -f "$WINETRICKS_TMP/Vb40016.dll" "$WINDIR"/system32/
2493
2494 }
2495
2496 #----------------------------------------------------------------
2497
2498 load_vbvm50() {
2499 download . http://download.microsoft.com/download/vb50pro/utility/1/win98/en -us/msvbvm50.exe 28bfaf09b8ac32cf5ffa81252f3e2fadcb3a8f27
2500 try $WINE "$WINETRICKS_CACHE"/msvbvm50.exe $WINETRICKS_QUIET
2501 }
2502
2503 #----------------------------------------------------------------
2504
2505 load_vbrun60() {
2506 if test ! -f "$WINETRICKS_CACHE"/vbrun60sp6.exe
2507 then
2508 download . http://download.microsoft.com/download/5/a/d/5ad868a0-8ecd-4b b0-a882-fe53eb7ef348/VB6.0-KB290887-X86.exe 73ef177008005675134d2f02c6f580515ab0 d842
2509 rm -rf "$WINETRICKS_TMP"/*
2510
2511 try $WINE "$WINETRICKS_CACHE"/VB6.0-KB290887-X86.exe "/T:$winetricks_tmp _win" /c $WINETRICKS_QUIET
2512 if test ! -f "$WINETRICKS_TMP"/vbrun60sp6.exe
2513 then
2514 die vbrun60sp6.exe not found
2515 fi
2516 try mv "$WINETRICKS_TMP"/vbrun60sp6.exe "$WINETRICKS_CACHE"
2517 fi
2518
2519 # Delete some fake DLLs to ensure that the installer overwrites them.
2520 rm -f "$WINDIR"/system32/comcat.dll
2521 rm -f "$WINDIR"/system32/oleaut32.dll
2522 rm -f "$WINDIR"/system32/olepro32.dll
2523 rm -f "$WINDIR"/system32/stdole2.tlb
2524 # Exits with status 43 for some reason?
2525 $WINE "$WINETRICKS_CACHE"/vbrun60sp6.exe $WINETRICKS_QUIET
2526
2527 status=$?
2528 case $status in
2529 0|43) ;;
2530 *) die $PACKAGE installation failed
2531 esac
2532 }
2533
2534 #----------------------------------------------------------------
2535
2536 load_vcrun6() {
2537 # Load the Visual C++ 6 runtime libraries, including the elusive mfc42u.dll
2538
2539 # If this is just a dependency check, don't re-install
2540 if test $PACKAGE != vcrun6 && test -f "$WINDIR"/system32/mfc42u.dll
2541 then
2542 echo "prerequisite vcrun6 already installed, skipping"
2543 return
2544 fi
2545
2546 if test ! -f "$WINETRICKS_CACHE"/vcredist.exe
2547 then
2548 download . http://download.microsoft.com/download/vc60pro/update/1/w9xnt4 /en-us/vc6redistsetup_enu.exe 382c8f5a7f41189af8d4165cf441f274b7e2a457
2549 rm -rf "$WINETRICKS_TMP"/*
2550
2551 try $WINE "$WINETRICKS_CACHE"/vc6redistsetup_enu.exe "/T:$winetricks_tmp_ win" /c $WINETRICKS_QUIET
2552 if test ! -f "$WINETRICKS_TMP"/vcredist.exe
2553 then
2554 die vcredist.exe not found
2555 fi
2556 mv "$WINETRICKS_TMP"/vcredist.exe "$WINETRICKS_CACHE"
2557 fi
2558 # Delete some fake dlls to avoid vcredist installer warnings
2559 rm -f "$WINDIR"/system32/comcat.dll
2560 rm -f "$WINDIR"/system32/msvcrt.dll
2561 rm -f "$WINDIR"/system32/oleaut32.dll
2562 rm -f "$WINDIR"/system32/olepro32.dll
2563 rm -f "$WINDIR"/system32/stdole2.tlb
2564 # vcredist still exits with status 43. Anyone know why?
2565 $WINE "$WINETRICKS_CACHE"/vcredist.exe
2566
2567 status=$?
2568 case $status in
2569 0|43) ;;
2570 *) die $PACKAGE installation failed
2571 esac
2572
2573 # And then some apps need mfc42u.dll, dunno what right way
2574 # is to get it, vcredist doesn't install it by default?
2575 try cabextract "$WINETRICKS_CACHE"/vcredist.exe -d "$WINDIR"/system32/ -F mf c42u.dll
2576
2577 override_dlls native,builtin msvcrt
2578
2579 }
2580
2581 #----------------------------------------------------------------
2582
2583 load_vcrun6sp6() {
2584 if test ! -f vcredistsp6.exe
2585 then
2586 download . http://download.microsoft.com/download/1/9/f/19fe4660-5792-46 83-99e0-8d48c22eed74/Vs6sp6.exe 2292437a8967349261c810ae8b456592eeb76620
2587
2588 # No EULA is presented when passing command-line extraction arguments,
2589 # so we'll simplify extraction with cabextract. We'll also try to avoid
2590 # overwriting the older vcrun6 redist by renaming the extracted file.
2591 try cabextract "$WINETRICKS_CACHE"/Vs6sp6.exe -d "$WINETRICKS_TMP" -F vc redist.exe
2592 try mv "$WINETRICKS_TMP"/vcredist.exe "$WINETRICKS_CACHE"/vcredistsp6.ex e
2593 fi
2594
2595 # Delete some fake dlls to avoid vcredist installer warnings
2596 try rm -f "$WINDIR"/system32/comcat.dll
2597 try rm -f "$WINDIR"/system32/msvcrt.dll
2598 try rm -f "$WINDIR"/system32/oleaut32.dll
2599 try rm -f "$WINDIR"/system32/olepro32.dll
2600 try rm -f "$WINDIR"/system32/stdole2.tlb
2601 # vcredist still exits with status 43. Anyone know why?
2602 $WINE "$WINETRICKS_CACHE"/vcredistsp6.exe
2603
2604 status=$?
2605 case $status in
2606 0|43) ;;
2607 *) die $PACKAGE installation failed
2608 esac
2609
2610 # And then some apps need mfc42u.dll, dunno what right way
2611 # is to get it, vcredist doesn't install it by default?
2612 try cabextract "$WINETRICKS_CACHE"/vcredistsp6.exe -d "$WINDIR"/system32/ -F mfc42u.dll
2613
2614 override_dlls native,builtin msvcrt
2615 }
2616
2617 #----------------------------------------------------------------
2618
2619 load_vcrun2003() {
2620 # Load the Visual C++ 2003 runtime libraries
2621 # Sadly, I know of no Microsoft URL for these
2622 echo "Installing BZFlag (which comes with the Visual C++ 2003 runtimes)"
2623 download . $SOURCEFORGE/bzflag/BZEditW32_1.6.5_Installer.exe bdd1b32c4202fd7 7e6513fd507c8236888b09121
2624 try $WINE "$WINETRICKS_CACHE"/BZEditW32_1.6.5_Installer.exe $WINETRICKS_S
2625 try cp "$programfilesdir_unix/BZEdit1.6.5"/m*71* "$WINDIR"/system32/
2626 }
2627
2628 #----------------------------------------------------------------
2629
2630 load_vcrun2005() {
2631 # Load the latest Visual C++ 2005 runtime libraries
2632 # If this is just a dependency check, don't re-install
2633
2634 # SP1 + ATL security fix build 4053 (MS09-035)
2635 # See http://www.microsoft.com/downloads/details.aspx?familyid=766A6AF7-EC73 -40FF-B072-9112BAB119C2
2636 if test $PACKAGE != vcrun2005 && test -d "$WINDIR"/winsxs/x86_Microsoft.VC80 .MFC_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_b77cec8e
2637 then
2638 echo "prerequisite vcrun2005 already installed, skipping"
2639 return
2640 fi
2641 download vcrun2005-ms09-035 http://download.microsoft.com/download/6/B/B/6BB 661D6-A8AE-4819-B79F-236472F6070C/vcredist_x86.exe e052789ebad7dc8d6f8505a9295b0 576babd125e
2642 cd "$WINETRICKS_CACHE"
2643 cd vcrun2005-ms09-035
2644 try $WINE vcredist_x86.exe $WINETRICKS_QUIET
2645 cd "$olddir"
2646 }
2647
2648 #----------------------------------------------------------------
2649
2650 load_vcrun2008() {
2651 # For the moment, assume windows already has this.
2652 case "$OS" in
2653 "Windows_NT")
2654 return
2655 ;;
2656 esac
2657
2658 # Work around bug 5351 (http://bugs.winehq.org/show_bug.cgi?id=5351). In rec ent
2659 # wine (>= 1.1.7) the bug is fixed. The workaround doesn't hurt anything, an d lets
2660 # installer work on older Wine (e.g., the stabe 1.0.1).
2661 volnum
2662
2663 # Load the latest Visual C++ 2008 runtime libraries
2664 # If this is just a dependency check, don't re-install
2665 # SP1 + ATL security fix build 4148 (MS09-035)
2666 # See http://www.microsoft.com/downloads/details.aspx?familyid=2051a0c1-c9b5 -4b0a-a8f5-770a549fd78c
2667 if test $PACKAGE != vcrun2008 && test -d "$WINDIR"/winsxs/x86_Microsoft.VC90 .MFC_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_a57c1f53
2668 then
2669 echo "prerequisite vcrun2008 already installed, skipping"
2670 return
2671 fi
2672 download vcrun2008-ms09-035 http://download.microsoft.com/download/9/7/7/977 B481A-7BA6-4E30-AC40-ED51EB2028F2/vcredist_x86.exe bd18409cfe75b88c2a9432d36d96f 4bf125a3237
2673 try $WINE "$WINETRICKS_CACHE"/vcrun2008-ms09-035/vcredist_x86.exe $WINETRICK S_QUIET
2674
2675 }
2676
2677 #----------------------------------------------------------------
2678
2679 load_vjrun20() {
2680 load_dotnet20
2681 # See http://www.microsoft.com/downloads/details.aspx?FamilyId=E9D87F37-2ADC -4C32-95B3-B5E3A21BAB2C
2682 download vjrun20 http://download.microsoft.com/download/9/2/3/92338cd0-759f- 4815-8981-24b437be74ef/vjredist.exe 80a098e36b90d159da915aebfbfbacf35f302bd8
2683 if [ $WINETRICKS_QUIET ]
2684 then
2685 try $WINE "$WINETRICKS_CACHE"/vjrun20/vjredist.exe /q /C:"install /QNT"
2686 else
2687 try $WINE vjrun20/vjredist.exe
2688 fi
2689 }
2690
2691 #----------------------------------------------------------------
2692
2693 load_vc2003toolkit()
2694 {
2695 # http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-vc/2679/ANN-Microsoft-V isual-C-Toolkit-2003
2696 #download . http://download.microsoft.com/download/3/9/b/39bac755-0a1e-4d0b -b72c-3a158b7444c4/VCToolkitSetup.exe 956c81c3106b97042c4126b23c81885c4b5211f4
2697 # I'm going to link to this for now even though it's not straight from micro soft
2698 # because it's a developer tool rather than a runtime, and
2699 # I'm in the middle of trying to get lots of open source windows
2700 # apps to build on Wine; see http://wiki.winehq.org/UnitTestSuites
2701 # (Plus the sha1sum, which I still have from a copy straight from microsoft,
2702 # protects us somewhat against corrupted copies.)
2703 download . http://npg.dl.ac.uk/MIDAS/MIDAS_Release/VCToolkitSetup.exe 956c81 c3106b97042c4126b23c81885c4b5211f4
2704 cd "$WINETRICKS_CACHE"
2705 try $WINE VCToolkitSetup.exe
2706 cd "$olddir"
2707 }
2708
2709 #----------------------------------------------------------------
2710
2711 load_vc2005express()
2712 {
2713 # Currently broken in wine, see http://bugs.winehq.org/show_bug.cgi?id=21010
2714 # Thanks to http://blogs.msdn.com/astebner/articles/551674.aspx for the reci pe
2715 load_dotnet20
2716 load_msxml6
2717
2718 # http://go.microsoft.com/fwlink/?LinkId=51410
2719 download vc2005express http://download.microsoft.com/download/8/3/a/83aad8f9 -38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe 0292ae1d576edd8ee5350a27113c94c9f99 58d5c
2720
2721 if [ $WINETRICKS_QUIET ]
2722 then
2723 # Thanks to Aaron Stebner's unattended install recipe
2724 # http://blogs.msdn.com/astebner/archive/2006/03/19/555326.aspx
2725
2726 # "http://go.microsoft.com/fwlink/?LinkId=51417"
2727 download vc2005express http://download.microsoft.com/download/0/5/A/05AA 45B9-A4BE-4872-8D57-733DF5297284/Ixpvc.exe ce0da62b5649f33c7a150de276d799fb2d68d 12a
2728
2729 cd "$WINETRICKS_TMP"
2730 rm -rf vc2005express.tmp || true
2731 mkdir vc2005express.tmp
2732 cd vc2005express.tmp
2733 cabextract "$WINETRICKS_CACHE"/vc2005express/vcsetup.exe
2734 cp "$WINETRICKS_CACHE"/vc2005express/Ixpvc.exe .
2735 chmod +x Ixpvc.exe
2736 # Add /qn after ReallySuppress for a really silent install (but then you won't see any errors)
2737
2738 try $WINE Ixpvc /t:"$WINETRICKS_TMP_WIN\\\\vc2005express.tmp" /q:a /c:"m siexec /i vcsetup.msi VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress"
2739
2740 cd ..
2741 rm -rf vc2005express.tmp || true
2742 else
2743 warn "Don't forget to install the IDE, or mt.exe won't be installed"
2744 cd "$WINETRICKS_CACHE"/vc2005express
2745 try $WINE vcsetup.exe
2746 # The interactive installer seems to be asynchronous, so wait until one of the last files is created
2747 while test ! -f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7 /Tools/vsvars32.bat"
2748 do
2749 echo "Waiting for install to finish..."
2750 sleep 10
2751 done
2752 fi
2753 cd "$olddir"
2754 }
2755
2756 #----------------------------------------------------------------
2757
2758 load_vc2005expresssp1()
2759 {
2760 warn "$PACKAGE does not work yet"
2761 if test ! -f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/ vsvars32.bat"
2762 then
2763 die "install vc2005express first (this verb will be merged into that onc e it's debugged)"
2764 fi
2765
2766 # http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E 6-AB4D-080D4D4A8C4E
2767 download vc2005express download.microsoft.com/download/7/7/3/7737290f-98e8-4 5bf-9075-85cc6ae34bf1/VS80sp1-KB926748-X86-INTL.exe 8b9a0172efad64774aa122f29e09 3ad2043b308d
2768 try $WINE "$WINETRICKS_CACHE"/vc2005express/VS80sp1-KB926748-X86-INTL.exe
2769 }
2770
2771 load_vcdmount()
2772 {
2773 if test "$WINE" != ""
2774 then
2775 return
2776 fi
2777
2778 # Call only on real Windows.
2779 # Sets VCD_DIR and ISO_MOUNT_ROOT
2780
2781 # The only free mount tool I know for Windows Vista is Virtual CloneDrive,
2782 # which can be downloaded at
2783 # http://www.slysoft.com/en/virtual-clonedrive.html
2784 # FIXME: actually install it here
2785
2786 # Locate vcdmount.exe.
2787 VCD_DIR="Elaborate Bytes/VirtualCloneDrive"
2788 if test ! -x "$programfilesdir_unix/$VCD_DIR/vcdmount.exe" && test ! -x "$pr ogramfilesdir_x86_unix/$VCD_DIR/vcdmount.exe"
2789 then
2790 warn "Installing Virtual CloneDrive"
2791 download . http://static.slysoft.com/SetupVirtualCloneDrive.exe
2792 # have to use cmd else vista won't let cygwin run .exe's?
2793 chmod +x "$WINETRICKS_CACHE"/SetupVirtualCloneDrive.exe
2794 cd "$WINETRICKS_CACHE"
2795 cmd /c SetupVirtualCloneDrive.exe
2796 cd "$olddir"
2797 fi
2798 if test -x "$programfilesdir_unix/$VCD_DIR/vcdmount.exe"
2799 then
2800 VCD_DIR="$programfilesdir_unix/$VCD_DIR"
2801 elif test -x "$programfilesdir_x86_unix/$VCD_DIR/vcdmount.exe"
2802 then
2803 VCD_DIR="$programfilesdir_x86_unix/$VCD_DIR"
2804 else
2805 die "can't find Virtual CloneDrive?"
2806 fi
2807
2808 # FIXME: Use WMI to locate the drive named
2809 # "ELBY CLONEDRIVE..." using WMI as described in
2810 # http://delphihaven.wordpress.com/2009/07/05/using-wmi-to-get-a-drive-frien dly-name/
2811 # For now, you just have to hardcode it for your system :-(
2812 warn "You probably need to edit the script to tell it which drive VirtualClo neDrive picked"
2813 for letter in e f g h
2814 do
2815 ISO_MOUNT_ROOT=/cygdrive/$letter
2816 test -d $ISO_MOUNT_ROOT || break
2817 done
2818 test -d $ISO_MOUNT_ROOT && die "cannot find the VirtualCloneDrive"
2819 }
2820
2821 iso_mount()
2822 {
2823 my_img="$1"
2824
2825 if test "$WINE" = ""
2826 then
2827 load_vcdmount
2828 my_img_win="`$XXXPATH -w $my_img | tr '\012' ' ' | sed 's/ $//'`"
2829 cd "$VCD_DIR"
2830 try vcdmount.exe /l=$letter "$my_img_win"
2831 cd "$olddir"
2832 while ! test -d "$ISO_MOUNT_ROOT"
2833 do
2834 echo "Waiting for mount to finish"
2835 sleep 1
2836 done
2837 else
2838 # Linux
2839 case "$GUI-$DE" in
2840 1-gnome)
2841 try gksudo "mkdir -p $ISO_MOUNT_ROOT"
2842 try gksudo "mount -o ro,loop $my_img $ISO_MOUNT_ROOT"
2843 ;;
2844 *)
2845 try sudo mkdir -p $ISO_MOUNT_ROOT
2846 try sudo mount -o ro,loop "$my_img" $ISO_MOUNT_ROOT
2847 ;;
2848 esac
2849 fi
2850 }
2851
2852 iso_umount()
2853 {
2854 if test "$WINE" = ""
2855 then
2856 # Windows
2857 load_vcdmount
2858 cd "$VCD_DIR"
2859 vcdmount /u
2860 cd "$olddir"
2861 else
2862 case "$GUI-$DE" in
2863 1-gnome)
2864 gksudo "umount $ISO_MOUNT_ROOT"
2865 try gksudo "rm -rf $ISO_MOUNT_ROOT"
2866 ;;
2867 *)
2868 sudo umount $ISO_MOUNT_ROOT
2869 try sudo rm -rf $ISO_MOUNT_ROOT
2870 ;;
2871 esac
2872 fi
2873 }
2874
2875 #----------------------------------------------------------------
2876
2877 load_vc2005trial()
2878 {
2879 load_vcrun6
2880 load_dotnet20
2881 load_msxml6
2882 load_vcdmount
2883
2884 warn "Downloading/checksumming Visual C++ 2005 Trial. This will take some t ime!"
2885 download vc2005trial http://download.microsoft.com/download/6/f/5/6f5f7a01-5 0bb-422d-8742-c099c8896969/En_vs_2005_vsts_180_Trial.img f66ae07618d67e693ca0524 d3582208c20e07823
2886
2887 iso_umount
2888 iso_mount "$WINETRICKS_CACHE"/vc2005trial/En_vs_2005_vsts_180_Trial.img
2889
2890 # FIXME: do this right
2891 rm -f /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt
2892
2893 if false && [ $WINETRICKS_QUIET ]
2894 then
2895 # Thanks to http://blogs.msdn.com/astebner/archive/2005/05/24/421314.aspx for unattended install method
2896 # See also http://support.microsoft.com/?kbid=913445
2897 die "not implemented yet"
2898 else
2899 try cd "$ISO_MOUNT_ROOT/vs/Setup"
2900 try $WINE setup.exe
2901
2902 # FIXME: unify these and make the windows one right
2903 if test "$WINE" = ""
2904 then
2905 while ! tr -d '\000' < "$TEMP"/dd_vsinstall80.txt | grep End_Session
2906 do
2907 sleep 10
2908 echo waiting for setup to finish
2909 done
2910 else
2911 while ps $psargs | grep -q setup.exe
2912 do
2913 sleep 10
2914 echo waiting for setup to finish
2915 done
2916 fi
2917 cd "$olddir"
2918 fi
2919
2920 iso_umount
2921 }
2922
2923 #----------------------------------------------------------------
2924
2925 load_vc2005sp1()
2926 {
2927 if test ! -f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/ vsvars32.bat"
2928 then
2929 die "install vc2005trial first (this verb will be merged into that once it's debugged)"
2930 fi
2931
2932 # http://www.microsoft.com/downloads/details.aspx?FamilyID=bb4a75ab-e2d4-4c9 6-b39d-37baf6b5b1dc
2933 download vc2005sp1 http://download.microsoft.com/download/6/3/c/63c69e5d-74c 9-48ea-b905-30ac3831f288/VS80sp1-KB926601-X86-ENU.exe d4b5c73253a7a4f5b4b389f41b 94fea4a7247b57
2934 # http://www.microsoft.com/downloads/details.aspx?FamilyID=7c8729dc-06a2-453 8-a90d-ff9464dc0197
2935 download vc2005sp1 http://download.microsoft.com/download/D/2/3/D23F9F62-3DE E-4EC0-B3B9-D64E9F573D1F/VS80sp1-KB971090-X86-INTL.exe
2936 cd "$WINETRICKS_CACHE"/vc2005sp1
2937 try $WINE VS80sp1-KB926601-X86-ENU.exe
2938 try $WINE VS80sp1-KB971090-X86-INTL.exe
2939 cd "$olddir"
2940 }
2941
2942 #----------------------------------------------------------------
2943
2944 load_one_hotfix()
2945 {
2946 kb=$1
2947 downloadid=$2
2948 downloadfile=$3
2949 hotfix=$4
2950
2951 cd "$WINETRICKS_CACHE/vs2005hotfixes"
2952 if test ! -f $downloadfile
2953 then
2954 case "$OS" in
2955 "Windows_NT")
2956 $WINE cygstart "https://connect.microsoft.com/VisualStudio/Downloads/D ownloadDetails.aspx?DownloadID=$downloadid" ;;
2957 *) # fails for chrome, see http://crbug.com/32800
2958 xdg-open "https://connect.microsoft.com/VisualStudio/Downloads/Downloa dDetails.aspx?DownloadID=$downloadid" ;;
2959 esac
2960 fi
2961 while test ! -f $downloadfile
2962 do
2963 echo "Waiting for you to save $downloadfile in $WINETRICKS_CACHE_WIN/vs20 05hotfixes"
2964 sleep 1
2965 done
2966 if test ! -f $hotfix
2967 then
2968 unzip -o $downloadfile
2969 fi
2970 try $WINE $hotfix
2971 cd "$olddir"
2972 }
2973
2974 load_vc2005hotfix()
2975 {
2976 # Loads the hotfixes recommended in http://dev.chromium.org/developers/how-t os/build-instructions-windows#TOC-Additional-free-downloads
2977 warn "This does not work in Wine yet."
2978 if test ! -f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/ vsvars32.bat"
2979 then
2980 die "install vc2005trial and vc2005sp1 first"
2981 fi
2982
2983 mkdir -p "$WINETRICKS_CACHE/vs2005hotfixes"
2984 case "$OS" in
2985 "Windows_NT") $WINE cygstart "$WINETRICKS_CACHE_WIN\\vs2005hotfixes" ;;
2986 *) xdg-open "$WINETRICKS_CACHE/vs2005hotfixes" ;;
2987 esac
2988
2989 load_one_hotfix KB935225 7258 306439_ENU_i386_zip.exe VS80sp1-KB935225-X86- ENU.exe
2990 load_one_hotfix KB947315 11587 341798_ENU_i386_zip.exe VS80sp1-KB947315-X86- ENU.exe
2991 load_one_hotfix KB949009 18623 VS80sp1-KB949009-X86-INTL.exe VS80sp1-KB94900 9-X86-INTL.exe
2992 load_one_hotfix KB946310 10644 335739_ENU_i386_zip.exe VS80sp1-KB946310-X86- ENU.exe
2993 # KB971090 is part of the sp1 verb, since it can be downloaded normally
2994 }
2995
2996 #----------------------------------------------------------------
2997
2998 save_vc2005_tarball()
2999 {
3000 # Save just the interesting parts of Visual Studio 2005 (edit to taste).
3001 # Workaround for vc 2005 sp1 and hotfixes not installing on Wine.
3002 # In Windows, do "winetricks vc2005trial vc2005sp1 vc2005hotfix vc2005save",
3003 # then reboot to Linux, grab vc8.tgz from the Windows partition,
3004 # and do "winetricks vc2005trial vc2005load".
3005 tar -C "$programfilesdir_x86_unix" \
3006 --exclude "Crystal Reports" \
3007 --exclude "DIA SDK" \
3008 --exclude "EnterpriseFrameworks" \
3009 --exclude "Microsoft Visual Studio 2005 Team Suite - ENU" \
3010 --exclude "ReportViewer" \
3011 --exclude "SmartDevices" \
3012 --exclude "Team Tools" \
3013 --exclude "VB" \
3014 --exclude "ce" \
3015 --exclude "Visual Studio Tools for Office" \
3016 --exclude "Xml" \
3017 --exclude "sqlserver" \
3018 -czvf vc8.tgz "Microsoft Visual Studio 8"
3019 }
3020
3021 load_vc2005_tarball()
3022 {
3023 tar -C "$programfilesdir_x86_unix" -xzvf vc8.tgz
3024 }
3025
3026 #----------------------------------------------------------------
3027
3028 load_vc2008trial()
3029 {
3030 load_vcrun6
3031 load_dotnet20
3032 load_msxml6
3033 load_vcdmount
3034
3035 warn "Visual C++ 2008 Trial does not yet work in Wine, and this recipe isn't quite debugged even in windows yet."
3036 warn "Downloading/checksumming Visual C++ 2008 Trial. This will take some t ime!"
3037 # http://www.microsoft.com/downloads/details.aspx?FamilyID=83c3a1ec-ed72-4a7 9-8961-25635db0192b
3038 download vc2008trial http://download.microsoft.com/download/8/1/d/81d3f35e-f a03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso dfb601096f6 2fd75af6ad62b277be79793f53b56
3039
3040 iso_umount
3041 iso_mount "$WINETRICKS_CACHE"/vc2008trial/VS2008ProEdition90dayTrialENUX1435 622.iso
3042
3043 # FIXME: do this right
3044 rm -f /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt
3045
3046 if true
3047 then
3048 try cd "$ISO_MOUNT_ROOT/Setup"
3049 try $WINE setup.exe
3050
3051 # FIXME: unify these and make the windows one right
3052 if test "$WINE" = ""
3053 then
3054 while ! tr -d '\000' < /cygdrive/c/Users/$USER/AppData/local/temp/dd_v sinstall80.txt | grep End_Session
3055 do
3056 sleep 10
3057 echo waiting for setup to finish
3058 done
3059 else
3060 while ps $psargs | grep -q setup.exe
3061 do
3062 sleep 10
3063 echo waiting for setup to finish
3064 done
3065 fi
3066 cd "$olddir"
3067 fi
3068
3069 iso_umount
3070 }
3071
3072 #----------------------------------------------------------------
3073
3074 load_vc2008sp1()
3075 {
3076 echo pfdu is ${programfilesdir_unix}
3077 echo setting FOO
3078 FOO="${programfilesdir_unix}/Microsoft Visual Studio 9.0/Microsoft Visual St udio 2008 Professional Edition - ENU"
3079 echo FOO set to $FOO
3080 if test ! -d "$FOO"
3081 then
3082 die "install vc2008trial first (this verb will be merged into that once it's debugged)"
3083 fi
3084
3085 # http://www.microsoft.com/downloads/details.aspx?familyid=FBEE1648-7106-44A 7-9649-6D9F6D58056E
3086 download vc2008sp1 http://download.microsoft.com/download/f/6/7/f67fdf05-058 6-413f-8231-affbe12f80a8/VS90sp1-KB945140-ENU.exe 91c146dffa96c6d8f9ceb2b5235b04 349cf93ed9
3087 cd "$WINETRICKS_CACHE"/vc2008sp1
3088 try $WINE VS90sp1-KB945140-ENU.exe
3089 cd "$olddir"
3090 }
3091
3092 #----------------------------------------------------------------
3093
3094 load_vlc() {
3095 download . http://www.videolan.org/mirror-geo-redirect.php?file=vlc/0.8.6f/w in32/vlc-0.8.6f-win32.exe b83558e4232c47a385dbc93ebdc2e6b942fbcfbf
3096 try $WINE "$WINETRICKS_CACHE"/vlc-0.8.6f-win32.exe $WINETRICKS_S
3097 }
3098
3099 #----------------------------------------------------------------
3100
3101 load_wininet() {
3102 # This is an updated wininet from IE 5.0.1.
3103 # (Good enough for Active Worlds browser. Also helps "Avatar - Legends of t he Arena" get to login screen.)
3104 # See http://www.microsoft.com/downloads/details.aspx?familyid=6DEE32AB-B618 -4FB3-9A45-CDD08162E167
3105 download . http://download.microsoft.com/download/ie5/Update/1/WIN98/EN-US/3 725.exe b048e0b4e303298de3317b16f7008c43ca71ddfe
3106 try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE/3725.exe"
3107 try cp -f "$WINETRICKS_TMP"/Wininet.dll "$WINDIR"/system32/wininet.dll
3108 override_dlls native,builtin wininet
3109 }
3110
3111 #----------------------------------------------------------------
3112
3113 load_wme9() {
3114 # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02 -e496-465a-bba9-b2f1182cdf24
3115 download wme9 http://download.microsoft.com/download/8/1/f/81f9402f-efdd-439 d-b2a4-089563199d47/WMEncoder.exe 7a3f8781f3e5705651992ef0150ee30bc1295116
3116
3117 try $WINE "$WINETRICKS_CACHE"/wme9/WMEncoder.exe $WINETRICKS_QUIET
3118 }
3119
3120 #----------------------------------------------------------------
3121
3122 load_wmp9() {
3123 # Not really expected to work well yet; see
3124 # http://appdb.winehq.org/appview.php?versionId=1449
3125
3126 load_wsh56
3127
3128 set_winver win2k
3129
3130 # See also http://www.microsoft.com/windows/windowsmedia/player/9series/defa ult.aspx
3131 download wmp9 http://download.microsoft.com/download/1/b/c/1bc0b1a3-c839-4b3 6-8f3c-19847ba09299/MPSetup.exe 580536d10657fa3868de2869a3902d31a0de791b
3132
3133 # Have to run twice; see http://bugs.winehq.org/show_bug.cgi?id=1886
3134 try $WINE "$WINETRICKS_CACHE"/wmp9/MPSetup.exe $WINETRICKS_QUIET
3135 try $WINE "$WINETRICKS_CACHE"/wmp9/MPSetup.exe $WINETRICKS_QUIET
3136
3137 # Also install the codecs
3138 # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7-dcc9 -466b-b0c4-04db144bb601
3139 download . http://download.microsoft.com/download/5/c/2/5c29d825-61eb-4b16-8 eb8-58367d0464d5/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253
3140 try $WINE "$WINETRICKS_CACHE"/WM9Codecs9x.exe $WINETRICKS_QUIET
3141
3142 # Disable WMP's services, since they depend on unimplemented stuff, they tri gger the GUI debugger several times
3143 try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K "
3144 try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2 k"
3145
3146 unset_winver
3147 }
3148
3149 #----------------------------------------------------------------
3150
3151 load_wmp10() {
3152 # See http://appdb.winehq.org/appview.php?iVersionId=3212
3153
3154 load_wsh56
3155
3156 # See also http://www.microsoft.com/windows/windowsmedia/player/10
3157 download . http://download.microsoft.com/download/1/2/A/12A31F29-2FA9-4F50-B 95D-E45EF7013F87/MP10Setup.exe 69862273a5d9d97b4a2e5a3bd93898d259e86657
3158
3159 # Crashes on exit, but otherwise ok; see http://bugs.winehq.org/show_bug.cgi ?id=12633
3160 echo Executing $WINE "$WINETRICKS_CACHE"/MP10Setup.exe $WINETRICKS_QUIET
3161 try $WINE "$WINETRICKS_CACHE"/MP10Setup.exe $WINETRICKS_QUIET
3162
3163 # Also install the codecs
3164 # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7-dcc9 -466b-b0c4-04db144bb601
3165 download . http://download.microsoft.com/download/5/c/2/5c29d825-61eb-4b16-8 eb8-58367d0464d5/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253
3166 set_winver win2k
3167 try $WINE "$WINETRICKS_CACHE"/WM9Codecs9x.exe $WINETRICKS_QUIET
3168
3169 # Disable WMP's services, since they depend on unimplemented stuff, they tri gger the GUI debugger several times
3170 try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K "
3171 try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2 k"
3172
3173 unset_winver
3174 }
3175
3176 #----------------------------------------------------------------
3177
3178 load_wenquanyi() {
3179 # See http://wenq.org/enindex.cgi
3180 # Donate at http://wenq.org/enindex.cgi?Download(en)#MicroHei_Beta if you wa nt to help support free CJK font development
3181 download . $SOURCEFORGE/wqy/wqy-microhei-0.2.0-beta.tar.gz 28023041b22b6368b cfae076de68109b81e77976
3182 cd "$WINETRICKS_TMP/"
3183 gunzip -dc "$WINETRICKS_CACHE/wqy-microhei-0.2.0-beta.tar.gz" | tar -xf -
3184 try mv wqy-microhei/wqy-microhei.ttc "$winefontsdir"
3185 register_font wqy-microhei.ttc "WenQuanYi Micro Hei"
3186 cd "$olddir"
3187 }
3188
3189 #----------------------------------------------------------------
3190
3191 load_wsh56() {
3192 # If this is just a dependency check, don't re-install
3193 if test $PACKAGE != wsh56 && test -f "$WINDIR"/system32/wscript.exe
3194 then
3195 echo "prerequisite wsh56 already installed, skipping"
3196 return
3197 fi
3198
3199 load_vcrun6
3200
3201 # See also http://www.microsoft.com/downloads/details.aspx?displaylang=en&Fa milyID=C717D943-7E4B-4622-86EB-95A22B832CAA
3202 download . http://download.microsoft.com/download/2/8/a/28a5a346-1be1-4049-b 554-3bc5f3174353/WindowsXP-Windows2000-Script56-KB917344-x86-enu.exe f4692766caa 3ee9b38d4166845486c6199a33457
3203
3204 try $WINE "$WINETRICKS_CACHE"/WindowsXP-Windows2000-Script56-KB917344-x86-en u.exe $WINETRICKS_QUIET
3205 }
3206
3207 #----------------------------------------------------------------
3208
3209 load_wsh56js() {
3210 # This installs jscript 5.6 (but not vbscript)
3211 # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=16dd21a1 -c4ee-4eca-8b80-7bd1dfefb4f8&DisplayLang=en
3212 download . http://download.microsoft.com/download/b/c/3/bc3a0c36-fada-497d-a 3de-8b0139766f3b/Windows2000-KB917344-56-x86-enu.exe add5f74c5bd4da6cfae47f8306d e213ec6ed52c8
3213
3214 try $WINE "$WINETRICKS_CACHE"/Windows2000-KB917344-56-x86-enu.exe $WINETRICK S_QUIET
3215 }
3216
3217 #----------------------------------------------------------------
3218
3219 load_wsh56vb() {
3220 # This installs vbscript 5.6 (but not jscript)
3221 # See also http://www.microsoft.com/downloads/details.aspx?familyid=4F728263 -83A3-464B-BCC0-54E63714BC75
3222 download . http://download.microsoft.com/download/IE60/Patch/Q318089/W9XNT4M e/EN-US/vbs56men.exe 48f14a93db33caff271da0c93f334971f9d7cb22
3223
3224 try $WINE "$WINETRICKS_CACHE"/vbs56men.exe $WINETRICKS_QUIET
3225 }
3226
3227 #----------------------------------------------------------------
3228
3229 load_xact() {
3230 helper_directx_dl ;
3231
3232 # xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll - extract
3233 cabextract -d "$WINETRICKS_TMP" -L -F '*_xact_*x86*' "$WINETRICKS_CACHE"/$DI RECTX_NAME
3234 cabextract -d "$WINETRICKS_TMP" -L -F '*_x3daudio_*x86*' "$WINETRICKS_CACHE" /$DIRECTX_NAME
3235 cabextract -d "$WINETRICKS_TMP" -L -F '*_xaudio_*x86*' "$WINETRICKS_CACHE"/$ DIRECTX_NAME
3236 for x in `ls "$WINETRICKS_TMP"/*.cab`
3237 do
3238 cabextract -d "$WINDIR"/system32 -L -F '*.dll' "$x"
3239 done
3240
3241 # xactengine?_?.dll, xaudio?_?.dll - register
3242 for x in `ls "$WINDIR"/system32/xactengine* "$WINDIR"/system32/xaudio*`
3243 do
3244 try $WINE regsvr32 `basename $x`
3245 done
3246 }
3247
3248 #----------------------------------------------------------------
3249
3250 load_xvid() {
3251 # xvid
3252 load_vcrun6
3253 download . http://www.koepi.info/Xvid-1.2.2-07062009.exe 435203e7f713c4484ca 4f50f43e847f3dc118962
3254 try $WINE "$WINETRICKS_CACHE"/Xvid-1.2.2-07062009.exe $WINETRICKS_SILENT
3255 }
3256
3257 #----------------------------------------------------------------
3258
3259 print_version() {
3260 echo "$VERSION"
3261 }
3262
3263 #--------- Main program -----------------------------------------
3264
3265 # On Solaris, choose more modern commands (needed for id -u).
3266 case `uname -s` in
3267 SunOS) PATH="/usr/xpg6/bin:/usr/xpg4/bin:$PATH"
3268 ;;
3269 esac
3270
3271 case "$1" in
3272 -V|--version)
3273 echo "Winetricks version $VERSION. (C) 2007-2009 Dan Kegel et al. LGPL."
3274 exit 0
3275 ;;
3276 esac
3277
3278 detectDE
3279
3280 GUI=0
3281 case x"$1" in
3282 x) GUI=1 ;;
3283 x-h|x--help|xhelp) usage ; exit 1 ;;
3284 esac
3285
3286 case "$OS" in
3287 "Windows_NT")
3288 ;;
3289 *)
3290 # Prevent running with wrong user id.
3291 # It's bad to create files as the wrong user!
3292 die_if_user_not_dirowner "$WINEPREFIX"
3293 die_if_user_not_dirowner "$WINETRICKS_CACHE"
3294
3295 if [ ! -x "`which "$WINE"`" ]
3296 then
3297 die "Cannot find wine ($WINE)"
3298 fi
3299
3300 # Create wineprefix if not already there
3301 test -d "$WINEPREFIX" || WINEDLLOVERRIDES=mshtml= $WINE cmd /c echo yes > /dev /null 2>&1
3302 ;;
3303 esac
3304
3305 mkdir -p "$WINETRICKS_TMP"
3306
3307 case $GUI in
3308 1) dogui ; set $todo ;;
3309 esac
3310
3311 mkdir -p "$WINETRICKS_CACHE"
3312 olddir=`pwd`
3313 # Clean up after failed runs, if needed
3314 rm -rf "$WINETRICKS_TMP"/*
3315
3316 # The folder-name is localized!
3317 programfilesdir_win="`unset WINEDEBUG; WINEDLLOVERRIDES=mshtml= $WINE cmd.exe /c echo "%ProgramFiles%" | tr -d '\015'`"
3318 test x"$programfilesdir_win" != x || die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string"
3319 programfilesdir_unix="`unset WINEDEBUG; $XXXPATH -u "$programfilesdir_win" | tr -d '\015' `"
3320 test x"$programfilesdir_unix" != x || die "winepath -u $programfilesdir_win retu rned empty string"
3321 winetricks_tmp_win="`$XXXPATH -w "$WINETRICKS_TMP"`"
3322
3323 # 64 bit windows has a second directory for program files
3324 programfilesdir_x86_win="${programfilesdir_win} (x86)"
3325 programfilesdir_x86_unix="${programfilesdir_unix} (x86)"
3326 if ! test -d "$programfilesdir_x86_unix"
3327 then
3328 programfilesdir_x86_win="${programfilesdir_win}"
3329 programfilesdir_x86_unix="${programfilesdir_unix}"
3330 fi
3331
3332 # (Fixme: get fonts path from SHGetFolderPath
3333 # See also http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx)
3334 #
3335 # Did the user rename Fonts to fonts?
3336 if test ! -d "$WINDIR"/Fonts && test -d "$WINDIR"/fonts
3337 then
3338 winefontsdir="$WINDIR"/fonts
3339 else
3340 winefontsdir="$WINDIR"/Fonts
3341 fi
3342
3343 # Mac folks tend to not have sha1sum, but we can make do with openssl
3344 if [ -x "`which sha1sum`" ]
3345 then
3346 SHA1SUM="sha1sum"
3347 elif [ -x "`which openssl`" ]
3348 then
3349 SHA1SUM="openssl dgst -sha1"
3350 else
3351 die "No sha1sum utility available."
3352 fi
3353
3354 if [ ! -x "`which cabextract`" ]
3355 then
3356 die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')."
3357 fi
3358
3359 if [ ! -x "`which unzip`" ]
3360 then
3361 die "Cannot find unzip. Please install it (e.g. 'sudo apt-get install unzip ' or 'sudo yum install unzip')."
3362 fi
3363
3364 while test "$1" != ""
3365 do
3366 PACKAGE=$1
3367 case $1 in
3368 -q) WINETRICKS_QUIET="/q"
3369 WINETRICKS_QUIET_T="/qt" # Microsoft Control Pad
3370 WINETRICKS_UNIXQUIET="-q"
3371 WINETRICKS_SILENT="/silent"
3372 WINETRICKS_S="/S" # for NSIS installers
3373 WINEDEBUG=${WINEDEBUG:-"fixme-all"}
3374 export WINEDEBUG
3375 ;;
3376 -v) set -x;;
3377 art2kmin|art2k7min) load_art2kmin;;
3378 atmlib) load_atmlib;;
3379 autohotkey|ahk) load_autohotkey;;
3380 cmake) load_cmake;;
3381 comctl32.ocx) load_comctl32ocx;;
3382 comctl32|cc580) load_cc580;;
3383 colorprofile) load_colorprofile;;
3384 controlpad|fm20) load_controlpad;;
3385 corefonts) load_corefonts;;
3386 cygwin) load_cygwin;;
3387 d3dx9) load_d3dx9;;
3388 d3dx10) load_d3dx10;;
3389 dcom98) load_dcom98;;
3390 dinput8) load_dinput8;;
3391 dirac|dirac0.8) load_dirac08;;
3392 directplay|dxplay|dplay) load_directplay;;
3393 directx9) DIRECTX_WINDOWS=win2k ; load_directx9;;
3394 directx9-beta) DIRECTX_WINDOWS=winxp ; load_directx9;;
3395 divx) load_divx;;
3396 dotnet1|dotnet11) load_dotnet11; load_fontfix;;
3397 dotnet11sdk) load_dotnet11sdk;;
3398 dotnet2|dotnet20) load_dotnet20;;
3399 dotnet20sdk) load_dotnet20sdk;;
3400 dotnet20sp2) load_dotnet20sp2; load_fontfix;;
3401 dotnet3|dotnet30) load_dotnet30; load_fontfix;;
3402 dotnet35) load_dotnet35; load_fontfix;;
3403 droid) load_droid;;
3404 ffdshow) load_ffdshow;;
3405 firefox|firefox3) load_firefox;;
3406 flash) load_flash;;
3407 fontfix) load_fontfix;;
3408 fontsmooth-bgr|fs-bgr) load_fs_bgr;;
3409 fontsmooth-disable|fs-disable) load_fs_disable;;
3410 fontsmooth-gray|fontsmooth-grayscale|fontsmooth-enable|fs-enable) load_fs_gr ayscale;;
3411 fontsmooth-rgb|fs-rgb|fs-cleartype) load_fs_rgb;;
3412 gdiplus) load_gdiplus;;
3413 gecko) load_gecko;;
3414 gecko-dbg|geckodbg|gecko_dbg|geckodebug|gecko_debug|gecko-debug) load_gecko_ dbg;;
3415 glsl-disable) load_glsl_disable;;
3416 glsl-enable) load_glsl_enable;;
3417 hosts) load_hosts;;
3418 icodecs) load_icodecs;;
3419 ie6) load_ie6;;
3420 ie7) load_ie7;;
3421 jet40) load_jet40;;
3422 kde) load_kde;;
3423 liberation) load_liberation;;
3424 mdac25) load_mdac25;;
3425 mdac27) load_mdac27;;
3426 mdac28) load_mdac28;;
3427 mfc40) load_mfc40;;
3428 mingw|mingw-min|mingw_min) load_mingw_min;;
3429 mingw-gdb|mingw_gdb) load_mingw_gdb;;
3430 mono19|mono20) load_mono20;;
3431 mono22) load_mono22;;
3432 mono24) load_mono24;;
3433 mozillabuild) load_mozillabuild;;
3434 mpc) load_mpc;;
3435 msi2) load_msi2;;
3436 mshflxgd) load_mshflxgd;;
3437 msls31) load_msls31;;
3438 msmask) load_msmask;;
3439 mspaint|paint) load_mspaint;;
3440 msscript) load_msscript;;
3441 msxml3) load_msxml3;;
3442 msxml4) load_msxml4;;
3443 msxml6) load_msxml6;;
3444 ogg) load_ogg;;
3445 ole2) load_ole2;;
3446 openwatcom|watcom) load_openwatcom;;
3447 pdh) load_pdh;;
3448 physx) load_physx;;
3449 psdk2003) load_psdk2003;;
3450 psdkvista) load_psdkvista;;
3451 psdkwin7) load_psdkwin7;;
3452 python|python26) load_python26;;
3453 python-comtypes|pythoncom|python-com|pythoncomtypes) load_python_comtypes;;
3454 quicktime72) load_quicktime72;;
3455 riched20) load_riched20;;
3456 riched30) load_riched30;;
3457 richtx32) load_richtx32;;
3458 shockwave) load_shockwave;;
3459 tahoma) load_tahoma;;
3460 urlmon) load_urlmon;;
3461 usp10) load_usp10;;
3462 vbrun200|vb2run) load_vb2run;;
3463 vbrun300|vb3run) load_vb3run;;
3464 vbrun400|vb4run) load_vb4run;;
3465 vbrun500|vbvm50|vb5run) load_vbvm50;;
3466 vbrun600|vbrun60|vb6run) load_vbrun60;;
3467 vc2003toolkit) load_vc2003toolkit;;
3468 vc2005express) load_vc2005express;;
3469 vc2005expresssp1) load_vc2005expresssp1;;
3470 vc2005hotfix) load_vc2005hotfix;;
3471 vc2005load) load_vc2005_tarball;;
3472 vc2005save) save_vc2005_tarball;;
3473 vc2005sp1) load_vc2005sp1;;
3474 vc2008sp1) load_vc2008sp1;;
3475 vc2005trial) load_vc2005trial;;
3476 vc2008trial) load_vc2008trial;;
3477 vcrun600|vcrun60|vcrun6|mfc42) load_vcrun6;;
3478 vcrun60sp6|vcrun6sp6) load_vcrun6sp6;;
3479 vcrun2003) load_vcrun2003;;
3480 vcrun2005|vcrun2005sp1) load_vcrun2005;;
3481 vcrun2008|vcrun2008sp1) load_vcrun2008;;
3482 vjrun20) load_vjrun20;;
3483 vlc) load_vlc;;
3484 wenquanyi) load_wenquanyi;;
3485 wininet) load_wininet;;
3486 wme9) load_wme9;;
3487 wmp9) load_wmp9;;
3488 wmp10) load_wmp10;;
3489 wsh56) load_wsh56;;
3490 wsh56js) load_wsh56js;;
3491 wsh56vb) load_wsh56vb;;
3492 xact|xactengine|x3daudio) load_xact;;
3493 xvid) load_xvid;;
3494
3495 allcodecs|allvcodecs) load_vcrun6; load_ffdshow; load_xvid; load_icodecs;;
3496 allfonts) load_corefonts; load_tahoma; load_liberation; load_droid; load_wen quanyi;;
3497 ddr=gdi) set_ddr gdi;;
3498 ddr=opengl) set_ddr opengl;;
3499 fakeie6) set_fakeie6;;
3500 heapcheck) set_heapcheck;;
3501 multisampling=enabled|multisampling=on) set_multisampling enabled;;
3502 multisampling=disabled|multisampling=off) set_multisampling disabled;;
3503 native_mdac) set_native_mdac;;
3504 native_oleaut32) override_dlls native,builtin oleaut32;;
3505 nocrashdialog) disable_crashdialog;;
3506 orm=backbuffer|backbuffer) set_orm backbuffer;;
3507 orm=fbo|fbo) set_orm fbo;;
3508 orm=pbuffer|pbuffer) set_orm pbuffer;;
3509 rtlm=auto) set_rtlm auto;;
3510 rtlm=disabled) set_rtlm disabled;;
3511 rtlm=readdraw) set_rtlm readdraw;;
3512 rtlm=readtex) set_rtlm readtex;;
3513 rtlm=texdraw) set_rtlm texdraw;;
3514 rtlm=textex) set_rtlm textex;;
3515 sandbox) sandbox;;
3516 sound=alsa|alsa) set_sound_driver alsa;;
3517 sound=audioio|audioio) set_sound_driver audioio;;
3518 sound=coreaudio|coreaudio) set_sound_driver coreaudio;;
3519 sound=esound|esound) set_sound_driver esound;;
3520 sound=jack|jack) set_sound_driver jack;;
3521 sound=nas|nas) set_sound_driver nas;;
3522 sound=oss|oss) set_sound_driver oss;;
3523 sound=disabled|sound=) set_sound_driver "";;
3524 version) print_version;;
3525 volnum) volnum;;
3526 winver=nt40|nt40) set_winver nt40;;
3527 winver=win98|win98) set_winver win98;;
3528 winver=win2k|win2k) set_winver win2k;;
3529 winver=winxp|winxp) set_winver winxp;;
3530 winver=vista|vista) set_winver vista;;
3531 winver=) unset_winver;;
3532 *) echo Unknown arg $1; usage ; exit 1;;
3533 esac
3534 # Provide a bit of feedback
3535 test "$WINETRICKS_QUIET" = "" && case $1 in
3536 -q) echo Setting quiet mode;;
3537 -v) echo Setting verbose mode;;
3538 *) echo "Install of $1 done" ;;
3539 esac
3540 shift
3541 # cleanup
3542 rm -rf "$WINETRICKS_TMP"/*
3543 done
3544
3545 # remove the temp directory
3546 rm -rf "$WINETRICKS_TMP"
3547
3548 test "$WINETRICKS_QUIET" = "" && echo winetricks done. || true
OLDNEW
« no previous file with comments | « tools/valgrind/wine_memcheck/suppressions.txt ('k') | tools/wine_valgrind/chrome_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698