#!/bin/sh # Quick and dirty script to download and install various # redistributable runtime libraries # # Current maintainers: Austin English, Dan Kegel # Copyright 2007, 2008, 2009, 2010 Google (Dan Kegel, [email protected]) # Copyright 2008, 2009, 2010 Austin English (austinenglish@.com) # License: LGPL (for compatibility with winehq) # Thanks to Detlef Riekenberg for lots of updates # Thanks to Saulius Krasuckas for corrections and suggestions # Thanks to Erik Inge Bolsø for several patches # Thanks to Hugh Perkins for the patch # Please report problems at http://code.google.com/p/winezeug/issues # See also http://wiki.winehq.org/winetricks # # Note to contributors: please avoid gnu extensions in this shell script, # as it has to run on MacOSX and Solaris, too. A good book on the topic is # "Portable Shell Programming" by Bruce Blinn, ISBN: 0134514947 # Constants # Name of this version of winetricks (YYYYMMDD) VERSION=20100904 early_wine() { WINEDLLOVERRIDES=mshtml= $WINE "$@" } # Default values for important settings if not already in environment. # These settings should not need editing here. case "$OS" in "Windows_NT") # Cheezy fix for getting rid of double slashes when running cygwin in wine case $HOME in /) HOME="" ;; esac WINE="" WINEPREFIX=${WINEPREFIX:$HOME/.wine} DRIVE_C="C:/" XXXPATH=cygpath ;; *) WINE=${WINE:wine} WINEPREFIX=${WINEPREFIX:$HOME/.wine} DRIVE_C="$WINEPREFIX/dosdevices/c:" XXXPATH="early_wine winepath" ;; esac # Decide where to store downloaded files if test ! "$WINETRICKS_CACHE" a d $HOME/.winetrickscache then # For backwards compatibility WINETRICKS_CACHE="$HOME/.winetrickscache" else # See http://standards.freedesktop.org/basedirspec/latest/ar01s03.html XDG_CACHE_HOME=${XDG_CACHE_HOME:$HOME/.cache} WINETRICKS_CACHE="${WINETRICKS_CACHE:$XDG_CACHE_HOME/winetricks}" fi test d "$WINETRICKS_CACHE" mkdir p "$WINETRICKS_CACHE" # Internal variables; these locations are not too important WINETRICKS_CACHE_WIN="`$XXXPATH w $WINETRICKS_CACHE tr '\012' ' ' sed 's/ $ //'`" WINETRICKS_TMP="$DRIVE_C"/winetrickstmp WINETRICKS_TMP_WIN='c:\winetrickstmp' mkdir p $WINETRICKS_TMP # Handle case where z: doesn't exist case "$WINETRICKS_CACHE_WIN" in ""*\?\\unix*) # WINETRICKS_CACHE isn't accessible via a drive letter mapping, so make one, # but be sure to clean it up later. for letter in y x w v u t s r q do if ! test d "$WINEPREFIX"/dosdevices/${letter}: then WINETRICKS_CACHE_SYMLINK="$WINEPREFIX"/dosdevices/${letter}: ln sf "$WINETRICKS_CACHE" "$WINETRICKS_CACHE_SYMLINK" break fi done ;; esac # Overridden for windows ISO_MOUNT_ROOT=/mnt/winetricks WINDIR="$DRIVE_C/windows" # Which mirror to use. Rotate based on time, since # their mirror picker sometimes persistantly sends you to a broken # mirror. case `date +%S` in *[23]) SOURCEFORGE=http://easynews.dl.sourceforge.net/sourceforge ;; *) SOURCEFORGE=http://downloads.sourceforge.net;; esac # Functions # Detect which sudo to use detect_sudo() { SUDO=sudo test "$GUI" = 1 return if test x"$DISPLAY" != x"" then if test x "`which gksudo 2>/dev/null`" then SUDO=gksudo elif test x "`which kdesudo 2>/dev/null`" then SUDO=kdesudo fi fi } # Detect which menu program to use detect_menu() { # TODO: add 'dialog' MENU=xmessage if test x "`which zenity 2>/dev/null`" then MENU=zenity elif test x "`which kdialog 2>/dev/null`" then MENU=kdialog fi } warn() { echo "" echo "$@" echo "" test "$GUI" = 1 return # For some reason, nulls were showing up in $@?!, causing truncated output i n zenity msg="`echo $@ tr '\000' ' '`" case $MENU in *zenity) zenity error title=Winetricks text="$msg" nowrap;; *kdialog) kdialog title Winetricks error "$msg" ;; *xmessage) xmessage title Winetricks center " Error: $msg " ;; esac } die() { warn "$@" exit 1 } # Abort if user doesn't own the given directory (or its parent, if it doesn't ex ist yet) die_if_user_not_dirowner() { if test d "$1" then checkdir="$1" else # fixme: quoting problem? checkdir=`dirname "$1"` fi nuser=`id u` nowner=`ls l n d L "$checkdir" awk '{print $3}'` if test x$nuser != x$nowner then die "You (`id un`) don't own $checkdir. Don't run winetricks as another user!" fi } # usage() { set +x # WARNING: do not use single quote in any package description; that breaks t he gui menu. echo "Usage: $0 [options] package [package] ..." echo "This script can help you prepare your system for Windows applications" echo "that mistakenly assume all users' systems have all the needed" echo "redistributable runtime libraries or ." echo "Some options require the Linux 'cabextract' program." echo "" echo "Options:" echo " q quiet. You must have already agreed to the EULAs." echo " v verbose" echo " V display Version" echo "Packages:" echo " 7zip 7zip file archiver" echo " adobeair Adobe AIR runtime" echo " art2kmin MS Access 2007 runtime" echo " atmlib Adobe Type Manager. Needed for Adobe CS4" echo " autohotkey Autohotkey (open source gui scripting language)" echo " cmake CMake, the crossplatform, opensource build system" echo " colorprofile Standard RGB color profile" echo " comctl32 MS common controls 5.80" echo " comctl32.ocx MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6" echo " comdlg32.ocx MS comdlg32.ocx for VB6" echo " controlpad MS ActiveX Control Pad" echo " corefonts MS , , Times fonts" echo " cygwin Unix apps for Windows (needed by some build scripts)" echo " d3dx9 MS d3dx9_??.dll (from DirectX 9 user redistributable)" echo " d3dx9_28 MS d3dx9_28.dll" echo " d3dx9_36 MS d3dx9_36.dll" echo " d3dx10 MS d3dx10_??.dll (from DirectX user redistributable)" echo " d3dxof MS d3dxof.dll (from DirectX user redistributable)" echo " dcom98 MS DCOM (ole32, oleaut32); requires license, but does not check for one" echo " dinput8 MS dinput8.dll (from DirectX 9 user redistributable)" echo " dirac the Dirac filter" echo " MS DirectMusic (from DirectX 9 user redistributable)" echo " directplay MS DirectPlay (from DirectX 9 user redistributable)" echo " directx9 MS DirectX 9 user redistributable (not recommended! use d3dx9 instead)" echo " directx9beta MS DirectX 9 user redistributable beta verb (not reco mmended! use d3dx9 instead)" echo " divx divx video codec" echo " dotnet11 MS .NET 1.1 (requires Windows license, but does not che ck for one)" # Doesn't work yet, don't make it public # echo " dotnet11sdk MS .NET Framework SDK Version 1.1 (requires Windows li cense, but does not check for one; may not work yet)" echo " dotnet20 MS .NET 2.0 (requires Windows license, but does not che ck for one)" # Doesn't work yet, don't make it public # echo " dotnet20sdk MS .NET Framework SDK Version 2.0 (requires Windows li cense, but does not check for one, may not work yet)" echo " dotnet20sp2 MS .NET 2.0 sp2 (requires Windows license, but does not check for one)" echo " dotnet30 MS .NET 3.0 (requires Windows license, but does not che ck for one, might not work yet)" echo " droid (on LCD, looks better with fontsmoothrgb)" echo " dxsdk_nov2006 DirectX Software Development Kit, November 2006 version " echo " eadm EA Download Manager" echo " eufonts Updated fonts for Romanian and Bulgarian" echo " ffdshow ffdshow video codecs" echo " firefox Firefox web browser" echo " flash Adobe Flash Player ActiveX and firefox plugins" echo " fm20 MS Forms 2.0 Object Library" echo " fontfix Fix bad fonts which cause crash in some apps (e.g. .net )." echo " fontsmoothbgr Enables subpixel smoothing for BGR LCDs" echo " fontsmoothdisable Disables smoothing" echo " fontsmoothgray Enables grayscale font smoothing" echo " fontsmoothrgb Enables subpixel smoothing for RGB LCDs" echo " gdiplus MS gdiplus.dll" echo " geckodbg The HTML rendering Engine (Mozilla), with debugging sym bols" echo " gecko The HTML rendering Engine (Mozilla)" echo " gfw MS Game For Windows Live (xlive.dll)" echo " glut The glut utility library" echo " hosts Adds empty C:\windows\system32\drivers\etc\{hosts,servi ces} files" echo " ie6 Microsoft 6.0" echo " ie7 Microsoft Internet Explorer 7.0" echo " ie8 Microsoft Internet Explorer 8.0" echo " jet40 MS Jet 4.0 Service Pack 8" echo " kde KDE for " echo " liberation (Sans, , Mono)" echo " MS Lucida Console font" echo " mdac25 MS MDAC 2.5: Microsoft ODBC drivers, etc." echo " mdac27 MS MDAC 2.7" echo " mdac28 MS MDAC 2.8" echo " mfc40 MS mfc40 (Microsoft Foundation Classes from Visual C++ 4)" echo " mfc42 MS mfc42 (same as vcrun6 below)" echo " mingwgdb GDB for MinGW" echo " mingw Minimalist GNU for Windows, including GCC for Windows!" echo " mono26 mono2.6" echo " mozillabuild Mozilla build environment" echo " mpc Media Player Classic" echo " mshflxgd MS Hierarchical FlexGrid Control" echo " msi2 MS Windows Installer 2.0" echo " msls31 MS Line Services 3.1 (needed by native riched?)" echo " msmask MS Masked Edit Control" echo " mspaint MS Paint (gotta draw stick figures somehow...)" echo " msscript MS Windows Script Control" echo " msxml3 MS XML Core Services 3.0" echo " msxml4 MS XML Core Services 4.0" echo " msxml6 MS XML Core Services 6.0" echo " ogg ogg filters/codecs: flac, theora, speex, vorbis, schroe dinger" echo " ole2 MS 16 bit OLE" echo " openwatcom Open Watcom C/C++ compiler (can compile win16 code!)" echo " pdh MS pdh.dll (Performance Data Helper)" echo " physx NVIDIA/AGEIA PhysX runtime" echo " psdk2003 MS Platform SDK 2003" echo " psdkvista MS Vista SDK (does not install yet)" echo " psdkwin7 MS SDK (installing just headers and c++ compi ler works)" echo " python26 Python 2.6.2 (and pywin32)" echo " pythoncomtypes Python 0.6.11 comtypes package" echo " quartz quartz.dll (from Directx 9 user redistributable)" echo " quicktime72 Apple Quicktime 7.2" echo " riched20 MS RichEdit Control, riched20 and riched32" echo " riched30 MS RichEdit Control, riched30" echo " richtx32 MS Rich TextBox Control 6.0" echo " safari Apple Safari web browser" echo " secur32 MS secur32" echo " shockwave Adobe Shockwave Player" echo " steam Steam Client App from Valve" echo " tahoma MS Tahoma font (not part of corefonts)" echo " urlmon MS urlmon.dll" echo " usp10 MS usp10.dll (Uniscribe)" echo " utorrent uTorrent" echo " vb2run MS Visual Basic 2 runtime" echo " vb3run MS Visual Basic 3 runtime" echo " vb4run MS Visual Basic 4 runtime" echo " vb5run MS Visual Basic 5 runtime" echo " vb6run MS Visual Basic 6 Service Pack 6 runtime" echo " vc2005express MS Visual C++ 2005 Express" echo " vc2005expresssp1 MS Visual C++ 2005 Express SP1 (does not work yet)" echo " vc2005sp1 MS Visual C++ 2005 Service Pack 1 and ATL fix (install trial 1st)" echo " vc2005hotfix MS Visual C++ 2005 hotfixes (install sp1 1st)" echo " vc2005trial MS Visual C++ 2005 Trial" echo " vcrun2003 MS Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)" echo " vcrun2005 MS Visual C++ 2005 sp1 libraries (mfc80,msvcp80,msvcr80 )" echo " vcrun2008 MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)" echo " vcrun2010 MS Visual C++ 2010 libraries (mfc100,msvcp100,msvcr100) " echo " vcrun6 MS Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcrt)" echo " vcrun6sp6 MS Visual C++ 6 sp6 libraries (mfc42, msvcp60, msvcrt; 64 MB download)" echo " vjrun20 MS Visual J# 2.0 SE libraries (requires dotnet20)" echo " vlc VLC media player" echo " WenQuanYi CJK font (on LCD looks better with fontsmooth rgb)" echo " windowscodecs MS Windows Imaging Component" echo " wininet MS wininet.dll (requires Windows license, but does not check for one)" echo " wme9 MS Encoder 9 (requires Windows license, b ut does not check for one)" echo " wmp10 MS Windows Media Player 10 (requires Windows license, b ut does not check for one)" echo " wmp9 MS Windows Media Player 9 (requires Windows license, bu t does not check for one)" echo " wsh56js MS Windows scripting 5.6, only, no cscript" echo " wsh56 MS Windows Scripting Host 5.6" echo " wsh56vb MS Windows scripting 5.6, only, no cscript" echo " xact MS XACT Engine (x3daudio?_?.dll, xactengine?_?.dll)" echo " xvid xvid video codec" echo "Pseudopackages:" echo " alldlls=builtin Force use of builtin dlls (even if loaded with absol ute path) (except for msvcp80 and d3dx9_*)" echo " alldlls=default Remove all DLL overrides" echo " allfonts All listed fonts (corefonts, droid, eufonts, liberation , lucida, tahoma, wenquanyi)" echo " allcodecs All listed codecs (xvid, ffdshow)" echo " ddr=gdi Set DirectDrawRenderer to GDI (default)" echo " ddr=opengl Set DirectDrawRenderer to OpenGL" echo " dsoundbug9612 Use DirectSound MaxShadowSize=0 workaround for bug #961 2" echo " forcemono Force using mono instead of .Net (for debugging)" echo " glsldisable Disable GLSL use by Wine " echo " glslenable Enable GLSL use by Wine Direct3D (default)" echo " heapcheck Enable heap checking" echo " multisampling=enabled Enable Direct3D multisampling" echo " multisampling=disabled Disable Direct3D multisampling (default)" echo " native_mdac Override odbc32, odbccp32 and oledb32" echo " native_oleaut32 Override oleaut32" echo " nocrashdialog Disable the graphical crash dialog" echo " orm=backbuffer Registry tweak: OffscreenRenderingMode=backbuffer" echo " orm=fbo Registry tweak: OffscreenRenderingMode=fbo (default)" echo " orm=pbuffer Registry tweak: OffscreenRenderingMode=pbuffer" echo " rtlm=auto Set RenderTargetLockMode to auto (default)" echo " rtlm=disabled Set RenderTargetLockMode to disabled" echo " rtlm=readdraw Set RenderTargetLockMode to readdraw" echo " rtlm=readtex Set RenderTargetLockMode to readtex" echo " rtlm=texdraw Set RenderTargetLockMode to texdraw" echo " rtlm=textex Set RenderTargetLockMode to textex" echo " sandbox Sandbox the wineprefix remove links to ~" echo " sound=alsa Set sound driver to ALSA" echo " sound=audioio Set sound driver to AudioIO" echo " sound=coreaudio Set sound driver to CoreAudio" echo " sound=esd Set sound driver to Esound" echo " sound=jack Set sound driver to Jack" echo " sound=nas Set sound driver to Nas" echo " sound=oss Set sound driver to OSS" echo " sound=disabled Disable sound" echo " strictdrawordering=enabled Enable StrictDrawOrdering (default)" echo " strictdrawordering=disabled Disable StrictDrawOrdering" echo " nt40 Set windows version to nt40" echo " win98 Set windows version to Windows 98" echo " win2k Set windows version to " echo " winxp Set windows version to Windows XP" echo " vista Set windows version to " echo " win7 Set windows version to Windows 7" echo " winver= Set windows version to default (winxp)" echo " volnum Rename drive_c to harddiskvolume0 (needed by some insta llers)" echo " mwo=force Set MouseWarpOverride to force (needed by some games)" echo " mwo=enabled Set MouseWarpOverride to enabled (default)" echo " mwo=disable Set MouseWarpOverride to disable" echo " npmrepack Set NonPower2Mode to repack" echo " psm=on Set PixelShaderMode to enabled" echo " psm=off Set PixelShaderMode to disabled" echo " vsmhard Set VertexShaderMode to hardware" }

# # Trivial GUI just to handle case where user tries running without commandline kdialog_showmenu() { title="$1" shift text="$1" shift col1name="$1" shift col2name="$1" shift while test $# gt 0 do args="$args $1 $1 off" shift done kdialog title "$title" separateoutput checklist "$text" $args } xmessage_showmenu() { title="$1" shift text="$1" shift col1name="$1" shift col2name="$1" shift if test $# gt 0 then args="$1" shift fi while test $# gt 0 do args="$args,$1" shift done (echo "$title"; echo ""; echo "$text") \ xmessage print file buttons "Cancel,$args" sed 's/Cancel//' } showmenu() { case $MENU in zenity) echo "zenity title 'Winetricks' text 'Select packages to install' list checklist column '' column Package column Description height 440 width 600 \\" > "$WINETRICKS_TMP"/zenity.sh usage grep '^ [09az]' sed 's/^ \([^ ]*\) *\(.*\)/FALSE "\1" '"'\2' /" sed 's/$/ \\/' >> $WINETRICKS_TMP/zenity.sh todo="`sh "$WINETRICKS_TMP"/zenity.sh tr '' ' '`" ;; kdialog) packages=`usage awk '/^ [09az]/ {print $1}'` todo="`kdialog_showmenu "winetricks" "Select a package to install" "Inst all?" "Package" $packages`" ;; xmessage) packages=`usage awk '/^ [09az]/ {print $1}'` todo="`xmessage_showmenu "winetricks" "Select a package to install" "Ins tall?" "Package" $packages`" ;; esac if test "$todo"x = x then exit 0 fi } # Helpers # Execute with error checking try() { # "VAR=foo try cmd" fails to put VAR in the environment # with some versions of bash if try is a shell function?! # Adding this explicit export works around it. export WINEDLLOVERRIDES echo Executing "$@" # Mark executable needed if running on windows vista case "$1" in *.exe) chmod +x "$1" true cmd /c "$@" ;; *) "$@" ;; esac status=$? if test $status ne 0 then die "Note: command '$@' returned status $status. Aborting." fi } try_regedit() { # on windows, doesn't work without cmd /c case "$OS" in "Windows_NT") cmdc="cmd /c";; *) unset cmdc esac try early_wine $cmdc regedit "$@" } regedit() { die oops, bug, please report } try_cabextract() { # Not always installed, but shouldn't be fatal unless it's being used CABEXTRACT="`which cabextract 2>/dev/null`" if test ! x "$CABEXTRACT" then die "Cannot find cabextract. Please install it (e.g. 'sudo aptget inst all cabextract' or 'sudo yum install cabextract')." fi

try $CABEXTRACT "$@" } cabextract() { die oops, bug, please report } try_unzip() { # Not always installed, but shouldn't be fatal unless it's being used UNZIP="`which unzip 2>/dev/null`" if test ! x "$UNZIP" then die "Cannot find unzip. Please install it (e.g. 'sudo aptget install u nzip' or 'sudo yum install unzip')." fi

try $UNZIP "$@" } unzip() { die oops, bug, please report } # verify an sha1sum verify_sha1sum() { wantsum=$1 file=$2 gotsum=`$SHA1SUM < "$file" sed 's/(stdin)= //;s/ .*//'` if [ "$gotsum"x != "$wantsum"x ] then die "sha1sum mismatch! Rename $file and try again." fi } # Download a file # Usage: package url [sha1sum [filename]] # Caches downloads in winetrickscache/$package download() { if [ "$4"x != ""x ] then file="$4" else file=`basename "$2"` fi cache="$WINETRICKS_CACHE/$1" mkdir p "$cache" if test ! f "$cache/$file" then cd "$cache" # Mac folks tend to have curl rather than wget # On Mac, 'which' doesn't return good exit status # Need to jam in header "AcceptEncoding: gzip,deflate" else # redhat.com decompresses liberationfonts.tar.gz! if [ x "`which wget 2>/dev/null`" ] then # Use nd to insulate ourselves from people who set x in WGETRC # [*] retryconnrefused works around the broken sf.net mirroring # system when downloading corefonts # [*] readtimeout is useful on the adobe server that doesn't # close the connection unless you tell it to (controlC or closing # the socket) try wget O "$file" nd c readtimeout=300 retryconnrefused header "AcceptEncoding: gzip,deflate" "$2" elif [ x "`which curl 2>/dev/null`" ] then # curl doesn't get filename from the location given by the server! # fortunately, we know it try curl L o "$file" C header "AcceptEncoding: gzip,deflate" "$2" else die "wget/curl not found, cannot download any files. Please install either wget or curl." fi # Need to decompress .exe's that are compressed, else cygwin fails # Only affects cygwin, so don't barf if 'file' not installed FILE=`which file 2>/dev/null` case $FILE$file in /**.exe) case `file $file` in *gzip*) mv $file $file.gz; gunzip < $file.gz > $file;; esac esac cd "$olddir" fi if [ "$3"x != ""x ] then verify_sha1sum $3 "$cache/$file" fi } set_winver() { echo "Setting Windows version to $1" cat > "$WINETRICKS_TMP"/setwinver.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine] "Version"="$1" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\setwinver.reg } set_app_winver() { app="$1" version="$2" echo "Setting $app to $version mode" ( echo REGEDIT4 echo "" echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$app]" echo "\"Version\"=\"$version\"" ) > "$WINETRICKS_TMP"/setwinver.reg try_regedit "$WINETRICKS_TMP_WIN"\\setwinver.reg rm "$WINETRICKS_TMP"/setwinver.reg } set_ddr() { echo "Setting DirectDrawRenderer to $1" cat > "$WINETRICKS_TMP"/setddr.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "DirectDrawRenderer"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setddr.reg } set_orm() { echo "Setting OffscreenRenderingMode to $1" cat > "$WINETRICKS_TMP"/setorm.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "OffscreenRenderingMode"="$1" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\setorm.reg } set_mmdevapi() { echo "Setting mmdevapi to $1"

