
#!/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 ([email protected]) # 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 directplay 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 sourceforge 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 fonts." 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 Arial, Courier, 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 Windows 98 license, but does not check for one" echo " dinput8 MS dinput8.dll (from DirectX 9 user redistributable)" echo " dirac the Dirac directshow filter" echo " directmusic 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 Droid fonts (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 font 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 Internet Explorer 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 Windows installer" echo " liberation Red Hat Liberation fonts (Sans, Serif, Mono)" echo " lucida 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 Windows 7 SDK (installing just headers and c++ compi ler works)" echo "
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages82 Page
-
File Size-