override_dlls $1 mmdevapi } set_rtlm() { echo "Setting RenderTargetLockMode to $1" cat > "$WINETRICKS_TMP"/setrtlm.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "RenderTargetLockMode"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setrtlm.reg } set_sdo() { echo "Setting StrictDrawOrdering to $1" cat > "$WINETRICKS_TMP"/setsdo.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "StrictDrawOrdering"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setsdo.reg } set_vsm() { echo "Setting Vertex Shaders to $1" cat > "$WINETRICKS_TMP"/setvsm.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "VertexShaderMode"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setvsm.reg } set_multisampling() { echo "Setting Multisampling to $1" cat > "$WINETRICKS_TMP"/setmulti.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "Multisampling"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setmulti.reg } set_mwo () { echo "Setting MouseWarpOverride to $1" cat > "$WINETRICKS_TMP"/setmwo.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\DirectInput] "MouseWarpOverride"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setmwo.reg } npm_repack (){ echo "Setting Nonpower2Mode to repack" cat > "$WINETRICKS_TMP"/setnpw.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "Nonpower2Mode"="repack" _EOF_ try_regedit "$WINETRICKS_TMP"/setnpw.reg } set_psm() { echo "Setting PixelShaderMode to $1" cat > "$WINETRICKS_TMP"/setpsm.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "RenderTargetLockMode"="$1" _EOF_ try_regedit "$WINETRICKS_TMP"/setpsm.reg } set_sound_driver() { echo "Setting sound driver to $1" cat > "$WINETRICKS_TMP"/setsound.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Drivers] "Audio"="$1" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\setsound.reg } set_videomemorysize() { echo "Setting video memory size to $1" case $1 in default) cat > "$WINETRICKS_TMP"/setvideo.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "VideoMemorySize"= _EOF_ ;; *) cat > "$WINETRICKS_TMP"/setvideo.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "VideoMemorySize"="$1" _EOF_ esac try_regedit "$WINETRICKS_TMP_WIN"\\setvideo.reg } disable_crashdialog() { echo "Disabling graphical crash dialog" cat > "$WINETRICKS_TMP"/crashdialog.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\WineDbg] "ShowCrashDialog"=dword:00000000 _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\crashdialog.reg } sandbox() { # Unmap drive Z # Might want to unpack gecko first, since Wine won't be able to get to /usr/ lib/wine after this rm f "$WINEPREFIX/dosdevices/z:" # remove symlinks (won't do anything if they're already directories) rm f "$WINEPREFIX/drive_c/users/$USER/Desktop" rm f "$WINEPREFIX/drive_c/users/$USER/My Documents" rm f "$WINEPREFIX/drive_c/users/$USER/My Music" rm f "$WINEPREFIX/drive_c/users/$USER/My Pictures" rm f "$WINEPREFIX/drive_c/users/$USER/My Videos" # create replacement directories if needed mkdir p "$WINEPREFIX/drive_c/users/$USER/Desktop" mkdir p "$WINEPREFIX/drive_c/users/$USER/My Documents" mkdir p "$WINEPREFIX/drive_c/users/$USER/My Music" mkdir p "$WINEPREFIX/drive_c/users/$USER/My Pictures" mkdir p "$WINEPREFIX/drive_c/users/$USER/My Videos" # Disable unixfs # Unfortunately, when you run with a different version of wine, wine will re create this key. # See http://bugs.winehq.org/show_bug.cgi?id=22450 $WINE regedit /d 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersi on\Explorer\Desktop\Namespace\{9D20AAE8062544B09CA771889C2254D9}' # Disable recreation of the above key or any updating of the regisry whe n running with new version of wine. echo disable > "$WINEPREFIX/.updatetimestamp" } unset_winver() { echo "Clearing Windows version back to default" cat > "$WINETRICKS_TMP"/unsetwinver.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine] "Version"= _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\unsetwinver.reg } override_dlls() { mode=$1 if [ $mode = "disabled" ] then mode="" fi shift echo Using $mode override for following DLLs: $@ cat > "$WINETRICKS_TMP"/overridedll.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\DllOverrides] _EOF_ while test "$1" != "" do case "$1" in comctl32) rm rf "$WINDIR"/winsxs/manifests/x86_microsoft.windows.commoncontro ls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest ;; esac # Note: if you want to override even DLLs loaded with an absolute path, # you need to add an asterisk: echo "\"*$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/overridedll.reg #echo "\"$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/overridedll.reg shift done try_regedit "$WINETRICKS_TMP_WIN"\\overridedll.reg cat "$WINETRICKS_TMP"/overridedll.reg rm "$WINETRICKS_TMP"/overridedll.reg } override_no_dlls() { $WINE regedit /d 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' } override_all_dlls() { # Disable all but the commonly used DLLs Wine doesn't have a credible altern ative for # i.e. Don't disallow msvcp80 or d3dx9_* for now # d3dx9_24.dll d3dx9_25.dll d3dx9_26.dll d3dx9_27.dll d3dx9_28.dll d3dx9_29. dll d3dx9_30.dll d3dx9_31.dll d3dx9_32.dll d3dx9_33.dll d3dx9_34.dll d3dx9_35.dl l d3dx9_36.dll d3dx9_37.dll d3dx9_38.dll d3dx9_39.dll d3dx9_40.dll d3dx9_41.dll d3dx9_42.dll d3dxof.dll override_dlls builtin \ acledit aclui activeds actxprxy advapi32 advpack amstream atl authz avic ap32 \ avifil32 avifilebavrt bcrypt browseui cabinet capi2032 cards cfgmgr32 cl usapi \ comcat comctl32 comdlg32 commdlg compobj compstui credui crtdll crypt32 cryptdlg \ cryptdll cryptnet cryptui ctapi32 ctl3d ctl3d32 ctl3dv2 d3d10 \ d3d10core d3d8 d3d9 d3dim d3drm \ d3dxof dbghelp dciman32 ddeml ddraw ddrawex \ devenum dinput dinput8 dispdib dispex dmband dmcompos dmime dmloader dms cript \ dmstyle dmsynth dmusic dmusic32 dnsapi dplay dplayx dpnaddr dpnet dpnhpa st \ dpnlobby dpwsockx drmclien dsound dssenh dswave dwmapi dxdiagn dxgi faul trep \ fltlib fusion fwpuclnt gdi32 gdiplus glu32 gpkcsp hal hid hlink \ hnetcfg httpapi iccvid icmp imagehlp imm imm32 inetcomm inetmib1 infosof t \ initpki inkobj inseng iphlpapi itircl itss jscript kernel32 loadperf loc alspl \ localui lz32 lzexpand mapi32 mapistub mciavi32 mcicda mciqtz32 mciseq mc iwave \ midimap mlang mmdevapi mmsystem mpr mprapi msacm msacm32 mscat32 mscms \ mscoree msctf msdaps msdmo msftedit mshtml msi msimg32 msimtf msisip \ msnet32 msrle32 mssign32 mssip32 mstask msvcirt msvcr70 msvcr71 msvcr80 \ msvcr90 msvcrt msvcrt20 msvcrt40 msvcrtd msvfw32 msvidc32 msvideo mswsoc k msxml3 \ msxml4 nddeapi netapi32 newdev ntdll ntdsapi ntprint objsel odbc32 odbcc p32 \ ole2 ole2conv ole2disp ole2nls ole2prox ole2thk ole32 oleacc oleaut32 ol ecli \ olecli32 oledb32 oledlg olepro32 olesvr olesvr32 olethk32 openal32 openg l32 pdh \ pidgen powrprof printui propsys psapi pstorec qcap qedit qmgr qmgrprxy \ quartz query rasapi16 rasapi32 rasdlg resutils riched20 riched32 rpcrt4 rsabase \ rsaenh rtutils sccbase schannel secur32 security sensapi serialui setupa pi setupx \ sfc sfc_os shdoclc shdocvw shell shell32 shfolder shlwapi slbcsp slc \ snmpapi softpub spoolss sti storage stress svrapi sxs t2embed tapi32 \ toolhelp traffic twain twain_32 typelib unicows updspapi url urlmon user 32 \ userenv usp10 uxtheme vdmdbg ver version w32skrnl w32sys wbemprox wiaser vc \ win32s16 win87em winaspi windebug windowscodecs wined3d winedos winemapi wing wing32 \ winhttp wininet winmm winnls winnls32 winscard wintab wintab32 w intrust \ wldap32 wmi wmiutils wnaspi32 wow32 ws2_32 wsock32 wtsapi32 wuapi wuauen g \ xinput1_1 xinput1_2 xinput1_3 xinput9_1_0 xmllite } override_app_dlls() { app=$1 shift mode=$1 shift echo Using $mode override for following DLLs when running $app: $@ ( echo REGEDIT4 echo "" echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$app\\DllOverrides]" ) > "$WINETRICKS_TMP"/overridedll.reg while test "$1" != "" do case "$1" in comctl32) rm rf "$WINDIR"/winsxs/manifests/x86_microsoft.windows.commoncontro ls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest ;; esac echo "\"$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/overridedll.reg shift done try_regedit "$WINETRICKS_TMP_WIN"\\overridedll.reg rm "$WINETRICKS_TMP"/overridedll.reg } register_font() { file=$1 shift font=$1 #echo "Registering $file as $font" cat > "$WINETRICKS_TMP"/registerfont.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts] "$font"="$file" _EOF_ # too verbose try_regedit "$WINETRICKS_TMP_WIN"\\registerfont.reg } append_path() { # Prepend $1 to the windows path in the registry. Caller must use single qu otes and double backslashes in argument. NEW_PATH="$1" WIN_PATH="`WINEDEBUG= $WINE cmd.exe /c echo "%PATH%" tr d '\r' sed 's,\ \\\,\\\\\\\\,g'`" sed 's/$/\r/' > "$WINETRICKS_TMP"/path.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Enviro nment] "PATH"="$NEW_PATH;$WIN_PATH" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\path.reg rm f "$WINETRICKS_TMP"/path.reg } # common download for several verbs helper_directx_dl() { # February 2010 DirectX 9c User Redistributable # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0c ef8180e94a4f56b1575ab8109cb4f5 download . http://download.microsoft.com/download/E/E/1/EE17FF746C4545759 CF47FC2597ACD18/directx_feb2010_redist.exe a97c820915dc20929e84b49646ec27576001 2a42 DIRECTX_NAME=directx_feb2010_redist.exe } # One function per package, in alphabetical order load_7zip() { download . $SOURCEFORGE/sevenzip/7z465.exe c36012e960fa3932cd23f30ac5b0fe722 740243a try $WINE "$WINETRICKS_CACHE"/7z465.exe $WINETRICKS_S } # load_adobeair() { # corefonts is necessary to avoid an installer crash. load_corefonts # Adobe AIR 2.0.2 runtime # 20100202: sha1sum 5c95f51a680f8c175a92755238127be4ad22c53b # 20100220: sha1sum 6f03e723bd855abbe00eb8fdf22da54fb49c62db # 20100729: sha1sum 7b93aedaf48ad7854940e7a4e7d9394a255e888b download . http://airdownload.adobe.com/air/win/download/2.0.2/AdobeAIRInsta ller.exe 7b93aedaf48ad7854940e7a4e7d9394a255e888b try $WINE "$WINETRICKS_CACHE"/AdobeAIRInstaller.exe $WINETRICKS_UNIXSILENT } # load_art2kmin() { # See http://www.microsoft.com/downloads/details.aspx?familyid=d9ae78d99dc6 4b389fa62c745a175aed&displaylang=en download . http://download.microsoft.com/download/D/2/A/D2A2FC8B0447491CA 5EFE8AA3A74FB98/AccessRuntime.exe 571811b7536e97cf4e4e53bbf8260cddd69f9b2d cd "$WINETRICKS_CACHE" try $WINE AccessRuntime.exe $WINETRICKS_QUIET cd "$olddir" } # load_atmlib() { # http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1749F49F 48010297BD6CA33A0&displaylang=en # FIXME: This is a huge download for a single dll. download . http://download.microsoft.com/download/E/6/A/E6A04295D2A840D0A 0C5241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4fa8 cd "$WINETRICKS_TMP" try_cabextract "$WINETRICKS_CACHE"/W2KSP4_EN.EXE i386/atmlib.dl_ try cp atmlib.dll "$WINDIR"/system32 try rm rf i386 cd "$olddir" } # load_autohotkey() { download . http://www.autohotkey.net/programs/AutoHotkey104805_Install.exe 1 3e5a9ca6d5b7705f1cd02560c3af4d38b1904fc cd "$WINETRICKS_CACHE" try $WINE AutoHotkey104805_Install.exe $WINETRICKS_S cd } # load_cc580() { # http://www.microsoft.com/downloads/details.aspx?familyid=6f94d31ad1e0465 8a56693af0d8d4a1e download . http://download.microsoft.com/download/platformsdk/redist/5.80.26 14.3600/w9xnt4/enus/cc32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde try $WINE "$WINETRICKS_CACHE"/cc32inst.exe "/T:$winetricks_tmp_win" /c $WINE TRICKS_QUIET try_unzip o $WINETRICKS_UNIXQUIET d "$WINDIR"/temp "$WINETRICKS_TMP"/comct l32.exe try $WINE "$WINDIR"/temp/x86/50ComUpd.Exe "/T:$winetricks_tmp_win" /c $WINET RICKS_QUIET try cp "$WINETRICKS_TMP"/comcnt.dll "$WINDIR"/system32/comctl32.dll override_dlls native,builtin comctl32 # some builtin apps don't like native comctl32 override_app_dlls winecfg.exe builtin comctl32 override_app_dlls explorer.exe builtin comctl32 override_app_dlls iexplore.exe builtin comctl32 } # load_cmake() { download . http://www.cmake.org/files/v2.8/cmake2.8.2win32x86.exe 2c46f4e 804787b231c2f45e1b43f1838462e8dfe try $WINE "$WINETRICKS_CACHE"/cmake2.8.2win32x86.exe } # load_comctl32ocx() { # http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D9851D041C 1BB1464662F5F62FE download . http://download.microsoft.com/download/3/a/5/3a5925ace7794b1cb b01af67dc2f96fc/VisualBasic6KB896559v1ENU.exe f52cf2034488235b37a1da837d1c40 eb2a1bad84 try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/VisualBa sic6KB896559v1ENU.exe try cp "$WINETRICKS_TMP"/mscomctl.ocx "$WINDIR"/system32/mscomctl.ocx try cp "$WINETRICKS_TMP"/comctl32.ocx "$WINDIR"/system32/comctl32.ocx try $WINE regsvr32 comctl32.ocx try $WINE regsvr32 mscomctl.ocx } # load_colorprofile() { download . http://download.microsoft.com/download/whistler/hwdev1/1.0/wxp/en us/ColorProfile.exe 6b72836b32b343c82d0760dff5cb51c2f47170eb try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ ColorProfile.exe mkdir p "$WINDIR"/system32/spool/drivers/color try cp f "$WINETRICKS_TMP/sRGB Color Space Profile.icm" "$WINDIR"/system32/ spool/drivers/color } # load_comdlg32ocx() { download . http://activex.microsoft.com/controls/vb6/comdlg32.cab d4f3e193c6 180eccd73bad53a8500beb5b279cbf try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/comdlg32.ca b try cp "$WINETRICKS_TMP"/comdlg32.ocx "$WINDIR"/system32/comdlg32.ocx try $WINE regsvr32 comdlg32.ocx } # load_controlpad() { # http://msdn.microsoft.com/enus/library/ms968493.aspx # Fixes error "Failed to load UniText..." load_wsh57 download . http://download.microsoft.com/download/activexcontrolpad/install/ 4.0.0.950/win98mexp/enus/setuppad.exe 8921e0f52507ca6a373c94d222777c750fb48af7 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/setuppad.ex e echo "If setup says 'Unable to start DDE ...', press Ignore" try $WINE "$WINETRICKS_TMP"/setup $WINETRICKS_QUIET_T } # load_corefonts() { # See http://corefonts.sf.net # TODO: let user pick mirror, # see http://corefonts.sourceforge.net/msttcorefonts2.01.spec for how # TODO: add more fonts # Added More Fonts (see msttcorefonts) # [*] Pointed download locations to sites that actually contained the # fonts to download (as of 04032008) #download . $SOURCEFORGE/corefonts/andale32.exe c4db8cbe42c566d12468f5fdad38 c43721844c69 download . $SOURCEFORGE/corefonts/arial32.exe 6d75f8436f39ab2da5c31ce651b744 3b4ad2916e download . $SOURCEFORGE/corefonts/arialb32.exe d45cdab84b7f4c1efd6d1b369f50e d0390e3d344 download . $SOURCEFORGE/corefonts/comic32.exe 2371d0327683dcc5ec1684fe7c275a 8de1ef9a51 download . $SOURCEFORGE/corefonts/courie32.exe 06a745023c034f88b4135f5e294fe ce1a3c1b057 download . $SOURCEFORGE/corefonts/georgi32.exe 90e4070cb356f1d811acb943080bf 97e419a8f1e download . $SOURCEFORGE/corefonts/impact32.exe 86b34d650cfbbe5d3512d49d2545f 7509a55aad2 download . $SOURCEFORGE/corefonts/times32.exe 20b79e65cdef4e2d7195f84da20249 9e3aa83060 download . $SOURCEFORGE/corefonts/trebuc32.exe 50aab0988423efcc9cf21fac7d64d 534d6d0a34a download . $SOURCEFORGE/corefonts/verdan32.exe f5b93cedf500edc67502f11657812 3618c64a42a download . $SOURCEFORGE/corefonts/webdin32.exe 2fb4a42c53e50bc70707a7b3c57ba f62ba58398f # Natively installed versions of these fonts will cause the installers # to exit silently. Because there are apps out there that depend on the # files being present in the Windows font directory we use cabextract # to obtain the files and register the fonts by hand. # Andale needs a FontSubstitutes entry # try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/andale32. exe # Display EULA test x"$WINETRICKS_QUIET" = x"" try $WINE "$WINETRICKS_CACHE"/arial32.exe $WINETRICKS_QUIET try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/arial32. exe try cp f "$WINETRICKS_TMP"/Arial*.TTF "$winefontsdir" register_font Arial.TTF "Arial (TrueType)" register_font Arialbd.TTF "Arial Bold (TrueType)" register_font Arialbi.TTF "Arial Bold Italic (TrueType)" register_font Ariali.TTF "Arial Italic (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/arialb32 .exe try cp f "$WINETRICKS_TMP"/AriBlk.TTF "$winefontsdir" register_font AriBlk.TTF "Arial Black (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/comic32. exe try cp f "$WINETRICKS_TMP"/Comic*.TTF "$winefontsdir" register_font Comic.TTF "Comic Sans MS (TrueType)" register_font Comicbd.TTF "Comic Sans MS Bold (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/courie32 .exe try cp f "$WINETRICKS_TMP"/cour*.ttf "$winefontsdir" register_font Cour.TTF "Courier New (TrueType)" register_font CourBD.TTF "Courier New Bold (TrueType)" register_font CourBI.TTF "Courier New Bold Italic (TrueType)" register_font Couri.TTF "Courier New Italic (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/georgi32 .exe try cp f "$WINETRICKS_TMP"/Georgia*.TTF "$winefontsdir" register_font Georgia.TTF "Georgia (TrueType)" register_font Georgiab.TTF "Georgia Bold (TrueType)" register_font Georgiaz.TTF "Georgia Bold Italic (TrueType)" register_font Georgiai.TTF "Georgia Italic (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/impact32 .exe try cp f "$WINETRICKS_TMP"/Impact.TTF "$winefontsdir" register_font Impact.TTF "Impact (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/times32. exe try cp f "$WINETRICKS_TMP"/Times*.TTF "$winefontsdir" register_font Times.TTF " (TrueType)" register_font Timesbd.TTF "Times New Roman Bold (TrueType)" register_font Timesbi.TTF "Times New Roman Bold Italic (TrueType)" register_font Timesi.TTF "Times New Roman Italic (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/trebuc32 .exe try cp f "$WINETRICKS_TMP"/trebuc*.ttf "$winefontsdir" register_font Trebuc.TTF "Trebucet MS (TrueType)" register_font Trebucbd.TTF "Trebucet MS Bold (TrueType)" register_font Trebucbi.TTF "Trebucet MS Bold Italic (TrueType)" register_font Trebucit.TTF "Trebucet MS Italic (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/verdan32 .exe try cp f "$WINETRICKS_TMP"/Verdana*.TTF "$winefontsdir" register_font Verdana.TTF "Verdana (TrueType)" register_font Verdanab.TTF "Verdana Bold (TrueType)" register_font Verdanaz.TTF "Verdana Bold Italic (TrueType)" register_font Verdanai.TTF "Verdana Italic (TrueType)" try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/webdin32 .exe try cp f "$WINETRICKS_TMP"/Webdings.TTF "$winefontsdir" register_font Webdings.TTF "Webdings (TrueType)" } # load_cygwin() { # See http://bugs.winehq.org/show_bug.cgi?id=21206 # Current is 1.7, but that doesn't install on wine, so jump through # hoops to get 1.5 #download cygwin http://cygwin.com/setup.exe fdc9379ed58231cddd25bb7b4484266 81a3dd3c3 # this is some random verison of cygwin's setup from mid2009, before the ch ange that wine couldn't handle. download cygwin http://kegel.com/cygwin/1.5/setup.exe 5cfb8ebe4f385b0fcffa04 d22d607ec75ea05180 mkdir p "$DRIVE_C"/cygpkgs # If you happen to have saved your cygpkgs directory, unpack it now test f "$WINETRICKS_CACHE/cygwin/cygpkgs.tgz" && (cd "$DRIVE_C"; gunzip dc "$WINETRICKS_CACHE/cygwin/cygpkgs.tgz" tar xf ) cp "$WINETRICKS_CACHE/cygwin/setup.exe" "$DRIVE_C"/cygpkgs cd "$DRIVE_C"/cygpkgs warn "Paste in ftp://www.fruitbat.org/pub/cygwin/circa/2009/09/08/111037 as the repo url for now, until bug 21206 is " # X option is insecure, but we have to use it because fruitbat.org didn't a rchive .sig files :( try $WINE setup.exe X cd "$olddir" } # load_d3dx9() { helper_directx_dl # Kinder, less invasive only extract and override d3dx9_??.dll try_cabextract d "$WINETRICKS_TMP" L F '*d3dx9*x86*' "$WINETRICKS_CACHE"/ $DIRECTX_NAME for x in `ls "$WINETRICKS_TMP"/*.cab` do try_cabextract d "$WINDIR"/system32 L F '*.dll' "$x" done # For now, not needed, but when Wine starts preferring our builtin dll over native it will be. override_dlls native d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 d 3dx9_30 override_dlls native d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d 3dx9_37 override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 } # load_d3dx9_xx() { dllname=d3dx9_$1 helper_directx_dl # Even kinder, less invasive directx only extract and override d3dx9_xx.dl l try_cabextract d "$WINETRICKS_TMP" L F "*$dllname*x86*" "$WINETRICKS_CACH E"/$DIRECTX_NAME for x in `ls "$WINETRICKS_TMP"/*.cab` do try_cabextract d "$WINDIR"/system32 L F '*.dll' "$x" done override_dlls native $dllname } # load_d3dx10() { helper_directx_dl # Kinder, less invasive directx10 only extract and override d3dx10_??.dll try_cabextract d "$WINETRICKS_TMP" L F '*d3dx10*x86*' "$WINETRICKS_CACHE" /$DIRECTX_NAME for x in `ls "$WINETRICKS_TMP"/*.cab` do try_cabextract d "$WINDIR"/system32 L F '*.dll' "$x" done # For now, not needed, but when Wine starts preferring our builtin dll over native it will be. override_dlls native d3dx10_33 d3dx10_34 d3dx10_35 d3dx10_36 d3dx10_37 override_dlls native d3dx10_38 d3dx10_39 d3dx10_40 d3dx10_41 d3dx10_42 } # load_d3dxof() { helper_directx_dl try_cabextract d "$WINETRICKS_TMP" L F 'dxnt.cab' "$WINETRICKS_CACHE"/$DI RECTX_NAME try_cabextract d "$WINDIR"/system32 L F 'd3dxof.dll' "$WINETRICKS_TMP/dxn t.cab" override_dlls native d3dxof } # load_dinput8() { helper_directx_dl try_cabextract d "$WINETRICKS_TMP" L F 'dxnt.cab' "$WINETRICKS_CACHE"/$DI RECTX_NAME try_cabextract d "$WINDIR"/system32 L F 'dinput8.dll' "$WINETRICKS_TMP/dx nt.cab" try $WINE regsvr32 dinput8 override_dlls native dinput8 } # load_dirac() { download . $SOURCEFORGE/dirac/Dirac%20Directshow%20Filter/Diract%20Direct%20 Show%20Filter%201.0.2/DiracDirectShowFilter1.0.2.exe c912d30a8fa500c7841444559f eb1f49301611c4 try $WINE "$WINETRICKS_CACHE"/DiracDirectShowFilter1.0.2.exe } # load_directmusic() { # Untested. Based off http://bugs.winehq.org/show_bug.cgi?id=4805 helper_directx_dl try_cabextract d "$WINETRICKS_TMP" L F dxnt.cab "$WINETRICKS_CACHE"/$DIRE CTX_NAME try_cabextract d "$WINDIR"/system32 L F 'dmband.dll' "$WINETRICKS_TMP/dxn t.cab" try_cabextract d "$WINDIR"/system32 L F 'dmcompos.dll' "$WINETRICKS_TMP/d xnt.cab" try_cabextract d "$WINDIR"/system32 L F 'dmime.dll' "$WINETRICKS_TMP/dxnt .cab" try_cabextract d "$WINDIR"/system32 L F 'dmloader.dll' "$WINETRICKS_TMP/d xnt.cab" try_cabextract d "$WINDIR"/system32 L F 'dmscript.dll' "$WINETRICKS_TMP/d xnt.cab" try_cabextract d "$WINDIR"/system32 L F 'dmstyle.dll' "$WINETRICKS_TMP/dx nt.cab" try_cabextract d "$WINDIR"/system32 L F 'dmsynth.dll' "$WINETRICKS_TMP/dx nt.cab" try_cabextract d "$WINDIR"/system32 L F 'dmusic.dll' "$WINETRICKS_TMP/dxn t.cab" try_cabextract d "$WINDIR"/system32 L F 'dmusic32.dll' "$WINETRICKS_TMP/d xnt.cab" try_cabextract d "$WINDIR"/system32 L F 'dswave.dll' "$WINETRICKS_TMP/dxn t.cab" try_cabextract d "$WINDIR"/system32 L F 'streamci.dll' "$WINETRICKS_TMP/d xnt.cab" try $WINE regsvr32 dmband try $WINE regsvr32 dmcompos try $WINE regsvr32 dmime try $WINE regsvr32 dmloader try $WINE regsvr32 dmscript try $WINE regsvr32 dmstyle try $WINE regsvr32 dmsynth try $WINE regsvr32 dmusic try $WINE regsvr32 dswave override_dlls native dmband dmcompos dmime dmloader dmscript dmstyle dmsynth dmusic dmusic32 dswave streamci } # load_directplay() { helper_directx_dl try_cabextract d "$WINETRICKS_TMP" L F dxnt.cab "$WINETRICKS_CACHE"/$DIRE CTX_NAME try_cabextract d "$WINDIR"/system32 L F 'dplaysvr.exe' "$WINETRICKS_TMP/d xnt.cab" try_cabextract d "$WINDIR"/system32 L F 'dplayx.dll' "$WINETRICKS_TMP/dxn t.cab" try_cabextract d "$WINDIR"/system32 L F 'dpnet.dll' "$WINETRICKS_TMP/dxnt .cab" try_cabextract d "$WINDIR"/system32 L F 'dpnhpast.dll' "$WINETRICKS_TMP/d xnt.cab" try_cabextract d "$WINDIR"/system32 L F 'dpwsockx.dll' "$WINETRICKS_TMP/d xnt.cab" try $WINE regsvr32 dplayx.dll try $WINE regsvr32 dpnet.dll try $WINE regsvr32 dpnhpast.dll override_dlls native dplayx dpnet dpnhpast dpwsockx } # load_directx9() { helper_directx_dl # Stefan suggested that, when installing, one should override as follows: # 1) use builtin wintrust (we don't run native properly somehow?) # 2) disable mscoree (else if it's present some module misbehaves?) # 3) override native any directx DLL whose Wine version doesn't register its elf well yet # For #3, I have no idea which DLLs don't register themselves well yet, # so I'm just listing a few of the basic ones. Let's whittle that # list down as soon as we can. echo "You probably shouldn't be using this. It's VERY invasive." echo "Use 'winetricks d3dx9' instead."

# Setting windows version to win2k apparently crashes the installer on OS X. .. # See http://code.google.com/p/winezeug/issues/detail?id=71 if [ "`uname s`" = "Darwin" ] then set_winver winxp else set_winver $DIRECTX_WINDOWS fi

WINEDLLOVERRIDES="wintrust=b,mscoree=,ddraw,d3d8,d3d9,dsound,dinput=n" \ try $WINE "$WINETRICKS_CACHE"/$DIRECTX_NAME /t:"$WINETRICKS_TMP_WIN" $WIN ETRICKS_QUIET # How many of these do we really need? # We should probably remove most of these...? override_dlls native d3dim d3drm d3dx8 d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d 3dx9_28 d3dx9_29 override_dlls native d3dx9_30 d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d 3dx9_36 d3dx9_37 override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 d3dxof override_dlls native dciman32 ddrawex devenum dmband dmcompos dmime dmloader dmscript dmstyle override_dlls native dmsynth dmusic dmusic32 dnsapi dplay dplayx dpnaddr dpn et dpnhpast dpnlobby override_dlls native dswave dxdiagn mscoree msdmo qcap quartz streamci override_dlls native dxdiag.exe override_dlls builtin d3d8 d3d9 dinput dinput8 dsound # Should be below, but fails on Wine when used silently. #if [ $WINETRICKS_QUIET ] #then # try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe /silent #else # try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe #fi try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe unset_winver } # load_divx() { # 6.8.2: 02203fdc4dddd13e789c39b22902837da31d2a1d ? # 6.8.2: e36bf87c1675d0cf9169839bc0cd8f866b9db026 as of 4 Jun 2008 as http:/ /download.divx.com/divx/DivXInstaller.exe # 6.8.3: f4f4387ef89316aea440a29f3e24c1f1945e14af as of 20 Jun 2008 as http: //download.divx.com/divx/abt/b1/DivXInstaller.exe # 6.8.4: c5fcb1465a1bb24d1c104c2588fdb6706d1e1476 as of 10 Jul 2008 as http: //download.divx.com/divx/abt/b1/DivXInstaller.exe # 6.8.4: d28a2b041f4af45d22c4dedfe7608f2958cf997d as of 23 Aug 2008 as http: //download.divx.com/divx/DivXInstaller.exe # 7.? 4d91ef90ae26a6088851560c4263ef0cdbf09123 as of 22 Mar 2009 as http://d ownload.divx.com/divx/DivXInstaller.exe # 7.0.? 19c9ba3104025d1fab335e405e7f411dfbbcb477 as of 28 May 2009 as http:/ /download.divx.com/divx/DivXInstaller.exe # 7.0.? 786aef0f421df5e7358d2d740d9911f9afd055de as of 24 June 2009 as http: //download.divx.com/divx/DivXInstaller.exe # 7.0.? ad420bf8bf72e924e658c9c6ad6bba76b848fb79 as of 23 Sep 2009 as http:/ /download.divx.com/divx/DivXInstaller.exe # 7.0.? 3385aa8f6ba64ae32e06f651bbbea247bcc1a44d as of 12 Dec 2009 as http:/ /download.divx.com/divx/DivXInstaller.exe # d59422969a72790e92b6795e24e332f91ffacf94 as of 26 May 2010 as http://downl oad.divx.com/divx/DivXInstaller.exe # 3a2fe8ff2f9c5b5e527662af3badb42b460f6e62 as of 29 July 2010 as http://down load.divx.com/divx/DivXInstaller.exe download divx7 http://download.divx.com/divx/DivXInstaller.exe 3a2fe8ff2f9c 5b5e527662af3badb42b460f6e62 try $WINE "$WINETRICKS_CACHE"/divx7/DivXInstaller } # load_dcom98() { # Install native dcom per http://wiki.winehq.org/NativeDcom # to avoid http://bugs.winehq.org/show_bug.cgi?id=4228 # See http://www.microsoft.com/downloads/details.aspx?familyid=08b1ac1b7a11 43e8b59d0867f9bdda66 download . http://download.microsoft.com/download/d/1/3/d13cd456f0cf4fb2a 17f20afc79f8a51/DCOM98.EXE aff002bd03f17340b2bef2e6b9ea8e3798e9ccc1 # Pick win98 so we can install native dcom set_winver win98 # Avoid "err:setupapi:SetupDefaultQueueCallbackA copy error 5 ..." # Those messages are suspect, probably shouldn't be err's. rm f "$WINDIR"/system32/ole32.dll rm f "$WINDIR"/system32/olepro32.dll rm f "$WINDIR"/system32/oleaut32.dll rm f "$WINDIR"/system32/rpcrt4.dll # Normally only need to override ole32, but overriding advpack # as well gets us the correct exit status. WINEDLLOVERRIDES="ole32,advpack=n" try $WINE "$WINETRICKS_CACHE"/DCOM98.EXE $WINETRICKS_QUIET # Set native DCOM by default for all apps (ok, this might be overkill) override_dlls native,builtin ole32 oleaut32 rpcrt4 # but not for a few builtin apps that don't like it override_app_dlls explorer.exe builtin ole32 oleaut32 rpcrt4 override_app_dlls iexplore.exe builtin ole32 oleaut32 rpcrt4 override_app_dlls services.exe builtin ole32 oleaut32 rpcrt4 override_app_dlls wineboot.exe builtin ole32 oleaut32 rpcrt4 override_app_dlls winedevice.exe builtin ole32 oleaut32 rpcrt4 # and undo version win98 unset_winver } # load_dotnet11() { DOTNET_INSTALL_DIR="$WINDIR/Microsoft.NET/Framework/v1.1.4322" # If this is just a dependency check, don't reinstall if test $PACKAGE != dotnet11 && test d "$DOTNET_INSTALL_DIR" then echo "prerequisite dotnet11 already installed, skipping" return fi # need corefonts, else installer crashes load_corefonts # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f # http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3F589484 28157034D1E7CF3A3 download dotnet11 http://download.microsoft.com/download/a/a/c/aac392268825 44ce90e3bf8203e74006/dotnetfx.exe 16a354a2207c4c8846b617cbc78f7b7c1856340e if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/dotnet11/dotnetfx.exe /q /C:"install /q" else try $WINE "$WINETRICKS_CACHE"/dotnet11/dotnetfx.exe fi } # load_dotnet11sdk() { load_dotnet11 warn "Installer hangs at end... not sure if it works fully." # http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA63647407 09F41A333C6B9181D download dotnet11sdk http://download.microsoft.com/download/5/2/0/5202f9183 06e426d9637d7ee26fbe507/setup.exe 9509b14924bcaf84a7780de3f6ad7894004c3450 cd "$WINETRICKS_CACHE"/dotnet11sdk try $WINE setup.exe cd "$olddir" } # load_dotnet20() { load_fontfix # If this is just a dependency check, don't reinstall if test $PACKAGE != dotnet20 && test f "$WINDIR"/Microsoft.NET/Framework/v2 .0.50727/mscorlib.dll then echo "prerequisite dotnet20 already installed, skipping" return fi warn "Instaling .net 2.0 runtime. Can take several minutes. See http://wik i.winehq.org/MicrosoftDotNet for tips." # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57 load_gecko set_winver win2k # See http://kegel.com/wine/l_intlsh.txt for how l_intl.nls was generated download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408 a361ac2659fa249 try cp f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/" # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f # http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb43624b0 d8eddaab15c5e04f5 download dotnet20 http://download.microsoft.com/download/5/6/7/567758a3759e 473ebf8f52154438565a/dotnetfx.exe a3625c59d7a2995fb60877b5f5324892a1693b2a if [ "$WINETRICKS_QUIET"x = ""x ] then try $WINE "$WINETRICKS_CACHE"/dotnet20/dotnetfx.exe else try $WINE "$WINETRICKS_CACHE"/dotnet20/dotnetfx.exe /q /c:"install.exe /q " fi unset_winver } # load_dotnet20sp2() { warn "Instaling .net 2.0 runtime. Can take several minutes. See http://wik i.winehq.org/MicrosoftDotNet for tips." # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57 load_gecko #set_winver win2k # See http://kegel.com/wine/l_intlsh.txt for how l_intl.nls was generated download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408 a361ac2659fa249 try cp f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/" # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f # http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358915B4EB 59B1D10E506DA9D0F download dotnet20 http://download.microsoft.com/download/c/6/e/c6e882150178 4c6cb5f3158ff77b1f38/NetFx20SP2_x86.exe 22d776d4d204863105a5db99e8b8888be23c6 1a7 if [ "$WINETRICKS_QUIET"x = ""x ] then try $WINE "$WINETRICKS_CACHE"/dotnet20/NetFx20SP2_x86.exe else try $WINE "$WINETRICKS_CACHE"/dotnet20/NetFx20SP2_x86.exe /q /c:"install. exe /q" fi unset_winver } # load_dotnet20sdk() { load_dotnet20 # http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA63647407 09F41A333C6B9181D download dotnet20sdk http://download.microsoft.com/download/c/4/b/c4b15d7d6 f374d5ab9c68f07e7d46635/setup.exe 4e4b1072b5e65e855358e2028403f2dc52a62ab4 cd "$WINETRICKS_CACHE"/dotnet20sdk try $WINE setup.exe cd "$olddir" } # load_dotnet30() { # If this is just a dependency check, don't reinstall if test $PACKAGE != dotnet30 && test d "$WINDIR/Microsoft.NET/Framework/v3. 0/Microsoft .NET Framework 3.0" then echo "prerequisite dotnet30 already installed, skipping" return fi warn "Instaling .net 3.0 runtime. Can take 1530 minutes. See http://wiki. winehq.org/MicrosoftDotNet for tips." load_dotnet20 # http://msdn.microsoft.com/enus/netframework/bb264589.aspx download dotnet30 http://download.microsoft.com/download/3/F/0/3F0A922CF239 4B9B9CB0DF53621C57D9/dotnetfx3.exe f3d2c3c7e4c0c35450cf6dab1f9f2e9e7ff50039 # AF's workaround to avoid long pause LANGPACKS_BASE_PATH="${WINDIR}/SYSMSICache/Framework/v3.0" test d "${LANGPACKS_BASE_PATH}" mkdir p "${LANGPACKS_BASE_PATH}" for lang in ar cs da de el es fi fr he it jp ko nb nl pl ptBR ptPT ru \ sv tr zhCHS zhCHT do ln sf "${WINDIR}/system32/spupdsvc.exe" "${LANGPACKS_BASE_PATH}/dotnetfx 3langpack${lang}.exe" done # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f if [ "$WINETRICKS_QUIET"x = ""x ] then try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe else try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe /q /c:"install.exe / q" fi } # load_dotnet35() { warn "This does not work yet, see bug 20110" # According to AF's recipe, installing dotnet30 first works around msi bugs load_dotnet30 # http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FDAE524E3 5B531508D977D32A6 download dotnet35 http://download.microsoft.com/download/6/0/f/60fc58543cb8 4892b6dbbd4f42510f28/dotnetfx35.exe # See also http://blogs.msdn.com/astebner/archive/2008/07/17/8745415.aspx cd "$DRIVE_C" try_cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/dotnet35/dotnetfx35 .exe cd wcu/dotNetFramework try $WINE dotNetFx35setup.exe /lang:ENU } # do_droid() { download . ${DROID_URL}$1';hb=HEAD' $3 $1 try cp f "$WINETRICKS_CACHE"/$1 "$winefontsdir" register_font $1 "$2" } load_droid() { # See http://en.wikipedia.org/wiki/Droid_(font) DROID_URL='http://android.git.kernel.org/?p=platform/frameworks/base.git;a=b lob_plain;f=data/fonts/' do_droid DroidSansBold.ttf "Droid Sans Bold" ada4e79c592f3c5 4546b7587b48f2b232d95ce2f do_droid DroidSansFallback.ttf "Droid Sans Fallback" 5065cce92e84202 32db95ab3ba421e462b09b965 do_droid DroidSansJapanese.ttf "Droid Sans Japanese" b3a248c11692aa8 8a30eb25df425b8910fe05dc5 do_droid DroidSansMono.ttf "Droid Sans Mono" f0815c6f36c72be 1d0f2f5e2b82fa85c8bf95655 do_droid DroidSans.ttf "Droid Sans" da5b3c7758a2c8f bc4775beb69d7150493c7d312 do_droid DroidSerifBoldItalic.ttf "Droid Serif Bold Italic" c1602dc11bf0f71 31aec21c7c3888195ad78e486 do_droid DroidSerifBold.ttf "Droid Serif Bold" d7896b9c0723299 553e95a00d27cbe52f7515c8c do_droid DroidSerifItalic.ttf "Droid Serif Italic" 117941be102c8f3 8a86a70ebccaecb8078f7027e do_droid DroidSerifRegular.ttf "Droid Serif" 7f243858e496ed1 bb1faca9f3a7bbe52defcbb5d } # load_dxsdk_nov2006() { download . http://download.microsoft.com/download/9/e/5/9e5bfc66a6214e0d8 bfe6688058c3f00/dxsdk_aug2006.exe load_vcrun6 # for mfc42u echo "Be patient, the 'installing new services' step at the end takes about five minutes" try $WINE "$WINETRICKS_CACHE"/dxsdk_aug2006.exe } # load_dsoundbug9612() { echo "Enabling DirectSound workaround for bug #9612" cat > "$WINETRICKS_TMP"/dsoundmaxshadow.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\DirectSound] "MaxShadowSize"="0" _EOF_ try $WINE regedit "$WINETRICKS_TMP"/dsoundmaxshadow.reg } # load_eadm() { download . http://akamai.cdn.ea.com/eamaster/u/f/eaonline/eadm/eadminstalle r.exe 6b3d1a328af2d44033c24b84444992f56107b27f load_adobeair try $WINE "$WINETRICKS_CACHE"/eadminstaller.exe $WINETRICKS_S } # load_eufonts() { # https://www.microsoft.com/downloads/details.aspx?FamilyID=0ec6f335c3de44 c5a13da1e7cea5ddea&displaylang=en download . http://download.microsoft.com/download/a/1/8/a180e21e9c2b4b549 c32bf7fd7429970/EUupdate.EXE 9b076c40cb63aa0d8512aa8e610ba11d3466e441 try_cabextract q directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/EUupdate .EXE try cp f "$WINETRICKS_TMP"/*.ttf "$winefontsdir" register_font ArialBI.ttf "Arial Bold Italic (TrueType)" register_font ArialI.ttf "Arial Italic (TrueType)" register_font Arial.ttf "Arial (TrueType)" register_font TimesBd.ttf "Times New Roman Bold (TrueType)" register_font TimesBI.ttf "Times New Roman Bold Italic (TrueType)" register_font TimesI.ttf "Times New Roman Italic (TrueType)" register_font Times.ttf "Times New Roman (TrueType)" register_font trebucbd.ttf "Trebuchet Bold (TrueType)" register_font trebucbi.ttf "Trebuchet Bold Italic (TrueType)" register_font trebucit.ttf "Trebuchet Italic (TrueType)" register_font trebuc.ttf "Trebuchet (TrueType)" register_font Verdanab.ttf "Verdana Bold (TrueType)" register_font Verdanai.ttf "Verdana Italian (TrueType)" register_font Verdana.ttf "Verdana (TrueType)" register_font Verdanaz.ttf "Verdana Bold Italic (TrueType)" } # load_firefox() { download . "http://releases.mozilla.org//pub/mozilla.org/firefox/releases/3. 6.6/win32/enUS/Firefox%20Setup%203.6.6.exe" 16e35488871390cdb7b91bc20b1e85c452b 418cb "Firefox Setup 3.6.6.exe" if [ "$WINETRICKS_QUIET"x = ""x ] then try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.6.6.exe" else try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.6.6.exe" ms fi } # load_ffdshow() { # ffdshow download . $SOURCEFORGE/ffdshowtryout/ffdshow_beta5_rev2033_20080705_clsid. exe 6da6837e2f400923ff5294a6591a88a3eee5ee40 try $WINE "$WINETRICKS_CACHE"/ffdshow_beta5_rev2033_20080705_clsid.exe $WINE TRICKS_SILENT } # load_flash() { # If this is just a dependency check, don't reinstall if test $PACKAGE != flash && test f "$WINDIR"/system32/Macromed/Flash/flash player.xpt then echo "prerequisite flash already installed, skipping" return fi # www.adobe.com/products/flashplayer/ # Active X plugin # http://blogs.adobe.com/psirt/2008/03/preparing_for_april_flash_play.html # http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/ins tall_flash_player_active_x.msi # 20080401: old version sha1sum f4dd1c0c715b791db2c972aeba90d3b78372996a # 20080418: new version sha1sum 04ac79c4f1eb1e1ca689f27fa71f12bb5cd11cc2 # Version 10 http://fpdownload.macromedia.com/get/flashplayer/current/instal l_flash_player_ax.exe # 20081127: 10 sha1sum 7f6850ae815e953311bb94a8aa9d226f97a646dd # 20090227: sha1sum 86745020a25edc9695a1a6a4d59eae375665a0b3 # 20090731: sha1sum 11a81ad1b19344c28b1e1249169f15dfbd2a04f5 # 20091209: sha1sum f4ec0e95099e354fd01cd3bb27c202f54932dc70 # 20100220: sha1sum e05ca1999e820b3fa2ca16fc27bc65183d275681 # 20100315: sha1sum 901b53ebe26c62c0bd7fc7dc400552ce335685bb # 20100624: sha1sum 6de519569137ec2ba3a4eed59f4052c4d944869c # 20100811: sha1sum bd3a91fe450a800dbbc8d070159dc0a599043652 download . http://fpdownload.macromedia.com/get/flashplayer/current/install_ flash_player_ax.exe bd3a91fe450a800dbbc8d070159dc0a599043652 if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe /install else try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe fi # Mozilla / Firefox plugin # 20080722: sha1sum 1e6f7627784a5b791e99ae9ad63133dc11c7940b # 20081127: sha1sum 20ec0300a8cae19105c903a7ec6c0801e016beb0 # 20090227: sha1sum 770db9ad471ffd4357358bc16ff0bb6c98d71e5d # 20090731: sha1sum 9590fb87cc33d3a3a1f2f42a1918f06b9f0fd88d # 20091209: sha1sum ccb4811b1cc26721c4abb2e5a080868acdee7b87 # 20100220: sha1sum f1df1ab84b61e7f2c3eea0a959d2115dd001816b # 20100316: sha1sum e2fe55927c4068b0a07636742814682c0a2aa0fe # 20100624: sha1sum a419339ada03076ea0a197b28011b87055c45478 # 20100811: sha1sum cb011ab4c74d222c8ddb48171a8aa3b5380f8d5a download . http://fpdownload.macromedia.com/get/flashplayer/current/install_ flash_player.exe cb011ab4c74d222c8ddb48171a8aa3b5380f8d5a if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe /install else try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe fi } # load_fontfix() { # some versions of ukai.ttf and uming.ttf crash .net and picasa # See http://bugs.winehq.org/show_bug.cgi?id=7098#c9 # Could fix globally, but that needs root, so just fix for wine if test f /usr/share/fonts//arphic/ukai.ttf then gotsum=`$SHA1SUM < /usr/share/fonts/truetype/arphic/ukai.ttf sed 's/ . *//'` # FIXME: do all affected versions of the font have same sha1sum as Gutsy ? Seems unlikely. if [ "$gotsum"x = "96e1121f89953e5169d3e2e7811569148f573985"x ] then download . https://launchpadlibrarian.net/1499628/ttfarphicukai_0. 1.20060108.orig.tar.gz 92e577602d71454a108968e79ab667451f3602a2 cd "$WINETRICKS_TMP/" gunzip dc "$WINETRICKS_CACHE/ttfarphicukai_0.1.20060108.orig.tar. gz" tar xf try mv ttfarphicukai0.1.20060108/*.ttf "$winefontsdir" cd "$olddir" fi fi if test f /usr/share/fonts/truetype/arphic/uming.ttf then gotsum=`$SHA1SUM < /usr/share/fonts/truetype/arphic/uming.ttf sed 's/ .*//'` if [ "$gotsum"x = "2a4f4a69e343c21c24d044b2cb19fd4f0decc82c"x ] then download . https://launchpadlibrarian.net/1564410/ttfarphicuming_0 .1.20060108.orig.tar.gz 1439cdd731906e9e5311f320c2cb33262b24ef91 cd "$WINETRICKS_TMP/" gunzip dc "$WINETRICKS_CACHE/ttfarphicuming_0.1.20060108.orig.tar .gz" tar xf try mv ttfarphicuming0.1.20060108/*.ttf "$winefontsdir" cd "$olddir" fi fi # Focht says Samyak is bad news, and isn't a good workarou nd. # I've seen psdkwin7 setup crash because of this; the symptom was a messageb ox saying # SDKSetup encountered an error: The type initializer for 'Microsoft.WizardF ramework.WizardSettings' threw an exception # and WINEDEBUG=+relay,+seh shows an exception very quickly after # Call KERNEL32.CreateFileW(0c83b36c L"Z:\\USR\\SHARE\\FONTS\\TRUETYPE\\TTF ORIYAFONTS\\SAMYAKORIYA.TTF",80000000,00000001,00000000,00000003,00000080,0000 0000) ret=70d44091 if xlsfonts 2>/dev/null egrep i "samyakoriya" then die "Please uninstall the Samyak/Oriya font, e.g. 'sudo dpkg r ttforiy afonts', then log out and log in again. That font causes strange crashes in .n et programs." fi } # load_forcemono() { # For wine/mono debugging override_dlls native mscoree.dll override_dlls disabled mscorsvw.exe } # load_fs_disable() { cat > "$WINETRICKS_TMP"/fs_disable.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop] "FontSmoothing"="0" "FontSmoothingGamma"=dword:00000578 "FontSmoothingOrientation"=dword:00000001 "FontSmoothingType"=dword:00000000 _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\fs_disable.reg } # load_fs_grayscale() { cat > "$WINETRICKS_TMP"/fs_grayscale.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop] "FontSmoothing"="2" "FontSmoothingGamma"=dword:00000578 "FontSmoothingOrientation"=dword:00000001 "FontSmoothingType"=dword:00000001 _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\fs_grayscale.reg } # load_fs_bgr() { cat > "$WINETRICKS_TMP"/fs_bgr.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop] "FontSmoothing"="2" "FontSmoothingGamma"=dword:00000578 "FontSmoothingOrientation"=dword:00000000 "FontSmoothingType"=dword:00000002 _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\fs_bgr.reg } # load_fs_rgb() { cat > "$WINETRICKS_TMP"/fs_rgb.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Control Panel\Desktop] "FontSmoothing"="2" "FontSmoothingGamma"=dword:00000578 "FontSmoothingOrientation"=dword:00000001 "FontSmoothingType"=dword:00000002 _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\fs_rgb.reg } # load_gecko() { # Load the HTML rendering Engine (Gecko) # FIXME: shouldn't this code be in some script installed # as part of Wine instead of in winetricks? # (e.g. we hardcode gecko's url here, but it's normally # only hardcoded in wine.inf, and fetched from the registry thereafter, # so we're adding a maintenance burden here.) case `$WINE version` in wine0*wine1.0*wine1.1wine1.1.?wine1.1.11) GECKO_DIR="$WINDIR" GECKO_VERSION=0.1.0 GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56 ;; wine1.1.1[234]*) GECKO_DIR="$WINDIR" GECKO_VERSION=0.9.0 GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09 ;; wine1.1.1[56789]*wine1.1.2[0123456]*) GECKO_DIR="$WINDIR" GECKO_VERSION=0.9.1 GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8 ;; wine1.1.2[789]*wine1.1.[34]*wine1.2*wine1.3wine1.3.[01]wine1.3.[0 ]*) GECKO_DIR="$WINDIR/system32" GECKO_VERSION=1.0.0 GECKO_ARCH=x86 GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01 ;; *) GECKO_DIR="$WINDIR/system32" GECKO_VERSION=1.1.0 GECKO_ARCH=x86 GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714 ;; esac # If this is just a dependency check, don't reinstall if test $PACKAGE != ie6 && test f "$GECKO_DIR/gecko/$GECKO_VERSION/wine_gec ko/nspr4.dll" then echo "prerequisite gecko already installed, skipping" return fi THEWINE=`which $WINE` WINEDIR="`dirname $THEWINE`" GECKOCAB="wine_gecko$GECKO_VERSION$GECKO_ARCH.cab" for candidate in "$WINEDIR/../share/wine/gecko/$GECKOCAB" "$WINEDIR/../gecko /$GECKOCAB" do gotsum=`$SHA1SUM 2>/dev/null < "$candidate" sed 's/ .*//'` if [ "$gotsum"x = "$GECKO_SHA1SUM"x ] then GECKOPATH="$candidate" break fi done if test z "$GECKOPATH" then # FIXME: busted if using curl! download . "http://downloads.sourceforge.net/wine/wine_gecko$GECKO_VERS ION$GECKO_ARCH.cab" \ $GECKO_SHA1SUM wine_gecko$GECKO_VERSION$GECKO_ARCH.cab GECKOPATH="$WINETRICKS_CACHE"/wine_gecko$GECKO_VERSION$GECKO_ARCH.cab fi cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\\Software\\Wine\\MSHTML\\$GECKO_VERSION] _EOF_ printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg case $GECKO_VERSION in 0.*) printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg ;; 1.*) printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg ;; esac # extract the files mkdir p "$GECKO_DIR/gecko/$GECKO_VERSION" cd "$GECKO_DIR/gecko/$GECKO_VERSION" try_cabextract $WINETRICKS_UNIXQUIET "$GECKOPATH" cd "$olddir" # set installpath try_regedit "$WINETRICKS_TMP_WIN"\\geckopath.reg

# register the dll, since it was disabled before try $WINE regsvr32 mshtml } # load_gecko_dbg() { # Load the HTML rendering Engine (Gecko), with debugging symbols # FIXME: shouldn't this code be in some script installed # as part of Wine instead of in winetricks? # (e.g. we hardcode gecko's url here, but it's normally # only hardcoded in wine.inf, and fetched from the registry thereafter, # so we're adding a maintenance burden here.) case `$WINE version` in wine0*wine1.0*wine1.1wine1.1.?wine1.1.11) die "There isn't a gecko debug build for your Wine version." ;; wine1.1.1[234]*) GECKO_DIR="$WINDIR" GECKO_VERSION=0.9.0 GECKO_EXTENSION=cab GECKO_SHA1SUM=23e354a82d7b7e61a6abe0384cc44669fbf92f86 ;; wine1.1.1[56789]*wine1.1.2[0123456]*) GECKO_DIR="$WINDIR" GECKO_VERSION=0.9.1 GECKO_EXTENSION=cab GECKO_SHA1SUM=a9b58d3330f8c78524fe4683f348302bfce96ff4 ;; wine1.1.2[789]*wine1.1.[34]*wine1.2*wine1.3wine1.3.[01]wine1.3.[0 1]*) GECKO_DIR="$WINDIR/system32" GECKO_VERSION=1.0.0 GECKO_ARCH=x86 GECKO_EXTENSION=cab GECKO_SHA1SUM=2de16b443826295f646cd5d54313ca421fd71210 ;; *) GECKO_DIR="$WINDIR/system32" GECKO_VERSION=1.1.0 GECKO_ARCH=x86 GECKO_EXTENSION=tar.bz2 GECKO_SHA1SUM=647a488b306f3865527ce03df3c16c06afce1677 ;; esac if test ! f "$WINETRICKS_CACHE"/wine_gecko$GECKO_VERSION$GECKO_ARCHdbg.$G ECKO_EXTENSION then # FIXME: busted if using curl! download . "http://downloads.sourceforge.net/wine/wine_gecko$GECKO_VERSI ON$GECKO_ARCHdbg.$GECKO_EXTENSION" $GECKO_SHA1SUM wine_gecko$GECKO_VERSION$GEC KO_ARCHdbg.$GECKO_EXTENSION fi cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\\Software\\Wine\\MSHTML\\$GECKO_VERSION] _EOF_ printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg case $GECKO_VERSION in 0.*) printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg ;; 1.*) printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg ;; esac # extract the files mkdir p "$GECKO_DIR/gecko/$GECKO_VERSION" cd "$GECKO_DIR/gecko/$GECKO_VERSION" if [ "$GECKO_EXTENSION" = "cab" ] then try_cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko$GEC KO_VERSION$GECKO_ARCHdbg.cab elif [ "$GECKO_EXTENSION" = "tar.bz2" ] then bunzip2 cd "$WINETRICKS_CACHE"/wine_gecko$GECKO_VERSION$GECKO_ARCHdbg .tar.bz2 tar xf if test $? ne 0 then die Gecko debug redistributable extraction failed fi else die unrecognized Gecko debug redistributable extension fi cd "$olddir" # set installpath try_regedit "$WINETRICKS_TMP_WIN"\\geckopath.reg

# register the dll, since it was disabled before try $WINE regsvr32 mshtml } # load_gdiplus() { # http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9CDF124D4 1933CBE590FEAA05A&displaylang=en download . http://download.microsoft.com/download/a/b/c/abc4551797a04ceea 3621957be2f24e1/WindowsXPKB975337x86ENU.exe b9a84bc3de92863bba1f5eb1d5984465 67fbc646 # Used to use $WINETRICKS_QUIET, but that mean that in nonq # mode, a mysterious "Extraction Complete" dialog was all user saw. # Showing that isn't useful, so always use /q. try $WINE "$WINETRICKS_CACHE"/WindowsXPKB975337x86ENU.exe /extract:$WINET RICKS_TMP_WIN /q # And then make it globally available. try cp "$WINETRICKS_TMP/asms/10/msft/windows/gdiplus/gdiplus.dll" "$WINDIR"/ system32/ # For some reason, native,builtin isn't good enough...? override_dlls native gdiplus } # load_gfw() { # http://www.microsoft.com/games/enus/live/pages/livejoin.aspx download . http://download.microsoft.com/download/5/5/8/55846E204A464EF8B 2727F988BC9090A/gfwlivesetupmin.exe 6f9e0ba052c68c8b51bb0e3ce6024d0e1c7b20b2

# FIXME: Depends on .Net 20, but is it really needed? For now, skip it. try $WINE "$WINETRICKS_CACHE"/gfwlivesetupmin.exe /nodotnet $WINETRICKS_QUIE T

# Now get msasn1.dll, which xlive.dll depends on: # http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1749F49F 48010297BD6CA33A0&displaylang=en # FIXME: This is a huge download for a single dll. download . http://download.microsoft.com/download/E/6/A/E6A04295D2A840D0A 0C5241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4fa8 cd "$WINETRICKS_TMP" try_cabextract "$WINETRICKS_CACHE"/W2KSP4_EN.EXE i386/msasn1.dl_ try cp msasn1.dll "$WINDIR"/system32 try rm rf i386 cd "$olddir" } # load_glsl_disable() { echo "Disabling GLSL" cat > "$WINETRICKS_TMP"/disableglsl.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "UseGLSL"="disabled" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\disableglsl.reg } # load_glsl_enable() { echo "Enabling GLSL" cat > "$WINETRICKS_TMP"/enableglsl.reg <<_EOF_ REGEDIT4 [HKEY_CURRENT_USER\Software\Wine\Direct3D] "UseGLSL"="enabled" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\enableglsl.reg } # load_glut() { download . http://www.xmission.com/~nate/glut/glut3.7.6bin.zip fb4731885c0 5b3cf2c79e85aabe8fc9949616ef4 try_unzip o $WINETRICKS_UNIXQUIET d "$DRIVE_C" "$WINETRICKS_CACHE"/glut3. 7.6bin.zip try cp "$DRIVE_C"/glut3.7.6bin/glut32.dll "$WINDIR"/system32 warn "If you want to compile glut programs, add c:/glut3.7.6bin to LIB and INCLUDE" } # load_hosts() { # Create fake system32\drivers\etc\hosts and system32\drivers\etc\services f iles. # The hosts file is used to map network names to IP addresses without DNS. # The services file is used map service names to network ports. # Some apps depend on these files, but they're not implemented in wine. # Fortunately, empty files in the correct location satisfy those apps. # See http://bugs.winehq.org/show_bug.cgi?id=12076 mkdir p "$WINDIR"/system32/drivers/etc touch "$WINDIR"/system32/drivers/etc/hosts touch "$WINDIR"/system32/drivers/etc/services } # set_heapcheck() { cat > "$WINETRICKS_TMP"/heapcheck.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager] "GlobalFlag"=dword:00200030 _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\heapcheck.reg } # load_ie6() { if test "$WINE" = "" then echo "No need to install ie6 on real windows" return 0 fi # If this is just a dependency check, don't reinstall if test $PACKAGE != ie6 && test f "$WINDIR"/system32/plugin.ocx then echo "prerequisite ie6 (or ie7) already installed, skipping" return fi load_msls31 # Unregister Wine IE if [ ! f "$WINDIR"/system32/plugin.ocx ] then try $WINE iexplore unregserver fi # Change the override to the native so we are sure we use and register them override_dlls native,builtin iexplore.exe itircl itss jscript mlang mshtml m simtf shdoclc shdocvw shlwapi urlmon # Remove the fake dlls, if any mv "$programfilesdir_unix"/"Internet Explorer"/iexplore.exe "$programfilesdi r_unix"/"Internet Explorer"/iexplore.exe.bak for dll in itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi u rlmon do test f "$WINDIR"/system32/$dll.dll && mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak done # The installer doesn't want to install iexplore.exe in XP mode. set_winver win2k # Workaround a IE6 Installer bug, not Wine's fault # See http://bugs.winehq.org/show_bug.cgi?id=5409 # Actual value downloaded doesn't matter rm f "$WINETRICKS_CACHE"/ie6sites.dat download . http://www.microsoft.com/windows/ie/ie6sp1/download/rtw/x86/ie6si tes.dat # Install download . http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT4 2KMeXP/ENUS/ie6setup.exe f3ab61a785eb9611fa583612e83f3b69377f2cef

# Workaround http://bugs.winehq.org/show_bug.cgi?id=21009 # See also http://code.google.com/p/winezeug/issues/detail?id=78 rm f "$WINDIR"/system32/browseui.dll "$WINDIR"/system32/inseng.dll # Silent install recipe from: # http://www.axonpro.sk/japo/info/MS/SILENT%20INSTALL/UnattendedSilent%20In stallation%20Switches%20for%20Windows%20Apps.htm if [ $WINETRICKS_QUIET ] then $WINE "$WINETRICKS_CACHE"/ie6setup.exe /q:a /r:n /c:"ie6wzd /S:""#e"" /q :a /r:n" else $WINE "$WINETRICKS_CACHE"/ie6setup.exe fi # IE6 exits with 194 to signal a reboot status=$? case $status in 0194) ;; *) die ie6 installation failed esac # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed # FIXME: whittle down this list cd "$WINDIR"/system32/ for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \ mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx do $WINE regsvr32 /i $i > /dev/null 2>&1 done # Set windows version back to user's default. Leave at win2k for better rend ering (is there a bug for that?) unset_winver # try $WINE "$programfilesdir_unix"/"Internet Explorer"/IEXPLORE.EXE http:// www.winehq.org } # load_ie7() { # Unregister Wine IE if [ ! f "$WINDIR"/system32/plugin.ocx ] then try $WINE iexplore unregserver fi

# Change the override to the native so we are sure we use and register them override_dlls native,builtin iexplore.exe itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon xmllite # Bundled updspapi cannot work on wine override_dlls builtin updspapi # Remove the fake dlls from the existing WINEPREFIX for dll in itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon do test f "$WINDIR"/system32/$dll.dll && mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak done # See http://bugs.winehq.org/show_bug.cgi?id=16013 # Find instructions to create this file in dlls/wintrust/tests/crypt.c download . http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetes t.cat ac8f50dd54d011f3bb1dd79240dae9378748449f # Put a dummy catalog file in place mkdir p "$WINDIR"/system32/catroot/\{f750e6c338ee11d185e500c04fc295ee\} try cp f "$WINETRICKS_CACHE"/winetest.cat "$WINDIR"/system32/catroot/\{f750 e6c338ee11d185e500c04fc295ee\}/oem0.cat # Install download . http://download.microsoft.com/download/3/8/8/38889DC1848C4BF28 33586C573AD86D9/IE7WindowsXPx86enu.exe d39b89c360fbaa9706b5181ae4718100687a5 326 if [ $WINETRICKS_QUIET ] then $WINE "$WINETRICKS_CACHE"/IE7WindowsXPx86enu.exe /quiet else $WINE "$WINETRICKS_CACHE"/IE7WindowsXPx86enu.exe fi # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed # FIXME: whittle down this list cd "$WINDIR"/system32/ for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \ mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx do $WINE regsvr32 /i $i > /dev/null 2>&1 done # Seeing is believing if [ "$WINETRICKS_QUIET" = "" ] then warn "Starting ie7. To start it later, use the command $WINE '${program filesdir_win}\\\\Internet Explorer\\\\iexplore'" $WINE "${programfilesdir_win}\\Internet Explorer\\iexplore" http://www.m icrosoft.com/windows/internetexplorer/ie7/ > /dev/null 2>&1 & else warn "To start ie7, use the command $WINE '${programfilesdir_win}\\\\Int ernet Explorer\\\\iexplore'" fi } # load_ie8() { # Unregister Wine IE if [ ! f "$WINDIR"/system32/plugin.ocx ] then try $WINE iexplore unregserver fi load_msls31

# Change the override to the native so we are sure we use and register them override_dlls native,builtin iexplore.exe itircl itss jscript msctf mshtml s hdoclc shdocvw shlwapi urlmon xmllite # Bundled updspapi cannot work on wine override_dlls builtin updspapi

# Remove the fake dlls from the existing WINEPREFIX for dll in browseui.dll inseng.dll itircl itss jscript msctf mshtml shdoclc shdocvw shlwapi urlmon do test f "$WINDIR"/system32/$dll.dll && mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak done # See http://bugs.winehq.org/show_bug.cgi?id=16013 # Find instructions to create this file in dlls/wintrust/tests/crypt.c download . http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetes t.cat ac8f50dd54d011f3bb1dd79240dae9378748449f # Put a dummy catalog file in place mkdir p "$WINDIR"/system32/catroot/\{f750e6c338ee11d185e500c04fc295ee\} try cp f "$WINETRICKS_CACHE"/winetest.cat "$WINDIR"/system32/catroot/\{f750 e6c338ee11d185e500c04fc295ee\}/oem0.cat # FIXME: According to http://www.winereviews.net/winereviews/microsoft/int ernetexplorer8onlinuxwithwine.html # may also need native msctf, msimtf, and uxtheme # Install download . http://download.microsoft.com/download/C/C/0/CC0BD55533DD411E9 36B73AC6F95AE11/IE8WindowsXPx86ENU.exe e489483e5001f95da04e1ebf3c664173baef3 e26 if [ $WINETRICKS_QUIET ] then # FIXME: There's an option for /updatesnoupdates to disable checking fo r updates, but that # forces the install to fail on Wine. Not sure if it's an IE8 or Wine bu g... $WINE "$WINETRICKS_CACHE"/IE8WindowsXPx86ENU.exe /quiet /forcerestart else $WINE "$WINETRICKS_CACHE"/IE8WindowsXPx86ENU.exe fi # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed # FIXME: whittle down this list cd "$WINDIR"/system32/ for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ imgutil.dll inetcomm.dll isetup.dll jscript.dll laprxy.dll \ mlang.dll msctf.dll mshtml.dll mshtmled.dll msi.dll msimtf.dll msident.dll \ msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ plugin.ocx proctexe.ocx tdc.ocx uxtheme.dll webcheck.dll wshom.ocx do $WINE regsvr32 /i $i > /dev/null 2>&1 done # Seeing is believing if [ "$WINETRICKS_QUIET" = "" ] then warn "Starting ie8. To start it later, use the command $WINE '${programf ilesdir_win}\\\\Internet Explorer\\\\iexplore'" $WINE "${programfilesdir_win}\\Internet Explorer\\iexplore" http://www.w inehq.org/ > /dev/null 2>&1 & else warn "To start ie8, use the command $WINE '${programfilesdir_win}\\\\Int ernet Explorer\\\\iexplore'. It doesn't work well yet though, see: http://bugs.w inehq.org/show_bug.cgi?id=12433" fi } # load_jet40() { # http://support.microsoft.com/kb/239114 # See also http://bugs.winehq.org/show_bug.cgi?id=6085 download . http://download.microsoft.com/download/4/3/9/4393c9ace69e458d9 f6d2fe191c51469/jet40sp8_9xnt.exe 8cd25342030857969ede2d8fcc34f3f7bcc2d6d4 try $WINE "$WINETRICKS_CACHE"/jet40sp8_9xnt.exe $WINETRICKS_QUIET } # load_kde() { download . http://www.winkde.org/pub/kde/ports/win32/installer/kdewininstal lergui0.9.65.exe f612945e094390d7bc0e4f8840d308ef2b00f86e mkdir p "$programfilesdir_unix/kde" try cp "$WINETRICKS_CACHE"/kdewininstallergui0.9.65.exe "$programfilesdi r_unix/kde" cd "$programfilesdir_unix/kde" try $WINE "$programfilesdir_win\\kde\\kdewininstallergui0.9.65.exe" cd "$olddir" } # load_liberation() { # http://www.redhat.com/promo/fonts/ case `uname s` in SunOSSolaris) echo "If you get 'ERROR: Certificate verification error for fedorahosted.o rg: unable to get local issuer certificate':" echo "Then you need to add Verisign root certificates to your local keysto re." echo "OpenSolaris users, see: http://www.linuxtopia.org/online_books/opens olaris_2008/SYSADV1/html/swmgrpatchtasks14.html" echo "Or edit winetricks' download function, and add 'nocheckcertifica te' to the command." ;; esac download . https://fedorahosted.org/releases/l/i/liberationfonts/liberation fonts1.04.tar.gz 097882c92e3260742a3dc3bf033792120d8635a3 cd "$WINETRICKS_TMP" gunzip dc "$WINETRICKS_CACHE"/liberationfonts1.04.tar.gz tar xf mv liberationfonts1.04/*.ttf "$winefontsdir" rm rf "$WINETRICKS_TMP"/* cd "$olddir" } # load_lucida() { download . ftp://ftp.microsoft.com/bussys/winnt/winntpublic/fixes/usa/NT40T SE/hotfixespostSP3/Eurofix/eurofixi.exe 64c47ad92265f6f10b0fd909a703d4fd1b05b2 d5 try_cabextract d "$winefontsdir" L F 'lucon.ttf' "$WINETRICKS_CACHE"/euro fixi.exe register_font lucon.ttf "Lucida Console" } # set_native_mdac() { # Set those overrides globally so user programs get MDAC's odbc # instead of wine's unixodbc override_dlls native,builtin odbc32 odbccp32 oledb32 } # load_mdac25() { download mdac25 http://download.microsoft.com/download/e/e/4/ee4fe9ee6fa14 ab6ab8cfe1769f4edcf/mdac_typ.exe 09e974a5dbebaaa08c7985a4a1126886dc05fd87 set_native_mdac set_winver nt40 if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/mdac25/mdac_typ.exe /q /C:"setup /QNT" else try $WINE "$WINETRICKS_CACHE"/mdac25/mdac_typ.exe fi unset_winver } # load_mdac27() { download mdac27 http://download.microsoft.com/download/3/b/f/3bf74b0116ba4 72d9a8c42b2b4fa0d76/mdac_typ.exe f68594d1f578c3b47bf0639c46c11c5da161feee set_native_mdac set_winver win2k if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/mdac27/mdac_typ.exe /q /C:"setup /QNT" else try $WINE "$WINETRICKS_CACHE"/mdac27/mdac_typ.exe fi unset_winver } # load_mdac28() { download mdac28 http://download.microsoft.com/download/c/d/f/cdfd58f139734 c51885149ae3777586f/MDAC_TYP.EXE 91bd59f0b02b67f3845105b15a0f3502b9a2216a set_native_mdac set_winver win98 if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/mdac28/mdac_typ.exe /q /C:"setup /QNT" else try $WINE "$WINETRICKS_CACHE"/mdac28/mdac_typ.exe fi unset_winver } # load_mfc40() { # See http://support.microsoft.com/kb/122244 download . http://download.microsoft.com/download/ole/ole2v/3.5/w351/enus/o le2v.exe c6cac71f32405ccb09c6f375e0738e6e13f073e4 try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ ole2v.exe try cp f "$WINETRICKS_TMP"/MFC40.DLL "$WINDIR"/system32/ rm rf "$WINETRICKS_TMP"/* } # load_mingw_min() { # If this is just a dependency check, don't reinstall if test $PACKAGE != mingw_min && test $PACKAGE != mingw && test $PACKAGE != mingwmin && test f "$DRIVE_C"/MinGW/bin/gcc.exe then echo "prerequisite mingw_min already installed, skipping" return fi # See http://mingw.org/wiki/Getting_Started download . http://sourceforge.net/projects/mingw/files/GNU%20Binutils/binuti ls2.19.1mingw32bin.tar.gz 1ab72f3af3fe96d08c3c9bff60c47913704d5774 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc core4.4.0mingw32bin.tar.gz b88b8f3644ca0cdf2c41cd03f820bf7823a8eabb download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc core4.4.0mingw32dll.tar.gz 0372ecf4caf75d0d9fe4a7739ca234f1a3de831b download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gmp 4.2.4mingw32dll.tar.gz a14dd928382f093f67cb3cd57c140625b1b265bb download . http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/libi conv1.13.11mingw32dll2.tar.lzma 5b60ce4d9ec9cf91aee437915a2469b915e1235f download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingw rt3.16mingw32dev.tar.gz 770ff5001989d8a9a1ec4f3621d8f264a24e178f download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingw rt3.16mingw32dll.tar.gz b8032e97c79e16a3c540043f0f39821df1531ae9 download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/mpf r2.4.1mingw32dll.tar.gz 43b7ecb2c0c785c44321ff6c4376f51375713a7b download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/pth readsw322.8.0mingw32dll.tar.gz f922f8c0c42921fd4482a3d2e6f779d6384040c1 download . http://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20M SWindows/w32api3.13mingw32dev.tar.gz 5eb7d8ec0fe032a92bea3a2c8282a78df2f1793 c mkdir "$DRIVE_C"/MinGW cd "$DRIVE_C"/MinGW gzip d c "$WINETRICKS_CACHE"/binutils2.19.1mingw32bin.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/mingwrt3.16mingw32dev.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/mingwrt3.16mingw32dll.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/w32api3.13mingw32dev.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/gmp4.2.4mingw32dll.tar.gz tar x lzma d c "$WINETRICKS_CACHE"/libiconv1.13.11mingw32dll2.tar.lzma ta r x gzip d c "$WINETRICKS_CACHE"/mpfr2.4.1mingw32dll.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/pthreadsw322.8.0mingw32dll.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/gcccore4.4.0mingw32bin.tar.gz tar x gzip d c "$WINETRICKS_CACHE"/gcccore4.4.0mingw32dll.tar.gz tar x append_path 'C:\\MinGW\\bin' } # load_mingw_gdb() { # See http://mingw.org/wiki/Getting_Started load_mingw_min download . $SOURCEFORGE/mingw/GNU%20SourceLevel%20Debugger/GDB7.0/gdb7.0 2mingw32bin.tar.gz a560cb0e3980d0ed853994c84038260212f58925 cd "$DRIVE_C"/MinGW gzip d c "$WINETRICKS_CACHE"/gdb7.02mingw32bin.tar.gz tar x } # load_mono26() { # Load Mono, have it handle all .net requests download . http://ftp.novell.com/pub/mono/archive/2.6.7/windowsinstaller/2/ mono2.6.7gtksharp2.12.10win322.exe c31c06063aa82006dff2f8df22dcc6ba046afbc2

try $WINE "$WINETRICKS_CACHE"/mono2.6.7gtksharp2.12.10win322.exe $WINET RICKS_SILENT # FIXME: what should this be for mono 2.6? cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] "Install"=dword:00000001 "SP"=dword:00000001 [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] "4322"="37064322" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg rm f "$WINETRICKS_TMP"/mono_2.0.reg } # load_mozillabuild() { download . http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/Mo zillaBuildSetup1.4.exe try $WINE "$WINETRICKS_CACHE"/MozillaBuildSetup1.4.exe $WINETRICKS_S } # load_mpc() { download . $SOURCEFORGE/mpchc/MPC%20HomeCinema%20%20Win32/MPCHC%20v1.3.12 49.0_32%20bits/MPCHomecinema.1.3.1249.0.%28x86%29.zip 6c46846b5298f35ccc81925aa 5304546b9a7e513 mkdir p "$programfilesdir_unix/Media Player Classic" cd "$programfilesdir_unix/Media Player Classic" try_unzip "$WINETRICKS_CACHE/MPCHomecinema.1.3.1249.0.%28x86%29.zip"

append_path "$programfilesdir_win"'\\Media Player Classic' cd "$olddir" warn "MPC now available as $programfilesdir_win\Media Player Classic\mpchc. exe" } # load_msi2() { # Install native msi per http://wiki.winehq.org/NativeMsi # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CE BBACD8C0944255B702DE3BB768148F download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/ENUS/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 # Pick win98 so we can install native msi set_winver win98 # Avoid "err:setupapi:SetupDefaultQueueCallbackA copy error 5 ..." rm f "$WINDIR"/system32/msi.dll rm f "$WINDIR"/system32/msiexec.exe WINEDLLOVERRIDES="msi,msiexec.exe=n" try $WINE "$WINETRICKS_CACHE"/InstMSIA. exe $WINETRICKS_QUIET override_dlls native,builtin msi msiexec.exe # and undo version win98 unset_winver } # load_mshflxgd() { # http://msdn.microsoft.com/enus/library/aa240864(VS.60).aspx # orig: 5f9c7a81022949bfe39b50f2bbd799c448bb7377 # Jan 2009: 7ad74e589d5eefcee67fa14e65417281d237a6b6 # May 2009: bd8aa796e16e5f213414af78931e0379d9cbe292 download . http://activex.microsoft.com/controls/vb6/MSHFLXGD.CAB bd8aa796e 16e5f213414af78931e0379d9cbe292 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/MSHFLXGD.CA B try cp f "$WINETRICKS_TMP"/[Mm][Ss][Hh][Ff][Ll][Xx][Gg][Dd].[Oo][Cc][Xx] "$ WINDIR"/system32 } # load_msls31() { # Install native Microsoft Line Services (needed by eSword, possibly only w hen using native riched20) download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/ENUS/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.ex e try cp f "$WINETRICKS_TMP"/msls31.dll "$WINDIR"/system32 } # load_msmask() { # http://msdn.microsoft.com/enus/library/11405hcf(VS.71).aspx # http://bugs.winehq.org/show_bug.cgi?id=2934 # old: 3c6b26f68053364ea2e09414b615dbebafb9d5c3 # May 2009: 30e55679e4a13fe4d9620404476f215f93239292 download . http://activex.microsoft.com/controls/vb6/MSMASK32.CAB 30e55679e 4a13fe4d9620404476f215f93239292 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/MSMASK32.CA B try cp f "$WINETRICKS_TMP"/[Mm][Ss][Mm][Aa][Ss][Kk]32.[Oo][Cc][Xx] "$WINDIR "/system32/msmask32.ocx try $WINE regsvr32 msmask32.ocx } # load_mspaint() { # http://helpforlinux.blogspot.com/2008/12/runmspaintinlinux.html download . http://download.microsoft.com/download/winntwks40/paint/1/nt4/en us/paintnt.exe a22c4e367ef9d2cd23f0a8ae8d9ebff5bc1e8a0b try_unzip "$WINETRICKS_CACHE"/paintnt.exe d "$WINDIR" warn "Paint is now installed to $WINDIR/MSPAINT.EXE" } # load_msscript() { # http://msdn.microsoft.com/scripting/scriptcontrol/x86/sct10en.exe # http://www.microsoft.com/downloads/details.aspx?familyid=d7e31492259549e 68c021426fec693ac download . http://download.microsoft.com/download/d/2/a/d2a7430c6d5b48e9 96c43c751be7bffe/sct10en.exe fd9f2f23357ab11ae70682d6864f7e9f188adf2a try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/sct10en.exe try cp f "$WINETRICKS_TMP"/msscript.ocx "$WINDIR"/system32 try $WINE regsvr32 msscript.ocx } # load_msxml3() { # Service Pack 5 #download http://download.microsoft.com/download/a/5/e/a5e0379824544d4b89 a34a47579891d8/msxml3.msi # Service Pack 7 download . http://download.microsoft.com/download/8/8/8/888f34b74f544f068 dacfa29b19f33dd/msxml3.msi d4c2178dfb807e1a0267fce0fd06b8d51106d913 # http://bugs.winehq.org/show_bug.cgi?id=7849 fixed since 0.9.37 override_dlls native,builtin msxml3 try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml3.msi $WINETRICKS_QUIET } # load_msxml4() { # If this is just a dependency check, don't reinstall if test $PACKAGE != msxml4 && test f "$WINDIR"/system32/msxml4.dll then echo "prerequisite msxml4 already installed, skipping" return fi # MS06071: http://www.microsoft.com/downloads/details.aspx?familyid=24B7D14 16CDF4FC4A91B6F18FE6921D4 # download . http://download.microsoft.com/download/e/2/e/e2e92e52210b4774 8cd93a7a0130141d/msxml4KB927978enu.exe d364f9fe80c3965e79f6f64609fc253dfeb69 c25 # MS07042: http://www.microsoft.com/downloads/details.aspx?FamilyId=021E12F 5CB4643DFA2B8185639BA2807 # download . http://download.microsoft.com/download/9/4/2/9422e6b608ee49cb 9f056c6ee755389e/msxml4KB936181enu.exe 73d75d7b41f8a3d49f272e74d4f73bb5e82f1 acf # SP3 (2009): http://www.microsoft.com/downloads/details.aspx?familyid=7F6C0 CB47A5E4790A7CF9E139E6819C0 download msxml4sp3 http://download.microsoft.com/download/A/2/D/A2D8587D002 742179DAD38AFDB0A177E/.msi aa70c5c1a7a069af824947bcda1d9893a895318b override_dlls native,builtin msxml4 try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml4sp3/msxml.msi $WINETRICKS_QUI ET } # load_msxml6() { # If this is just a dependency check, don't reinstall if test $PACKAGE != msxml6 && test f "$WINDIR"/system32/msxml6.dll then echo "prerequisite msxml6 already installed, skipping" return fi # http://www.microsoft.com/downloads/details.aspx?FamilyID=993c0bcf3bcf400 9be2127e85e1857b1 # download . http://download.microsoft.com/download/2/e/0/2e01308ae17f4bf9 bf48161356cf9c81/msxml6.msi 2308743ddb4cb56ae910e461eeb3eab0a9e58058 # Service Pack 1 # http://www.microsoft.com/downloads/details.aspx?familyid=D21C292C368B4CE 19DAB3E9827B70604 download . http://download.microsoft.com/download/e/a/f/eafb8ee7667d4e30b b394694b5b3006f/msxml6_x86.msi override_dlls native,builtin msxml6 try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml6_x86.msi $WINETRICKS_QUIET } # load_ogg() { # flac, ogg, speex, vorbis, ogm source, ogg source # see following URLs for more info # http://xiph.org/dshow/ # http://www.diracvideo.org/ # http://crosslfs.org/~mlankhorst/directschro.txt # http://www.diracvideo.org/git?p=directschro.git;a=summary download . http://downloads.xiph.org/releases/oggdsf/opencodecs_0.84.17338.e xe 6151ab79e6ae246208cdf707e080f01c93d95deb try $WINE "$WINETRICKS_CACHE"/opencodecs_0.84.17338.exe $WINETRICKS_S } # load_ole2() { # http://support.microsoft.com/kb/123087/ENUS/ download . http://download.microsoft.com/download/win31/update/2.03/win/enu s/ww1116.exe b803991c40f387464b61f606536b7c98a88245d2 try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ ww1116.exe set_winver win31 cd "$WINETRICKS_TMP" try $WINE setup.exe cd "$olddir" unset_winver override_dlls native,builtin COMPOBJ OLE2CONV OLE2DISP OLE2 override_dlls native,builtin OLE2NLS OLE2PROX STORAGE TYPELIB } # load_openwatcom() { # http://www.openwatcom.org download . "http://ftp.openwatcom.org/ftp/openwatcomcwin321.9.exe" 236ac 33ebd463006be4ecd83d7ebea1c026eb55a if [ $WINETRICKS_QUIET ] then # Options documented at http://bugzilla.openwatcom.org/show_bug.cgi?id=8 98 # But they don't seem to work on wine, so jam them into setup.inf # Pick smallest installation that supports 16 bit C and C++ cd "$WINETRICKS_TMP" cp "$WINETRICKS_CACHE"/openwatcomcwin321.9.exe . try_unzip openwatcomcwin321.9.exe setup.inf sed i 's/tools16=.*/tools16=true/' setup.inf try zip f openwatcomcwin321.9.exe try $WINE openwatcomcwin321.9.exe s cd "$olddir" else try $WINE "$WINETRICKS_CACHE"/openwatcomcwin321.9.exe fi if test ! f "$DRIVE_C"/WATCOM/binnt/wcc.exe then 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" fi } # load_pdh() { # http://support.microsoft.com/kb/284996 download . http://download.microsoft.com/download/platformsdk/Redist/5.0.219 5.2668/NT4/ENUS/pdhinst.exe f42448660def8cd7f42b34aa7bc7264745f4425e try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/pdhinst.exe try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_TMP"/pd h.exe try cp f "$WINETRICKS_TMP"/x86/Pdh.Dll "$WINDIR"/system32/pdh.dll } # load_physx() { # http://www.nvidia.com/object/physx_9.09.0814.html # download . http://us.download.nvidia.com/Windows/9.09.0814/PhysX_9.09.0814 _SystemSoftware.exe e19f7c3385a4a68e7acb85301bb4d2d0d1eaa1e2 # http://www.nvidia.com/object/physx_9.10.0129.html download . http://us.download.nvidia.com/Windows/9.10.0129/PhysX_9.10.0129_S ystemSoftware.exe 33a8b54d842c7246946de15b1a48209c386c9c4b try $WINE "$WINETRICKS_CACHE"/PhysX_9.10.0129_SystemSoftware.exe $WINETRICKS _QUIET } # load_psdk2003() { load_vcrun6 # Note: aborts on 64 bit windows with dialog saying "don't run on WoW" # http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35c656496 9ace8e4c0c0716adb download psdk2003 http://download.microsoft.com/download/f/a/d/fad9efde8627 4e7a8812c351ba099151/PSDKx86.exe 5c7dc2e1eb902b376d7797cc383fefdfc64ff9c9 echo "This can take up to an hour." cd "$WINETRICKS_CACHE"/psdk2003 try $WINE PSDKx86.exe cd "$olddir" } # load_psdkvista() { # http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35c656496 9ace8e4c0c0716adb warn "Vista SDK doesn't work yet as of wine1.1.28" load_dotnet20 download psdkvista download.microsoft.com/download/c/a/1/ca145d10e254475c 85f91439f4cd2a9e/Setup.exe 756c21a7fc9b831f7200f3f44ae55cc7689e8063 #chmod +x "$WINETRICKS_CACHE"/psdkvista/Setup.exe cd "$WINETRICKS_CACHE"/psdkvista try $WINE Setup.exe cd "$olddir" } # load_psdkwin7() { # http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba8699671433 0a63e1fd44e0e2505&displaylang=en load_vcrun6 load_vcrun2008 load_dotnet20 load_gdiplus # work around http://bugs.winehq.org/show_bug.cgi?id=21509 # don't have a working unattended recipe. Maybe we'll have to # do an autohotkey script until msft gets its act together: # http://social.msdn.microsoft.com/Forums/enUS/windowssdk/thread/c053b6167 d5b405d9841ec465a8e21d5 download psdkwin7 http://download.microsoft.com/download/7/A/B/7ABD2203C472 40368BA0E505528CCCB7/winsdk_web.exe a01dcc67a38f461e80ea649edf1353f306582507 cd "$WINETRICKS_CACHE"/psdkwin7 warn "When given a choice, select only C++ compilers and headers, the other options don't work yet. See http://bugs.winehq.org/show_bug.cgi?id=21596" try $WINE winsdk_web.exe cd "$olddir" # FIXME: don't do this if running on real Windows? # Work around bug http://bugs.winehq.org/show_bug.cgi?id=21362 # Assume user installed in default location cat > "$WINETRICKS_TMP"/setpsdk7.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows] "CurrentVersion"="v7.0" "CurrentInstallFolder"="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0] "InstallationFolder"="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\" "ProductVersion"="7.0.7600.16385.40715" "ProductName"=" SDK for Windows 7 (7.0.7600.16385.40715)" _EOF_ try_regedit "$WINETRICKS_TMP_WIN"\\setpsdk7.reg } # load_python26() { # If this is just a dependency check, don't reinstall if test $PACKAGE != python26 && test f "$WINEPREFIX"/drive_c/Python26/pytho n.exe then echo "prerequisite python26 already installed, skipping" return fi download . http://www.python.org/ftp/python/2.6.2/python2.6.2.msi 2d1503b0e 8b7e4c72a276d4d9027cf4856b208b8 download . $SOURCEFORGE/project/pywin32/pywin32/Build%20214/pywin32214.win3 2py2.6.exe eca58f29b810d8e3e7951277ebb3e35ac35794a3 cd "$WINETRICKS_CACHE" try $WINE msiexec /i python2.6.2.msi ALLUSERS=1 $WINETRICKS_QUIET # FIXME: unzip this instead of running it if quiet install? try $WINE pywin32214.win32py2.6.exe cd "$olddir" } # load_python_comtypes() {

load_python26

download . $SOURCEFORGE/project/comtypes/comtypes/0.6.1/comtypes0.6.11.zip 814318cdae0ab2471a9cd500847bf12f4df9a57c cd "$WINETRICKS_CACHE" try_unzip comtypes0.6.11.zip cd comtypes0.6.1 try $WINE "C:\Python26\python.exe" setup.py install cd "$olddir" } # load_quartz() { helper_directx_dl try_cabextract d "$WINETRICKS_TMP" L F dxnt.cab "$WINETRICKS_CACHE"/$DIRE CTX_NAME try_cabextract d "$WINDIR"/system32 L F 'quartz.dll' "$WINETRICKS_TMP/dxn t.cab"

try $WINE regsvr32 quartz.dll

override_dlls native quartz

} # load_quicktime72() { echo "Quicktime needs gdiplus..." load_gdiplus # http://www.apple.com/support/downloads/quicktime72forwindows.html download quicktime72 'http://wsidecar.apple.com/cgibin/nphreg3rdpty2.pl/pr oduct=14402&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe' bb89981f10cf21 de57b9453e53cf81b9194271a9 unset QUICKTIME_QUIET if test "$WINETRICKS_QUIET"x != x then QUICKTIME_QUIET="/qn" # ISSETUPDRIVEN=0 fi # set vista mode to inhibit overlay use that blacks the screen set_winver vista 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 if test "$WINETRICKS_QUIET"x = x then echo "You probably want to select Advanced / Safe Mode in the Quicktime control panel" try $WINE control "$programfilesdir_win\\QuickTime\\QTSystem\\QuickTime. cpl" fi unset_winver # user might want to set vista mode himself, or run # wine control ".wine/drive_c/Program Files/QuickTime/QTSystem/QuickTime.cp l" # and pick Advanced / Safe Mode (gdi only). # We could probably force that by overwriting QuickTime.qtp # (probably in Program Files/QuickTime/QTSystem/QuickTime.qtp) # but the format isn't known, so we'd have to override all other settings, t oo. } # volnum() { case "$OS" in "Windows_NT") return ;; esac # Recent Microsoft installers are often based on "windows package manager", see # http://support.microsoft.com/kb/262841 and # http://www.microsoft.com/technet/prodtechnol/windowsserver2003/deployment/ winupdte.mspx # These installers check the drive name, and if it doesn't start with 'hardd isk', # they complain "Unable to find a volume for file extraction", see # http://bugs.winehq.org/show_bug.cgi?id=5351 # You may be able to work around this by using the installer's /x or /extrac t switch, # but renaming drive_c to "harddiskvolume0" lets you just run the installer as normal. if test ! d "$WINEPREFIX"/harddiskvolume0/ then ln s drive_c "$WINEPREFIX"/harddiskvolume0 rm "$WINEPREFIX"/dosdevices/c: ln s ../harddiskvolume0 "$WINEPREFIX"/dosdevices/c: echo "Renamed drive_c to harddiskvolume0" else echo "drive_c already named harddiskvolume0" fi } # load_riched20() { # http://support.microsoft.com/?kbid=249973 download . http://download.microsoft.com/download/winntsp/Patch/RTF/NT4/ENU S/Q249973i.EXE f0b7663f15dbd31410435483ba832318c7a70470 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/Q249973i.EX E try cp f "$WINETRICKS_TMP"/riched??.dll "$WINDIR"/system32 override_dlls native,builtin riched20 riched32 rm rf "$WINETRICKS_TMP"/* } # load_riched30() { # http://www.novell.com/documentation/nm1/readmeen_web/readmeen_web.html#Akx 3j64 # claims that Groupwise Messenger's View / Text Size command # only works with riched30, and recommends getting it by installing # msi 2, which just happens to come with riched30 version of riched20 # (though not with a corresponding riched32, which might be a problem) # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CE BBACD8C0944255B702DE3BB768148F download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/ENUS/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.ex e try cp f "$WINETRICKS_TMP"/riched20.dll "$WINDIR"/system32 override_dlls native,builtin riched20 rm rf "$WINETRICKS_TMP"/* } # load_richtx32() { download . http://activex.microsoft.com/controls/vb6/richtx32.cab da404b566d f3ad74fe687c39404a36c3e7cadc07 try_cabextract "$WINETRICKS_CACHE"/richtx32.cab d "$WINDIR"/system32 F Ric hTx32.Ocx try $WINE regsvr32 RichTx32.ocx } # load_secur32(){ # http://www.microsoft.com/downloads/details.aspx?familyid=c4e408d767164a1 2ad3a8029667f5c84 download . http://download.microsoft.com/download/6/9/5/69501788B62F44D89 33FB6FAA576CA87/Windows2000KB959426x86ENU.EXE bf930a4d2982165a0793465bb255d4 94ba5b4cf7 try_cabextract "$WINETRICKS_CACHE"/Windows2000KB959426x86ENU.EXE d "$WIN DIR"/system32 F secur32.dll override_dlls native,builtin secur32 } # load_safari() { download . http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Sa fari5/0617138.20100607.Y7U87/SafariSetup.exe e56d5d79d9cfbb85ac46ac78aa497d7f3d 8dbc3d cd "$WINETRICKS_CACHE" # Workaround http://bugs.winehq.org/show_bug.cgi?id=21146 # FIXME: is this localized? try mkdir p "$DRIVE_C/users/$USER/Application Data/Apple Computer/Preferenc es" cat > "$DRIVE_C/users/$USER/Application Data/Apple Computer/Preferences/com. apple.Safari.plist" <<_EOF_ LastDisplayedWelcomePageVersionString 4.0 _EOF_ if test "$WINETRICKS_QUIET" then warn "Safari's silent install is broken under wine. See http://bugs.wine hq.org/show_bug.cgi?id=23493. You should do a regular install if you want to use Safari." try $WINE SafariSetup.exe /qn else try $WINE SafariSetup.exe fi }

# load_shockwave() { # Not silent enough, use msi instead #download . http://fpdownload.macromedia.com/get/shockwave/default/english/w in95nt/latest/Shockwave_Installer_Full.exe 840e34e9b067cf247bfa9092665b8966158f3 8e3 #try $WINE "$WINETRICKS_CACHE"/Shockwave_Installer_Full.exe $WINETRICKS_S # old sha1sum: 6a91a9da4b54c3fdc97130a15e1a173117e5f4ff # 20090731 sha1sum: 0bb506ef67a268e8d3fb6c7ce556320ee10b9da5 # 20091213 sha1sum: d35649883bf13cb1a86f5650e1050d15533ac0f4 # 20100123 sha1sum: 4a837d238c28c5f345d73f105711f20c6d059273 # 20100515 sha1sum: bdce02afc82233801e84137e78c2c5fe574db253 # 20100902 sha1sum: fed20eccc29fec2f64162b7265343514d43884bc download . http://fpdownload.macromedia.com/get/shockwave/default/english/wi n95nt/latest/sw_lic_full_installer.msi fed20eccc29fec2f64162b7265343514d43884bc try $WINE msiexec /i "$WINETRICKS_CACHE"/sw_lic_full_installer.msi $WINETRIC KS_QUIET } # load_steam() { download . http://storefront.steampowered.com/download/SteamInstall.msi a0ca 8791b7b2e96665ee059e03eebbfb3d95be55 try $WINE msiexec /i "$WINETRICKS_CACHE"/SteamInstall.msi $WINETRICKS_QUIET if ! test f "$WINDIR/Fonts/Times.TTF" then warn "Installing corefonts to prvent a Steam crash; see wine bug 22751" load_corefonts fi warn "Once Steam is running, disable player notifications and ingame chat i n Settings, or games will crash on launch; see wine bug 22053" } # load_tahoma() { # The tahoma and tahomabd fonts are needed by e.g. Steam download . http://download.microsoft.com/download/office97pro/fonts/1/w95/en us/tahoma32.exe 888ce7b7ab5fd41f9802f3a65fd0622eb651a068 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/tahoma32.ex e try cp f "$WINETRICKS_TMP"/Tahoma.TTF "$winefontsdir"/tahoma.ttf try cp f "$WINETRICKS_TMP"/Tahomabd.TTF "$winefontsdir"/tahomabd.ttf chmod +w "$winefontsdir"/tahoma*.ttf rm rf "$WINETRICKS_TMP"/* } # load_urlmon() { # This is an updated urlmon from IE 6.0 # See http://www.microsoft.com/downloads/details.aspx?familyid=85BB441A5BB1 4A8286ECA249AF287513 # (Works for Dolphin Smalltalk, see http://bugs.winehq.org/show_bug.cgi?id=8 258) download . http://download.microsoft.com/download/8/2/0/820faffc3ea04914b ca3584235964ded/Q837251.exe bcc79b92ac3c06c4de3692672c3d70bdd36be892 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE/Q837251.exe" try cp f "$WINETRICKS_TMP"/URLMON.DLL "$WINDIR"/system32/urlmon.dll override_dlls native,builtin urlmon } load_usp10() { # http://www.microsoft.com/downloads/details.aspx?familyid=cebbacd8c094425 5b702de3bb768148f download . http://download.microsoft.com/download/WindowsInstaller/Install/2 .0/W9XMe/ENUS/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.ex e try cp f "$WINETRICKS_TMP"/usp10.dll "$WINDIR"/system32 override_dlls native,builtin usp10 } # load_utorrent() { # Torrent client supported on Windows,Mac OSX, Linux through WINE download . http://download.utorrent.com/2.0.2/utorrent.exe dfec781877aa86afa 941d512c3fc9e95c2b2bdea try cp f "$WINETRICKS_CACHE"/utorrent.exe "$WINDIR"/utorrent.exe warn "utorrent is now installed to $WINDIR/utorrent.exe" } # load_vb2run() { # Not referenced on MS web anymore. But the old Microsoft Software Library F TP still has it. # See ftp://ftp.microsoft.com/Softlib/index.txt download . ftp://ftp.microsoft.com/Softlib/MSLFILES/VBRUN200.EXE ac0568b73ee 375408778e9b505df995f79ab907e try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ VBRUN200.EXE try cp f "$WINETRICKS_TMP/VBRUN200.DLL" "$WINDIR"/system32/ } # load_vb3run() { # See http://support.microsoft.com/kb/196285 download . http://download.microsoft.com/download/vb30/utility/1/w9xnt4/enu s/vb3run.exe 518fcfefde9bf680695cadd06512efadc5ac2aa7 try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ vb3run.exe try cp f "$WINETRICKS_TMP/Vbrun300.dll" "$WINDIR"/system32/ } # load_vb4run() { # See http://support.microsoft.com/kb/196286 download . http://download.microsoft.com/download/vb40ent/sample27/1/w9xnt4/ enus/vb4run.exe 83e968063272e97bfffd628a73bf0ff5f8e1023b try_unzip o $WINETRICKS_UNIXQUIET d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ vb4run.exe try cp f "$WINETRICKS_TMP/Vb40032.dll" "$WINDIR"/system32/ try cp f "$WINETRICKS_TMP/Vb40016.dll" "$WINDIR"/system32/ } # load_vbvm50() { download . http://download.microsoft.com/download/vb50pro/utility/1/win98/en us/msvbvm50.exe 28bfaf09b8ac32cf5ffa81252f3e2fadcb3a8f27 try $WINE "$WINETRICKS_CACHE"/msvbvm50.exe $WINETRICKS_QUIET } # load_vbrun60() { if test ! f "$WINETRICKS_CACHE"/vbrun60sp6.exe then download . http://download.microsoft.com/download/5/a/d/5ad868a08ecd4b b0a882fe53eb7ef348/VB6.0KB290887X86.exe 73ef177008005675134d2f02c6f580515ab0 d842 rm rf "$WINETRICKS_TMP"/* try $WINE "$WINETRICKS_CACHE"/VB6.0KB290887X86.exe "/T:$winetricks_tmp _win" /c $WINETRICKS_QUIET if test ! f "$WINETRICKS_TMP"/vbrun60sp6.exe then die vbrun60sp6.exe not found fi try mv "$WINETRICKS_TMP"/vbrun60sp6.exe "$WINETRICKS_CACHE" fi # Delete some fake DLLs to ensure that the installer overwrites them. rm f "$WINDIR"/system32/comcat.dll rm f "$WINDIR"/system32/oleaut32.dll rm f "$WINDIR"/system32/olepro32.dll rm f "$WINDIR"/system32/stdole2.tlb # Exits with status 43 for some reason? $WINE "$WINETRICKS_CACHE"/vbrun60sp6.exe $WINETRICKS_QUIET status=$? case $status in 043) ;; *) die $PACKAGE installation failed esac } # load_vcrun6() { # Load the Visual C++ 6 runtime libraries, including the elusive mfc42u.dll # If this is just a dependency check, don't reinstall if test $PACKAGE != vcrun6 && test f "$WINDIR"/system32/mfc42u.dll then echo "prerequisite vcrun6 already installed, skipping" return fi if test ! f "$WINETRICKS_CACHE"/vcredist.exe then download . http://download.microsoft.com/download/vc60pro/update/1/w9xnt4 /enus/vc6redistsetup_enu.exe 382c8f5a7f41189af8d4165cf441f274b7e2a457 rm rf "$WINETRICKS_TMP"/* try $WINE "$WINETRICKS_CACHE"/vc6redistsetup_enu.exe "/T:$winetricks_tmp_ win" /c $WINETRICKS_QUIET if test ! f "$WINETRICKS_TMP"/vcredist.exe then die vcredist.exe not found fi mv "$WINETRICKS_TMP"/vcredist.exe "$WINETRICKS_CACHE" fi # Delete some fake dlls to avoid vcredist installer warnings rm f "$WINDIR"/system32/comcat.dll rm f "$WINDIR"/system32/msvcrt.dll rm f "$WINDIR"/system32/oleaut32.dll rm f "$WINDIR"/system32/olepro32.dll rm f "$WINDIR"/system32/stdole2.tlb # vcredist still exits with status 43. Anyone know why? $WINE "$WINETRICKS_CACHE"/vcredist.exe status=$? case $status in 043) ;; *) die $PACKAGE installation failed esac # And then some apps need mfc42u.dll, dunno what right way # is to get it, vcredist doesn't install it by default? try_cabextract "$WINETRICKS_CACHE"/vcredist.exe d "$WINDIR"/system32/ F mf c42u.dll override_dlls native,builtin msvcrt } # load_vcrun6sp6() { if test ! f vcredistsp6.exe then download . http://download.microsoft.com/download/1/9/f/19fe4660579246 8399e08d48c22eed74/Vs6sp6.exe 2292437a8967349261c810ae8b456592eeb76620 # No EULA is presented when passing commandline extraction arguments, # so we'll simplify extraction with cabextract. We'll also try to avoid # overwriting the older vcrun6 redist by renaming the extracted file. try_cabextract "$WINETRICKS_CACHE"/Vs6sp6.exe d "$WINETRICKS_TMP" F vc redist.exe try mv "$WINETRICKS_TMP"/vcredist.exe "$WINETRICKS_CACHE"/vcredistsp6.ex e fi # Delete some fake dlls to avoid vcredist installer warnings try rm f "$WINDIR"/system32/comcat.dll try rm f "$WINDIR"/system32/msvcrt.dll try rm f "$WINDIR"/system32/oleaut32.dll try rm f "$WINDIR"/system32/olepro32.dll try rm f "$WINDIR"/system32/stdole2.tlb # vcredist still exits with status 43. Anyone know why? $WINE "$WINETRICKS_CACHE"/vcredistsp6.exe status=$? case $status in 043) ;; *) die $PACKAGE installation failed esac # And then some apps need mfc42u.dll, dunno what right way # is to get it, vcredist doesn't install it by default? try_cabextract "$WINETRICKS_CACHE"/vcredistsp6.exe d "$WINDIR"/system32/ F mfc42u.dll override_dlls native,builtin msvcrt } # load_vcrun2003() { # Load the Visual C++ 2003 runtime libraries # Sadly, I know of no Microsoft URL for these echo "Installing BZFlag (which comes with the Visual C++ 2003 runtimes)" download . $SOURCEFORGE/bzflag/BZEditW32_1.6.5_Installer.exe bdd1b32c4202fd7 7e6513fd507c8236888b09121 try $WINE "$WINETRICKS_CACHE"/BZEditW32_1.6.5_Installer.exe $WINETRICKS_S try cp "$programfilesdir_unix/BZEdit1.6.5"/m*71* "$WINDIR"/system32/ } # load_vcrun2005() { # Load the latest Visual C++ 2005 runtime libraries # If this is just a dependency check, don't reinstall # SP1 + ATL security fix build 4053 (MS09035) # See http://www.microsoft.com/downloads/details.aspx?familyid=766A6AF7EC73 40FFB0729112BAB119C2 if test $PACKAGE != vcrun2005 && test d "$WINDIR"/winsxs/x86_Microsoft.VC80 .MFC_1fc8b3b9a1e18e3b_8.0.50727.4053_xww_b77cec8e then echo "prerequisite vcrun2005 already installed, skipping" return fi download vcrun2005ms09035 http://download.microsoft.com/download/6/B/B/6BB 661D6A8AE4819B79F236472F6070C/vcredist_x86.exe e052789ebad7dc8d6f8505a9295b0 576babd125e cd "$WINETRICKS_CACHE" cd vcrun2005ms09035 override_dlls native,builtin msvcr80 try $WINE vcredist_x86.exe $WINETRICKS_QUIET cd "$olddir" } # load_vcrun2008() { # For the moment, assume windows already has this. case "$OS" in "Windows_NT") return ;; esac # Work around bug 5351 (http://bugs.winehq.org/show_bug.cgi?id=5351). In rec ent # wine (>= 1.1.7) the bug is fixed. The workaround doesn't hurt anything, an d lets # installer work on older Wine (e.g., the stabe 1.0.1). volnum # Load the latest Visual C++ 2008 runtime libraries # If this is just a dependency check, don't reinstall # SP1 + ATL security fix build 4148 (MS09035) # See http://www.microsoft.com/downloads/details.aspx?familyid=2051a0c1c9b5 4b0aa8f5770a549fd78c if test $PACKAGE != vcrun2008 && test d "$WINDIR"/winsxs/x86_Microsoft.VC90 .MFC_1fc8b3b9a1e18e3b_9.0.30729.4148_xww_a57c1f53 then echo "prerequisite vcrun2008 already installed, skipping" return fi download vcrun2008ms09035 http://download.microsoft.com/download/9/7/7/977 B481A7BA64E30AC40ED51EB2028F2/vcredist_x86.exe bd18409cfe75b88c2a9432d36d96f 4bf125a3237 override_dlls native,builtin msvcr90 try $WINE "$WINETRICKS_CACHE"/vcrun2008ms09035/vcredist_x86.exe $WINETRICK S_QUIET } # load_vcrun2010() { # Load the Visual C++ 2010 runtime libraries # See http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e6de6 4d3aa42337bf0912db84 download vcrun2010 http://download.microsoft.com/download/5/B/C/5BC5DBB3652 D4DCEB14A475AB85EEF6E/vcredist_x86.exe 372d9c1670343d3fb252209ba210d4dc4d67d3 58 override_dlls native,builtin msvcr100 # Workaround Wine bug http://bugs.winehq.org/show_bug.cgi?id=23427 load_msxml3 try $WINE "$WINETRICKS_CACHE"/vcrun2010/vcredist_x86.exe $WINETRICKS_QUIET } # load_vjrun20() { load_dotnet20 # See http://www.microsoft.com/downloads/details.aspx?FamilyId=E9D87F372ADC 4C3295B3B5E3A21BAB2C download vjrun20 http://download.microsoft.com/download/9/2/3/92338cd0759f 4815898124b437be74ef/vjredist.exe 80a098e36b90d159da915aebfbfbacf35f302bd8 if [ $WINETRICKS_QUIET ] then try $WINE "$WINETRICKS_CACHE"/vjrun20/vjredist.exe /q /C:"install /QNT" else try $WINE "$WINETRICKS_CACHE"/vjrun20/vjredist.exe fi } # load_vc2003toolkit() { # http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnetvc/2679/ANNMicrosoftV isualCToolkit2003 #download . http://download.microsoft.com/download/3/9/b/39bac7550a1e4d0b b72c3a158b7444c4/VCToolkitSetup.exe 956c81c3106b97042c4126b23c81885c4b5211f4 # I'm going to link to this for now even though it's not straight from micro soft # because it's a developer tool rather than a runtime, and # I'm in the middle of trying to get lots of open source windows # apps to build on Wine; see http://wiki.winehq.org/UnitTestSuites # (Plus the sha1sum, which I still have from a copy straight from microsoft,

# protects us somewhat against corrupted copies.) download . http://npg.dl.ac.uk/MIDAS/MIDAS_Release/VCToolkitSetup.exe 956c81 c3106b97042c4126b23c81885c4b5211f4 cd "$WINETRICKS_CACHE" try $WINE VCToolkitSetup.exe cd "$olddir" } # load_vc2005express() { # Currently broken in wine, see http://bugs.winehq.org/show_bug.cgi?id=21010 # Thanks to http://blogs.msdn.com/astebner/articles/551674.aspx for the reci pe load_dotnet20 load_msxml6 # http://go.microsoft.com/fwlink/?LinkId=51410 download vc2005express http://download.microsoft.com/download/8/3/a/83aad8f9 38ba4503b3cdba28c360c27b/ENU/vcsetup.exe 0292ae1d576edd8ee5350a27113c94c9f99 58d5c if [ $WINETRICKS_QUIET ] then # Thanks to Aaron Stebner's unattended install recipe # http://blogs.msdn.com/astebner/archive/2006/03/19/555326.aspx # "http://go.microsoft.com/fwlink/?LinkId=51417" download vc2005express http://download.microsoft.com/download/0/5/A/05AA 45B9A4BE48728D57733DF5297284/Ixpvc.exe ce0da62b5649f33c7a150de276d799fb2d68d 12a cd "$WINETRICKS_TMP" rm rf vc2005express.tmp true mkdir vc2005express.tmp cd vc2005express.tmp try_cabextract "$WINETRICKS_CACHE"/vc2005express/vcsetup.exe cp "$WINETRICKS_CACHE"/vc2005express/Ixpvc.exe . chmod +x Ixpvc.exe # Add /qn after ReallySuppress for a really silent install (but then you won't see any errors) try $WINE Ixpvc /t:"$WINETRICKS_TMP_WIN\\\\vc2005express.tmp" /q:a /c:"m siexec /i vcsetup.msi VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress" cd .. rm rf vc2005express.tmp true else warn "Don't forget to install the IDE, or mt.exe won't be installed" cd "$WINETRICKS_CACHE"/vc2005express try $WINE vcsetup.exe # The interactive installer seems to be asynchronous, so wait until one of the last files is created while test ! f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7 /Tools/vsvars32.bat" do echo "Waiting for install to finish..." sleep 10 done fi cd "$olddir" } # load_vc2005expresssp1() { warn "$PACKAGE does not work yet" if test ! f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/ vsvars32.bat" then die "install vc2005express first (this verb will be merged into that onc e it's debugged)" fi # http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339613A46E 6AB4D080D4D4A8C4E download vc2005express download.microsoft.com/download/7/7/3/7737290f98e84 5bf907585cc6ae34bf1/VS80sp1KB926748X86INTL.exe 8b9a0172efad64774aa122f29e09 3ad2043b308d try $WINE "$WINETRICKS_CACHE"/vc2005express/VS80sp1KB926748X86INTL.exe } load_vcdmount() { if test "$WINE" != "" then return fi # Call only on real Windows. # Sets VCD_DIR and ISO_MOUNT_ROOT # The only free mount tool I know for Windows Vista is Virtual CloneDrive, # which can be downloaded at # http://www.slysoft.com/en/virtualclonedrive.html # FIXME: actually install it here # Locate vcdmount.exe. VCD_DIR="Elaborate Bytes/VirtualCloneDrive" if test ! x "$programfilesdir_unix/$VCD_DIR/vcdmount.exe" && test ! x "$pr ogramfilesdir_x86_unix/$VCD_DIR/vcdmount.exe" then warn "Installing Virtual CloneDrive" download . http://static.slysoft.com/SetupVirtualCloneDrive.exe # have to use cmd else vista won't let cygwin run .exe's? chmod +x "$WINETRICKS_CACHE"/SetupVirtualCloneDrive.exe cd "$WINETRICKS_CACHE" cmd /c SetupVirtualCloneDrive.exe cd "$olddir" fi if test x "$programfilesdir_unix/$VCD_DIR/vcdmount.exe" then VCD_DIR="$programfilesdir_unix/$VCD_DIR" elif test x "$programfilesdir_x86_unix/$VCD_DIR/vcdmount.exe" then VCD_DIR="$programfilesdir_x86_unix/$VCD_DIR" else die "can't find Virtual CloneDrive?" fi # FIXME: Use WMI to locate the drive named # "ELBY CLONEDRIVE..." using WMI as described in # http://delphihaven.wordpress.com/2009/07/05/usingwmitogetadrivefrien dlyname/ # For now, you just have to hardcode it for your system :( warn "You probably need to edit the script to tell it which drive VirtualClo neDrive picked" for letter in e f g h do ISO_MOUNT_ROOT=/cygdrive/$letter test d $ISO_MOUNT_ROOT break done test d $ISO_MOUNT_ROOT && die "cannot find the VirtualCloneDrive" } iso_mount() { my_img="$1" if test "$WINE" = "" then load_vcdmount my_img_win="`$XXXPATH w $my_img tr '\012' ' ' sed 's/ $//'`" cd "$VCD_DIR" try vcdmount.exe /l=$letter "$my_img_win" cd "$olddir" while ! test d "$ISO_MOUNT_ROOT" do echo "Waiting for mount to finish" sleep 1 done else # Linux case "$SUDO" in gksudo) try $SUDO "mkdir p $ISO_MOUNT_ROOT" try $SUDO "mount o ro,loop $my_img $ISO_MOUNT_ROOT" ;; *) try $SUDO mkdir p $ISO_MOUNT_ROOT try $SUDO mount o ro,loop "$my_img" $ISO_MOUNT_ROOT ;; esac fi } iso_umount() { if test "$WINE" = "" then # Windows load_vcdmount cd "$VCD_DIR" vcdmount /u cd "$olddir" else case "$SUDO" in gksudo) $SUDO "umount $ISO_MOUNT_ROOT" try $SUDO "rm rf $ISO_MOUNT_ROOT" ;; *) $SUDO umount $ISO_MOUNT_ROOT try $SUDO rm rf $ISO_MOUNT_ROOT ;; esac fi } # load_vc2005trial() { load_vcrun6 load_dotnet20 load_msxml6 load_vcdmount if test ! x "$programfilesdir_unix/7Zip/7z.exe" then warn "Installing 7zip file archiver for vc2005trial image extraction" load_7zip fi # This is the last file that 7zip extracts. if test ! f "$WINETRICKS_CACHE/vc2005trial/vs/wcu/runmsi.exe" then warn "Downloading/checksumming Visual C++ 2005 Trial. This will take so me time!" download . http://download.microsoft.com/download/6/f/5/6f5f7a0150bb42 2d8742c099c8896969/En_vs_2005_vsts_180_Trial.img f66ae07618d67e693ca0524d35822 08c20e07823 try $WINE "$programfilesdir_win"/7Zip/7z.exe x y o"$WINETRICKS_CACHE_ WIN"/vc2005trial "$WINETRICKS_CACHE_WIN"/En_vs_2005_vsts_180_Trial.img fi verify_sha1sum 15433993ab7573c5154dbea2dcb65450f2adbf5c "$WINETRICKS_CACHE/v c2005trial/vs/wcu/runmsi.exe" # FIXME: do this right rm f /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt if [ $WINETRICKS_QUIET ] then download . "http://winezeug.googlecode.com/svn/trunk/winetricks_files/vc 2005trial.ahk" e22a01c0c6f92dabd3d6d471798357b8c5c01272 download . "http://winezeug.googlecode.com/svn/trunk/appinstall/tools/au tohotkey/autohotkey.exe" 7af551a851da5ccb8a98ba980b6b19ec5892884d try cd "$WINETRICKS_CACHE"/vc2005trial/vs/Setup try $WINE "$WINETRICKS_CACHE_WIN"/autohotkey.exe "$WINETRICKS_CACHE_WIN" /vc2005trial.ahk else try cd "$WINETRICKS_CACHE"/vc2005trial/vs/Setup try $WINE setup.exe # FIXME: unify these and make the windows one right if test "$WINE" = "" then while ! tr d '\000' < "$TEMP"/dd_vsinstall80.txt grep End_Session do sleep 10 echo waiting for setup to finish done else while ps $psargs grep q setup.exe do sleep 10 echo waiting for setup to finish done fi cd "$olddir" fi } # load_vc2005sp1() { if test ! f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/ vsvars32.bat" then die "install vc2005trial first (this verb will be merged into that once it's debugged)" fi # http://www.microsoft.com/downloads/details.aspx?FamilyID=bb4a75abe2d44c9 6b39d37baf6b5b1dc download vc2005sp1 http://download.microsoft.com/download/6/3/c/63c69e5d74c 948eab90530ac3831f288/VS80sp1KB926601X86ENU.exe d4b5c73253a7a4f5b4b389f41b 94fea4a7247b57 # http://www.microsoft.com/downloads/details.aspx?FamilyID=7c8729dc06a2453 8a90dff9464dc0197 download vc2005sp1 http://download.microsoft.com/download/D/2/3/D23F9F623DE E4EC0B3B9D64E9F573D1F/VS80sp1KB971090X86INTL.exe cd "$WINETRICKS_CACHE"/vc2005sp1 try $WINE VS80sp1KB926601X86ENU.exe try $WINE VS80sp1KB971090X86INTL.exe cd "$olddir" } # load_one_hotfix() { kb=$1 downloadid=$2 downloadfile=$3 hotfix=$4 cd "$WINETRICKS_CACHE/vs2005hotfixes" if test ! f $downloadfile then case "$OS" in "Windows_NT") $WINE cygstart "https://connect.microsoft.com/VisualStudio/Downloads/D ownloadDetails.aspx?DownloadID=$downloadid" ;; *) # fails for chrome, see http://crbug.com/32800 xdgopen "https://connect.microsoft.com/VisualStudio/Downloads/Downloa dDetails.aspx?DownloadID=$downloadid" ;; esac fi while test ! f $downloadfile do echo "Waiting for you to save $downloadfile in $WINETRICKS_CACHE_WIN/vs20 05hotfixes" sleep 1 done if test ! f $hotfix then try_unzip o $downloadfile fi try $WINE $hotfix cd "$olddir" } load_vc2005hotfix() { # Loads the hotfixes recommended in http://dev.chromium.org/developers/howt os/buildinstructionswindows#TOCAdditionalfreedownloads warn "This does not work in Wine yet." if test ! f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/ vsvars32.bat" then die "install vc2005trial and vc2005sp1 first" fi mkdir p "$WINETRICKS_CACHE/vs2005hotfixes" case "$OS" in "Windows_NT") $WINE cygstart "$WINETRICKS_CACHE_WIN\\vs2005hotfixes" ;; *) xdgopen "$WINETRICKS_CACHE/vs2005hotfixes" ;; esac load_one_hotfix KB935225 7258 306439_ENU_i386_zip.exe VS80sp1KB935225X86 ENU.exe load_one_hotfix KB947315 11587 341798_ENU_i386_zip.exe VS80sp1KB947315X86 ENU.exe load_one_hotfix KB949009 18623 VS80sp1KB949009X86INTL.exe VS80sp1KB94900 9X86INTL.exe load_one_hotfix KB946310 10644 335739_ENU_i386_zip.exe VS80sp1KB946310X86 ENU.exe # KB971090 is part of the sp1 verb, since it can be downloaded normally } # save_vc2005_tarball() { # Save just the interesting parts of Visual Studio 2005 (edit to taste). # Workaround for vc 2005 sp1 and hotfixes not installing on Wine. # In Windows, do "winetricks vc2005trial vc2005sp1 vc2005hotfix vc2005save", # then reboot to Linux, grab vc8.tgz from the Windows partition, # and do "winetricks vc2005trial vc2005load". tar C "$programfilesdir_x86_unix" \ exclude "Crystal Reports" \ exclude "DIA SDK" \ exclude "EnterpriseFrameworks" \ exclude "Microsoft Visual Studio 2005 Team Suite ENU" \ exclude "ReportViewer" \ exclude "SmartDevices" \ exclude "Team Tools" \ exclude "VB" \ exclude "ce" \ exclude "Visual Studio Tools for Office" \ exclude "Xml" \ exclude "sqlserver" \ czvf vc8.tgz "Microsoft Visual Studio 8" } load_vc2005_tarball() { tar C "$programfilesdir_x86_unix" xzvf vc8.tgz } # load_vc2008trial() { load_vcrun6 load_dotnet20 load_msxml6 load_vcdmount warn "Visual C++ 2008 Trial does not yet work in Wine, and this recipe isn't quite debugged even in windows yet." warn "Downloading/checksumming Visual C++ 2008 Trial. This will take some t ime!" # http://www.microsoft.com/downloads/details.aspx?FamilyID=83c3a1eced724a7 9896125635db0192b download vc2008trial http://download.microsoft.com/download/8/1/d/81d3f35ef a03485b953bff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso dfb601096f6 2fd75af6ad62b277be79793f53b56 iso_umount iso_mount "$WINETRICKS_CACHE"/vc2008trial/VS2008ProEdition90dayTrialENUX1435 622.iso # FIXME: do this right rm f /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt if true then try cd "$ISO_MOUNT_ROOT/Setup" try $WINE setup.exe # FIXME: unify these and make the windows one right if test "$WINE" = "" then while ! tr d '\000' < /cygdrive/c/Users/$USER/AppData/local/temp/dd_v sinstall80.txt grep End_Session do sleep 10 echo waiting for setup to finish done else while ps $psargs grep q setup.exe do sleep 10 echo waiting for setup to finish done fi cd "$olddir" fi iso_umount } # load_vc2008sp1() { echo pfdu is ${programfilesdir_unix} echo setting FOO FOO="${programfilesdir_unix}/Microsoft Visual Studio 9.0/Microsoft Visual St udio 2008 Professional Edition ENU" echo FOO set to $FOO if test ! d "$FOO" then die "install vc2008trial first (this verb will be merged into that once it's debugged)" fi # http://www.microsoft.com/downloads/details.aspx?familyid=FBEE1648710644A 796496D9F6D58056E download vc2008sp1 http://download.microsoft.com/download/f/6/7/f67fdf05058 6413f8231affbe12f80a8/VS90sp1KB945140ENU.exe 91c146dffa96c6d8f9ceb2b5235b04 349cf93ed9 cd "$WINETRICKS_CACHE"/vc2008sp1 try $WINE VS90sp1KB945140ENU.exe cd "$olddir" } # load_vlc() { download . $SOURCEFORGE/vlc/vlc1.1.0win32.exe 501b6cb12d4916ed11ec9dac9e39 4add9227b3be try $WINE "$WINETRICKS_CACHE"/vlc1.1.0win32.exe $WINETRICKS_S } # load_windowscodecs() { download . http://download.microsoft.com/download/f/f/1/ff178bb1da9148ed8 9e5478a99387d4f/wic_x86_enu.exe 53c18652ac2f8a51303deb48a1b7abbdb1db427f # Avoid a file existence check. rm f "$WINDIR"/system32/windowscodecs.dll override_dlls native,builtin windowscodecs # Always run the WIC installer in passive mode. # See http://bugs.winehq.org/show_bug.cgi?id=16876 and # http://bugs.winehq.org/show_bug.cgi?id=23232 try $WINE "$WINETRICKS_CACHE"/wic_x86_enu.exe /passive } # load_wininet() { # This is an updated wininet from IE 5.0.1. # (Good enough for Active Worlds browser. Also helps "Avatar Legends of t he Arena" get to login screen.) # See http://www.microsoft.com/downloads/details.aspx?familyid=6DEE32ABB618 4FB39A45CDD08162E167 download . http://download.microsoft.com/download/ie5/Update/1/WIN98/ENUS/3 725.exe b048e0b4e303298de3317b16f7008c43ca71ddfe try_cabextract directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE/3725.exe" try cp f "$WINETRICKS_TMP"/Wininet.dll "$WINDIR"/system32/wininet.dll override_dlls native,builtin wininet } # load_wme9() { # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02 e496465abba9b2f1182cdf24 download wme9 http://download.microsoft.com/download/8/1/f/81f9402fefdd439 db2a4089563199d47/WMEncoder.exe 7a3f8781f3e5705651992ef0150ee30bc1295116 try $WINE "$WINETRICKS_CACHE"/wme9/WMEncoder.exe $WINETRICKS_QUIET } # load_wmp9() { # Not really expected to work well yet; see # http://appdb.winehq.org/appview.php?versionId=1449 load_wsh57 set_winver win2k # See also http://www.microsoft.com/windows/windowsmedia/player/9series/defa ult.aspx download wmp9 http://download.microsoft.com/download/1/b/c/1bc0b1a3c8394b3 68f3c19847ba09299/MPSetup.exe 580536d10657fa3868de2869a3902d31a0de791b # Have to run twice; see http://bugs.winehq.org/show_bug.cgi?id=1886 try $WINE "$WINETRICKS_CACHE"/wmp9/MPSetup.exe $WINETRICKS_QUIET try $WINE "$WINETRICKS_CACHE"/wmp9/MPSetup.exe $WINETRICKS_QUIET # Also install the codecs # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7dcc9 466bb0c404db144bb601 download . http://download.microsoft.com/download/5/c/2/5c29d82561eb4b168 eb858367d0464d5/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253 try $WINE "$WINETRICKS_CACHE"/WM9Codecs9x.exe $WINETRICKS_QUIET # Disable WMP's services, since they depend on unimplemented stuff, they tri gger the GUI debugger several times try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K " try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2 k" unset_winver } # load_wmp10() { # See http://appdb.winehq.org/appview.php?iVersionId=3212 load_wsh57 # See also http://www.microsoft.com/windows/windowsmedia/player/10 download . http://download.microsoft.com/download/1/2/A/12A31F292FA94F50B 95DE45EF7013F87/MP10Setup.exe 69862273a5d9d97b4a2e5a3bd93898d259e86657 # Crashes on exit, but otherwise ok; see http://bugs.winehq.org/show_bug.cgi ?id=12633 echo Executing $WINE "$WINETRICKS_CACHE"/MP10Setup.exe $WINETRICKS_QUIET try $WINE "$WINETRICKS_CACHE"/MP10Setup.exe $WINETRICKS_QUIET # Also install the codecs # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7dcc9 466bb0c404db144bb601 download . http://download.microsoft.com/download/5/c/2/5c29d82561eb4b168 eb858367d0464d5/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253 set_winver win2k try $WINE "$WINETRICKS_CACHE"/WM9Codecs9x.exe $WINETRICKS_QUIET # Disable WMP's services, since they depend on unimplemented stuff, they tri gger the GUI debugger several times try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K " try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2 k" unset_winver } # load_wenquanyi() { # See http://wenq.org/enindex.cgi # Donate at http://wenq.org/enindex.cgi?Download(en)#MicroHei_Beta if you wa nt to help support free CJK font development download . $SOURCEFORGE/wqy/wqymicrohei0.2.0beta.tar.gz 28023041b22b6368b cfae076de68109b81e77976 cd "$WINETRICKS_TMP/" gunzip dc "$WINETRICKS_CACHE/wqymicrohei0.2.0beta.tar.gz" tar xf try mv wqymicrohei/wqymicrohei.ttc "$winefontsdir" register_font wqymicrohei.ttc "WenQuanYi Micro Hei" cd "$olddir" } # load_wsh57() { # If this is just a dependency check, don't reinstall if test $PACKAGE != wsh56 && test $PACKAGE != wsh57 && test f "$WINDIR"/sys tem32/scrrun.dll then echo "prerequisite wsh57 already installed, skipping" return fi # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=47809025 D896482EA0D6524E7E844D81&displaylang=en download . http://download.microsoft.com/download/4/4/d/44de8a9e630d4c109 f17b9b34d3f6417/scripten.exe b15c6a834b7029e2dfed22127cf905b06857e6f5 try_cabextract d "$WINDIR"/system32 "$WINETRICKS_CACHE"/scripten.exe # Wine doesn't provide the other dll's (yet?) override_dlls native,builtin jscript.dll try $WINE regsvr32 dispex.dll jscript.dll scrobj.dll scrrun.dll vbscript.dll wshcon.dll wshext.dll } # load_wsh56js() { # This installs jscript 5.6 (but not vbscript) # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=16dd21a1 c4ee4eca8b807bd1dfefb4f8&DisplayLang=en download . http://download.microsoft.com/download/b/c/3/bc3a0c36fada497da 3de8b0139766f3b/Windows2000KB91734456x86enu.exe add5f74c5bd4da6cfae47f8306d e213ec6ed52c8 try $WINE "$WINETRICKS_CACHE"/Windows2000KB91734456x86enu.exe $WINETRICK S_QUIET } # load_wsh56vb() { # This installs vbscript 5.6 (but not jscript) # See also http://www.microsoft.com/downloads/details.aspx?familyid=4F728263 83A3464BBCC054E63714BC75 download . http://download.microsoft.com/download/IE60/Patch/Q318089/W9XNT4M e/ENUS/vbs56men.exe 48f14a93db33caff271da0c93f334971f9d7cb22 try $WINE "$WINETRICKS_CACHE"/vbs56men.exe $WINETRICKS_QUIET } # load_xact() { helper_directx_dl ; # xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll extract try_cabextract d "$WINETRICKS_TMP" L F '*_xact_*x86*' "$WINETRICKS_CACHE" /$DIRECTX_NAME try_cabextract d "$WINETRICKS_TMP" L F '*_x3daudio_*x86*' "$WINETRICKS_CA CHE"/$DIRECTX_NAME try_cabextract d "$WINETRICKS_TMP" L F '*_xaudio_*x86*' "$WINETRICKS_CACH E"/$DIRECTX_NAME for x in `ls "$WINETRICKS_TMP"/*.cab` do try_cabextract d "$WINDIR"/system32 L F '*.dll' "$x" done # xactengine?_?.dll, xaudio?_?.dll register for x in `ls "$WINDIR"/system32/xactengine* "$WINDIR"/system32/xaudio*` do try $WINE regsvr32 `basename $x` done } # load_xvid() { # xvid load_vcrun6 download . http://www.koepi.info/Xvid1.2.207062009.exe 435203e7f713c4484ca 4f50f43e847f3dc118962 try $WINE "$WINETRICKS_CACHE"/Xvid1.2.207062009.exe $WINETRICKS_SILENT } # print_version() { echo "$VERSION" } # Main program # On Solaris, choose more modern commands (needed for id u). case `uname s` in SunOS) PATH="/usr/xpg6/bin:/usr/xpg4/bin:$PATH" ;; esac case "$1" in Vversion) echo "Winetricks version $VERSION. (C) 20072010 Dan Kegel et al. LGPL." exit 0 ;; esac detect_menu detect_sudo GUI=0 case x"$1" in x) GUI=1 ;; xhxhelpxhelp) usage ; exit 1 ;; esac case "$OS" in "Windows_NT") ;; *) # Prevent running with wrong user id. # It's bad to create files as the wrong user! die_if_user_not_dirowner "$WINEPREFIX" #die_if_user_not_dirowner "$WINETRICKS_CACHE" if [ ! x "`which "$WINE" 2>/dev/null`" ] then die "Cannot find wine ($WINE)" fi # Create wineprefix if not already there test d "$WINEPREFIX" WINEDLLOVERRIDES=mshtml= $WINE cmd /c echo yes > /dev /null 2>&1 ;; esac mkdir p "$WINETRICKS_TMP" case $GUI in 1) showmenu ; set $todo ;; esac mkdir p "$WINETRICKS_CACHE" olddir=`pwd` # Clean up after failed runs, if needed rm rf "$WINETRICKS_TMP"/* # The foldername is localized! programfilesdir_win="`unset WINEDEBUG; WINEDLLOVERRIDES=mshtml= $WINE cmd.exe /c echo "%ProgramFiles%" tr d '\015'`" test x"$programfilesdir_win" != x die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string" programfilesdir_unix="`unset WINEDEBUG; $XXXPATH u "$programfilesdir_win" tr d '\015' `" test x"$programfilesdir_unix" != x die "winepath u $programfilesdir_win retu rned empty string" winetricks_tmp_win="`$XXXPATH w "$WINETRICKS_TMP"`" # 64 bit windows has a second directory for program files programfilesdir_x86_win="${programfilesdir_win} (x86)" programfilesdir_x86_unix="${programfilesdir_unix} (x86)" if ! test d "$programfilesdir_x86_unix" then programfilesdir_x86_win="${programfilesdir_win}" programfilesdir_x86_unix="${programfilesdir_unix}" fi # (Fixme: get fonts path from SHGetFolderPath # See also http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx) # # Did the user rename Fonts to fonts? if test ! d "$WINDIR"/Fonts && test d "$WINDIR"/fonts then winefontsdir="$WINDIR"/fonts else winefontsdir="$WINDIR"/Fonts fi mkdir p "${winefontsdir}" # Mac folks tend to not have sha1sum, but we can make do with openssl if [ x "`which sha1sum 2>/dev/null`" ] then SHA1SUM="sha1sum" elif [ x "`which openssl 2>/dev/null`" ] then SHA1SUM="openssl dgst sha1" else die "No sha1sum utility available." fi while test "$1" != "" do PACKAGE=$1 case $1 in q) WINETRICKS_QUIET="/q" WINETRICKS_QUIET_T="/qt" # Microsoft Control Pad WINETRICKS_UNIXQUIET="q" WINETRICKS_SILENT="/silent" WINETRICKS_UNIXSILENT="silent" WINETRICKS_S="/S" # for NSIS installers WINEDEBUG=${WINEDEBUG:"fixmeall"} export WINEDEBUG ;; v) set x;; 7zip7zip) load_7zip;; adobeair) load_adobeair;; art2kminart2k7min) load_art2kmin;; atmlib) load_atmlib;; autohotkeyahk) load_autohotkey;; cmake) load_cmake;; comctl32.ocx) load_comctl32ocx;; comctl32cc580) load_cc580;; comdlg32.ocx) load_comdlg32ocx;; colorprofile) load_colorprofile;; controlpadfm20) load_controlpad;; corefonts) load_corefonts;; cygwin) load_cygwin;; d3dx9) load_d3dx9;; d3dx9_28) load_d3dx9_xx 28;; d3dx9_36) load_d3dx9_xx 36;; d3dx10) load_d3dx10;; d3dxof) load_d3dxof;; dcom98) load_dcom98;; dinput8) load_dinput8;; dirac) load_dirac;; directmusic) load_directmusic;; directplaydxplaydplay) load_directplay;; directx9) DIRECTX_WINDOWS=win2k ; load_directx9;; directx9beta) DIRECTX_WINDOWS=winxp ; load_directx9 ; load_directmusic ; lo ad_directplay ;; divx) load_divx;; dotnet1dotnet11) load_dotnet11; load_fontfix;; dotnet11sdk) load_dotnet11sdk;; dotnet2dotnet20) load_dotnet20;; dotnet20sdk) load_dotnet20sdk;; dotnet20sp2) load_dotnet20sp2; load_fontfix;; dotnet3dotnet30) load_dotnet30; load_fontfix;; dotnet35) load_dotnet35; load_fontfix;; droid) load_droid;; dxsdk_nov2006) load_dxsdk_nov2006;; eadm) load_eadm;; eufonts) load_eufonts;; ffdshow) load_ffdshow;; firefoxfirefox3) load_firefox;; flash) load_flash;; fontfix) load_fontfix;; fontsmoothbgrfsbgr) load_fs_bgr;; fontsmoothdisablefsdisable) load_fs_disable;; fontsmoothgrayfontsmoothgrayscalefontsmoothenablefsenable) load_fs_gr ayscale;; fontsmoothrgbfsrgbfscleartype) load_fs_rgb;; gdiplus) load_gdiplus;; gecko) load_gecko;; geckodbggeckodbggecko_dbggeckodebuggecko_debuggeckodebug) load_gecko_ dbg;; gfwxlive) load_gfw;; glsldisable) load_glsl_disable;; glslenable) load_glsl_enable;; glut) load_glut;; hosts) load_hosts;; ie6) load_ie6;; ie7) load_ie7;; ie8) load_ie8;; jet40) load_jet40;; kde) load_kde;; liberation) load_liberation;; lucida) load_lucida;; mdac25) load_mdac25;; mdac26mdac27) load_mdac27;; mdac28) load_mdac28;; mfc40) load_mfc40;; mingwmingwminmingw_min) load_mingw_min;; mingwgdbmingw_gdb) load_mingw_gdb;; mono26) load_mono26;; mozillabuild) load_mozillabuild;; mpc) load_mpc;; msi2) load_msi2;; mshflxgd) load_mshflxgd;; msls31) load_msls31;; msmask) load_msmask;; mspaintpaint) load_mspaint;; msscript) load_msscript;; msxml3) load_msxml3;; msxml4) load_msxml4;; msxml6) load_msxml6;; ogg) load_ogg;; ole2) load_ole2;; openwatcomwatcom) load_openwatcom;; pdh) load_pdh;; physx) load_physx;; psdk2003) load_psdk2003;; psdkvista) load_psdkvista;; psdkwin7) load_psdkwin7;; pythonpython26) load_python26;; pythoncomtypespythoncompythoncompythoncomtypes) load_python_comtypes;; quartz) load_quartz;; quicktime72) load_quicktime72;; riched20) load_riched20;; riched30) load_riched30;; richtx32) load_richtx32;; safari) load_safari;; secur32) load_secur32;; shockwave) load_shockwave;; steam) load_steam;; tahoma) load_tahoma;; urlmon) load_urlmon;; usp10) load_usp10;; utorrent) load_utorrent;; vbrun200vb2run) load_vb2run;; vbrun300vb3run) load_vb3run;; vbrun400vb4run) load_vb4run;; vbrun500vbvm50vb5run) load_vbvm50;; vbrun600vbrun60vb6run) load_vbrun60;; vc2003toolkit) load_vc2003toolkit;; vc2005express) load_vc2005express;; vc2005expresssp1) load_vc2005expresssp1;; vc2005hotfix) load_vc2005hotfix;; vc2005load) load_vc2005_tarball;; vc2005save) save_vc2005_tarball;; vc2005sp1) load_vc2005sp1;; vc2008sp1) load_vc2008sp1;; vc2005trial) load_vc2005trial;; vc2008trial) load_vc2008trial;; vcrun600vcrun60vcrun6mfc42) load_vcrun6;; vcrun60sp6vcrun6sp6) load_vcrun6sp6;; vcrun2003) load_vcrun2003;; vcrun2005vcrun2005sp1) load_vcrun2005;; vcrun2008vcrun2008sp1) load_vcrun2008;; vcrun2010) load_vcrun2010;; vjrun20) load_vjrun20;; vlc) load_vlc;; wenquanyi) load_wenquanyi;; windowscodecswic) load_windowscodecs;; wininet) load_wininet;; wme9) load_wme9;; wmp9) load_wmp9;; wmp10) load_wmp10;; wsh56wsh57) load_wsh57;; jscriptwsh56js) load_wsh56js;; wsh56vb) load_wsh56vb;; xactxactenginex3daudioxapofx) load_xact;; xvid) load_xvid;; allcodecsallvcodecs) load_vcrun6; load_ffdshow; load_xvid;; allfonts) load_corefonts; load_droid; load_eufonts; load_liberation; load_lu cida; load_tahoma; load_wenquanyi;; alldlls=builtin) override_all_dlls;; alldlls=default) override_no_dlls;; ddr=gdi) set_ddr gdi;; ddr=opengl) set_ddr opengl;; dsoundbug9612) load_dsoundbug9612;; forcemonoforce_mono) load_forcemono;; heapcheck) set_heapcheck;; mmdevapi=builtin) set_mmdevapi builtin ;; mmdevapi=native) set_mmdevapi native ;; mmdevapi=disabled) set_mmdevapi disabled ;; multisampling=enabledmultisampling=on) set_multisampling enabled;; multisampling=disabledmultisampling=off) set_multisampling disabled;; native_mdac) set_native_mdac;; native_oleaut32) override_dlls native,builtin oleaut32;; nocrashdialog) disable_crashdialog;; orm=backbufferbackbuffer) set_orm backbuffer;; orm=fbofbo) set_orm fbo;; orm=pbufferpbuffer) set_orm pbuffer;; rtlm=auto) set_rtlm auto;; rtlm=disabled) set_rtlm disabled;; rtlm=readdraw) set_rtlm readdraw;; rtlm=readtex) set_rtlm readtex;; rtlm=texdraw) set_rtlm texdraw;; rtlm=textex) set_rtlm textex;; sandbox) sandbox;; sound=alsaalsa) set_sound_driver alsa;; sound=audioioaudioio) set_sound_driver audioio;; sound=coreaudiocoreaudio) set_sound_driver coreaudio;; sound=esoundsound=esdesdesound) set_sound_driver esd;; sound=jackjack) set_sound_driver jack;; sound=nasnas) set_sound_driver nas;; sound=ossoss) set_sound_driver oss;; sound=disabledsound=) set_sound_driver "";; strictdrawordering=enabled) set_sdo enabled;; strictdrawordering=disabled) set_sdo disabled;; version) print_version;; videomemorysize=512) set_videomemorysize 512;; videomemorysize=1024) set_videomemorysize 1024;; videomemorysize=default) set_videomemorysize default;; volnum) volnum;; mwo=force)set_mwo force;; mwo=disablemwo=disabled) set_mwo disable;; mwo=enabled) set_mwo enabled;; npmrepack) npm_repack;; psm=on) set_psm enabled;; psm=off) set_psm disabled;; vsmhard) set_vsm hardware;; winver=nt40nt40) set_winver nt40;; winver=win98win98) set_winver win98;; winver=win2kwin2k) set_winver win2k;; winver=win7win7) set_winver win7;; winver=winxpwinxp) set_winver winxp;; winver=vistavista) set_winver vista;; winver=) unset_winver;; *=disabled) arg=`echo $PACKAGE sed 's/=.*//'`; override_dlls disabled $arg ;; *) echo Unknown arg $1; usage ; exit 1;; esac # Provide a bit of feedback test "$WINETRICKS_QUIET" = "" && case $1 in q) echo Setting quiet mode;; v) echo Setting verbose mode;; *) echo "Install of $1 done" ;; esac shift # cleanup rm rf "$WINETRICKS_TMP"/* done # remove the temp directory rm rf "$WINETRICKS_TMP" test "$WINETRICKS_CACHE_SYMLINK" && rm f "$WINETRICKS_CACHE_SYMLINK" test "$WINETRICKS_QUIET" = "" && echo winetricks done. true