Professional Documents
Culture Documents
/bin/sh
# Name of this version of winetricks (YYYYMMDD)
# (This doesn't change often, use the sha1sum of the file when reporting problem
s)
WINETRICKS_VERSION=20140302
#
#
#
#
#-------------------------------------------------------------------#
# Winetricks is a package manager for win32 dlls and applications on posix.
# Features:
# - Consists of a single shell script - no installation required
# - Downloads packages automatically from original trusted sources
# - Points out and works around known wine bugs automatically
# - Both commandline and GUI operation
# - Can install many packages in silent (unattended) mode
# - Multiplatform; written for Linux, but supports MacOSX and Cygwin, too
#
# Uses the following non-Posix system tools:
# - wine is used to execute win32 apps except on cygwin.
# - cabextract, unrar, unzip, and 7z are needed by some verbs.
# - aria2c, wget, or curl is needed for downloading.
# - sha1sum or openssl is needed for verifying downloads.
# - zenity is needed by the GUI, though it can limp along somewhat with kdialog.
# - xdg-open (if present) or open (for Mac OSX) is used to open download pages
# for the user when downloads cannot be fully automated.
# - sudo is used to mount .iso images if the user cached them with -k option.
# - perl is used to munge steam config files
# On ubuntu, the following lines can be used to install all the prereqs:
#
sudo add-apt-repository ppa:ubuntu-wine/ppa
#
sudo apt-get update
#
sudo apt-get install cabextract p7zip unrar unzip wget wine1.3 zenity
#
# See http://winetricks.org for documentation and tutorials, including
# how to contribute changes to winetricks.
#
#-------------------------------------------------------------------#
# Copyright
# Copyright (C) 2007-2014 Dan Kegel <dank!kegel.com>
# Copyright (C) 2008-2014 Austin English <austinenglish!gmail.com>
# Copyright (C) 2010-2011 Phil Blankenship <phillip.e.blankenship!gmail.com>
# Copyright (C) 2010-2012 Shannon VanWagner <shannon.vanwagner!gmail.com>
# Copyright (C) 2010 Belhorma Bendebiche <amro256!gmail.com>
# Copyright (C) 2010 Eleazar Galano <eg.galano!gmail.com>
# Copyright (C) 2010 Travis Athougies <iammisc!gmail.com>
# Copyright (C) 2010 Andrew Nguyen
# Copyright (C) 2010 Detlef Riekenberg
# Copyright (C) 2010 Maarten Lankhorst
# Copyright (C) 2010 Rico Schller
# Copyright (C) 2011 Scott Jackson <sjackson2!gmx.com>
# Copyright (C) 2011 Trevor Johnson
# Copyright (C) 2011 Franco Junio
# Copyright (C) 2011 Craig Sanders
# Copyright (C) 2011 Matthew Bauer <mjbauer95>
unset _W_timeout
unset _W_timeout
exit 1
# Kill all instances of a process in a safe way (Solaris killall kills _everythi
ng_)
w_killall()
{
kill -s KILL `pgrep $1`
}
# Execute with error checking
# Put this in front of any command that might fail
w_try()
{
# "VAR=foo w_try cmd" fails to put VAR in the environment
# with some versions of bash if w_try is a shell function?!
# This is a problem when trying to pass environment variables to e.g. wine.
# Adding an explicit export here works around it, so add any we use.
export WINEDLLOVERRIDES
printf '%s\n' "Executing $*"
w_try_regedit()
{
# on windows, doesn't work without cmd /c
case "$OS" in
"Windows_NT") cmdc="cmd /c";;
*) unset cmdc ;;
esac
}
w_try_regsvr()
{
w_try "$WINE" regsvr32 $W_UNATTENDED_SLASH_S $@
}
w_try_cabextract()
{
# Not always installed, but shouldn't be fatal unless it's being used
if test ! -x "`which cabextract 2>/dev/null`"
then
w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get in
stall cabextract' or 'sudo yum install cabextract')."
fi
}
w_try_unrar()
{
# Not always installed, but shouldn't be fatal unless it's being used
if test ! -x "`which unrar 2>/dev/null`"
then
w_die "Cannot find unrar. Please install it (e.g. 'sudo apt-get install
unrar' or 'sudo yum install unrar')."
fi
}
w_try_unzip()
{
# Not always installed, but shouldn't be fatal unless it's being used
if test ! -x "`which unzip 2>/dev/null`"
then
w_die "Cannot find unzip. Please install it (e.g. 'sudo apt-get install
unzip' or 'sudo yum install unzip')."
fi
}
w_try_7z()
{
# Not always installed, but shouldn't be fatal unless it's being used
if test ! -x "`which 7z 2>/dev/null`"
then
w_die "Cannot find 7z. Please install it (e.g. 'sudo apt-get install p7
zip-full' or 'sudo yum install p7zip p7zip-plugins')."
fi
}
w_try 7z "$@"
w_read_key()
{
if test ! "$W_OPT_UNATTENDED"
then
W_KEY=dummy_to_make_autohotkey_happy
return 0
fi
mkdir -p "$W_CACHE/$W_PACKAGE"
"
fi
W_RAW_KEY=`cat "$_W_keyfile"`
W_KEY=`echo $W_RAW_KEY | tr -d '[:blank:][=-=]'`
unset _W_keyfile _W_keymsg _W_nokeymsg
}
#
#
#
#
#
#
#
winetricks_parse_wget_progress()
{
# Parse a percentage, a size, and a time into $1, $2 and $3
# then use them to create the output line.
perl -p -e \
then
_W_file=`basename "$_W_url"`
fi
_W_cache="$W_CACHE/$_W_packagename"
if test ! -d "$_W_cache"
then
w_try mkdir -p "$_W_cache"
fi
# Try download twice
checksum_ok=""
tries=0
while test $tries -lt 2
do
tries=`expr $tries + 1`
if test -s "$_W_cache/$_W_file"
then
if test "$3"
then
if test $tries = 1
then
# The cache was full. If the file is larger than 500MB,
# don't checksum it, that just annoys the user.
if test `du -k "$_W_cache/$_W_file" | cut -f1` -gt 500000
then
checksum_ok=1
break
fi
fi
# If checksum matches, declare success and exit loop
gotsum=`$WINETRICKS_SHA1SUM < "$_W_cache/$_W_file" | sed 's/(std
in)= //;s/ .*//'`
if [ "$gotsum"x = "$3"x ]
then
checksum_ok=1
break
fi
if test ! "$WINETRICKS_CONTINUE_DOWNLOAD"
then
w_warn "Checksum for $_W_cache/$_W_file did not match, retry
ing download"
mv -f "$_W_cache/$_W_file" "$_W_cache/$_W_file".bak
fi
else
# file exists, no checksum known, declare success and exit loop
break
fi
elif test -f "$_W_cache/$_W_file"
then
# zero length file, just delete before retrying
rm "$_W_cache/$_W_file"
fi
_W_dl_olddir=`pwd`
cd "$_W_cache"
# Mac folks tend to have curl rather than wget
# On Mac, 'which' doesn't return good exit status
# Need to jam in --header "Accept-Encoding: gzip,deflate" else
curl)"
ile";;
esac
done
w_download_torrent()
{
# FIXME: figure out how to extract the filename from the .torrent file
# so callers don't need to check if the files are already downloaded.
w_call utorrent
UT_WINPATH="$W_CACHE_WIN\\$W_PACKAGE"
cd "$W_CACHE/$W_PACKAGE"
if [ "$2"x != ""x ] # foo.torrent parameter supplied
then
w_try "$WINE" utorrent "/DIRECTORY" "$UT_WINPATH" "$UT_WINPATH\\$2" &
else # grab all torrents
for torrent in `ls *.torrent`
do
w_try "$WINE" utorrent "/DIRECTORY" "$UT_WINPATH" "$UT_WINPATH\\$tor
rent" &
done
fi
# Start uTorrent, have it wait until all downloads are finished
w_ahk_do "
SetTitleMatchMode, 2
winwait, Torrent
Loop
{
sleep 6000
ifwinexist, Torrent, default
{
;should uTorrent be the default torrent app?
controlclick, Button1, Torrent, default ; yes
continue
}
ifwinexist, Torrent, already
{
;torrent already registered, fine
controlclick, Button1, Torrent, default ; yes
continue
}
ifwinexist, Torrent, Bandwidth
{
;Cancels bandwidth test on first run of uTorrent
controlclick, Button5, Torrent, Bandwidth
continue
}
ifwinexist, Torrent, version
{
;Decline upgrade to newer version
controlclick, Button3, Torrent, version
controlclick, Button2, Torrent, version
continue
}
break
}
;Sets parameter to close uTorrent once all downloads are complete
winactivate, Torrent 2.0
send !o
send a{Down}{Enter}
winwaitclose, Torrent 2.0
"
w_download_manual_to()
{
_W_packagename="$1"
_W_url="$2"
_W_file="$3"
_W_sha1sum="$4"
case "$media" in
"download")
w_info "FAIL: bug: media type is download, but w_download_manual was cal
led. Programmer, please change verb's media type to manual_download."
;;
esac
case $LANG in
da*) _W_dlmsg="Hent venligst filen $_W_file fra $_W_url og placr den i $W_CAC
HE/$_W_packagename, k r derefter dette skript.";;
de*) _W_dlmsg="Bitte laden Sie $_W_file von $_W_url runter, stellen Sie's in
$W_CACHE/$_W_packagename, dann wiederholen Sie diesen Kommando.";;
pl*) _W_dlmsg="Prosz pobra plik $_W_file z $_W_url, nastpnie umieci go w $W_CACHE
/$_W_packagename, a na kocu uruchomi ponownie ten skrytp.";;
uk*) _W_dlmsg=" , $_W_file $_W_url, $W_CACHE/$_W_packag
*) _W_dlmsg="Please download $_W_file from $_W_url, place it in $W_CACHE/$_W
_packagename, then re-run this script.";;
esac
if ! test -f "$W_CACHE/$_W_packagename/$_W_file"
then
mkdir -p "$W_CACHE/$_W_packagename"
w_open_folder "$W_CACHE/$_W_packagename"
w_open_webpage "$_W_url"
sleep 3 # give some time for browser to open
w_die "$_W_dlmsg"
# FIXME: wait in loop until file is finished?
fi
# FIXME: verify $sha1sum of $file
unset _W_url _W_file _W_sha1sum _W_dlmsg
w_download_manual()
{
w_download_manual_to $W_PACKAGE "$@"
}
# Turn off news, overlays, and friend interaction in steam
# Run from inside c:\Program Files\Steam
w_steam_safemode()
{
cat > "$W_TMP/steamconfig.pl" <<"_EOF_"
#!/usr/bin/perl
# Parse steam's localconfig.vcf, add settings to it, and write it out again
# The file is a recursive dictionary
#
# FILE :== CONTAINER
#
# VALUE :== "name" "value" NEWLINE
#
# CONTAINER :== "name" NEWLINE "{" NEWLINE ( VALUE | CONTAINER ) * "}" NEWLINE
#
# We load it into a recursive hash.
use strict;
use warnings;
sub read_into_container{
my( $pcontainer ) = @_;
sub dump_container{
my( $pcontainer, $indent ) = @_;
foreach (sort(keys(%{$pcontainer}))) {
my( $val ) = ${$pcontainer}{$_};
if (ref $val eq 'HASH') {
print "${indent}\"$_\"\n";
print "${indent}{\n";
dump_container($val, "$indent\t");
print "${indent}}\n";
} else {
print "${indent}\"${_}\"\t\t\"$val\"\n";
}
}
}
# Disable anything unsafe or annoying
sub disable_notifications{
my( $pcontainer ) = @_;
${$pcontainer}{"friends"}{"PersonaStateDesired"} = "1";
${$pcontainer}{"friends"}{"Notifications_ShowIngame"} = "0";
${$pcontainer}{"friends"}{"Sounds_PlayIngame"} = "0";
${$pcontainer}{"friends"}{"Notifications_ShowOnline"} = "0";
${$pcontainer}{"friends"}{"Sounds_PlayOnline"} = "0";
${$pcontainer}{"friends"}{"Notifications_ShowMessage"} = "0";
${$pcontainer}{"friends"}{"Sounds_PlayMessage"} = "0";
${$pcontainer}{"friends"}{"AutoSignIntoFriends"} = "0";
${$pcontainer}{"News"}{"NotifyAvailableGames"} = "0";
${$pcontainer}{"system"}{"EnableGameOverlay"} = "0";
}
# Read the file
my(%top);
open FILE, $ARGV[0] || w_die "can't open ".$ARGV[0];
my($line);
$line = <FILE> || w_die "Could not read first line from ".$ARGV[0];
$line =~ /"UserLocalConfigStore"/ || w_die "this is not a localconfig.vdf file";
read_into_container(\%top);
# Modify it
disable_notifications(\%top);
# Write modified file
print "\"UserLocalConfigStore\"\n";
print "{\n";
dump_container(\%top, "\t");
print "}\n";
_EOF_
for file in userdata/*/config/localconfig.vdf
do
cp "$file" "$file.old"
perl "$W_TMP"/steamconfig.pl "$file.old" > "$file"
done
}
w_question()
{
case $WINETRICKS_GUI in
*zenity) $WINETRICKS_GUI --entry --text "$1" ;;
*kdialog) $WINETRICKS_GUI --inputbox "$1" ;;
*xmessage) w_die "sorry, can't ask question with xmessage" ;;
none) echo -n "$1" >&2 ; read W_ANSWER ; echo $W_ANSWER; unset W_ANSWER;;
esac
}
# Reads steam username and password from environment, cache, or user
# If had to ask user, cache answer.
w_steam_getid()
{
#TODO: Translate
_W_steamidmsg="Please enter your Steam login ID (not email)"
_W_steampasswordmsg="Please enter your Steam password"
if test ! "$W_STEAM_ID"
then
if test -f "$W_CACHE"/steam_userid.txt
then
W_STEAM_ID=`cat "$W_CACHE"/steam_userid.txt`
else
W_STEAM_ID=`w_question "$_W_steamidmsg"`
echo "$W_STEAM_ID" > "$W_CACHE"/steam_userid.txt
chmod 600 "$W_CACHE"/steam_userid.txt
fi
fi
if test ! "$W_STEAM_PASSWORD"
then
if test -f "$W_CACHE"/steam_password.txt
then
W_STEAM_PASSWORD=`cat "$W_CACHE"/steam_password.txt`
else
W_STEAM_PASSWORD=`w_question "$_W_steampasswordmsg"`
fi
fi
# Usage:
# w_steam_install_game steamidnum windowtitle
w_steam_install_game()
{
_W_steamid=$1
_W_steamtitle="$2"
w_steam_getid
# Install the steam runtime
WINETRICKS_OPT_SHAREDPREFIX=1 w_call steam
ne)
in
onnecting
_PASSWORD
}
; wait for login window to close
winwaitclose
"
if [ "$STEAM_DVD" = "TRUE" ]
then
w_ahk_do "
; Run a fourth time, have it install the app.
run steam.exe -install ${W_ISO_MOUNT_LETTER}:\\
"
else
w_ahk_do "
; Run a fourth time, have it install the app.
run steam.exe -applaunch $_W_steamid
"
fi
w_ahk_do "
winwait Install - $_W_steamtitle
if ( w_opt_unattended > 0 ) {
send {enter}
; next (for 1st of 3 pages of install dialog)
sleep 1000
click 32, 91
; uncheck create menu item?
click 32, 119
; check create desktop icon?
send {enter}
; next (for 2nd of 3 pages of install dialog)
; dismiss any news dialogs, and click 'next' on third page of instal
l dialog
loop
{
sleep 1000
ifwinexist Steam - Updates News
{
winclose
continue
}
ifwinexist Install - $_W_steamtitle
{
winactivate
send {enter}
; next (for 3rd of 3 pages of install dial
og)
}
ifwinnotexist Install - $_W_steamtitle
{
sleep 1000
ifwinnotexist Install - $_W_steamtitle
break
}
}
}
"
if [ "$STEAM_DVD" = "TRUE" ]
then
# Wait for install to finish
while true
do
#
For games which download url doesn't match their game_id
# install_dir
#
If different from game_title
# installer_size_and_sha1
#
exe file SHA1.
winetricks_load_gog()
{
game_id="$1"
game_title="$2"
other_files="$3"
reader_control="$4"
run_command="$5"
download_id="$6"
install_dir="$7"
installer_size_and_sha1="$8"
if [ "$download_id"x = ""x ]
then
download_id="$game_id"
fi
if [ "$install_dir"x = ""x ]
then
install_dir="$game_title"
fi
installer_path="$W_CACHE/$W_PACKAGE"
mkdir -p "$installer_path"
installer="setup_$game_id.exe"
if test "$installer_size_and_sha1"x = ""x
then
files="$installer $other_files"
else
files="$installer,$installer_size_and_sha1 $other_files"
fi
/'`
file_id=0
for file_and_size_and_sha1 in $files
do
case "$file_and_size_and_sha1" in
*,*,*)
sha1sum=`echo $file_and_size_and_sha1 | sed "s/.*,//"`
minsize=`echo $file_and_size_and_sha1 | sed 's/[^,]*,\([^,]*\),.*/\1
file=`echo $file_and_size_and_sha1 | sed 's/,.*//'`
;;
*,*)
*)
sha1sum=""
minsize=`echo $file_and_size_and_sha1 | sed 's/.*,//'`
file=`echo $file_and_size_and_sha1 | sed 's/,.*//'`
;;
sha1sum=""
minsize=1
file=$file_and_size_and_sha1
;;
esac
file_path="$installer_path/$file"
if ! test -s "$file_path" || test `stat -Lc%s "$file_path"` -lt $minsize
then
"
}
#----------------------------------------------------------------
fi
case "$WINETRICKS_OPT_KEEPISOS" in
1)
winetricks_cache_iso "$1"
winetricks_mount_cached_iso
;;
esac
w_umount()
{
if test "$WINE" = ""
then
# Windows
winetricks_load_vcdmount
cd "$VCD_DIR"
w_try vcdmount.exe /u
else
echo "Running $WINETRICKS_SUDO umount $W_ISO_MOUNT_ROOT"
case "$WINETRICKS_SUDO" in
gksudo)
# -l lazy unmount in case executable still running
$WINETRICKS_SUDO "umount -l $W_ISO_MOUNT_ROOT"
w_try $WINETRICKS_SUDO "rm -rf $W_ISO_MOUNT_ROOT"
;;
*)
fi
w_ahk_do()
{
if ! test -f "$W_CACHE/ahk/AutoHotkey.exe"
then
W_BROWSERAGENT=1 \
w_download_to ahk http://www.autohotkey.com/download/AutoHotkey104805.zi
p b3981b13fbc45823131f69d125992d6330212f27
w_try_unzip -d "$W_CACHE/ahk" "$W_CACHE/ahk/AutoHotkey104805.zip" AutoH
otkey.exe AU3_Spy.exe
chmod +x "$W_CACHE/ahk/AutoHotkey.exe"
fi
_W_CR=`printf \\\\r`
cat <<_EOF_ | sed "s/\$/$CR/" > "$W_TMP"/tmp.ahk
w_opt_unattended = ${W_OPT_UNATTENDED:-0}
$@
_EOF_
w_try "$WINE" "$W_CACHE_WIN\\ahk\\AutoHotkey.exe" "$W_TMP_WIN"\\tmp.ahk
unset _W_CR
}
# Function to protect wine-specific sections of code.
# Outputs a message to console explaining what's being skipped.
# Usage:
# if w_skip_windows name-of-operation
# then
#
return
# fi
# ... do something that doesn't make sense on windows ...
w_skip_windows()
{
case "$OS" in
"Windows_NT")
echo "Skipping operation '$1' on Windows"
return 0
;;
esac
return 1
}
w_override_dlls()
{
w_skip_windows w_override_dlls && return
_W_mode=$1
case $_W_mode in
*=*)
w_die "w_override_dlls: unknown mode $_W_mode.
Usage: 'w_override_dlls mode[,mode] dll ...'." ;;
disabled)
_W_mode="" ;;
esac
shift
echo Using $_W_mode override for following DLLs: $@
cat > "$W_TMP"/override-dll.reg <<_EOF_
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\DllOverrides]
_EOF_
while test "$1" != ""
do
case "$1" in
comctl32)
rm -rf "$W_WINDIR_UNIX"/winsxs/manifests/x86_microsoft.windows.common
-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
;;
esac
if [ "$_W_mode" = default ]
then
# To delete a registry key, give an unquoted dash as value
echo "\"*$1\"=-" >> "$W_TMP"/override-dll.reg
else
# Note: if you want to override even DLLs loaded with an absolute
# path, you need to add an asterisk:
echo "\"*$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
#echo "\"$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
fi
shift
done
w_try_regedit "$W_TMP_WIN"\\override-dll.reg
}
unset _W_mode
w_override_no_dlls()
{
w_skip_windows override && return
}
w_override_all_dlls()
{
# Disable all known native Microsoft DLLs in favor of Wine's builtin ones
# Generated with
# find ~/wine-git/dlls -maxdepth 1 -type d -print | sed 's,.*/,,' | sort | f
mt -50 | sed 's/$/ \\/'
w_override_dlls builtin \
acledit aclui activeds actxprxy adsiid advapi32 \
advpack amstream apphelp appwiz.cpl atl atl80 \
authz avicap32 avifil32 avifile.dll16 avrt \
bcrypt browseui cabinet capi2032 cards cfgmgr32 \
clusapi comcat comctl32 comdlg32 commdlg.dll16 \
comm.drv16 compobj.dll16 compstui credui crtdll \
crypt32 cryptdlg cryptdll cryptnet cryptui \
ctapi32 ctl3d32 ctl3d.dll16 ctl3dv2.dll16 d3d10 \
w_override_app_dlls()
{
w_skip_windows w_override_app_dlls && return
_W_app=$1
shift
_W_mode=$1
shift
# Fixme: handle comma-separated list of modes
case $_W_mode in
b|builtin) _W_mode=builtin ;;
n|native) _W_mode=native ;;
default) _W_mode=default ;;
d|disabled)
_W_mode="" ;;
*)
w_die "w_override_app_dlls: unknown mode $_W_mode. (want native, builti
n, default, or disabled)
Usage: 'w_override_app_dlls app mode dll ...'." ;;
esac
]"
echo
(
echo
echo
echo
) > "$W_TMP"/override-dll.reg
if [ "$_W_mode" = default ]
then
# To delete a registry key, give an unquoted dash as value
echo "\"*$1\"=-" >> "$W_TMP"/override-dll.reg
else
# Note: if you want to override even DLLs loaded with an absolute
# path, you need to add an asterisk:
echo "\"*$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
#echo "\"$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
fi
shift
done
w_try_regedit "$W_TMP_WIN"\\override-dll.reg
rm "$W_TMP"/override-dll.reg
unset _W_app _W_mode
;;
win95)
# This key is only used for win 95/98:
echo "Setting Windows version to $1"
cat > "$W_TMP"/set-winver.reg <<_EOF_
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]
"ProductName"="Microsoft Windows 95"
"SubVersionNumber"=""
"VersionNumber"="4.0.950"
_EOF_
w_try_regedit "$W_TMP_WIN"\\set-winver.reg
return
;;
win98)
# This key is only used for win 95/98:
echo "Setting Windows version to $1"
cat > "$W_TMP"/set-winver.reg <<_EOF_
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]
"ProductName"="Microsoft Windows 98"
"SubVersionNumber"=" A "
"VersionNumber"="4.10.2222"
_EOF_
w_try_regedit "$W_TMP_WIN"\\set-winver.reg
return
;;
nt40)
# Similar to modern version, but sets two extra keys:
echo "Setting Windows version to $1"
cat > "$W_TMP"/set-winver.reg <<_EOF_
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]
"CSDVersion"="Service Pack 6a"
"CurrentBuildNumber"="1381"
"CurrentVersion"="4.0"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions]
"ProductType"="WinNT"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ServiceCurrent]
"OS"="Windows_NT"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]
"CSDVersion"=dword:00000600
_EOF_
w_try_regedit "$W_TMP_WIN"\\set-winver.reg
return
;;
win2k)
csdversion="Service Pack 4"
currentbuildnumber="2195"
currentversion="5.0"
csdversion_hex=dword:00000400
;;
winxp)
csdversion="Service Pack 3"
currentbuildnumber="2600"
currentversion="5.1"
csdversion_hex=dword:00000300
;;
win2k3)
csdversion="Service Pack 2"
currentbuildnumber="3790"
currentversion="5.2"
csdversion_hex=dword:00000200
"$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOption
s" /v ProductType /d "ServerNT" /f
;;
vista)
csdversion="Service Pack 2"
currentbuildnumber="6002"
currentversion="6.0"
csdversion_hex=dword:00000200
"$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOption
s" /v ProductType /d "WinNT" /f
;;
win7)
csdversion="Service Pack 1"
currentbuildnumber="7601"
currentversion="6.1"
csdversion_hex=dword:00000100
"$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOption
s" /v ProductType /d "WinNT" /f
;;
*)
w_die "Invalid Windows version given."
;;
esac
echo "Setting Windows version to $1"
cat > "$W_TMP"/set-winver.reg <<_EOF_
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]
"CSDVersion"="$csdversion"
"CurrentBuildNumber"="$currentbuildnumber"
"CurrentVersion"="$currentversion"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]
"CSDVersion"=$csdversion_hex
_EOF_
w_try_regedit "$W_TMP_WIN"\\set-winver.reg
}
w_unset_winver()
{
w_set_winver winxp
}
w_try_regedit "$W_TMP_WIN"\\set-winver.reg
rm "$W_TMP"/set-winver.reg
unset _W_app
w_wine_version_in $3 $4 $
$6"
w_wine_version_in $3 $4 $
$6"
case $1 in
"$WINETRICKS_BLACKLIST")
echo wine bug $1 workaround blacklisted, skipping
return 1
;;
esac
case $LANG in
da*) w_warn "Arbejder uden om wine-fejl ${1} $_W_msg" ;;
de*) w_warn "Wine-Fehler ${1} wird umgegangen $_W_msg" ;;
pl*) w_warn "Obchodzenie bdu w wine ${1} $_W_msg" ;;
uk*) w_warn " ${1} $_W_msg" ;;
*) w_warn "Working around wine bug ${1} $_W_msg" ;;
esac
winetricks_stats_log_command w_workaround_wine_bug-$1
return 0
_W_category=$2
file="$WINETRICKS_METADATA/$_W_category/$1.vars"
shift
shift
# Echo arguments to file, with double quotes around the values.
# Used to use perl here, but that was too slow on cygwin.
for arg
do
case "$arg" in
installed_exe1=/*)
w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_exe1
, should be a windows path";;
installed_file1=/*)
w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_file
1, should be a windows path";;
media=download_manual)
w_die "bug: verb $_W_md_cmd has media=download_manual, should be man
ual_download" ;;
esac
# Use longest match when stripping value,
# and shortest match when stripping name,
# so descriptions can have embedded equals signs
# FIXME: backslashes get interpreted here. This screws up
# installed_file1 fairly often. Fortunately, we can use forward
# slashes in that variable instead of backslashes.
echo ${arg%%=*}=\"${arg#*=}\"
done > "$file"
echo category='"'$_W_category'"' >> "$file"
# If the problem described above happens, you'd see errors like this:
# /tmp/w.dank.4650/metadata/dlls/comctl32.vars: 6: Syntax error: Unterminate
d quoted string
# so check for lines that aren't properly quoted.
s?"
# Do sanity check unless running on cygwin, where it's way too slow.
case "$OS" in
"Windows_NT")
;;
*)
if grep '[^"]$' "$file"
then
w_die "bug: w_metadata $_W_md_cmd corrupt, might need forward slashe
fi
;;
esac
unset _W_md_cmd
# Function for verbs to register their main executable [or, if name is given,
# other executables]
# Example:
# w_declare_exe "$W_PROGRAMS_X86_WIN\\WorldOfGooDemo" WorldOfGoo.exe [name]
w_declare_exe()
{
_W_dir="$1"
_W_exe="$2"
if test "$3"
then
_W_name="$3"
else
_W_name="$W_PACKAGE"
fi
cat > "$W_DRIVE_C/run-$_W_name.bat" <<__EOF__
${W_PROGRAMS_DRIVE}:
cd "$_W_dir"
$_W_exe %*
__EOF__
unset _W_dir _W_exe _W_name
}
# Call a verb, don't let it affect environment
# Hope that subshell passes through exit status
# Usage: w_do_call foo [bar]
(calls load_foo bar)
# Or: w_do_call foo=bar
(also calls load_foo bar)
# Or: w_do_call foo
(calls load_foo)
w_do_call()
{
(
# Hack..
if test $cmd = vd
then
load_vd $arg
_W_status=$?
test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
return $_W_status
fi
case $1 in
*=*) arg=`echo $1 | sed 's/.*=//'`; cmd=`echo $1 | sed 's/=.*//'`;;
*) cmd=$1; arg=$2 ;;
esac
# Kludge: use Temp instead of temp to avoid \t expansion in w_try
# but use temp in unix path because that's what wine creates, and having
both temp and Temp
# causes confusion (e.g. makes vc2005trial fail)
# FIXME: W_TMP is also set in winetricks_set_wineprefix, can we avoid th
e duplication?
W_TMP="$W_DRIVE_C/windows/temp/_$1"
W_TMP_WIN="C:\\windows\\Temp\\_$1"
test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
mkdir -p "$W_TMP"
# Unset all known used metadata values, in case this is a nested call
unset installed_file1 installed_exe1
if winetricks_metadata_exists $1
then
. "$WINETRICKS_METADATA"/*/$1.vars
elif winetricks_metadata_exists $cmd
then
. "$WINETRICKS_METADATA"/*/$cmd.vars
elif test $cmd = native || test $cmd = disabled || test $cmd = builtin |
| test $cmd = default
then
# ugly special case - can't have metadata for these verbs until we a
llow arbitrary parameters
w_override_dlls $cmd $arg
_W_status=$?
test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
return $_W_status
else
fi
t found"
fi
fi
w_try_regedit "$W_TMP_WIN"\\path.reg
rm -f "$W_TMP"/path.reg
unset _W_NEW_PATH _W_WIN_PATH
}
# Detect which sudo to use
winetricks_detect_sudo()
{
WINETRICKS_SUDO=sudo
if test "$WINETRICKS_GUI" = "none"
then
return
fi
if test x"$DISPLAY" != x""
then
if test -x "`which gksudo 2>/dev/null`"
then
WINETRICKS_SUDO=gksudo
elif test -x "`which kdesudo 2>/dev/null`"
then
WINETRICKS_SUDO=kdesudo
# fall back to the su versions if sudo isn't available (Fedora, etc.):
elif test -x "`which gksu 2>/dev/null`"
then
WINETRICKS_SUDO=gksu
elif test -x "`which kdesu 2>/dev/null`"
then
WINETRICKS_SUDO=kdesu
fi
fi
}
winetricks_get_prefix_var()
{
(
. "$W_PREFIXES_ROOT/$p/wrapper.cfg"
# The cryptic sed is there to turn ' into '\''
eval echo \$ww_$1 | sed "s/'/'\\\''/"
)
}
# Display prefix menu, get which wineprefix the user wants to work with
winetricks_prefixmenu()
{
case $LANG in
uk*) _W_msg_title="Winetricks - wineprefix"
_W_msg_body=' ?'
_W_msg_apps=' '
_W_msg_games=' '
_W_msg_benchmarks=' benchmark'
_W_msg_default=" wineprefix "
_W_msg_unattended0=" "
_W_msg_unattended1=" "
_W_msg_showbroken0=" ( DRM)"
_W_msg_showbroken1=" ( DRM)"
_W_msg_help=" "
;;
*) _W_msg_title="Winetricks - choose a wineprefix"
_W_msg_body='What do you want to do?'
_W_msg_apps='Install an app'
_W_msg_games='Install a game'
_W_msg_benchmarks='Install a benchmark'
_W_msg_default="Select the default wineprefix"
esac
case "$W_OPT_UNATTENDED" in
1) _W_cmd_unattended=attended; _W_msg_unattended="$_W_msg_unattended0" ;;
*) _W_cmd_unattended=unattended; _W_msg_unattended="$_W_msg_unattended1" ;;
esac
case "$W_OPT_SHOWBROKEN" in
1) _W_cmd_showbroken=hidebroken; _W_msg_showbroken="$_W_msg_showbroken0" ;;
*) _W_cmd_showbroken=showbroken; _W_msg_showbroken="$_W_msg_showbroken1" ;;
esac
case $WINETRICKS_GUI in
zenity)
printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--radiolist \
--column '' \
--column '' \
--column '' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
--hide-column 2 \
FALSE help
'$_W_msg_help' \
FALSE apps
'$_W_msg_apps' \
FALSE benchmarks '$_W_msg_benchmarks' \
FALSE games
'$_W_msg_games' \
TRUE main
'$_W_msg_default' \
" \
> "$WINETRICKS_WORKDIR"/zenity.sh
if ls -d $W_PREFIXES_ROOT/*/dosdevices > /dev/null 2>&1
then
for prefix in "$W_PREFIXES_ROOT"/*/dosdevices
do
q="${prefix%%/dosdevices}"
p="${q##*/}"
if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"
then
_W_msg_name="$p (`winetricks_get_prefix_var name`)"
else
_W_msg_name="$p"
fi
printf %s " FALSE prefix='$p' 'Select $_W_msg_name' "
done >> "$WINETRICKS_WORKDIR"/zenity.sh
fi
printf %s " FALSE $_W_cmd_unattended '$_W_msg_unattended'" >> "$WINETRIC
KS_WORKDIR"/zenity.sh
printf %s " FALSE $_W_cmd_showbroken '$_W_msg_showbroken'" >> "$WINETRIC
KS_WORKDIR"/zenity.sh
sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' '
;;
kdialog)
(
printf %s "kdialog \
--geometry 600x400+100+100 \
--title '$_W_msg_title' \
--separate-output \
--radiolist '$_W_msg_body' \
help
'$_W_msg_help'
off \
games
'$_W_msg_games'
off \
benchmarks '$_W_msg_benchmarks' off \
apps
'$_W_msg_apps'
off \
main
'$_W_msg_default'
on "
if ls -d "$W_PREFIXES_ROOT"/*/dosdevices > /dev/null 2>&1
then
for prefix in "$W_PREFIXES_ROOT"/*/dosdevices
do
q="${prefix%%/dosdevices}"
p="${q##*/}"
if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"
then
_W_msg_name="$p (`winetricks_get_prefix_var name`)"
else
_W_msg_name="$p"
fi
printf %s "prefix='$p' 'Select $_W_msg_name' off "
done
fi
) > "$WINETRICKS_WORKDIR"/kdialog.sh
sh "$WINETRICKS_WORKDIR"/kdialog.sh
;;
esac
unset _W_msg_help _W_msg_body _W_msg_title _W_msg_new _W_msg_default _W_msg_
name
}
FIX"
A"
;;
pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\""
_W_msg_body='What would you like to do to this wineprefix?'
_W_msg_dlls="Zainstaluj Windowsow bibliotek DLL lub komponent"
_W_msg_fonts='Zainstaluj czcionk'
_W_msg_settings='Zmie ustawienia'
_W_msg_winecfg='Uruchom winecfg'
_W_msg_regedit='Uruchom regedit'
_W_msg_taskmgr='Uruchom taskmgr'
_W_msg_shell='Uruchom powok wiersza polece (dla debugowania)'
_W_msg_folder='Przegldaj pliki'
_W_msg_annihilate="Usu WSZYSTKIE DANE I APLIKACJE WEWNTRZ TEGO WINEPREFIX
;;
uk*) _W_msg_title="Winetricks - prefix \"$WINEPREFIX\""
_W_msg_body=' wineprefix?'
_W_msg_dlls=" Windows DLL ()"
_W_msg_fonts=' '
_W_msg_settings=' '
_W_msg_winecfg=' winecfg'
_W_msg_regedit=' regedit'
_W_msg_taskmgr=' taskmgr'
_W_msg_shell=' ( )'
_W_msg_folder=' '
_W_msg_annihilate=" WINEPREFIX"
;;
*) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\""
_W_msg_body='What would you like to do to this wineprefix?'
_W_msg_dlls="Install a Windows DLL or component"
_W_msg_fonts='Install a font'
_W_msg_settings='Change settings'
_W_msg_winecfg='Run winecfg'
_W_msg_regedit='Run regedit'
_W_msg_taskmgr='Run taskmgr'
_W_msg_shell='Run a commandline shell (for debugging)'
_W_msg_folder='Browse files'
_W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPRE
FIX"
esac
;;
case $WINETRICKS_GUI in
zenity)
(
printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--radiolist \
--column '' \
--column '' \
--column '' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
--hide-column 2 \
FALSE dlls
'$_W_msg_dlls' \
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
fonts
settings
winecfg
regedit
taskmgr
shell
folder
annihilate
'$_W_msg_fonts' \
'$_W_msg_settings' \
'$_W_msg_winecfg' \
'$_W_msg_regedit' \
'$_W_msg_taskmgr' \
'$_W_msg_shell' \
'$_W_msg_folder' \
'$_W_msg_annihilate' \
"
) > "$WINETRICKS_WORKDIR"/zenity.sh
sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' '
;;
kdialog)
$WINETRICKS_GUI --geometry 600x400+100+100 \
--title "$_W_msg_title" \
--separate-output \
--radiolist \
"$_W_msg_body"\
dlls
"$_W_msg_dlls" off \
fonts
"$_W_msg_fonts" off \
settings "$_W_msg_settings" off \
winecfg
"$_W_msg_winecfg" off \
regedit
"$_W_msg_regedit" off \
taskmgr
"$_W_msg_taskmgr" off \
shell
"$_W_msg_shell" off \
folder
"$_W_msg_folder" off \
annihilate "$_W_msg_annihilate" off \
$_W_cmd_unattended "$_W_msg_unattended" off \
;;
esac
unset _W_msg_body _W_msg_title _W_msg_apps _W_msg_benchmarks _W_msg_dlls _W_
msg_games _W_msg_settings
}
winetricks_settings_menu()
{
case $LANG in
*) _W_msg_title="Winetricks - prefix \"$WINEPREFIX\""
_W_msg_body=' ?'
;;
esac
case $WINETRICKS_GUI in
zenity)
case $LANG in
da*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Pakke \
--column Navn \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
de*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Paket \
--column Name \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
pl*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Ustawienie \
--column Nazwa \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
uk*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column \
--column \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Setting \
--column Title \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
esac > "$WINETRICKS_WORKDIR"/zenity.sh
for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars
do
code=`winetricks_metadata_basename "$metadatafile"`
(
title='?'
author='?'
. "$metadatafile"
# Begin 'title' strings localization code
case $LANG in
uk*) case "$title_uk" in
"") ;;
*) title="$title_uk";;
esac
esac
# End of code
printf "%s %s %s %s" " " FALSE \
$code \
"\"$title\""
)
done >> "$WINETRICKS_WORKDIR"/zenity.sh
sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' '
;;
kdialog)
(
printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' -separate-output --checklist '$_W_msg_body' "
winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr
'\012' ' '
) > "$WINETRICKS_WORKDIR"/kdialog.sh
sh "$WINETRICKS_WORKDIR"/kdialog.sh
;;
esac
}
--list \
--checklist \
--column '' \
--column Pakke \
--column Navn \
--column Udgiver \
--column r \
--column Medie \
--column Status \
--column 'Size (MB)' \
--column 'Time (sec)' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
de*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Paket \
--column Name \
--column Herausgeber \
--column Jahr \
--column Media \
--column Status \
--column 'Gre (MB)' \
--column 'Zeit (sec)' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
pl*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Paczka \
--column Nazwa \
--column Wydawca \
--column Rok \
--column Media \
--column Status \
--column 'Rozmiar (MB)' \
--column 'Czas (sek)' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
uk*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column \
--column \
--column \
--column \
--column \
--column \
--column ' ()' \
--column ' ()' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
*) printf %s "zenity \
--title '$_W_msg_title' \
--text '$_W_msg_body' \
--list \
--checklist \
--column '' \
--column Package \
--column Title \
--column Publisher \
--column Year \
--column Media \
--column Status \
--column 'Size (MB)' \
--column 'Time (sec)' \
--height $WINETRICKS_MENU_HEIGHT \
--width $WINETRICKS_MENU_WIDTH \
"
;;
esac > "$WINETRICKS_WORKDIR"/zenity.sh
> "$WINETRICKS_WORKDIR"/installed.txt
for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars
do
code=`winetricks_metadata_basename "$metadatafile"`
(
title='?'
author='?'
. "$metadatafile"
if test "$W_OPT_SHOWBROKEN" = 1 || test "$wine_showstoppers" = ""
then
# Compute cached and downloadable flags
flags=""
winetricks_is_cached $code && flags="$_W_cached"
installed=FALSE
if winetricks_is_installed $code
then
installed=TRUE
echo $code >> "$WINETRICKS_WORKDIR"/installed.txt
fi
printf %s " $installed \
$code \
\"$title\" \
\"$publisher\" \
\"$year\" \
\"$media\" \
\"$flags\" \
\"$size_MB\" \
\"$time_sec\" \
"
fi
)
unset _W_path
return 1
done
)
unset _W_metadatafile
$LANG in
_W_cached="cached" ; _W_download="kan hentes"
;;
_W_cached="gecached" ; _W_download="herunterladbar";;
_W_cached="zarchiwizowane" ; _W_download="do pobrania" ;;
_W_cached="" ; _W_download="" ;;
_W_cached="cached" ; _W_download="downloadable" ;;
"$flags"
fi
)
done
unset _W_cached _W_metadatafile
# Abort if user doesn't own the given directory (or its parent, if it doesn't ex
ist yet)
winetricks_die_if_user_not_dirowner()
{
if test -d "$1"
then
_W_checkdir="$1"
else
# fixme: quoting problem?
_W_checkdir=`dirname "$1"`
fi
_W_nuser=`id -u`
_W_nowner=`ls -l -n -d -L "$_W_checkdir" | awk '{print $3}'`
if test x$_W_nuser != x$_W_nowner
then
w_die "You (`id -un`) don't own $_W_checkdir. Don't run this tool as an
other user!"
fi
}
# See
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf (iso
9660)
# http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf
# http://www.osta.org/specs/pdf/udf102.pdf
# http://www.ecma-international.org/publications/techreports/E-TR-071.htm
# Usage: read_bytes offset count device
winetricks_read_bytes()
{
dd status=noxfer if=$3 bs=1 skip=$1 count=$2 2>/dev/null
}
# Usage: read_hex offset count device
winetricks_read_hex()
{
od -j $1 -N $2 -t x1 $3
| # offset $1, count $2, single byte hex fo
rmat, file $3
sed 's/^[^ ]* //'
| # remove address
sed '$d'
# remove final line which is just final
offset
}
# Usage: read_decimal offset device
# Reads single four byte word, outputs in decimal.
# Uses default endianness.
# udf uses little endian words, so this only works on little endian machines.
winetricks_read_decimal()
{
od -j $1 -N 4 -t u4 $2
| # offset $1, byte count 4, four byte deci
mal format, file $2
sed 's/^[^ ]* //'
| # remove address
sed '$d'
# remove final line which is just final
offset
}
winetricks_read_udf_volume_name()
{
# "Anchor volume descriptor pointer" starts at sector 256
# AVDP Layout (ECMA-167 3/10.2):
# size offset contents
# 16
# 16
# ...
0
8
#
#
#
#
#
#
#
#
extent
size
4
8
#
#
#
#
#
primary volume
size offset
16
0
...
32
24
# 1. check the 16 bit TagIdentifier of the descriptor tag, make sure it's 2
tagid=`winetricks_read_hex 524288 2 $1`
: echo tagid is $tagid
case "$tagid" in
"02 00") : echo Found AVDP ;;
*) echo "Did not find AVDP (tagid was $tagid)"; exit 1;;
esac
# 2. read the location of the main volume descriptor:
offset=`winetricks_read_decimal 524308 $1`
: echo MVD is at sector $offset
offset=`expr $offset \* 2048`
: echo MVD is at byte $offset
# 3. check the TagIdentifier of the MVD's descriptor tag, make sure it's 1
tagid=`winetricks_read_hex $offset 2 $1`
: echo tagid is $tagid
case "$tagid" in
"01 00") : echo Found MVD ;;
*) echo Did not find MVD; exit 1;;
esac
# 4. Read whether the name is in 8 or 16 bit chars
offset=`expr $offset + 24`
width=`winetricks_read_hex $offset 1 $1`
offset=`expr $offset + 1`
# 5. Profit!
case $width in
08) winetricks_read_bytes $offset 30 $1 | sed 's/ *$//' ;;
10) winetricks_read_bytes $offset 30 $1 | tr -d '\000' | sed 's/ *$//' ;;
*) echo "Unhandled dvd volname character width '$width'"; exit 1;;
esac
}
echo ""
winetricks_read_iso9660_volume_name()
{
winetricks_read_volume_name()
{
# ECMA-119 says that CD-ROMs have sector size 2k, and at sector 16 have:
# size offset contents
# 1
0
Volume descriptor type (1 for primary volume descriptor)
# 5
1
Standard identifier ("CD001" for iso9660)
# ECMA-167, section 9.1.2, has a table of standard identifiers:
# "BEA01": ecma-167 9.2, Beginning Extended Area Descriptor
# "CD001": ecma-119
# "CDW02": ecma-168
std_id=`winetricks_read_bytes 32769 5 $1`
: echo std_id is $std_id
case $std_id in
CD001) winetricks_read_iso9660_volume_name $1 ;;
BEA01) winetricks_read_udf_volume_name $1; ;;
*) echo "Unrecognized disk type $std_id"; exit 1 ;;
esac
winetricks_volname()
{
x=`volname $1 2> /dev/null| sed 's/ *$//'`
if test "x$x" = "x"
then
# UDF? See https://bugs.launchpad.net/bugs/678419
x=`winetricks_read_volume_name $1`
fi
echo $x
}
# Really, should take a volume name as argument, and use 'mount' to get
# mount point if system automounted it.
winetricks_detect_optical_drive()
{
case "$WINETRICKS_DEV" in
"") ;;
*) return ;;
esac
for WINETRICKS_DEV in /dev/cdrom /dev/dvd /dev/sr0
do
test -b $WINETRICKS_DEV && break
done
case "$WINETRICKS_DEV" in
"x") w_die "can't find cd/dvd drive" ;;
esac
winetricks_cache_iso()
{
# WINETRICKS_IMG has already been set by w_mount
_W_expected_volname="$1"
winetricks_die_if_user_not_dirowner "$W_CACHE"
winetricks_detect_optical_drive
# Horrible hack for Gentoo - make sure we can read from the drive
if ! test -r $WINETRICKS_DEV
then
case "$WINETRICKS_SUDO" in
gksudo) $WINETRICKS_SUDO "chmod 666 $WINETRICKS_DEV" ;;
*) $WINETRICKS_SUDO chmod 666 $WINETRICKS_DEV ;;
esac
fi
while true
do
# Wait for user to insert disc.
# Sleep long to make it less likely to close the drive during insertion.
while ! dd if=$WINETRICKS_DEV of=/dev/null count=1
do
sleep 5
done
else
fi
break
done
too
> /dev/null 2>&1
mv "$W_CACHE"/temp.iso "$WINETRICKS_IMG"
}
winetricks_load_vcdmount()
{
if test "$WINE" != ""
then
return
fi
# Call only on real Windows.
# Sets VCD_DIR and W_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/virtual-clonedrive.html
FIXME: actually install it here
# Locate vcdmount.exe.
VCD_DIR="Elaborate Bytes/VirtualCloneDrive"
if test ! -x "$W_PROGRAMS_UNIX/$VCD_DIR/vcdmount.exe" && test ! -x "$W_PROGR
AMS_X86_UNIX/$VCD_DIR/vcdmount.exe"
then
w_warn "Installing Virtual CloneDrive"
w_download_to vcd http://static.slysoft.com/SetupVirtualCloneDrive.exe
# have to use cmd else vista won't let cygwin run .exe's?
chmod +x "$W_CACHE"/vcd/SetupVirtualCloneDrive.exe
cd "$W_CACHE/vcd"
cmd /c SetupVirtualCloneDrive.exe
fi
if test -x "$W_PROGRAMS_UNIX/$VCD_DIR/vcdmount.exe"
then
VCD_DIR="$W_PROGRAMS_UNIX/$VCD_DIR"
elif test -x "$W_PROGRAMS_X86_UNIX/$VCD_DIR/vcdmount.exe"
then
VCD_DIR="$W_PROGRAMS_X86_UNIX/$VCD_DIR"
else
w_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/using-wmi-to-get-a-drive-frien
dly-name/
}
winetricks_mount_cached_iso()
{
# On entry, WINETRICKS_IMG is already set
w_umount
'`"
tries=0
while test $tries -lt 20
do
for W_ISO_MOUNT_LETTER in e f g h i j k
do
# let user blacklist drive letters
echo "$WINETRICKS_MOUNT_LETTER_IGNORE" | grep -q "$W_ISO_MOUNT_L
ETTER" && continue
W_ISO_MOUNT_ROOT=/cygdrive/$W_ISO_MOUNT_LETTER
if find $W_ISO_MOUNT_ROOT -iname 'setup*' -o -iname '*.exe' -o iname '*.msi'
then
break 2
fi
done
tries=`expr $tries + 1`
echo "Waiting for mount to finish mounting"
sleep 1
done
else
# Linux
# FIXME: find a way to mount or copy from image without sudo
_W_USERID=`id -u`
case "$WINETRICKS_SUDO" in
gksudo)
w_try $WINETRICKS_SUDO "mkdir -p $W_ISO_MOUNT_ROOT"
w_try $WINETRICKS_SUDO "mount -o ro,loop,uid=$_W_USERID,unhide $WINETR
ICKS_IMG $W_ISO_MOUNT_ROOT"
;;
*)
w_try $WINETRICKS_SUDO mkdir -p $W_ISO_MOUNT_ROOT
w_try $WINETRICKS_SUDO mount -o ro,loop,uid=$_W_USERID,unhide "$WINETR
ICKS_IMG" $W_ISO_MOUNT_ROOT
;;
esac
echo "Mounting as drive ${W_ISO_MOUNT_LETTER}:"
# Gotta provide a symlink to the raw disc, else installers that check vo
lume names will fail
rm -f "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:"*
ln -sf "$WINETRICKS_IMG" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}::
"
ln -sf "$W_ISO_MOUNT_ROOT" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}
:"
unset _W_USERID
fi
}
# List the currently mounted udf or iso9660 filesystems that match the given pat
tern
# Output format:
# dev mountpoint
# dev mountpoint
# ...
# Mountpoints may contain spaces.
winetricks_list_mounts()
{
mount | egrep 'udf|iso9660' | sed 's,^\([^ ]*\) on \(.*\) type .*,\1 \2,'| g
rep "$1\$"
}
# Return success and set _W_dev _W_mountpoint if volume $1 is mounted
# Note: setting variables as a way of returning results from a
# shell function exposed several bugs in most shells (except ksh!)
# related to implicit subshells. It would be better to output
# one string to stdout instead.
winetricks_is_mounted()
{
# First, check for matching mountpoint
_W_tmp="`winetricks_list_mounts "$1"`"
if test "$_W_tmp"
then
_W_dev=`echo $_W_tmp | sed 's/ .*//'`
_W_mountpoint="`echo $_W_tmp | sed 's/^[^ ]* //'`"
# Volume found!
return 0
fi
# If that fails, read volume name the hard way for each volume
# Have to use file to return results from implicit subshell
rm -f "/tmp/_W_tmp.$LOGNAME"
winetricks_list_mounts . | while true
do
IFS= read _W_tmp
_W_dev=`echo $_W_tmp | sed 's/ .*//'`
test "$_W_dev" || break
_W_mountpoint="`echo $_W_tmp | sed 's/^[^ ]* //'`"
_W_volname=`winetricks_volname $_W_dev`
if test "$1" = "$_W_volname"
then
fi
done
if test -f "/tmp/_W_tmp.$LOGNAME"
then
# Volume found! Return from function.
_W_dev=`cat "/tmp/_W_tmp.$LOGNAME" | sed 's/ .*//'`
_W_mountpoint="`cat "/tmp/_W_tmp.$LOGNAME" | sed 's/^[^ ]* //'`"
rm -f "/tmp/_W_tmp.$LOGNAME"
return 0
fi
winetricks_mount_real_volume()
{
_W_expected_volname="$1"
# Wait for user to insert disc.
case $LANG in
da*)_W_mountmsg="Indst venligst disken '$_W_expected_volname' (krvet af pakken
'$_PACKAGE')" ;;
de*)_W_mountmsg="Disc '$_W_expected_volname' bitte einlegen (fr Pakete '$W_PA
CKAGE')" ;;
pl*) _W_mountmsg="Prosz woy dysk '$_W_expected_volname' (potrzebny paczce '$W_P
ACKAGE')" ;;
uk*) _W_mountmsg=" , '$_W_expected_volname' (
*) _W_mountmsg="Please insert volume '$_W_expected_volname' (needed for pac
kage '$W_PACKAGE')" ;;
esac
if test "$WINE" = ""
then
# Assume already mounted, just get drive letter
W_ISO_MOUNT_LETTER=`awk '/iso/ {print $1}' < /proc/mounts | tr -d :`
W_ISO_MOUNT_ROOT=`awk '/iso/ {print $2}' < /proc/mounts`
else
while ! winetricks_is_mounted "$_W_expected_volname"
do
w_try w_warn_cancel "$_W_mountmsg"
# In non-gui case, give user two seconds to futz with disc drive bef
ore spamming him again
sleep 2
done
WINETRICKS_DEV=$_W_dev
W_ISO_MOUNT_ROOT="$_W_mountpoint"
# Gotta provide a symlink to the raw disc, else installers that check vo
lume names will fail
rm -f "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:"*
ln -sf "$WINETRICKS_DEV" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}::
"
ln -sf "$W_ISO_MOUNT_ROOT" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}
:"
fi
# FIXME: need to remount some discs with unhide option,
# add that as option to w_mount
unset _W_mountmsg
winetricks_cleanup()
{
set +e
if test -f "$WINETRICKS_WORKDIR/dd-pid"
then
kill `cat "$WINETRICKS_WORKDIR/dd-pid"`
fi
test "$WINETRICKS_CACHE_SYMLINK" && rm -f "$WINETRICKS_CACHE_SYMLINK"
test "$W_OPT_NOCLEAN" = 1 || rm -rf "$WINETRICKS_WORKDIR"
}
winetricks_set_unattended()
{
# We shouldn't use all these extra variables. Instead, we should
# use ${foo:+bar} to jam in commandline options for silent install
# only if W_OPT_UNATTENDED is nonempty. See
# http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#t
ag_18_06_02
# So in attended mode, W_OPT_UNATTENDED should be empty.
case $1 in
1)
W_OPT_UNATTENDED=1
# Might want to trim our stable of variables here a bit...
W_UNATTENDED_DASH_Q="-q"
W_UNATTENDED_SLASH_Q="/q"
W_UNATTENDED_SLASH_S="/S"
W_UNATTENDED_DASH_SILENT="-silent"
W_UNATTENDED_SLASH_SILENT="/silent"
;;
*)
W_OPT_UNATTENDED=""
W_UNATTENDED_DASH_Q=""
W_UNATTENDED_SLASH_Q=""
W_UNATTENDED_SLASH_S=""
W_UNATTENDED_DASH_SILENT=""
W_UNATTENDED_SLASH_SILENT=""
;;
esac
fi
export WINEPREFIX
#echo "WINEPREFIX is now $WINEPREFIX" >&2
mkdir -p "`dirname "$WINEPREFIX"`"
# Run wine here to force creation of the wineprefix so it's there when we wa
nt to make the cache symlink a bit later.
# The folder-name is localized!
W_PROGRAMS_WIN="`w_expand_env ProgramFiles`"
case "$W_PROGRAMS_WIN" in
"") w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string" ;;
%*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned unexpanded string
'$W_PROGRAMS_WIN' ... can be caused a corrupt wineprefix, an old wine, or by no
t owning $WINEPREFIX" ;;
*unknown*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned a string c
ontaining the word 'unknown', as if a voice had cried out in terror, and was sud
denly silenced." ;;
esac
case "$OS" in
"Windows_NT")
W_DRIVE_C="/cygdrive/c" ;;
*)
W_DRIVE_C="$WINEPREFIX/dosdevices/c:" ;;
esac
# Kludge: use Temp instead of temp to avoid \t expansion in w_try
# but use temp in unix path because that's what wine creates, and having bot
h temp and Temp
# causes confusion (e.g. makes vc2005trial fail)
if ! test "$1"
then
W_TMP="$W_DRIVE_C/windows/temp"
W_TMP_WIN="C:\\windows\\Temp"
else
# Verbs can rely on W_TMP being empty at entry, deleted after return, an
d a subdir of C:
W_TMP="$W_DRIVE_C/windows/temp/_$1"
W_TMP_WIN="C:\\windows\\Temp\\_$1"
fi
case "$OS" in
"Windows_NT")
W_CACHE_WIN="`w_pathconv -w $W_CACHE`"
;;
*)
# For case where z: doesn't exist or / is writable (!),
# make a drive letter for W_CACHE. Clean it up on exit.
test "$WINETRICKS_CACHE_SYMLINK" && rm -f "$WINETRICKS_CACHE_SYMLINK"
for letter in y x w v u t s r q p o n m
do
if ! test -d "$WINEPREFIX"/dosdevices/${letter}:
then
mkdir -p "$WINEPREFIX"/dosdevices
WINETRICKS_CACHE_SYMLINK="$WINEPREFIX"/dosdevices/${letter}:
ln -sf "$W_CACHE" "$WINETRICKS_CACHE_SYMLINK"
break
fi
done
W_CACHE_WIN="${letter}:"
;;
esac
winetricks_init()
{
#---- Private Variables ---if ! test "$USERNAME"
then
# Posix only requires LOGNAME to be defined, and sure enough, when
# logging in via console and startx in ubuntu 11.04, USERNAME isn't set!
# And even normal logins in Ubuntu 13.04 doesn't set it.
# I tried using only LOGNAME in this script, but it's so easy to slip
# and use USERNAME, so define it here if needed.
USERNAME="$LOGNAME"
fi
# Ephemeral files for this run
WINETRICKS_WORKDIR="/tmp/w.$LOGNAME.$$"
test "$W_OPT_NOCLEAN" = 1 || rm -rf "$WINETRICKS_WORKDIR"
# Registering a verb creates a file in WINETRICKS_METADATA
WINETRICKS_METADATA="$WINETRICKS_WORKDIR/metadata"
# The list of categories is also hardcoded in winetricks_mainmenu() :-(
WINETRICKS_CATEGORIES="apps benchmarks dlls fonts games settings"
for _W_cat in $WINETRICKS_CATEGORIES
do
mkdir -p "$WINETRICKS_METADATA"/$_W_cat
done
# Which subdirectory of WINETRICKS_METADATA is currently active (or main, if
none)
WINETRICKS_CURMENU=prefix
# Delete work directory after each run, on exit either graceful or abrupt
trap winetricks_cleanup EXIT HUP INT QUIT ABRT
# Whether to always cache cached iso's (1) or only use cache if present (0)
# Can be inherited from environment or set via -k, defaults to off
WINETRICKS_OPT_KEEPISOS=${WINETRICKS_OPT_KEEPISOS:-0}
# what program to use to make disc image (dd or ddrescue)
WINETRICKS_OPT_DD=${WINETRICKS_OPT_DD:-dd}
# whether to use shared wineprefix (1) or unique wineprefix for each app (0)
WINETRICKS_OPT_SHAREDPREFIX=${WINETRICKS_OPT_SHAREDPREFIX:-0}
# Mac folks tend to not have sha1sum, but we can make do with openssl
if [ -x "`which sha1sum 2>/dev/null`" ]
then
WINETRICKS_SHA1SUM="sha1sum"
elif [ -x "`which openssl 2>/dev/null`" ]
then
WINETRICKS_SHA1SUM="openssl dgst -sha1"
else
w_die "No sha1sum utility available."
fi
;;
WINETRICKS_SOURCEFORGE=http://downloads.sourceforge.net;;
l}"
;;
*)
WINE="${WINE:-wine}"
# Find wineserver. Some distros (Debian) don't have it on the path,
# on the mistaken understanding that user scripts never need it :-(
# FIXME: get packagers to put wineserver on the path.
for x in \
"$WINESERVER" \
"${WINE}server" \
"`which wineserver 2> /dev/null`" \
/usr/lib*/wine-unstable/wineserver \
/usr/lib*/wine/wineserver \
/usr/lib*/wine/bin/wineserver \
/usr/lib/*/wine-unstable/wineserver \
/usr/lib/*/wine-unstable/bin/wineserver \
/usr/lib/*/wine-unstable/wine/wineserver \
/usr/lib/*/wine-unstable/wine/bin/wineserver \
/usr/lib/*/wine/wineserver \
/usr/lib/*/wine/bin/wineserver \
"`dirname $WINE`/server/wineserver" \
file-not-found
do
if test -x "$x"
then
break
fi
done
case "$x" in
file-not-found)
w_die "wineserver not found!" ;;
*)
WINESERVER="$x" ;;
esac
if test "$WINEPREFIX"
then
WINETRICKS_ORIGINAL_WINEPREFIX="$WINEPREFIX"
#if test WINETRICKS_OPT_SHAREDPREFIX=0
#then
#
w_info "To install apps into $WINEPREFIX, give the --no-isolate
option"
#fi
else
file"
WINETRICKS_ORIGINAL_WINEPREFIX="$HOME/.wine"
fi
_abswine="`which "$WINE" 2>/dev/null`"
if ! test -x "$_abswine" || ! test -f "$_abswine"
then
w_die "WINE is $WINE, which is neither on the path nor an executable
fi
case "$WINETRICKS_OPT_VERBOSE" in
"1") echo -n "Wine is '$WINE'; Wine version is "
"$WINE" --version || w_die "Can't get wine version"
;;
esac
unset _abswine
;;
esac
winetricks_set_wineprefix
e/'`
# A small hack...
case "$WINETRICKS_WINE_VERSION" in
wine-1.4-*) WINETRICKS_WINE_VERSION="wine-1.4.40"; export WINETRICKS_WIN
E_VERSION;;
wine-1.4) WINETRICKS_WINE_VERSION="wine-1.4.0"; export WINETRICKS_WINE_V
ERSION;;
wine-1.6-*) WINETRICKS_WINE_VERSION="wine-1.6.0"; export WINETRICKS_WINE
_VERSION;;
wine-1.6) WINETRICKS_WINE_VERSION="wine-1.6.0"; export WINETRICKS_WINE_V
ERSION;;
esac
WINETRICKS_WINE_MINOR=`echo $WINETRICKS_WINE_VERSION | sed 's/wine-1\.\([0-9
]*\)\..*/\1/'`
WINETRICKS_WINE_MICRO=`echo $WINETRICKS_WINE_VERSION | sed 's/wine-1.[0-9][0
-9]*\.\([0-9]*\).*/\1/'`
}
winetricks_usage()
{
case $LANG in
da*)
cat <<_EOF_
Brug: $0 [tilvalg] [verbum|sti-til-verbum] ...
K rer de angivne verber. Hvert verbum installerer et program eller ndrer en indsti
lling.
Tilvalg:
-k|--keep_isos: lagr iso'er lokalt (muligg r senere installation uden disk)
-q|--unattended: stil ingen sp rgsml, installr bare automatisk
-r|--ddrescue: brug alternativ disk-tilgangsmetode (hjlper i tilflde af en ridset
disk)
-v|--verbose: vis alle kommandoer som de bliver udf rt
-V|--version: vis programversionen og afslut
-h|--help: vis denne besked og afslut
Diverse verber:
list: vis en liste over alle verber
list-cached: vis en liste over verber for allerede-hentede installationsprogramm
er
list-download: vis en liste over verber for programmer der kan hentes
list-manual-download: list applications which can be downloaded with some help f
rom the user
list-installed: list already-installed applications
_EOF_
;;
de*)
cat <<_EOF_
Usage: $0 [options] [verb|path-to-verb] ...
winetricks_handle_option()
{
case "$1" in
-r|--ddrescue) WINETRICKS_OPT_DD=ddrescue ;;
-k|--keep_isos) WINETRICKS_OPT_KEEPISOS=1 ;;
-q|--unattended) winetricks_set_unattended 1 ;;
-v|--verbose) WINETRICKS_OPT_VERBOSE=1; set -x ;;
-V|--version) winetricks_print_version ; exit 0;;
-h|--help) winetricks_usage ; exit 0 ;;
--isolate) WINETRICKS_OPT_SHAREDPREFIX=0 ;;
--no-isolate) WINETRICKS_OPT_SHAREDPREFIX=1 ;;
--no-clean) W_OPT_NOCLEAN=1 ;;
--force) WINETRICKS_FORCE=1;;
--gui) winetricks_detect_gui;;
--showbroken) W_OPT_SHOWBROKEN=1 ;;
--optin) WINETRICKS_STATS_REPORT=1;;
--optout) WINETRICKS_STATS_REPORT=0;;
-*) w_die "unknown option $1" ;;
*) return 1 ;;
esac
return 0
winetricks_init
winetricks_install_app()
{
case $LANG in
da*) fail_msg="Installationen af pakken $1 fejlede" ;;
de*) fail_msg="Installieren von Pakete $1 gescheitert" ;;
pl*) fail_msg="Niepowodzenie przy instalacji paczki $1" ;;
uk*) fail_msg=" $1" ;;
*) fail_msg="Failed to install package $1" ;;
esac
les
# FIXME: initialize a new wineprefix for this app, set lots of global variab
if ! w_do_call $1 $2
then
w_die "$fail_msg"
fi
DIRECTX_NAME=directx_feb2010_redist.exe
helper_directx_Jun2010()
{
# June 2010 DirectX 9c User Redistributable
# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3b170b25-abab4bc3-ae91-50ceb6d8fa8d
w_download_to directx9 http://download.microsoft.com/download/8/4/A/84A35BF1
-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe
}
DIRECTX_NAME=directx_Jun2010_redist.exe
helper_d3dx9_xx()
{
dllname=d3dx9_$1
helper_directx_dl
l
# Even kinder, less invasive directx - only extract and override d3dx9_xx.dl
helper_win2ksp4()
{
filename=$1
# http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1-749F-49F
4-8010-297BD6CA33A0&displaylang=en
w_download_to win2ksp4 http://download.microsoft.com/download/E/6/A/E6A04295
-D2A8-40D0-A0C5-241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4
fa8
w_try_cabextract -d "$W_TMP" -L -F $filename "$W_CACHE"/win2ksp4/W2KSP4_EN.E
XE
}
helper_xpsp2()
filename=$1
# http://www.microsoft.com/en-us/download/details.aspx?id=28
w_download_to xpsp2 http://download.microsoft.com/download/1/6/5/165b076b-aa
a9-443d-84f0-73cf11fdcdf8/WindowsXP-KB835935-SP2-ENU.exe 33a8fef60d48ae1f2c4feea
27111af5ceca3c4f6
w_try_cabextract -d "$W_TMP" -L -F $filename "$W_CACHE"/xpsp2/WindowsXP-KB83
5935-SP2-ENU.exe
}
helper_win7sp1()
{
filename=$1
# https://www.microsoft.com/en-us/download/details.aspx?id=5842
w_download_to win7sp1 http://download.microsoft.com/download/0/A/F/0AFB53163062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe c3516bc5c9e69fee6d9ac4f9
81f5b95977a8a2fa
w_try_cabextract -d "$W_TMP" -L -F $filename "$W_CACHE"/win7sp1/windows6.1-K
B976932-X86.exe
}
#--------------------------------------------------------w_metadata adobeair dlls \
title="Adobe AIR 4.0" \
publisher="Adobe" \
year="2014" \
media="download" \
file1="AdobeAIRInstaller.exe" \
installed_file1="$W_COMMONFILES_X86_WIN/Adobe AIR/Versions/1.0/Adobe AIR.dll
" \
homepage="http://www.adobe.com/products/air/"
load_adobeair()
{
# 2010-02-02: sha1sum 5c95f51a680f8c175a92755238127be4ad22c53b
# 2010-02-20: sha1sum 6f03e723bd855abbe00eb8fdf22da54fb49c62db
# 2010-07-29: 2.0.2 sha1sum 7b93aedaf48ad7854940e7a4e7d9394a255e888b
# 2010-12-08: 2.5.1 sha1sum 2664207ca8e836f5070ee356064829a39785a92e
# 2011-04-13: 2.6 sha1sum 3d9c2f9d8f3533424cfea84d61fcb9464278d9fc
# 2011-10-26: 2.7 sha1sum dfa337d4b53e9d924356febc116450190fa183dd
# 2014-03-01: 4.0 sha1sum 0034bdd4e0b2ce0fa6198b0b715fba85754d9a57
# http://helpx.adobe.com/en/flash-player/release-note/fp_12_air_4_release_no
tes.html
w_download http://airdownload.adobe.com/air/win/download/4.0/AdobeAIRInstall
er.exe 0034bdd4e0b2ce0fa6198b0b715fba85754d9a57
cd "$W_CACHE"/adobeair
w_try "$WINE" AdobeAIRInstaller.exe $W_UNATTENDED_DASH_SILENT
}
#---------------------------------------------------------------w_metadata amstream dlls \
title="MS amstream.dll" \
publisher="Microsoft" \
year="2010" \
media="download" \
file1="../directx9/directx_feb2010_redist.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/amstream.dll"
load_amstream()
{
helper_directx_dl
mkdir "$W_CACHE"/amstream
E
"
media="download" \
file1="../xpsp2/WindowsXP-KB835935-SP2-ENU.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/avifil32.dll"
load_avifil32()
{
helper_xpsp2 i386/avifil32.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/avifil32.dl_
}
publisher="Microsoft" \
year="2001" \
media="download" \
file1="cc32inst.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/comctl32.dll"
load_comctl32()
{
# http://www.microsoft.com/downloads/details.aspx?familyid=6f94d31a-d1e0-465
8-a566-93af0d8d4a1e
#w_download http://download.microsoft.com/download/platformsdk/redist/5.80.2
614.3600/w9xnt4/en-us/cc32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde
w_download $WINETRICKS_SOURCEFORGE/pocmin/Win%2095_98%20Controls/Win%2095_98
%20Controls/CC32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde cc32inst.exe
w_try "$WINE" "$W_CACHE"/comctl32/cc32inst.exe "/T:$W_TMP_WIN" /c $W_UNATTEN
DED_SLASH_Q
w_try_unzip -d "$W_TMP" "$W_TMP"/comctl32.exe
w_try "$WINE" "$W_TMP"/x86/50ComUpd.Exe "/T:$W_TMP_WIN" /c $W_UNATTENDED_SLA
SH_Q
w_try cp "$W_TMP"/comcnt.dll "$W_SYSTEM32_DLLS"/comctl32.dll
w_override_dlls native,builtin comctl32
helper_directx_Jun2010
w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIR
ECTX_NAME
for x in "$W_TMP"/*.cab
do
w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
done
}
media="download" \
file1="../directx9/directx_Jun2010_redist.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx11_42.dll"
load_d3dx11_42()
{
dllname=d3dx11_42
helper_directx_Jun2010
w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIR
ECTX_NAME
for x in "$W_TMP"/*.cab
do
w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
done
}
"
"
"
"
"
-d
-d
-d
-d
"$W_SYSTEM32_DLLS"
"$W_SYSTEM32_DLLS"
"$W_SYSTEM32_DLLS"
"$W_SYSTEM32_DLLS"
-L
-L
-L
-L
-F
-F
-F
-F
'dmstyle.dll' "$W_TMP/dxnt.cab"
'dmsynth.dll' "$W_TMP/dxnt.cab"
'dmusic.dll' "$W_TMP/dxnt.cab"
'dmusic32.dll' "$W_TMP/dxnt.cab
devenum.dll
dmband.dll
dmcompos.dll
dmime.dll
dmloader.dll
dmscript.dll
dmstyle.dll
dmsynth.dll
dmusic.dll
dswave.dll
quartz.dll
"
"
w_try_regsvr dplayx.dll
w_try_regsvr dpnet.dll
w_try_regsvr dpnhpast.dll
cd "$W_TMP"
w_try_unzip "$W_CACHE"/dx8sdk/dx81sdk_full.exe
cd DXF
w_try "$WINE" setup.exe # /S/v/qn for silent mode, but it's broken?
w_download http://download.microsoft.com/download/9/e/5/9e5bfc66-a621-4e0d-8
bfe-6688058c3f00/dxsdk_aug2006.exe 1e9cdbef391ebfbf781e6c87a375138d8c195c57
# dxview.dll uses mfc42u while registering
w_call mfc42
cd "$W_TMP"
w_try_cabextract "$W_CACHE"/dxsdk_nov2006/dxsdk_aug2006.exe
w_try_unzip dxsdk.exe
w_try "$WINE" msiexec /i Microsoft_DirectX_SDK.msi $W_UNATTENDED_SLASH_Q
U}
}
cd "$W_TMP"
w_try "$WINE" "$W_CACHE"/dxsdk_jun2010/DXSDK_Jun10.exe ${W_OPT_UNATTENDED:+/
#----------------------------------------------------------------
sleep 1000
ifwinexist, Fatal error, Failed to delay load library
{
WinClose, Fatal error, Failed to delay load library
continue
}
Process, exist, dotnetfx.exe
dotnet_pid = %ErrorLevel% ; Save the value immediately since Er
rorLevel is often changed.
if dotnet_pid = 0
{
break
}
}
"
else
}
fi
;;
}
case $status in
0) ;;
105|194) echo "exit status $status - normal, system needs simulated reboot"
*) w_die "exit status $status - $W_PACKAGE installation failed" ;;
esac
.8,
cd "$W_CACHE"/dotnet20
if w_workaround_wine_bug 30845 "Using native fusion while installing..." 1.5
then
w_killall "mscorsvw.exe"
fi
guide
stalled
sleep 1000
ifwinexist, Microsoft Document Explorer, Application Data folder
{
WinClose, Microsoft Document Explorer, Application Data folder
continue
}
ifwinexist, Microsoft CLR Debugger, Application Data folder
{
WinClose, Microsoft CLR Debugger, Application Data folder
continue
}
; FIXME: only appears if dotnet30sp1 is run first?
ifwinexist, Microsoft .NET Framework 2.0 SDK Setup, This wizard will
{
ControlClick, Button22,
Winwait, Microsoft .NET
sleep 100
ControlClick, Button21
sleep 100
ControlClick, Button18
WinWait, Microsoft .NET
sleep 100
ControlClick, Button12
WinWait, Microsoft .NET
sleep 100
ControlClick, Button8
WinWait, Microsoft .NET
sleep 100
ControlClick, Button2
sleep 100
"
}
Process, exist, setup.exe
dotnet_pid = %ErrorLevel%
if dotnet_pid = 0
{
break
}
}
#---------------------------------------------------------------w_metadata dotnet20sp1 dlls \
title="MS .NET 2.0 SP1 (experimental)" \
publisher="Microsoft" \
year="2008" \
media="download" \
file1="NetFx20SP1_x86.exe" \
installed_file1="c:/windows/winsxs/manifests/x86_Microsoft.VC80.CRT_1fc8b3b9
a1e18e3b_8.0.50727.1433_x-ww_5cf844d2.cat"
load_dotnet20sp1()
{
if w_workaround_wine_bug 16956 "wine version too old" 1.3.22,
then
w_die "wine-1.3.22 or later required to install dotnet20sp1 properly"
fi
w_call dotnet20
WINEDLLOVERRIDES=
w_warn "Setting windows version so installer works"
# Stop services
# Recipe from http://bugs.winehq.org/show_bug.cgi?id=16956
$WINESERVER -k
# Fight a race condition, see bug 16956 comment 43
w_set_winver win2k
$WINESERVER -w
WINEDLLOVERRIDES=ngen.exe,regsvcs.exe,mscorsvw.exe=b
export WINEDLLOVERRIDES
# Workaround Wine/Mono integration:
"$WINE" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v2.0.5
0727" /v Version /t REG_SZ /d "2.0.50727" /f
w_download http://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9
d6c-150906578c9e/NetFx20SP1_x86.exe eef5a36924cdf0c02598ccf96aa4f60887a49840
cd "$W_CACHE"/dotnet20sp1
"$WINE" NetFx20SP1_x86.exe ${W_OPT_UNATTENDED:+/q}
status=$?
case $status in
0) ;;
105) echo "exit status $status - normal, user selected 'restart now'" ;;
194) echo "exit status $status - normal, user selected 'restart later'" ;;
*) w_die "exit status $status - $W_PACKAGE installation failed" ;;
esac
w_unset_winver
sleep 1000
ifwinexist,, cannot be uninstalled
{
WinClose,, cannot be uninstalled
continue
}
Process, exist, NetFx20SP2_x86.exe
dotnet_pid = %ErrorLevel%
if dotnet_pid = 0
{
break
}
}
"
status=$?
case $status in
0) ;;
105) echo "exit status $status - normal, user selected 'restart now'" ;;
194) echo "exit status $status - normal, user selected 'restart later'" ;;
*) w_die "exit status $status - $W_PACKAGE installation failed" ;;
esac
}
w_unset_winver
w_warn "Installing .net 3.0 runtime takes 3 minutes on a very fast machine,
and the Finished dialog may hide in the taskbar."
# http://msdn.microsoft.com/en-us/netframework/bb264589.aspx
w_download_manual http://www.oldversion.com/download-.Net-Framework-3.0.html
netframework3.exe f3d2c3c7e4c0c35450cf6dab1f9f2e9e7ff50039
# AF's workaround to avoid long pause
LANGPACKS_BASE_PATH="${W_WINDIR_UNIX}/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 pt-BR pt-PT ru \
sv tr zh-CHS zh-CHT
do
ln -sf "${W_SYSTEM32_DLLS}/spupdsvc.exe" "${LANGPACKS_BASE_PATH}/dotnetf
x3langpack${lang}.exe"
done
w_set_winver winxp
# Delete FontCache 3.0 service, it's in Wine for Mono, breaks native .NET
# OK if this fails, that just means you have an older wine.
"$WINE" sc delete "FontCache3.0.0.0"
if w_workaround_wine_bug 30845 "Using native fusion..." ,1.5.6
then
# Either adding this registry key
#$WINE reg add 'HKLM\Software\Microsoft\.NETFramework' /v InstallRoot /d
'C:\Windows\Microsoft.NET\Framework\' /f
# or using native mscoree and fusion
WINEDLLOVERRIDES=mscoree,fusion=n
export WINEDLLOVERRIDES
# will let install start
fi
WINEDLLOVERRIDES="ngen.exe,mscorsvw.exe=b;$WINEDLLOVERRIDES"
cd "$W_CACHE"/dotnet30
w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /q /c:"install.exe /q"}
load_dotnet30sp1()
{
case "$OS" in
"Windows_NT") ;;
*) w_warn "dotnet30sp1 does not yet fully work or install on wine. Caveat e
mptor." ;;
esac
# dotnet20 does this, which is called by dotnet30:
# w_call remove_mono
w_call dotnet30
$WINESERVER -w
w_call dotnet20sp1
$WINESERVER -w
w_download http://download.microsoft.com/download/8/F/E/8FEEE89D-9E4F-4BA3-9
93E-0FFEA8E21E1B/NetFx30SP1_x86.exe 8d779e337920b097aa0c01859912950606e9fc12
cd "$W_CACHE/$W_PACKAGE"
"$WINE" reg add "HKLM\\Software\\Microsoft\\Net Framework Setup\\NDP\\v3.0"
/v Version /t REG_SZ /d "3.0" /f
"$WINE" reg add "HKLM\\Software\\Microsoft-\\Net Framework Setup\\NDP\\v3.0"
/v SP /t REG_DWORD /d 0001 /f
# Recipe from http://bugs.winehq.org/show_bug.cgi?id=25060#c10
w_download http://download.microsoft.com/download/2/5/2/2526f55d-32bc-410f-b
e18-164ba67ae07d/XPSEP%20XP%20and%20Server%202003%2032%20bit.msi 5d332ebd1025e29
4adafe72030fe33db707b2c82 "XPSEP XP and Server 2003 32 bit.msi"
w_try "$WINE" msiexec /i "XPSEP XP and Server 2003 32 bit.msi" ${W_OPT_UNATT
ENDED:+/qb}
"$WINE" sc delete FontCache3.0.0.0
"
sleep 1000
ifwinexist,, cannot be uninstalled
{
WinClose,, cannot be uninstalled
continue
}
Process, exist, dotnetfx35.exe
dotnet_pid = %ErrorLevel%
if dotnet_pid = 0
{
break
}
}
#---------------------------------------------------------------w_metadata dotnet40 dlls \
title="MS .NET 4.0" \
publisher="Microsoft" \
year="2011" \
media="manual_download" \
file1="dotNetFx40_Full_x86_x64.exe" \
installed_file1="c:/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe"
load_dotnet40()
{
if [ $W_ARCH = win64 ]
then
w_die "This package does not work on a 64-bit installation"
fi
case "$OS" in
"Windows_NT") ;;
*) w_warn "dotnet40 does not yet fully work or install on wine. Caveat
emptor." ;;
esac
# http://www.microsoft.com/download/en/details.aspx?id=17718
w_download http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-B
C36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe 58da3d74db353aad03588cbb5cea8234166
d8b99
if w_workaround_wine_bug 30707 "Need to get gacutil.exe" 1.5.5,
then
w_download_manual http://www.mediafire.com/?v8rw5h1ra7maod4 gacutil-net4
0.tar.bz2 d40cc1249ea051338c064aff5ba0f1a5f24b59a5
fi
w_call remove_mono
# Remove Mono registry entry:
"$WINE" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
w_try rm -f "$W_WINDIR_UNIX/system32/mscoree.dll"
cd "$W_CACHE/$W_PACKAGE"
WINEDLLOVERRIDES=fusion=b "$WINE" dotNetFx40_Full_x86_x64.exe ${W_OPT_UNATTE
NDED:+/q /c:"install.exe /q"} || true
w_override_dlls native mscoree
"$WINE" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Fu
ll" /v Install /t REG_DWORD /d 0001 /f
"$WINE" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Fu
ll" /v Version /t REG_SZ /d "4.0.30319" /f
if w_workaround_wine_bug 30707 "Manually registering assemblies" 1.5.5,
then
cd "$W_TMP"
tar -xvjf "$W_CACHE/$W_PACKAGE/gacutil-net40.tar.bz2"
ll
do
done
[dD]ll
# Some of the dlls aren't assemblies. FIXME: Should filter them base
d on that..
rue
done
mkdir -p "$W_WINDIR_UNIX/Microsoft.NET/assembly/GAC_32/System.Enterprise
Services/v4.0_4.0.0.0__b03f5f7f11d50a3a"
cp "$W_WINDIR_UNIX/Microsoft.NET/Framework/v4.0.30319/System.EnterpriseS
ervices.dll" "$W_WINDIR_UNIX/Microsoft.NET/assembly/GAC_32/System.EnterpriseServ
ices/v4.0_4.0.0.0__b03f5f7f11d50a3a"
fi
}
#---------------------------------------------------------------w_metadata dotnet45 dlls \
title="MS .NET 4.5" \
publisher="Microsoft" \
year="2012" \
media="download" \
file1="dotnetfx45_full_x86_x64.exe" \
installed_file1="c:/windows/Microsoft.NET/Framework/v4.0.30319/Microsoft.Win
dows.ApplicationServer.Applications.45.man"
load_dotnet45()
{
if [ $W_ARCH = win64 ]
then
w_warn "This package may not work on a 64-bit installation"
fi
# http://www.microsoft.com/download/en/details.aspx?id=17718
w_download http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a
0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe b2ff712ca0947040ca0b8e9bd7436a3c352
4bb5d
w_call remove_mono
# Remove Mono registry entry:
"$WINE" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
w_try rm -f "$W_WINDIR_UNIX/system32/mscoree.dll"
# See https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478 fo
r Focht's recipe
w_call dotnet35
w_call dotnet40
w_set_winver win7
cd "$W_CACHE/$W_PACKAGE"
;;
case $status in
0) ;;
105) echo "exit status $status - normal, user selected 'restart now'" ;;
194) echo "exit status $status - normal, user selected 'restart later'"
*) w_die "exit status $status - $W_PACKAGE installation failed" ;;
esac
untimes" 1.5.7,
then
w_call vcrun2005
fi
#
#
#
#
After updating the above, you should carry the following steps out by
hand to verify that plugin works. (Ideally you'd also do it on
wine-1.5.6 to make sure the new version still uses vcrun2005 and
not something newer.)
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
rm -rf ~/.cache/winetricks/flash
cd ~/winetricks/src
rm -rf ~/.wine
sh winetricks -q flash ie7
cd ~/".wine/drive_c/Program Files/Internet Explorer"
wine iexplore.exe http://www.adobe.com/software/flash/about
Verify that the version of flash shows up and that you're not prompted
to install flash again
cd ~/winetricks/src
rm -rf ~/.wine
sh winetricks -q flash --no-isolate firefox
cd ~/.wine/drive_c/Program\ Files/Mozilla\ Firefox
wine firefox.exe http://www.adobe.com/software/flash/about
Verify that the version of flash shows up and that you're not prompted
to install flash again
load_gdiplus_winxp()
{
w_download_manual http://download.cnet.com/NET-Framework-1-0-GDIPLUS-DLL-Sec
urity-Update/3000-10250_4-10732223.html NDP1.0sp2-KB830348-X86-Enu.exe 6113cd89d
77525958295ccbd73b5fb8b89abd0aa
cd "$W_CACHE"/gdiplus
w_try_cabextract -d "$W_TMP" -F FL_gdiplus_dll_____X86.3643236F_FC70_11D3_A5
36_0090278A1BB8 "$W_CACHE"/gdiplus_winxp/$file1
w_try cp "$W_TMP/FL_gdiplus_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
" "$W_SYSTEM32_DLLS/gdiplus.dll"
year="2010" \
media="download" \
file1="wine_gecko-1.1.0-x86.cab" \
installed_file1="$W_SYSTEM32_DLLS_WIN/gecko/1.1.0/wine_gecko/nspr4.dll"
load_gecko110()
{
w_skip_windows gecko110 && return
w_warn "You should probably not be using the gecko110 verb, see http://wiki.
winehq.org/Gecko"
case `$WINE --version` in
wine-1.3.[2-9]|wine-1.3.[2-9]-*|wine-1.3.1[0-5]*)
;;
*)
w_die "This verb only supports wine-1.3.2 to wine-1.3.15"
;;
esac
w_download http://downloads.sourceforge.net/project/wine/Wine%20Gecko/1.1.0/
wine_gecko-1.1.0-x86.cab 1b6c637207b6f032ae8a52841db9659433482714
mkdir -p "$W_SYSTEM32_DLLS/gecko/1.1.0"
cd "$W_SYSTEM32_DLLS/gecko/1.1.0"
w_try_cabextract $W_UNATTENDED_DASH_Q "$W_CACHE/gecko110/wine_gecko-1.1.0-x8
6.cab"
cat > "$W_TMP"/geckopath.reg <<_EOF_
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\MSHTML\1.1.0]
"GeckoPath"="c:\\\\windows\\\\system32\\\\gecko\\\\1.1.0\\\\wine_gecko\\\\"
_EOF_
w_try_regedit "$W_TMP_WIN"\\geckopath.reg
}
w_try_regsvr mshtml
w_call msasn1
load_allcodecs()
{
w_call dirac
w_call l3codecx
w_call ffdshow
w_call icodecs
w_call xvid
}
#---------------------------------------------------------------w_metadata dirac dlls \
title="The Dirac directshow filter v1.0.2" \
publisher="Dirac" \
year="2009" \
media="download" \
file1="DiracDirectShowFilter-1.0.2.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/Dirac/DiracDecoder.dll"
load_dirac()
{
w_download $WINETRICKS_SOURCEFORGE/dirac/DiracDirectShowFilter-1.0.2.exe c91
2d30a8fa500c7841444559feb1f49301611c4
# Avoid mfc90 not found error. (DiracSplitter-libschroedinger.ax needs mfc9
0 to register itself, I think.)
w_call vcrun2008
cd "$W_CACHE"/dirac
w_ahk_do "
SetTitleMatchMode, 2
run DiracDirectShowFilter-1.0.2.exe
WinWait, Dirac, Welcome
if ( w_opt_unattended > 0 ) {
ControlClick, Button2
WinWait, Dirac, License
ControlClick, Button2
WinWait, Dirac, Location
ControlClick, Button2
WinWait, Dirac, Components
ControlClick, Button2
WinWait, Dirac, environment
ControlCLick, Button1
WinWait, Dirac, installed
ControlClick, Button2
}
WinWaitClose
"
load_ffdshow()
{
w_download $WINETRICKS_SOURCEFORGE/ffdshow-tryout/ffdshow_beta7_rev3154_2009
1209.exe 8534c31489e51df70ee9583438d6211e6f0696d0
cd "$W_CACHE"/ffdshow
w_try "$WINE" ffdshow_beta7_rev3154_20091209.exe $W_UNATTENDED_SLASH_SILENT
}
#---------------------------------------------------------------w_metadata hid dlls \
title="MS hid" \
publisher="Microsoft" \
year="2003" \
media="download" \
file1="../win2ksp4/W2KSP4_EN.EXE" \
installed_file1="$W_SYSTEM32_DLLS_WIN/hid.dll"
load_hid()
{
helper_win2ksp4 i386/hid.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/hid.dl_
}
"
if ( w_opt_unattended > 0 ) {
sleep 1000
controlclick, Button4 ; Finish
}
winwaitclose
de"
mkdir -p "$W_PROGRAMS_UNIX/kde"
w_try cp "$W_CACHE"/kde/kdewin-installer-gui-0.9.8-1.exe "$W_PROGRAMS_UNIX/k
cd "$W_PROGRAMS_UNIX/kde"
# There's no unattended option, probably because there are so many choices,
# it's like cygwin
w_try "$WINE" kdewin-installer-gui-0.9.8-1.exe
}
#---------------------------------------------------------------w_metadata kindle apps \
title="Amazon Kindle" \
publisher="Amazon" \
year="2011" \
media="download" \
file1="KindleForPC-installer.exe" \
installed_exe1="$W_PROGRAMS_WIN/Amazon/Kindle/Kindle.exe" \
homepage="http://www.amazon.com/gp/feature.html/?docId=1000426311"
load_kindle()
{
w_download http://kindleforpc.amazon.com/36154/KindleForPC-installer.exe aca
576086de7abd1d82c211dbeeb810387e046f5
cd "$W_CACHE"/kindle
w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
w_declare_exe "$W_PROGRAMS_WIN\\Amazon\\Kindle" Kindle.exe
}
#---------------------------------------------------------------w_metadata l3codecx dlls \
title="MPEG Layer-3 Audio Codec for Microsoft DirectShow" \
publisher="Microsoft" \
year="2010" \
media="download" \
file1="../directx9/directx_feb2010_redist.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/l3codecx.ax"
load_l3codecx()
{
helper_directx_dl
E
then
fi
# http://www.microsoft.com/downloads/en/details.aspx?FamilyId=9AD000F2-CAE7493D-B0F3-AE36C570ADE8&displaylang=en
w_download_manual http://download.cnet.com/Microsoft-Data-Access-ComponentsMDAC-2-7-Service-Pack-1-Refresh/3000-10250_4-10729498.html mdac_typ.exe f68594d1
f578c3b47bf0639c46c11c5da161feee
load_native_mdac
w_set_winver nt40
w_try "$WINE" "$W_CACHE"/mdac27/mdac_typ.exe ${W_OPT_UNATTENDED:+ /q /C:"set
up /QNT"}
w_unset_winver
}
#---------------------------------------------------------------w_metadata mdac28 dlls \
title="Microsoft Data Access Components 2.8 sp1" \
publisher="Microsoft" \
year="2005" \
media="download" \
file1="MDAC_TYP.EXE" \
installed_file1="$W_COMMONFILES_X86_WIN/System/ADO/msado27.tlb"
load_mdac28()
{
# http://www.microsoft.com/downloads/en/details.aspx?familyid=78cac895-efc24f8e-a9e0-3a1afbd5922e
w_download http://download.microsoft.com/download/4/a/a/4aafff19-9d21-4d35-a
e81-02c48dcbbbff/MDAC_TYP.EXE 4fbc272c79da59e38818924d8575accb0af776fb
load_native_mdac
w_set_winver win98
cd "$W_CACHE"/mdac28
if [ $W_UNATTENDED_SLASH_Q ]
then
w_try "$WINE" mdac_typ.exe /q /C:"setup /QNT"
else
w_try "$WINE" mdac_typ.exe
fi
w_unset_winver
}
#---------------------------------------------------------------w_metadata mfc40 dlls \
title="MS mfc40 (Microsoft Foundation Classes from Visual C++ 4.0)" \
publisher="Microsoft" \
year="1999" \
media="download" \
file1="mfc40.cab" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc40.dll"
load_mfc40()
{
w_download http://activex.microsoft.com/controls/vc/mfc40.cab 53c570e2c81167
4d6e4fa46cff5a3a04cd0ffc24
w_try_cabextract -d "$W_TMP" "$W_CACHE"/mfc40/mfc40.cab
w_try_cabextract -d "$W_SYSTEM32_DLLS" -F *40.dll "$W_TMP"/mfc40.exe
}
#---------------------------------------------------------------w_metadata mozillabuild apps \
title="Mozilla build environment" \
publisher="The Mozilla Foundation" \
year="2010" \
media="download" \
file1="MozillaBuildSetup-1.5.1.exe" \
installed_file1="c:/mozilla-build/start-l10n.bat" \
homepage="https://wiki.mozilla.org/MozillaBuild"
load_mozillabuild()
{
w_download http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/Mo
zillaBuildSetup-1.5.1.exe 216c52eafe42df7559e8451f4e40a28e9c0f8133
cd "$W_CACHE/$W_PACKAGE"
w_try "$WINE" MozillaBuildSetup-1.5.1.exe $W_UNATTENDED_SLASH_S
}
#---------------------------------------------------------------w_metadata msacm32 dlls \
title="MS ACM32" \
publisher="Microsoft" \
year="2003" \
media="download" \
file1="../xpsp2/WindowsXP-KB835935-SP2-ENU.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msacm32.dll"
load_msacm32()
{
helper_xpsp2 i386/msacm32.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/msacm32.dl_
w_override_dlls native,builtin msacm32
}
#---------------------------------------------------------------w_metadata msasn1 dlls \
title="MS ASN1" \
publisher="Microsoft" \
year="2003" \
media="download" \
file1="../win2ksp4/W2KSP4_EN.EXE" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msasn1.dll"
load_msasn1()
{
helper_win2ksp4 i386/msasn1.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/msasn1.dl_
}
#---------------------------------------------------------------w_metadata msctf dlls \
title="MS Text Service Module" \
publisher="Microsoft" \
year="2003" \
media="download" \
file1="../xpsp2/WindowsXP-KB835935-SP2-ENU.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msctf.dll"
load_msctf()
{
helper_xpsp2 i386/msctf.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/msctf.dl_
w_override_dlls native,builtin msctf
}
#---------------------------------------------------------------w_metadata msflxgrd dlls \
title="MS FlexGrid Control (msflxgrd.ocx)" \
publisher="Microsoft" \
year="2009" \
media="download" \
file1="msflxgrd.cab" \
installed_file1="$W_SYSTEM32_DLLS_WIN/MSFlxGrd.Ocx"
load_msflxgrd()
{
# http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx
# may 2011: f497c3b390cd80d5bcd1f13d5c0c68b206369aa7
w_download http://activex.microsoft.com/controls/vb6/msflxgrd.cab f497c3b390
cd80d5bcd1f13d5c0c68b206369aa7
w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msflxgrd/msflxgrd.cab
w_try cp -f "$W_TMP"/[Mm][Ss][Ff][Ll][Xx][Gg][Rr][Dd].[Oo][Cc][Xx] "$W_SYSTE
M32_DLLS"
w_try_regsvr MSFlxGrd.Ocx
}
#---------------------------------------------------------------w_metadata mshflxgd dlls \
title="MS Hierarchical FlexGrid Control (mshflxgd.ocx)" \
publisher="Microsoft" \
year="2009" \
media="download" \
file1="MSHFLXGD.CAB" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mshflxgd.ocx"
load_mshflxgd()
{
# http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx
# orig: 5f9c7a81022949bfe39b50f2bbd799c448bb7377
# Jan 2009: 7ad74e589d5eefcee67fa14e65417281d237a6b6
# May 2009: bd8aa796e16e5f213414af78931e0379d9cbe292
w_download http://activex.microsoft.com/controls/vb6/MSHFLXGD.CAB bd8aa796e1
6e5f213414af78931e0379d9cbe292
w_try_cabextract --directory="$W_TMP" "$W_CACHE"/mshflxgd/MSHFLXGD.CAB
w_try cp -f "$W_TMP"/[Mm][Ss][Hh][Ff][Ll][Xx][Gg][Dd].[Oo][Cc][Xx] "$W_SYSTE
M32_DLLS"
w_try_regsvr mshflxgd.ocx
}
#----------------------------------------------------------------
}
#---------------------------------------------------------------w_metadata msls31 dlls \
title="MS Line Services" \
publisher="Microsoft" \
year="2001" \
media="download" \
file1="InstMsiW.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msls31.dll"
load_msls31()
{
# Needed by native richedit and internet explorer
w_download http://download.microsoft.com/download/WindowsInstaller/Install/2
.0/NT45/EN-US/InstMsiW.exe 4fc3bf0dc96b5cf5ab26430fac1c33c5c50bd142
w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msls31/InstMsiW.exe
w_try cp -f "$W_TMP"/msls31.dll "$W_SYSTEM32_DLLS"
}
#----------------------------------------------------------------
# Hmm. Anyone know of a better source? At least it has the right checksum.
w_download_manual http://download.cnet.com/Microsoft-XML-Parser-MSXML-3-0-Se
rvice-Pack-7-SP7/3000-7241_4-10731613.html msxml3.msi d4c2178dfb807e1a0267fce0fd
06b8d51106d913
# it won't install on top of wine's msxml3, which has a pretty high version
number, so delete wine's fake dll
rm "$W_SYSTEM32_DLLS"/msxml3.dll
w_override_dlls native msxml3
cd "$W_CACHE"/msxml3
w_try "$WINE" msiexec /i msxml3.msi $W_UNATTENDED_SLASH_Q
}
#---------------------------------------------------------------w_metadata msxml4 dlls \
title="MS XML Core Services 4.0" \
publisher="Microsoft" \
year="2009" \
media="download" \
file1="msxml.msi" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msxml4.dll"
load_msxml4()
{
# MS06-071: http://www.microsoft.com/downloads/details.aspx?familyid=24B7D14
1-6CDF-4FC4-A91B-6F18FE6921D4
# w_download http://download.microsoft.com/download/e/2/e/e2e92e52-210b-4774
-8cd9-3a7a0130141d/msxml4-KB927978-enu.exe d364f9fe80c3965e79f6f64609fc253dfeb69
c25
# MS07-042: http://www.microsoft.com/downloads/details.aspx?FamilyId=021E12F
5-CB46-43DF-A2B8-185639BA2807
# w_download http://download.microsoft.com/download/9/4/2/9422e6b6-08ee-49cb
-9f05-6c6ee755389e/msxml4-KB936181-enu.exe 73d75d7b41f8a3d49f272e74d4f73bb5e82f1
acf
# SP3 (2009): http://www.microsoft.com/downloads/details.aspx?familyid=7F6C0
CB4-7A5E-4790-A7CF-9E139E6819C0
w_download http://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9
DAD-38AFDB0A177E/msxml.msi aa70c5c1a7a069af824947bcda1d9893a895318b
w_override_dlls native,builtin msxml4
cd "$W_CACHE"/msxml4
w_try "$WINE" msiexec /i msxml.msi $W_UNATTENDED_SLASH_Q
}
#---------------------------------------------------------------w_metadata msxml6 dlls \
title="MS XML Core Services 6.0 sp1" \
publisher="Microsoft" \
year="2007" \
media="download" \
file1="msxml6_x86.msi" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msxml6.dll"
load_msxml6()
{
# Service Pack 1
# http://www.microsoft.com/downloads/details.aspx?familyid=D21C292C-368B-4CE
1-9DAB-3E9827B70604
w_download http://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-b
b39-4694b5b3006f/msxml6_x86.msi 5125220e985b33c946bbf9f60e2b222c7570bfa2
w_override_dlls native,builtin msxml6
rm -f "$W_SYSTEM32_DLLS/msxml6.dll"
w_try "$WINE" msiexec /i "$W_CACHE"/msxml6/msxml6_x86.msi $W_UNATTENDED_SLAS
H_Q
}
#---------------------------------------------------------------w_metadata nuget dlls \
title="NuGet Package manager" \
publisher="Outercurve Foundation" \
year="2013" \
media="download" \
file1="nuget.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/nuget.exe" \
homepage="https://nuget.org"
load_nuget()
{
w_call dotnet40
# 2014-01-22: d4082afc4f89df195fa1e83ee1cf02bce3dd2f13
# 2014-02-26: 9bc98ced9c2d2b51ab687f86b5580913c025b8b0
w_download https://nuget.org/nuget.exe 9bc98ced9c2d2b51ab687f86b5580913c025b
8b0
w_try cp "$W_CACHE/$W_PACKAGE"/nuget.exe "$W_SYSTEM32_DLLS"
w_warn "To run nuget, use the commandline \"$WINE nuget\"."
}
#---------------------------------------------------------------w_metadata ogg dlls \
title="OpenCodecs 0.85: flac, speex, theora, vorbis, WebM" \
publisher="xiph.org" \
year="2011" \
media="download" \
file1="opencodecs_0.85.17777.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/Xiph.Org/Open Codecs/AxPlayer.dll" \
homepage="http://xiph.org/dshow"
load_ogg()
{
w_download http://downloads.xiph.org/releases/oggdsf/opencodecs_0.85.17777.e
xe 386cf7cd29ffcbf8705eff8c8233de448ecf33ab
cd "$W_CACHE"/ogg
w_try "$WINE" $file1 $W_UNATTENDED_SLASH_S
}
#---------------------------------------------------------------w_metadata openwatcom apps \
title="Open Watcom C/C++ compiler (can compile win16 code!)" \
publisher="Watcom" \
year="2010" \
media="download" \
file1="open-watcom-c-win32-1.9.exe" \
installed_file1="c:/WATCOM/owsetenv.bat" \
homepage="http://www.openwatcom.org"
load_openwatcom()
98
if [ $W_UNATTENDED_SLASH_Q ]
then
# Options documented at http://bugzilla.openwatcom.org/show_bug.cgi?id=8
# 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 "$W_TMP"
cp "$W_CACHE"/openwatcom/open-watcom-c-win32-1.9.exe .
w_try_unzip open-watcom-c-win32-1.9.exe setup.inf
sed -i 's/tools16=.*/tools16=true/' setup.inf
w_try zip -f open-watcom-c-win32-1.9.exe
w_try "$WINE" open-watcom-c-win32-1.9.exe -s
else
fi
cd "$W_CACHE/$W_PACKAGE"
w_try "$WINE" open-watcom-c-win32-1.9.exe
if test ! -f "$W_DRIVE_C"/WATCOM/binnt/wcc.exe
then
w_warn "c:/watcom/binnt/wcc.exe not found; you probably didn't select 16
bit tools, and won't be able to buld win16test"
fi
load_physx()
{
# Has a minor issue, see bug report http://bugs.winehq.org/show_bug.cgi?id=3
4167
w_download http://uk.download.nvidia.com/Windows/9.13.0604/PhysX-9.13.0604-S
ystemSoftware.msi c2aac1635bfc474de82b5aad6571d15b4ccb84b5
cd "$W_CACHE"/physx
w_try "$WINE" msiexec /i PhysX-9.13.0604-SystemSoftware.msi $W_UNATTENDED_SL
ASH_Q
}
#---------------------------------------------------------------w_metadata pngfilt dlls \
title="pngfilt.dll (from ie5)" \
publisher="Microsoft" \
year="2004" \
media="download" \
file1="IE5.01sp4-KB871260-Windows2000sp4-x86-ENU.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/pngfilt.dll"
load_pngfilt()
{
# http://www.microsoft.com/en-us/download/details.aspx?id=3907
w_download http://download.microsoft.com/download/5/0/c/50c42d0e-07a8-4a2b-b
efb-1a403bd0df96/IE5.01sp4-KB871260-Windows2000sp4-x86-ENU.exe 6f5db296ebf58e81c
49bc667049a3f88a3f1ec3d
w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F pngfilt.dll "$W_CACHE"/pngfilt/
IE5.01sp4-KB871260-Windows2000sp4-x86-ENU.exe
w_try_regsvr pngfilt.dll
}
#---------------------------------------------------------------w_metadata quartz dlls \
title="quartz.dll (from Directx 9 user redistributable)" \
publisher="Microsoft" \
year="2010" \
media="download" \
file1="../directx9/directx_feb2010_redist.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/quartz.dll"
load_quartz()
{
helper_directx_dl
E
year="2010" \
media="download" \
file1="quicktimeplayer72.exe" \
installed_file1="c:/windows/Installer/{95A890AA-B3B1-44B6-9C18-A8F7AB3EE7FC}
/QTPlayer.ico"
load_quicktime72()
{
# http://www.apple.com/support/downloads/quicktime72forwindows.html
# http://www.oldapps.com/quicktime_player.php?old_quicktime=6
w_download http://download.oldapps.com/Quicktime/quicktimeplayer72.exe bb899
81f10cf21de57b9453e53cf81b9194271a9
unset QUICKTIME_QUIET
if test "$W_UNATTENDED_SLASH_Q" != ""
then
QUICKTIME_QUIET="/qn" # ISSETUPDRIVEN=0
fi
if w_workaround_wine_bug 9366 "" 1.1.22,
then
w_call gdiplus
w_call vcrun2005
# no bug number, but same era
fi
me"
if w_workaround_wine_bug 1347
then
w_warn "Setting vista mode to avoid blacking the whole screen in quickti
fi
w_set_winver vista
cd "$W_CACHE"/quicktime72
w_try "$WINE" quicktimeplayer72.exe ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRun
Flags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No $QUICKTIME_QUIET >
/dev/null 2>&1
if w_workaround_wine_bug 11681
then
# Following advice verified with test movies from
# http://support.apple.com/kb/HT1425
# in QuickTimePlayer.
w_warn "In Quicktime preferences, check Advanced / Safe Mode (gdi), or m
ovies won't play."
if test "$W_UNATTENDED_SLASH_Q" = ""
then
w_try "$WINE" control "$W_PROGRAMS_WIN\\QuickTime\\QTSystem\\QuickTi
me.cpl"
else
# FIXME: script the control panel with autohotkey?
# We could probably also overwrite QuickTime.qtp but
# the format isn't known, so we'd have to override all other setting
s, too.
:
fi
fi
}
#----------------------------------------------------------------
me"
if w_workaround_wine_bug 1347
then
w_warn "Setting vista mode to avoid blacking the whole screen in quickti
fi
w_set_winver vista
cd "$W_CACHE"/quicktime76
w_try "$WINE" QuickTimeInstaller.exe ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRu
nFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No $QUICKTIME_QUIET >
/dev/null 2>&1
if w_workaround_wine_bug 11681
then
# Following advice verified with test movies from
# http://support.apple.com/kb/HT1425
# in QuickTimePlayer.
w_warn "In Quicktime preferences, check Advanced / Safe Mode (gdi), or m
ovies won't play."
if test "$W_UNATTENDED_SLASH_Q" = ""
then
w_try "$WINE" control "$W_PROGRAMS_WIN\\QuickTime\\QTSystem\\QuickTi
me.cpl"
else
# FIXME: script the control panel with autohotkey?
# We could probably also overwrite QuickTime.qtp but
# the format isn't known, so we'd have to override all other setting
s, too.
:
fi
fi
}
#---------------------------------------------------------------w_metadata remove_mono settings \
title_uk=" wine-mono" \
title="Remove builtin wine-mono"
load_remove_mono()
{
# FIXME: fold other .NET cleanups here (registry entries).
# Probably should only do that for wine >= 1.5.6
mono_uuid="`$WINE uninstaller --list | grep Mono | cut -f1 -d\|`"
if test "$mono_uuid"
then
"$WINE" uninstaller --remove $mono_uuid
else
w_warn "Mono does not appear to be installed."
fi
}
#---------------------------------------------------------------w_metadata riched20 dlls \
title="MS RichEdit Control version 2.0 (riched20.dll)" \
publisher="Microsoft" \
year="2004" \
media="download" \
file1="../win2ksp4/W2KSP4_EN.EXE" \
installed_file1="$W_SYSTEM32_DLLS_WIN/riched20.dll"
load_riched20()
{
# FIXME: this verb used to also install riched32. Does anyone need that?
helper_win2ksp4 i386/riched20.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/riched20.dl_
w_override_dlls native,builtin riched20
# https://code.google.com/p/winetricks/issues/detail?id=292
w_call msls31
installed_file1="$W_SYSTEM32_DLLS_WIN/secur32.dll"
load_secur32()
{
# http://www.microsoft.com/downloads/details.aspx?familyid=c4e408d7-6716-4a1
2-ad3a-8029667f5c84
w_download http://download.microsoft.com/download/6/9/5/69501788-B62F-44D8-9
33F-B6FAA576CA87/Windows2000-KB959426-x86-ENU.EXE bf930a4d2982165a0793465bb255d4
94ba5b4cf7
w_try_cabextract "$W_CACHE"/secur32/Windows2000-KB959426-x86-ENU.EXE -d "$W_
SYSTEM32_DLLS" -F secur32.dll
w_override_dlls native,builtin secur32
}
#---------------------------------------------------------------w_metadata shockwave dlls \
title="Shockwave" \
publisher="Adobe" \
year="2010" \
media="download" \
file1="sw_lic_full_installer.msi" \
installed_file1="$W_SYSTEM32_DLLS_WIN/Adobe/Shockwave 12/shockwave_Projector
_Loader.dcr"
load_shockwave() {
# Not silent enough, use msi instead
#w_download http://fpdownload.macromedia.com/get/shockwave/default/english/w
in95nt/latest/Shockwave_Installer_Full.exe 840e34e9b067cf247bfa9092665b8966158f3
8e3
#w_try "$WINE" "$W_CACHE"/Shockwave_Installer_Full.exe $W_UNATTENDED_SLASH_S
# old sha1sum: 6a91a9da4b54c3fdc97130a15e1a173117e5f4ff
# 2009-07-31 sha1sum: 0bb506ef67a268e8d3fb6c7ce556320ee10b9da5
# 2009-12-13 sha1sum: d35649883bf13cb1a86f5650e1050d15533ac0f4
# 2010-01-23 sha1sum: 4a837d238c28c5f345d73f105711f20c6d059273
# 2010-05-15 sha1sum: bdce02afc82233801e84137e78c2c5fe574db253
# 2010-09-02 sha1sum: fed20eccc29fec2f64162b7265343514d43884bc
# 2010-11-03 sha1sum: 2ff28665543e80f3bd4ff1933ac05ec9314aaac6
# 2011-02-03 sha1sum: e71ddc4fa42662208b2f52c1bd34a40e7775ad75
# 2011-06-13 sha1sum: 7fd6cc61bb20d0bef654a44f4501a5a65b55b0c9
# 2011-11-10 sha1sum: b55974b471c516f13fb032424247c07390baf380
# 2012-03-07 sha1sum: 3b10f645ba1a6815fa97924a6bde4eda3177ff68
# 2012-04-26 sha1sum: 48b1a44b2c12c486916d641f3b4e20abffb3d6e4
# 2012-08-08 sha1sum: 3c4d531ccf0bb5788f1c197c63e9c0aa89885ee6
# 2013-06-15 sha1sum: 9c02499deaf567bde7d827493705e5680833d02e
# 2014-01-22 sha1sum: c8f1b2c137a1373d591f7c1d48db9c6baa961caf
# 2014-02-26 sha1sum: ae2855b729bfaedc766f3addd8c2b74eac576909
w_download http://fpdownload.macromedia.com/get/shockwave/default/english/wi
n95nt/latest/sw_lic_full_installer.msi ae2855b729bfaedc766f3addd8c2b74eac576909
cd "$W_CACHE"/shockwave
w_try "$WINE" msiexec /i sw_lic_full_installer.msi $W_UNATTENDED_SLASH_Q
}
#---------------------------------------------------------------w_metadata speechsdk dlls \
title="MS Speech SDK 5.1" \
publisher="Microsoft" \
year="2009" \
media="download" \
file1="SpeechSDK51.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/Microsoft Speech SDK 5.1/Bin/SAPI51Samp
leApp.exe"
load_speechsdk()
{
# http://www.microsoft.com/download/en/details.aspx?id=10121
w_download http://download.microsoft.com/download/B/4/3/B4314928-7B71-4336-9
DE7-6FA4CF00B7B3/SpeechSDK51.exe f69efaee8eb47f8c7863693e8b8265a3c12c4f51
w_try_unzip -d "$W_TMP" "$W_CACHE"/speechsdk/SpeechSDK51.exe
# Otherwise it only installs the SDK and not the redistributable:
w_set_winver win2k
Q
}
cd "$W_TMP"
w_try "$WINE" msiexec /i "Microsoft Speech SDK 5.1.msi" $W_UNATTENDED_SLASH_
w_unset_winver
5-b702-de3bb768148f
w_download_to msi2 http://download.microsoft.com/download/WindowsInstaller/I
nstall/2.0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msi2/InstMsiA.exe
w_try cp -f "$W_TMP"/usp10.dll "$W_SYSTEM32_DLLS"
w_override_dlls native,builtin usp10
}
#---------------------------------------------------------------w_metadata vb2run dlls \
title="MS Visual Basic 2 runtime" \
publisher="Microsoft" \
year="1993" \
media="download" \
file1="VBRUN200.EXE" \
installed_file1="$W_SYSTEM32_DLLS_WIN/VBRUN200.DLL"
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
w_download ftp://$ftp_microsoft_com/Softlib/MSLFILES/VBRUN200.EXE ac0568b73e
e375408778e9b505df995f79ab907e
w_try_unzip -d "$W_TMP" "$W_CACHE"/vb2run/VBRUN200.EXE
w_try cp -f "$W_TMP/VBRUN200.DLL" "$W_SYSTEM32_DLLS"
}
#---------------------------------------------------------------w_metadata vb3run dlls \
title="MS Visual Basic 3 runtime" \
publisher="Microsoft" \
year="1998" \
media="download" \
file1="vb3run.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/Vbrun300.dll"
load_vb3run()
{
# See http://support.microsoft.com/kb/196285
w_download http://download.microsoft.com/download/vb30/utility/1/w9xnt4/en-u
s/vb3run.exe 518fcfefde9bf680695cadd06512efadc5ac2aa7
w_try_unzip -d "$W_TMP" "$W_CACHE"/vb3run/vb3run.exe
w_try cp -f "$W_TMP/Vbrun300.dll" "$W_SYSTEM32_DLLS"
}
#---------------------------------------------------------------w_metadata vb4run dlls \
title="MS Visual Basic 4 runtime" \
publisher="Microsoft" \
year="1998" \
media="download" \
file1="vb4run.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/Vb40032.dll"
load_vb4run()
{
# See http://support.microsoft.com/kb/196286
w_download http://download.microsoft.com/download/vb40ent/sample27/1/w9xnt4/
en-us/vb4run.exe 83e968063272e97bfffd628a73bf0ff5f8e1023b
w_try_unzip -d "$W_TMP" "$W_CACHE"/vb4run/vb4run.exe
w_try cp -f "$W_TMP/Vb40032.dll" "$W_SYSTEM32_DLLS"
w_try cp -f "$W_TMP/Vb40016.dll" "$W_SYSTEM32_DLLS"
}
#---------------------------------------------------------------w_metadata vb5run dlls \
title="MS Visual Basic 5 runtime" \
publisher="Microsoft" \
year="2001" \
media="download" \
file1="msvbvm50.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msvbvm50.dll"
load_vb5run()
{
w_download http://download.microsoft.com/download/vb50pro/utility/1/win98/en
-us/msvbvm50.exe 28bfaf09b8ac32cf5ffa81252f3e2fadcb3a8f27
cd "$W_CACHE"/vb5run
w_try "$WINE" msvbvm50.exe $W_UNATTENDED_SLASH_Q
}
#---------------------------------------------------------------w_metadata vb6run dlls \
title="MS Visual Basic 6 runtime sp6" \
publisher="Microsoft" \
year="2004" \
media="download" \
file1="vbrun60sp6.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/MSVBVM60.DLL"
load_vb6run()
{
# http://support.microsoft.com/kb/290887
if test ! -f "$W_CACHE"/vb6run/vbrun60sp6.exe
then
w_download http://download.microsoft.com/download/5/a/d/5ad868a0-8ecd-4b
b0-a882-fe53eb7ef348/VB6.0-KB290887-X86.exe 73ef177008005675134d2f02c6f580515ab0
d842
w_try "$WINE" "$W_CACHE"/vb6run/VB6.0-KB290887-X86.exe "/T:$W_TMP_WIN" /
c $W_UNATTENDED_SLASH_Q
if test ! -f "$W_TMP"/vbrun60sp6.exe
then
w_die vbrun60sp6.exe not found
fi
w_try mv "$W_TMP"/vbrun60sp6.exe "$W_CACHE"/vb6run
fi
# Delete some fake DLLs to ensure that the installer overwrites them.
rm -f "$W_SYSTEM32_DLLS"/comcat.dll
rm -f "$W_SYSTEM32_DLLS"/oleaut32.dll
rm -f "$W_SYSTEM32_DLLS"/olepro32.dll
rm -f "$W_SYSTEM32_DLLS"/stdole2.tlb
cd "$W_CACHE"/vb6run
# Exits with status 43 for some reason?
"$WINE" vbrun60sp6.exe $W_UNATTENDED_SLASH_Q
status=$?
case $status in
0|43) ;;
*) w_die $W_PACKAGE installation failed
esac
#---------------------------------------------------------------winetricks_vcrun6_helper() {
if test ! -f "$W_CACHE"/vcrun6/vcredist.exe
then
w_download_to vcrun6 http://download.microsoft.com/download/vc60pro/Upda
te/2/W9XNT4/EN-US/VC6RedistSetup_deu.exe a8c4dd33e281c166488846a10edf97ff0ce3704
4
w_try "$WINE" "$W_CACHE"/vcrun6/vc6redistsetup_deu.exe "/T:$W_TMP_WIN" /
c $W_UNATTENDED_SLASH_Q
if test ! -f "$W_TMP"/vcredist.exe
then
w_die vcredist.exe not found
fi
mv "$W_TMP"/vcredist.exe "$W_CACHE"/vcrun6
fi
}
w_metadata vcrun6 dlls \
title="Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcirt)" \
publisher="Microsoft" \
year="2000" \
media="download" \
file1="vc6redistsetup_deu.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc42.dll"
load_vcrun6()
{
# Load the Visual C++ 6 runtime libraries, including the elusive mfc42u.dll
winetricks_vcrun6_helper
# Delete some fake dlls to avoid vcredist installer warnings
rm -f "$W_SYSTEM32_DLLS"/comcat.dll
rm -f "$W_SYSTEM32_DLLS"/msvcrt.dll
rm -f "$W_SYSTEM32_DLLS"/oleaut32.dll
rm -f "$W_SYSTEM32_DLLS"/olepro32.dll
rm -f "$W_SYSTEM32_DLLS"/stdole2.tlb
"$WINE" "$W_CACHE"/vcrun6/vcredist.exe
status=$?
case $status in
0|43) ;;
*) w_die vcrun6 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?
load_mfc42
}
w_metadata mfc42 dlls \
title="Visual C++ 6 sp4 mfc42 library; part of vcrun6" \
publisher="Microsoft" \
year="2000" \
media="download" \
file1="../vcrun6/vc6redistsetup_deu.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc42u.dll"
load_mfc42()
{
winetricks_vcrun6_helper
w_try_cabextract "$W_CACHE"/vcrun6/vcredist.exe -d "$W_SYSTEM32_DLLS" -F "mf
c42*.dll"
}
w_metadata msvcirt dlls \
title="Visual C++ 6 sp4 msvcirt library; part of vcrun6" \
publisher="Microsoft" \
year="2000" \
media="download" \
file1="../vcrun6/vc6redistsetup_deu.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/msvcirt.dll"
load_msvcirt()
{
winetricks_vcrun6_helper
w_try_cabextract "$W_CACHE"/vcrun6/vcredist.exe -d "$W_SYSTEM32_DLLS" -F msv
cirt.dll
}
#---------------------------------------------------------------# FIXME: we don't currently have an install check that can distinguish
# between sp4 and sp6, it would have to check size or version of a file,
# or maybe a registry key.
w_metadata vcrun6sp6 dlls \
title="Visual C++ 6 sp6 libraries (with fixes in atl and mfc)" \
publisher="Microsoft" \
year="2004" \
media="download" \
file1="Vs6sp6.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/mfc42.dll"
load_vcrun6sp6()
{
w_download http://download.microsoft.com/download/1/9/f/19fe4660-5792-4683-9
9e0-8d48c22eed74/Vs6sp6.exe 2292437a8967349261c810ae8b456592eeb76620
# No EULA is presented when passing command-line extraction arguments,
# so we'll simplify extraction with cabextract.
w_try_cabextract "$W_CACHE"/vcrun6sp6/Vs6sp6.exe -d "$W_TMP" -F vcredist.exe
cd "$W_TMP"
# Delete some fake dlls to avoid vcredist installer warnings
w_try rm -f "$W_SYSTEM32_DLLS"/comcat.dll
w_try rm -f "$W_SYSTEM32_DLLS"/msvcrt.dll
w_try rm -f "$W_SYSTEM32_DLLS"/oleaut32.dll
w_try rm -f "$W_SYSTEM32_DLLS"/olepro32.dll
w_try rm -f "$W_SYSTEM32_DLLS"/stdole2.tlb
# vcredist still exits with status 43. Anyone know why?
"$WINE" vcredist.exe
status=$?
case $status in
0|43) ;;
*) w_die $W_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?
w_try_cabextract vcredist.exe -d "$W_SYSTEM32_DLLS" -F mfc42u.dll
# Should the mfc42 verb install this one instead?
load_vcrun2005()
{
# June 2011 security update, see
# http://www.microsoft.com/technet/security/bulletin/MS11-025.mspx or
# http://support.microsoft.com/kb/2538242
w_download http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-A
C2E-4B208FD8D66A/vcredist_x86.EXE b8fab0bb7f62a24ddfe77b19cd9a1451abd7b847
cd "$W_CACHE"/vcrun2005
w_override_dlls native,builtin atl80 msvcm80 msvcp80 msvcr80 vcomp
w_try "$WINE" $file1 $W_UNATTENDED_SLASH_Q
if [ $W_UNATTENDED_SLASH_Q ]
then
w_try "$WINE" "$W_CACHE"/vjrun20/vjredist.exe /q /C:"install /QNT"
else
w_try "$WINE" "$W_CACHE"/vjrun20/vjredist.exe
fi
year="2008" \
media="download" \
file1="../win2ksp4/W2KSP4_EN.EXE" \
installed_file1="$W_SYSTEM32_DLLS_WIN/wininet.dll"
load_wininet()
{
helper_win2ksp4 i386/wininet.dl_
w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/wininet.dl_
w_override_dlls native,builtin wininet
}
#---------------------------------------------------------------w_metadata wmi dlls \
title="Windows Management Instrumentation (aka WBEM) Core 1.5" \
publisher="Microsoft" \
year="2000" \
media="download" \
file1="wmi9x.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/wbem/wbemcore.dll"
load_wmi()
{
if test $W_ARCH = win64
then
w_die "Installer doesn't support 64-bit architecture."
fi
# WMI for NT4.0 need validation: http://www.microsoft.com/downloads/en/detai
ls.aspx?FamilyID=c174cfb1-ef67-471d-9277-4c2b1014a31e
# See also http://www.microsoft.com/downloads/en/details.aspx?FamilyId=98A4C
5BA-337B-4E92-8C18-A63847760EA5
w_download http://download.microsoft.com/download/platformsdk/wmi9x/1.5/W9X/
EN-US/wmi9x.exe 62752e9c1b879688c26f205eebf07d3783906c3e
w_set_winver win98
w_override_dlls native,builtin wbemprox wmiutils
# Note: there is a crash in the background towards the end, doesn't seem to
hurt; see http://bugs.winehq.org/show_bug.cgi?id=7920
cd "$W_CACHE"/wmi
w_try "$WINE" wmi9x.exe $W_UNATTENDED_SLASH_S
w_unset_winver
}
#---------------------------------------------------------------w_metadata wsh56js dlls \
title="MS Windows scripting 5.6, jscript only, no cscript" \
publisher="Microsoft" \
year="2006" \
media="download" \
file1="Windows2000-KB917344-56-x86-enu.exe" \
installed_file1="c:/windows/inf/jscren.inf"
load_wsh56js()
{
# This installs jscript 5.6 (but not vbscript)
# See also http://www.microsoft.com/downloads/details.aspx?FamilyID=16dd21a1
-c4ee-4eca-8b80-7bd1dfefb4f8&DisplayLang=en
w_download http://download.microsoft.com/download/b/c/3/bc3a0c36-fada-497d-a
3de-8b0139766f3b/Windows2000-KB917344-56-x86-enu.exe add5f74c5bd4da6cfae47f8306d
e213ec6ed52c8
cd "$W_CACHE/$W_PACKAGE"
w_override_dlls native,builtin jscript
# setupapi looks at the versions in new and original jscript.dll, and wine's
original is newer than wsh56js's, so have to nuke the original
w_try rm "$W_SYSTEM32_DLLS/jscript.dll"
w_try "$WINE" Windows2000-KB917344-56-x86-enu.exe $W_UNATTENDED_SLASH_Q
xe
ECTX_NAME
for x in "$W_TMP"/*.cab
do
w_try_cabextract -d "$W_SYSTEM32_DLLS"
w_try_cabextract -d "$W_SYSTEM32_DLLS"
w_try_cabextract -d "$W_SYSTEM32_DLLS"
w_try_cabextract -d "$W_SYSTEM32_DLLS"
done
-L
-L
-L
-L
-F
-F
-F
-F
'xactengine*.dll' "$x"
'xaudio*.dll' "$x"
'x3daudio*.dll' "$x"
'xapofx*.dll' "$x"
ed8-9326-ba1e639031b1/WindowsXP-KB915865-v11-x86-ENU.exe 226d246a1c64e693791de5c
727509002d089b0d5 ;;
fr*) w_download http://download.microsoft.com/download/4/1/d/41de58a0-6715-4
d3e-99e7-ff0c11283d1b/WindowsXP-KB915865-v11-x86-FRA.exe abb70b6a96be7dce453b008
77739e90c6f3efba0 ;;
de*) w_download http://download.microsoft.com/download/9/b/6/9b67efdb-cce3-4
247-a2e0-386673859a1b/WindowsXP-KB915865-v11-x86-DEU.exe a03a325815acf9d624db58a
b94a140a5586e64c8 ;;
*) w_die "sorry, xmllite install not yet implemented for language $LANG" ;;
esac
if w_workaround_wine_bug 16013
then
# Find instructions to create this file in dlls/wintrust/tests/crypt.c
w_download http://winezeug.googlecode.com/svn/trunk/winetricks_files/win
etest.cat ac8f50dd54d011f3bb1dd79240dae9378748449f
# Put a dummy catalog file in place
mkdir -p "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295
ee\}
w_try cp -f "$W_CACHE"/xmllite/winetest.cat "$W_SYSTEM32_DLLS"/catroot/\
{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
if test ! "$W_OPT_UNATTENDED"
then
w_warn "xmllite's interactive installer will hang at the end, but ot
herwise work."
fi
fi
;;
;;
;;
}
cd "$W_CACHE"/xmllite
w_override_dlls native xmllite
case $LANG in
en*) w_try "$WINE" WindowsXP-KB915865-v11-x86-ENU.exe $W_UNATTENDED_SLASH_Q
fr*) w_try "$WINE" WindowsXP-KB915865-v11-x86-FRA.exe $W_UNATTENDED_SLASH_Q
de*) w_try "$WINE" WindowsXP-KB915865-v11-x86-DEU.exe $W_UNATTENDED_SLASH_Q
esac
#
#
#
#
See http://corefonts.sf.net
TODO: let user pick mirror,
see http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec for how
TODO: add more fonts
# See http://en.wikipedia.org/wiki/Droid_(font)
# Old url was http://android.git.kernel.org/?p=platform/frameworks/base.git;
a=blob_plain;f=data/fonts/'
DROID_URL='https://github.com/android/platform_frameworks_base/blob/master/d
ata/fonts/'
do_droid DroidSans-Bold.ttf
9645fbf92633a2ae0d2f9801f
do_droid DroidSansFallback.ttf
4e5f268a7ebfd28b54dc6bcdc
do_droid DroidSansJapanese.ttf
8a30eb25df425b8910fe05dc5
do_droid DroidSansMono.ttf
b456fb557b94ce8c46143b117
do_droid DroidSans.ttf
6a0303cd1567ed2d300b4e31c
do_droid DroidSerif-BoldItalic.ttf
caed6958885d7285c841c95f1
do_droid DroidSerif-Bold.ttf
593acb5cf6923abb2e6008187
do_droid DroidSerif-Italic.ttf
9683bcee024551cb58d1be790
do_droid DroidSerif-Regular.ttf
501c12d616f832f2235b5b93b
}
560e4bcafdebaf2
c5e4f11e2f1d0b8
b3a248c11692aa8
133fb6cf26ea073
"Droid Sans"
62f2841f61e4be6
2775e9b8e96a3e9
e91cc6c1ae9a669
"Droid Serif"
a689ce25a4063cf
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
"MS
"MS
"MS
"MS
Gothic" "TakaoGothic"
PGothic" "TakaoPGothic"
Mincho" "TakaoMincho"
PMincho" "TakaoPMincho"
year="1999"
load_fakekorean()
{
w_call baekmuk
# Loads Baekmuk fonts and sets as an alias for Gulim, Dotum, and Batang for
Korean language support
# Aliases to set:
# Gulim --> Baekmuk Gulim
# GulimChe --> Baekmuk Gulim
# Batang --> Baekmuk Batang
# BatangChe --> Baekmuk Batang
# Dotum --> Baekmuk Dotum
# DotumChe --> Baekmuk Dotum
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_register_font_replacement
w_download https://launchpadlibrarian.net/1564410/ttf-arphic-uming_0
.1.20060108.orig.tar.gz 1439cdd731906e9e5311f320c2cb33262b24ef91
gunzip -dc "$W_CACHE/fontfix/ttf-arphic-uming_0.1.20060108.orig.tar.
gz" | (cd "$W_TMP"; tar -xf -)
w_try mv "$W_TMP"/ttf-arphic-uming-0.1.20060108/*.ttf "$W_FONTSDIR_U
NIX"
fi
fi
nd.
# Focht says Samyak is bad news, and font substitution isn't a good workarou
# 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\\TTFORIYA-FONTS\\SAMYAK-ORIYA.TTF",80000000,00000001,00000000,00000003,00000080,0000
0000) ret=70d44091
if xlsfonts 2>/dev/null | egrep -i "samyak|oriya"
then
w_die "Please uninstall the Samyak/Oriya font, e.g. 'sudo dpkg -r ttf-or
iya-fonts', then log out and log in again. That font causes strange crashes in
.net programs."
fi
}
#---------------------------------------------------------------w_metadata liberation fonts \
title="Red Hat Liberation fonts (Sans, Serif, Mono)" \
publisher="Red Hat" \
year="2008" \
media="download" \
file1="liberation-fonts-1.04.tar.gz" \
installed_file1="$W_FONTSDIR_WIN/LiberationMono-BoldItalic.ttf"
load_liberation()
{
# http://www.redhat.com/promo/fonts/
case `uname -s` in
SunOS|Solaris)
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/swmgrpatchtasks-14.html"
echo "Or edit winetricks's download function, and add '--no-check-certific
ate' to the command."
;;
esac
w_download https://fedorahosted.org/releases/l/i/liberation-fonts/liberation
-fonts-1.04.tar.gz 097882c92e3260742a3dc3bf033792120d8635a3
cd "$W_TMP"
gunzip -dc "$W_CACHE"/liberation/liberation-fonts-1.04.tar.gz | tar -xf mv liberation-fonts-1.04/*.ttf "$W_FONTSDIR_UNIX"
w_register_font LiberationMono-BoldItalic.ttf "LiberationMono-BoldItalic"
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
w_register_font
LiberationMono-Bold.ttf "LiberationMono-Bold"
LiberationMono-Italic.ttf "LiberationMono-Italic"
LiberationMono-Regular.ttf "LiberationMono-Regular"
LiberationSans-BoldItalic.ttf "LiberationSans-BoldItalic"
LiberationSans-Bold.ttf "LiberationSans-Bold"
LiberationSans-Italic.ttf "LiberationSans-Italic"
LiberationSans-Regular.ttf "LiberationSans-Regular"
LiberationSerif-BoldItalic.ttf "LiberationSerif-BoldItalic"
LiberationSerif-Bold.ttf "LiberationSerif-Bold"
LiberationSerif-Italic.ttf "LiberationSerif-Italic"
LiberationSerif-Regular.ttf "LiberationSerif-Regular"
tf
cd "$W_TMP"
w_try ar x "$W_CACHE/opensymbol/$file1" data.tar.bz2
w_try tar jvxf data.tar.bz2 ./usr/share/fonts/truetype/openoffice/opens___.t
TakaoGothic.ttf "TakaoGothic"
TakaoPGothic.ttf "TakaoPGothic"
TakaoMincho.ttf "TakaoMincho"
TakaoPMincho.ttf "TakaoPMincho"
TakaoExGothic.ttf "TakaoExGothic"
TakaoExMincho.ttf "TakaoExMincho"
}
#---------------------------------------------------------------w_metadata uff fonts \
title="Ubuntu Font Family" \
publisher="Ubuntu" \
year="2010" \
media="download" \
file1="ubuntu-font-family-0.70.1.zip" \
installed_file1="$W_FONTSDIR_WIN/Ubuntu-R.ttf" \
homepage="https://launchpad.net/ubuntu-font-family"
load_uff()
{
w_download http://font.ubuntu.com/download/ubuntu-font-family-0.70.1.zip efb
ab0d5d8cb5cff091307d2360dcb1bfe1ae6e1
cd "$W_TMP"
w_try_unzip "$W_CACHE"/uff/ubuntu-font-family-0.70.1.zip
mv ubuntu-font-family-0.70.1/*.ttf "$W_FONTSDIR_UNIX"
w_register_font
w_register_font
w_register_font
w_register_font
Ubuntu-R.ttf "Ubuntu"
Ubuntu-I.ttf "Ubuntu Italic"
Ubuntu-B.ttf "Ubuntu Bold"
Ubuntu-BI.ttf "Ubuntu Bold Italic"
load_unifont()
{
# The GNU Unifont provides glyphs for just about everything in common langua
ge. It is intended for multilingual usage.
# See http://unifoundry.com/unifont.html for project page
w_download http://unifoundry.com/unifont-5.1.20080907.zip bb8a3960dc0a96aa30
5de28312ea8a0ab64123d2
cp -f "$W_CACHE"/unifont/unifont-5.1.20080907.zip "$W_TMP"
w_try_unzip -d "$W_TMP" "$W_TMP"/unifont-5.1.20080907.zip
w_try cp -f "$W_TMP"/unifont-5.1.20080907.ttf "$W_FONTSDIR_UNIX/unifont.ttf"
W_BROWSERAGENT=1 \
w_download http://www.autohotkey.com/download/AutoHotkey104805_Install.exe 1
3e5a9ca6d5b7705f1cd02560c3af4d38b1904fc
cd "$W_CACHE"/autohotkey
w_try "$WINE" AutoHotkey104805_Install.exe $W_UNATTENDED_SLASH_S
}
#---------------------------------------------------------------w_metadata kobo apps \
title="Kobo e-book reader" \
publisher="Kobo" \
year="2011" \
media="download" \
file1="KoboSetup.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Kobo/Kobo.exe" \
homepage="http://www.borders.com/online/store/MediaView_ereaderapps"
load_kobo()
{
w_download http://download.kobobooks.com/desktop/1/KoboSetup.exe 31a5f5583ed
f4b716b9feacb857d2170104cabd9
cd "$W_CACHE"/kobo
w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
w_declare_exe "$W_PROGRAMS_X86_WIN\\Kobo" "Kobo.exe"
}
#---------------------------------------------------------------w_metadata cmake apps \
title="CMake 2.8" \
publisher="Kitware" \
year="2013" \
media="download" \
file1="cmake-2.8.11.2-win32-x86.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/CMake 2.8/bin/cmake-gui.exe"
load_cmake()
{
w_download http://www.cmake.org/files/v2.8/cmake-2.8.11.2-win32-x86.exe d79a
f5715c0ad48d78bb731cce93b5ad89b16512
cd "$W_CACHE"/cmake
w_try "$WINE" cmake-2.8.11.2-win32-x86.exe $W_UNATTENDED_SLASH_S
}
w_download http://download.microsoft.com/download/whistler/hwdev1/1.0/wxp/en
-us/ColorProfile.exe 6b72836b32b343c82d0760dff5cb51c2f47170eb
w_try_unzip -d "$W_TMP" "$W_CACHE"/colorprofile/ColorProfile.exe
# It's in system32 for both win32/win64
mkdir -p "$W_WINDIR_UNIX"/system32/spool/drivers/color
w_try cp -f "$W_TMP/sRGB Color Space Profile.icm" "$W_WINDIR_UNIX"/system32/
spool/drivers/color
}
#---------------------------------------------------------------w_metadata controlpad apps \
title="MS ActiveX Control Pad" \
publisher="Microsoft" \
year="1997" \
media="download" \
file1="setuppad.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/ActiveX Control Pad/PED.EXE"
load_controlpad()
{
# http://msdn.microsoft.com/en-us/library/ms968493.aspx
w_call wsh57
w_download http://download.microsoft.com/download/activexcontrolpad/install/
4.0.0.950/win98mexp/en-us/setuppad.exe 8921e0f52507ca6a373c94d222777c750fb48af7
w_try_cabextract --directory="$W_TMP" "$W_CACHE"/controlpad/setuppad.exe
echo "If setup says 'Unable to start DDE ...', press Ignore"
cd "$W_TMP"
case "$W_UNATTENDED_SLASH_Q" in
"") quiet="" ;;
*) quiet="/qt"
esac
w_try "$WINE" setup $quiet
if ! test -f "$W_SYSTEM32_DLLS"/FM20.DLL
then
w_die "Install failed. Please report, If you just wanted fm20.dll, try
installing art2min instead."
fi
}
#---------------------------------------------------------------# dxdiag is a system component that one usually adds to an existing wineprefix,
# so it belongs in 'dlls', not apps.
w_metadata dxdiag dlls \
title="DirectX Diagnostic Tool" \
publisher="Microsoft" \
year="2010" \
media="download" \
file1="../directx9/directx_feb2010_redist.exe" \
installed_file1="$W_SYSTEM32_DLLS_WIN/dxdiag.exe"
load_dxdiag()
{
helper_directx_dl
E
b"
fi
w_download "http://download.mozilla.org/?product=firefox-24.0&os=win&lang=en
-US" d6213601b69a606f4537c394dfa0dd7968b17b93 "$file1"
cd "$W_CACHE"/firefox
w_try "$WINE" "$file1" ${W_OPT_UNATTENDED:+ -ms}
}
cd "$W_CACHE/fontxplorer"
w_try "$WINE" Font_Xplorer_122_Free.exe $W_UNATTENDED_SLASH_S
w_declare_exe "$W_PROGRAMS_X86_WIN\\Font Xplorer" "FXplorer.exe"
"
else
Files/Internet Explorer/iedetect.dll"
load_ie6()
{
# Installer doesn't support Win64, and I can't find a x64 version on microso
ft.com
if [ $W_ARCH = win64 ]
then
w_die "This package does not work on a 64-bit installation"
fi
w_download_manual http://www.oldversion.com/download-Internet-Explorer-6.0.h
tml msie60.exe 8e483db28ff01a7cabd39147ab6c59753ea1f533
cd "$W_TMP"
"$WINE" "$W_CACHE"/ie6/$file1
w_call msls31
# Unregister Wine IE
if [ ! -f "$W_SYSTEM32_DLLS"/plugin.ocx ]
then
w_try "$WINE" iexplore -unregserver
fi
# Change the override to the native so we are sure we use and register them
w_override_dlls native,builtin iexplore.exe inetcpl.cpl itircl itss jscript
mlang mshtml msimtf shdoclc shdocvw shlwapi
# Remove the fake dlls, if any
mv "$W_PROGRAMS_UNIX"/"Internet Explorer"/iexplore.exe "$W_PROGRAMS_UNIX"/"I
nternet Explorer"/iexplore.exe.bak
for dll in itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi
do
test -f "$W_SYSTEM32_DLLS"/$dll.dll &&
mv "$W_SYSTEM32_DLLS"/$dll.dll "$W_SYSTEM32_DLLS"/$dll.dll.bak
done
# The installer doesn't want to install iexplore.exe in XP mode.
w_set_winver win2k
# Workaround http://bugs.winehq.org/show_bug.cgi?id=21009
# See also http://code.google.com/p/winezeug/issues/detail?id=78
rm -f "$W_SYSTEM32_DLLS"/browseui.dll "$W_SYSTEM32_DLLS"/inseng.dll
# Otherwise regsvr32 crashes later
rm -f "$W_SYSTEM32_DLLS"/inetcpl.cpl
# Work around http://bugs.winehq.org/show_bug.cgi?id=25432
w_try_cabextract -F inseng.dll "$W_TMP/IE 6.0 Full/ACTSETUP.CAB"
mv inseng.dll "$W_SYSTEM32_DLLS"
w_override_dlls native inseng
cd "$W_TMP/IE 6.0 Full"
if [ $W_UNATTENDED_SLASH_Q ]
then
"$WINE" IE6SETUP.EXE /q:a /r:n /c:"ie6wzd /S:""#e"" /q:a /r:n"
else
"$WINE" IE6SETUP.EXE
fi
# IE6 exits with 194 to signal a reboot
status=$?
case $status in
0|194) ;;
*) w_die ie6 installation failed
esac
# Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
# See http://bugs.winehq.org/show_bug.cgi?id=16013
# Find instructions to create this file in dlls/wintrust/tests/crypt.c
w_download http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetes
t.cat ac8f50dd54d011f3bb1dd79240dae9378748449f
# Put a dummy catalog file in place
mkdir -p "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
w_try cp -f "$W_CACHE"/ie7/winetest.cat "$W_SYSTEM32_DLLS"/catroot/\{f750e6c
3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
# Install
w_download http://download.microsoft.com/download/3/8/8/38889DC1-848C-4BF2-8
335-86C573AD86D9/IE7-WindowsXP-x86-enu.exe d39b89c360fbaa9706b5181ae4718100687a5
326
if test "$W_UNATTENDED_SLASH_Q" = ""
then
quiet=""
else
quiet="/quiet"
fi
cd "$W_CACHE"/ie7
# KLUDGE: if / is writable (as on MacOSX?), having a z: mapping to it
# causes ie7 to put temporary directories on Z:\
# so hide it temporarily. This is not very robust!
if test -w /
then
rm -f "$WINEPREFIX/dosdevices/z:.bak_wt"
mv "$WINEPREFIX/dosdevices/z:" "$WINEPREFIX/dosdevices/z:.bak_wt"
fi
if w_workaround_wine_bug 21947 "Working around heap corruption (see also bug
26016)"
then
WINEDEBUG=warn+heap "$WINE" IE7-WindowsXP-x86-enu.exe $quiet
else
"$WINE" IE7-WindowsXP-x86-enu.exe $quiet
fi
if test -w /
then
# END KLUDGE: restore z:, assuming user didn't kill us
mv "$WINEPREFIX/dosdevices/z:.bak_wt" "$WINEPREFIX/dosdevices/z:"
fi
# Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
# FIXME: whittle down this list
cd "$W_SYSTEM32_DLLS"
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
case $WINETRICKS_GUI in
none)
w_warn "To start ie7, use the command "$WINE" '${W_PROGRAMS_WIN}\\\\Inte
rnet Explorer\\\\iexplore'"
;;
*)
w_warn "Starting ie7. To start it later, use the command "$WINE" '${W_P
ROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'"
"$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" http://www.micr
osoft.com/windows/internet-explorer/ie7/ > /dev/null 2>&1 &
;;
esac
}
#---------------------------------------------------------------w_metadata ie8 dlls \
title="Internet Explorer 8" \
publisher="Microsoft" \
year="2009" \
media="download" \
file1="IE8-WindowsXP-x86-ENU.exe" \
installed_file1="c:/windows/ie8_main.log"
load_ie8()
{
# Unregister Wine IE
if grep -q -i "wine placeholder" "$W_PROGRAMS_X86_UNIX/Internet Explorer/iex
plore.exe"
#if [ ! -f "$W_SYSTEM32_DLLS"/plugin.ocx ]
then
w_try "$WINE" iexplore -unregserver
fi
w_call msls31
# Change the override to the native so we are sure we use and register them
w_override_dlls native,builtin iexplore.exe itircl itss jscript msctf mshtml
shdoclc shdocvw shlwapi urlmon wininet xmllite
# Bundled updspapi cannot work on wine
w_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 "$W_SYSTEM32_DLLS"/$dll.dll &&
mv "$W_SYSTEM32_DLLS"/$dll.dll "$W_SYSTEM32_DLLS"/$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
w_download http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetes
t.cat ac8f50dd54d011f3bb1dd79240dae9378748449f
# Put a dummy catalog file in place
mkdir -p "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
w_try cp -f "$W_CACHE"/ie8/winetest.cat "$W_SYSTEM32_DLLS"/catroot/\{f750e6c
3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
w_download http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-9
36B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe e489483e5001f95da04e1ebf3c664173baef3
e26
if [ $W_UNATTENDED_SLASH_Q ]
then
quiet="/quiet /forcerestart"
else
quiet=""
fi
cd "$W_CACHE"/ie8
# KLUDGE: if / is writable, having a z: mapping to it causes ie8 to put temp
orary directories on Z:\
# so hide it temporarily. This is not very robust!
rm -f "$WINEPREFIX/dosdevices/z:.bak_wt"
mv "$WINEPREFIX/dosdevices/z:" "$WINEPREFIX/dosdevices/z:.bak_wt"
# FIXME: There's an option for /updates-noupdates to disable checking for up
dates, but that
# forces the install to fail on Wine. Not sure if it's an IE8 or Wine bug...
# FIXME: can't check status, as it always reports failure on wine?
"$WINE" IE8-WindowsXP-x86-ENU.exe $quiet
# END KLUDGE: restore z:, assuming user didn't kill us
mv "$WINEPREFIX/dosdevices/z:.bak_wt" "$WINEPREFIX/dosdevices/z:"
do
done
w_try_regedit "$W_TMP_WIN"\\set-tabprocgrowth.reg
# Seeing is believing
case $WINETRICKS_GUI in
none)
w_warn "To start ie8, use the command "$WINE" '${W_PROGRAMS_WIN}\\\\Inte
rnet Explorer\\\\iexplore'"
;;
*)
w_warn "Starting ie8. To start it later, use the command "$WINE" '${W_P
ROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'"
"$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" http://www.micr
osoft.com/windows/internet-explorer > /dev/null 2>&1 &
;;
esac
}
#---------------------------------------------------------------w_metadata mingw apps \
title="Minimalist GNU for Windows, including GCC for Windows" \
publisher="GNU" \
year="2013" \
media="download" \
file1="mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz" \
installed_exe1="c:/MinGW/bin/gcc.exe" \
homepage="http://mingw.org/wiki/Getting_Started"
load_mingw()
{
w_download "$WINETRICKS_SOURCEFORGE/mingw/files/$file1"
w_read_key
w_ahk_do "
if ( w_opt_unattended > 0 ) {
run ${W_ISO_MOUNT_LETTER}:setup.exe /EULA_ACCEPT=YES /PIDKEY=$W_KEY
} else {
run ${W_ISO_MOUNT_LETTER}:setup.exe
}
SetTitleMatchMode, 2
WinWait,Microsoft Office 2003 Setup, Welcome
if ( w_opt_unattended > 0 ) {
Sleep 500
WinWait,Microsoft Office 2003 Setup,Key
Sleep 500
ControlClick Button1 ; Next
WinWait,Microsoft Office 2003 Setup,Initials
Sleep 500
ControlClick Button1 ; Next
WinWait,Microsoft Office 2003 Setup,End-User
Sleep 500
ControlClick Button1 ; I accept
ControlClick Button2 ; Next
WinWait,Microsoft Office 2003 Setup,Recommended
Sleep 500
ControlClick Button7 ; Next
WinWait,Microsoft Office 2003 Setup,Summary
Sleep 500
ControlClick Button1 ; Install
}
WinWait,Microsoft Office 2003 Setup,Completed
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick Button2 ; Finish
}
WinWaitClose
"
w_declare_exe
word2003
w_declare_exe
excel2003
w_declare_exe
powerpoint2003
w_declare_exe
access2003
w_declare_exe
outlook2003
if test $W_OPT_UNATTENDED
then
# See
# http://blogs.technet.com/b/office_resource_kit/archive/2009/01/29/conf
igure-a-silent-install-of-the-2007-office-system-with-config-xml.aspx
# http://www.symantec.com/connect/articles/office-2007-silent-installati
on-lessons-learned
cat > "$W_TMP"/config.xml <<__EOF__
<Configuration Product="ProPlus">
<Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes"
/>
<PIDKEY Value="$W_KEY" />
</Configuration>
__EOF__
"$WINE" ${W_ISO_MOUNT_LETTER}:setup.exe /config "$W_TMP_WIN"\\config.xml
status=$?
case $status in
0|43) ;;
78)
w_die "Installing $W_PACKAGE failed, product key $W_KEY \
might be wrong. Try again without -q, or put correct key in \
$W_CACHE/$W_PACKAGE/key.txt and rerun."
;;
*)
w_die "Installing $W_PACKAGE failed."
;;
esac
else
fi
w_declare_exe
word2007
w_declare_exe
excel2007
w_declare_exe
powerpoint2007
w_declare_exe
access2007
w_declare_exe
outlook2007
w_declare_exe
ublisher2007
publisher="Microsoft" \
year="2009" \
media="download" \
file1="winsdk_web.exe" \
installed_exe1="C:/Program Files/Microsoft SDKs/Windows/v7.0/Bin/SetEnv.Cmd"
load_psdkwin7()
{
# http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-433
0-a63e-1fd44e0e2505&displaylang=en
w_call dotnet20
if w_workaround_wine_bug 21509 "" 1.2,
then
w_call gdiplus
# work around http://bugs.winehq.org/show_bug.cgi?id=
21509
fi
w_call mfc42 # need mfc42u, or setup will abort
# 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/en-US/windowssdk/thread/c053b616-7
d5b-405d-9841-ec465a8e21d5
w_download http://download.microsoft.com/download/7/A/B/7ABD2203-C472-4036-8
BA0-E505528CCCB7/winsdk_web.exe a01dcc67a38f461e80ea649edf1353f306582507
cd "$W_CACHE"/psdkwin7
if w_workaround_wine_bug 21596
then
w_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"
fi
w_try "$WINE" winsdk_web.exe
if w_workaround_wine_bug 21362
then
# Assume user installed in default location
cat > "$W_TMP"/set-psdk7.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"="Microsoft Windows SDK for Windows 7 (7.0.7600.16385.40715)"
_EOF_
w_try_regedit "$W_TMP_WIN"\\set-psdk7.reg
fi
}
#---------------------------------------------------------------w_metadata python26 dlls \
title="Python Interpreter, version 2.6.2" \
publisher="Python Software Foundaton" \
year="2009" \
media="download" \
file1="python-2.6.2.msi" \
installed_exe1="c:/Python26/python.exe"
load_python26()
{
w_download http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi 2d1503b0e
8b7e4c72a276d4d9027cf4856b208b8
w_download $WINETRICKS_SOURCEFORGE/project/pywin32/pywin32/Build%20214/pywin
32-214.win32-py2.6.exe eca58f29b810d8e3e7951277ebb3e35ac35794a3
if [ "$WINETRICKS_WINE_VERSION" = "wine-1.4.1" ]
then
w_die "This installer is broken under $WINETRICKS_WINE_VERSION. Please u
pgrade Wine. See https://code.google.com/p/winetricks/issues/detail?id=347 for m
ore info."
fi
cd "$W_CACHE"/python26
w_try "$WINE" msiexec /i python-2.6.2.msi ALLUSERS=1 $W_UNATTENDED_SLASH_Q
w_ahk_do "
SetTitleMatchMode, 2
run pywin32-214.win32-py2.6.exe
WinWait, Setup, Wizard will install pywin32
if ( w_opt_unattended > 0 ) {
ControlClick Button2 ; next
WinWait, Setup, Python 2.6 is required
ControlClick Button3 ; next
WinWait, Setup, Click Next to begin
ControlClick Button3 ; next
WinWait, Setup, finished
ControlClick Button4 ; Finish
}
WinWaitClose
"
cd "$W_TMP"
w_try_unzip "$W_CACHE/$W_PACKAGE"/comtypes-0.6.2.zip
cd comtypes-0.6.2
w_try "$WINE" "C:\Python26\python.exe" setup.py install
year="2010" \
media="download" \
file1="SafariSetup.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Safari/Safari.exe"
load_safari()
{
w_download http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Sa
fari5/061-7138.20100607.Y7U87/SafariSetup.exe e56d5d79d9cfbb85ac46ac78aa497d7f3d
8dbc3d
cd "$W_CACHE"/$W_PACKAGE
if w_workaround_wine_bug 21146
then
w_try mkdir -p "$W_APPDATA_UNIX/Apple Computer/Preferences"
cat > "$W_APPDATA_UNIX/Apple Computer/Preferences/com.apple.Safari.plist
" <<_EOF_
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/
PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LastDisplayedWelcomePageVersionString</key>
<string>4.0</string>
</dict>
</plist>
_EOF_
fi
if test $W_OPT_UNATTENDED
then
w_warn "Safari's silent install is broken under wine. See http://bugs.wi
nehq.org/show_bug.cgi?id=23493. You should do a regular install if you want to u
se Safari."
w_try "$WINE" SafariSetup.exe /qn
else
w_try "$WINE" SafariSetup.exe
fi
}
"
SetTitleMatchMode, 2
run GoogleSketchUpWEN.exe
WinWait, SketchUp, Welcome
if ( w_opt_unattended > 0 ) {
Sleep 4000
Send {Enter}
WinWait, SketchUp, License
Sleep 1000
ControlClick Button1 ; accept
Sleep 1000
ControlClick Button4 ; Next
WinWait, SketchUp, Destination
Sleep 1000
ControlClick Button1 ; Next
WinWait, SketchUp, Ready
Sleep 1000
ControlClick Button1 ; Install
}
WinWait, SketchUp, Completed
if ( w_opt_unattended > 0 ) {
Sleep 1000
ControlClick Button1 ; Finish
}
WinWaitClose
w_try_regedit "$W_TMP_WIN"\\glconfigdisplay.reg
load_uplay()
{
# 4 June 2013 3.0.1 sha1sum fdb9e736b5b2211fb23b35d30d52deae6f4b32a4
# 1 July 2013 3.1.0 sha1sum 21a7f469534dd1463eaaab6b2be2fa9084bceea2
# 11 Nov 2013 4.0 sha1sum 52e287f9f78313e4713d2f070b15734410da0c5a
# 26 Dec 2013 4.2 sha1sum ada2c11ee62eee19f8b1661bd974862e336623c6
# 16 Feb 2014 ?
sha1sum 19f98632ad1ff330c647f8ff1a3a15b44238c709
# Changes too frequently, don't check anymore
w_download http://static3.cdn.ubi.com/orbit/launcher_installer/UplayInstalle
r.exe
cd "$W_CACHE"/uplay
# NSIS installer
w_try "$WINE" UplayInstaller.exe ${W_OPT_UNATTENDED:+ /S}
if w_workaround_wine_bug 33742 "Using native crypt32 so uplay's autoupdater
doesn't abort"
then
# Directx9 and game installation often fails with native crypt32,
# so set it to native for Uplay.exe only.
w_call crypt32
w_override_dlls default crypt32
w_override_app_dlls Uplay.exe native crypt32
fi
if w_workaround_wine_bug 33673 "Installing gdiplus to work around slow navig
ation"
then
w_call gdiplus
fi
xe"
}
then
w_call msxml6
fi
# http://blogs.msdn.com/b/astebner/archive/2006/03/14/551674.aspx
# http://go.microsoft.com/fwlink/?linkid=57034
w_download http://download.microsoft.com/download/A/9/1/A91D6B2B-A798-47DF-9
C7E-A97854B7DD18/VC.iso 1ae44e4eaf8c61c3a39e573fd6efd9889e940529
# Unpack ISO (how handy that 7z can do this!)
cd "$W_TMP"
w_try_7z x "$W_CACHE"/vc2005express/VC.iso
if [ $W_UNATTENDED_SLASH_Q ]
then
chmod +x Ixpvc.exe
# Add /qn after ReallySuppress for a really silent install (but then you
won't see any errors)
w_try "$WINE" Ixpvc.exe /t:"$W_TMP_WIN" /q:a /c:"msiexec /i vcsetup.msi
VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress"
else
if w_workaround_wine_bug 25331
then
w_warn "Install fails with wine older than 1.1.35. With wine-1.3.5
or higher, interactive install fails, but quiet mode (-q option) may work."
fi
w_try "$WINE" setup.exe
w_ahk_do "
SetTitleMatchMode, 2
WinWait, Visual C++ 2005 Express Edition Setup
WinWaitClose, Visual C++ 2005 Express Edition Setup
"
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Microsoft Visual Studio 8\\Common7\\IDE"
"VCExpress.exe"
then
# Unpack ISO
cd "$W_TMP"
w_try_7z x "$W_CACHE"/vc2010express/VS2010Express1.iso
cd VCExpress
# dotnet40 leaves winver at win2k, which causes vc2010 to abort on
# start because it looks for c:\users\$LOGNAME\Application Data
w_set_winver winxp
if w_workaround_wine_bug 12501 "Installing mspatcha to work around bug in SQ
L Server install"
then
w_call mspatcha
fi
if w_workaround_wine_bug 34627 "Installing Visual C++ 2005 managed runtime t
o work around bug in SQL Server install"
then
w_call vcrun2005
fi
w_try $WINE setup.exe $W_UNATTENDED_SLASH_Q
w_declare_exe "$W_PROGRAMS_X86_WIN\\Microsoft Visual Studio 10.0\\Common7\\I
DE" "VCExpress.exe"
}
#---------------------------------------------------------------w_metadata vlc apps \
title="VLC media player" \
publisher="videolan.org" \
year="2010" \
media="download" \
file1="vlc-1.1.9-win32.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/VideoLAN/VLC/vlc.exe" \
homepage="http://www.videolan.org/vlc/"
load_vlc()
{
w_download $WINETRICKS_SOURCEFORGE/vlc/vlc-1.1.9-win32.exe 7128f6e43d6550fcc
2574b9c82c5153ff47efcf6
cd "$W_CACHE"/vlc
w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
w_declare_exe "$W_PROGRAMS_X86_WIN\\VideoLAN\\VLC" vlc.exe
}
#---------------------------------------------------------------w_metadata winamp apps \
title="Winamp" \
publisher="AOL (Nullsoft)" \
year="2011" \
media="download" \
file1="winamp5621_full_emusic-7plus_en-us.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Winamp/winamp.exe" \
homepage="http://www.winamp.com"
load_winamp()
if [ $W_ARCH = win64 ]
then
w_die "Installer doesn't support 64-bit architecture. Use a 32-bit WINEP
REFIX instead."
fi
# FIXME: what versions of windows are really bundled with wmp10?
w_skip_windows wmp10 && return
# See http://appdb.winehq.org/appview.php?iVersionId=3212
w_call wsh57
# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b446ae53-375940cf-80d5-cde4bbe07999
w_download http://download.microsoft.com/download/1/2/a/12a31f29-2fa9-4f50-b
95d-e45ef7013f87/MP10Setup.exe 69862273a5d9d97b4a2e5a3bd93898d259e86657
# Crashes on exit, but otherwise ok; see http://bugs.winehq.org/show_bug.cgi
?id=12633
cd "$W_CACHE"/wmp10
w_try "$WINE" MP10Setup.exe $W_UNATTENDED_SLASH_Q
# Disable WMP's services, since they depend on unimplemented stuff, they tri
gger the GUI debugger several times
w_try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_
2K"
w_try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdral
w2k"
load_wm9codecs
w_unset_winver
}
#---------------------------------------------------------------# Benchmarks
#---------------------------------------------------------------w_metadata 3dmark2000 benchmarks \
title="3DMark2000" \
publisher="MadOnion.com" \
year="2000" \
media="download" \
file1="3dmark2000_v11_100308.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/MadOnion.com/3DMark2000/3DMark2000.exe"
load_3dmark2000()
{
# http://www.futuremark.com/download/3dmark2000/
if ! test -f "$W_CACHE/$W_PACKAGE/3dmark2000_v11_100308.exe"
then
w_download http://www.ocinside.de/download/3dmark2000_v11_100308.exe b04
00d59cfd45d8c8893d3d4edc58b6285ee1502
fi
cd "$W_TMP"
mkdir $W_PACKAGE
cd $W_PACKAGE
w_try_unzip "$W_CACHE/$W_PACKAGE"/3dmark2000_v11_100308.exe
w_ahk_do "
SetTitleMatchMode, 2
run Setup.exe
WinWait Welcome
;ControlClick Button1 ; Next
Sleep 1000
Send {Enter}
; Next
WinWait License
;ControlClick Button2 ; Yes
Sleep 1000
Send {Enter}
; Yes
;WinWaitClose ahk_class #32770 ; License
WinWait ahk_class #32770, Destination
;ControlClick Button1 ; Next
Sleep 1000
Send {Enter}
; Next
;WinWaitClose ahk_class #32770 ; Destination
WinWait, Start
;ControlClick Button1 ; Next
Sleep 1000
Send {Enter}
; Next
WinWait Registration
ControlClick Button1 ; Next
WinWait Complete
Sleep 1000
ControlClick Button1 ; Unclick View Readme
;ControlClick Button4 ; Finish
Send {Enter}
; Finish
WinWaitClose
"
cat > "$W_DRIVE_C/run-$W_PACKAGE.bat" <<__EOF__
c:
cd "$W_PROGRAMS_X86_WIN\MadOnion.com\3DMark2000"
REM possible wine cmd bug: "3dmark2000" aborts, but ".\3dmark2000" works
.\3DMark2000 %*
__EOF__
}
#---------------------------------------------------------------w_metadata 3dmark2001 benchmarks \
title="3DMark2001" \
publisher="MadOnion.com" \
year="2001" \
media="download" \
file1="3dmark2001se_330_100308.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/MadOnion.com/3DMark2001 SE/3DMark2001SE
.exe"
load_3dmark2001()
{
# http://www.futuremark.com/download/3dmark2001/
if ! test -f "$W_CACHE/$W_PACKAGE"/3dmark2001se_330_100308.exe
then
w_download http://www.ocinside.de/download/3dmark2001se_330_100308.exe 6
43bacbcc1615bb4f46d3b045b1b8d78371a6b54
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run 3dmark2001se_330_100308.exe
WinWait ahk_class #32770 ; welcome
if ( w_opt_unattended > 0 ) {
ControlClick Button2 ; Next
sleep 5000
WinWait ahk_class #32770 ; License
ControlClick Button2 ; Next
WinWait ahk_class #32770, Destination
ControlClick Button1 ; Next
WinWait ahk_class #32770, Start
ControlClick Button1 ; Next
WinWait,, Registration
ControlClick Button2 ; Next
}
WinWait,, Complete
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Unclick View Readme
ControlClick Button4 ; Finish
}
WinWaitClose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\MadOnion.com\\3DMark2001 SE" "3DMark2001
SE.exe"
}
#---------------------------------------------------------------w_metadata 3dmark03 benchmarks \
title="3D Mark 03" \
publisher="Futuremark" \
year="2003" \
media="manual_download" \
file1="3DMark03_v360_1901.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Futuremark/3DMark03/3DMark03.exe"
load_3dmark03()
{
# http://www.futuremark.com/benchmarks/3dmark03/download/
if ! test -f "$W_CACHE/$W_PACKAGE/3DMark03_v360_1901.exe"
then
w_download_manual http://www.futuremark.com/download/3dmark03/ 3DMark03_
v360_1901.exe 46a439101ddbbe3c9563b5e9651cb61b46ce0619
fi
cd "$W_CACHE/$W_PACKAGE"
w_warn "Don't use mouse while this installer is running. Sorry..."
# This old installer doesn't seem to be scriptable the usual way, so spray a
nd pray.
w_ahk_do "
SetTitleMatchMode, 2
run 3DMark03_v360_1901.exe
WinWait 3DMark03 - InstallShield Wizard, Welcome
if ( w_opt_unattended > 0 ) {
WinActivate
Send {Enter}
Sleep 2000
WinWait 3DMark03 - InstallShield Wizard, License
WinActivate
; Accept license
Send a
Send {Enter}
Sleep 2000
; Choose Destination
Send {Enter}
Sleep 2000
; Begin install
Send {Enter}
; Wait for install to finish
WinWait 3DMark03, Registration
; Purchase later
Send {Tab}
Send {Tab}
Send {Enter}
}
WinWait, 3DMark03 - InstallShield Wizard, Complete
if ( w_opt_unattended > 0 ) {
; Uncheck readme
Send {Space}
Send {Tab}
Send {Tab}
Send {Enter}
}
WinWaitClose, 3DMark03 - InstallShield Wizard, Complete
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Futuremark\\3DMark03" "3DMark03.exe"
}
WinWait, ahk_class #32770, Complete
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Uncheck view readme
ControlClick Button3 ; Finish
}
WinWaitClose, ahk_class #32770, Complete
"
ARGS=""
if w_workaround_wine_bug 22392
then
w_warn "You must run the app with the -nosysteminfo option to avoid a cr
ash on startup"
ARGS="-nosysteminfo"
fi
}
"
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Uncheck view readme
ControlClick Button3 ; Finish
}
WinWaitClose, ahk_class #32770, Complete
if w_workaround_wine_bug 9210
then
w_warn "The benchmark may warn that shader model 2.0 is not present. Yo
u can ignore this, but if you want to work around it, see http://bugs.winehq.org
/show_bug.cgi?id=9210 for a patch."
fi
if w_workaround_wine_bug 0 "Installing shader compiler..."
then
# "Demo" button doesn't work without this. d3dcompiler_43 related.
w_call d3dx9_28
w_call d3dx9_36
fi
ARGS=""
if w_workaround_wine_bug 22392
then
w_warn "You must run the app with the -nosysteminfo option to avoid a cr
ash on startup"
ARGS="-nosysteminfo"
fi
}
"
}
WinWait ahk_class MsiDialogCloseClass, Completed
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Finish
Send {Enter}
}
winwaitclose
"
}
#---------------------------------------------------------------# Games
#---------------------------------------------------------------w_metadata algodoo_demo games \
title="Algodoo Demo" \
publisher="Algoryx" \
year="2009" \
media="download" \
file1="Algodoo_1_7_1-Win32.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Algodoo/Algodoo.exe"
load_algodoo_demo()
{
w_download http://www.algodoo.com/download/Algodoo_1_7_1-Win32.exe caa73e73
669a8787652a6bed123bbe2682152f12
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
; This one's funny... on Wine, keyboard works once you click manually, b
ut until then, only ControlClick seems to work.
run, Algodoo_1_7_1-Win32.exe
SetTitleMatchMode, 2
winwait, Algodoo, Welcome
if ( w_opt_unattended > 0 ) {
ControlClick, TNewButton1
winwait, Algodoo, License
;send {Tab}a{Space}{Enter}
ControlClick, TNewRadioButton1 ; Accept
}
winwait, Algodoo, Completing
if ( w_opt_unattended > 0 ) {
sleep 500
send {Space}{Tab}{Space}{Tab}{Space}{Enter}
r view tutorials
}
WinWaitClose, Algodoo, Completing
"
re
Demo,Welcome
Demo,License
Demo,Destination
Demo,shortcuts
Demo,additional tasks
Demo,installing
"
}
WinWait,Setup - Amnesia - The Dark Descent Demo,finished
if ( w_opt_unattended > 0 ) {
;ControlClick TNewButton4 ; Finish
send {Enter}
; Finish
}
WinWaitClose,Setup - Amnesia - The Dark Descent Demo,finished
w_call msxml4
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run aoe3trial.exe
WinWait,Empires,Welcome
if ( w_opt_unattended > 0 ) {
sleep 1000
winactivate
; else next button click ignored on vista?
Sleep 500
ControlClick Button1 ; Next
WinWait,Empires,Please
Sleep 500
ControlClick Button4 ; Next
WinWait,Empires,Complete
Sleep 500
ControlClick Button4 ; Finish
}
WinWaitClose
"
if w_workaround_wine_bug 24911 "Installing devnum, dmsynth, and quartz to ge
t sound working" 1.3.9,
then
# On some systems, only quartz is needed?
# appdb says that l3codecx is also needed?
w_call devenum
w_call dmsynth
w_call quartz
fi
if w_workaround_wine_bug 24912
then
# kill off lingering installer
w_ahk_do "
SetTitleMatchMode, 2
WinKill,Empires
"
# or should we just do $WINESERVER -k, like fable_tlc does?
PID=`ps augxw | grep IDriver | grep -v grep | awk '{print $2}'`
kill $PID
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Microsoft Games\\Age of Empires III Tria
l" "age3.exe"
}
#---------------------------------------------------------------w_metadata aoe_demo games \
title="Age of Empires Demo" \
publisher="Microsoft" \
year="1997" \
media="download" \
file1="MSAoE.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Age of Empires Trial/emp
ires.exe"
load_aoe_demo()
w_download http://download.microsoft.com/download/aoe/Trial/1.0/WIN98/EN-US/
MSAoE.exe 23630a65ce4133038107f3175f8fc54a914bc2f3
lly
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
run, MSAoE.exe
SetTitleMatchMode, 2
winwait, Microsoft Age of Empires Trial Version
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick, Button1
winwait, End User License Agreement
sleep 1000
ControlClick, Button1
winwait, Microsoft Age of Empires Trial Version, Setup will install
sleep 1000
ControlClick Button2
winwait, Microsoft Age of Empires Trial Version, Setup has successfu
sleep 1000
ControlClick Button1
"
}
WinWaitClose, Microsoft Age of Empires Trial Version
sleep 500
send {Enter} ; Next
winwait, Brotherhood, begin
send {Enter} ; Install
}
winwait, Brotherhood, Finish
if ( w_opt_unattended > 0 ) {
ControlClick Button4
send {Enter} ; Finish
}
WinWaitClose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Ubisoft\\Assassin's Creed Brotherhood" A
ssassinsCreedBrotherhood.exe
w_download http://static3.cdn.ubi.com/ac_brotherhood/ac_brotherhood_1.01_ww.
exe a2b76f16616709cc16537b0e98faa4181ca904ce
if w_workaround_wine_bug 26562 "Disabling glsl for smoother rendering"
then
w_call glsl=disabled
fi
"
SetTitleMatchMode, 2
run ac_brotherhood_1.01_ww.exe
WinWait, Choose Setup Language, Select
if ( w_opt_unattended > 0 ) {
send {Enter}
winwait, Brotherhood 1.01, License
WinActivate
send a
; Agree
sleep 500
send {Enter} ; Next
winwait, Brotherhood 1.01, Details
ControlClick Button1 ; Next
}
winwait, Brotherhood 1.01, Complete
if ( w_opt_unattended > 0 ) {
send {Enter}
}
WinWaitClose
cd "$W_TMP"
w_try_unrar "$W_CACHE/$W_PACKAGE/Avatar_The_Game_Demo.exe"
w_ahk_do "
SetTitleMatchMode, 2
SetWinDelay 500
run, setup.exe
winwait, Language
u = $W_OPT_UNATTENDED
if ( u > 0 ) {
WinActivate
controlclick, Button1
winwait, AVATAR, Welcome
controlclick, Button1
winwait, AVATAR, License
controlclick, Button5
controlclick, Button2
winwait, AVATAR, setup type
controlclick, Button2
}
winwait AVATAR
if ( u > 0 ) {
; Strange CRC error workaround. Will check this out. Stay tuned.
loop
{
ifwinexist, CRC Error
{
winactivate, CRC Error
controlclick, Button3, CRC Error ; ignore
}
ifwinexist, AVATAR, Complete
{
controlclick, Button4
break
}
sleep 1000
}
}
winwaitclose AVATAR
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Ubisoft\\Demo\\James Cameron's AVATAR THE GAME (Demo)\\bin" "AvatarDemo.exe"
d"
}
w_ahk_do "
SetTitleMatchMode, 2
run setup.exe
winwait, BioShock Demo - InstallShield Wizard, Choose Setup Language
if ( w_opt_unattended > 0 ) {
sleep 2000
ControlClick, Button3
ControlClick, Button3
winwait, BioShock Demo - InstallShield Wizard, Welcome
sleep 1000
ControlClick, Button1
winwait, BioShock Demo - InstallShield Wizard, Please read
sleep 1000
ControlClick, Button5
sleep 1000
ControlClick, Button2
winwait, BioShock Demo - InstallShield Wizard, Select the setup type
sleep 1000
ControlClick, Button2
winwait, BioShock Demo - InstallShield Wizard, Click Install to begi
ControlClick, Button1
}
winwait, BioShock Demo - InstallShield Wizard, The InstallShield Wizard
has successfully installed BioShock
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick, Button2
; don't launch
ControlClick, Button6
; don't show readme
send {Enter}
; finish
}
winwaitclose
sleep 3000 ; wait for splash screen to close
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\2K Games\\BioShock Demo\\Builds\\Release
" "Bioshock.exe"
}
#---------------------------------------------------------------w_metadata bioshock2 games \
title="Bioshock 2" \
publisher="2K Games" \
year="2010" \
media="dvd" \
file1="BIOSHOCK_2.iso" \
wine_showstoppers="7065" \
installed_exe1="$W_PROGRAMS_X86_WIN/2K Games/BioShock 2/SP/Builds/Binaries/B
ioshock2Launcher.exe" \
installed_exe2="$W_PROGRAMS_X86_WIN/2K Games/BioShock 2/MP/Builds/Binaries/B
ioshock2Launcher.exe"
load_bioshock2()
{
w_workaround_wine_bug 7065 "This game won't work in Wine because its disc ch
eck fails."
w_mount BIOSHOCK_2
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run ${W_ISO_MOUNT_LETTER}:setup.exe
if ( w_opt_unattended > 0 ) {
winwait BioShock 2, Language
controlclick Button3
winwait BioShock 2, Welcome
controlclick Button1 ; Accept
winwait BioShock 2, License
controlclick Button3 ; Accept
sleep 500
controlclick Button1 ; Next
winwait BioShock 2, Setup Type
controlclick Button4 ; Next
winwait BioShock 2, Ready to Install
controlclick Button1 ; Install
}
winwait BioShock 2, Complete
if ( w_opt_unattended > 0 ) {
controlclick Button4 ; Finish
}
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\2K Games\\BioShock 2\\SP\\Builds\\Binari
es" Bioshock2Launcher.exe
w_declare_exe "$W_PROGRAMS_X86_WIN\\2K Games\\BioShock 2\\MP\\Builds\\Binari
es" Bioshock2Launcher.exe bioshock2_mp
}
#---------------------------------------------------------------w_metadata bfbc2 games \
title="Battlefield Bad Company 2" \
publisher="EA" \
year="2010" \
media="dvd" \
file1="BFBC2.iso"
load_bfbc2()
{
# Title of installer window gets the TM symbol wrong, even in utf8 locales.
# Is it like that in Windows, too?
w_mount BFBC2
w_read_key
w_ahk_do "
SetTitleMatchMode, 2
run ${W_ISO_MOUNT_LETTER}:setup.exe
winwait, Bad Company, English
sleep 500
ControlClick, Next, Bad Company
winwait, Bad Company, Registration Code
sleep 500
send {RAW}$W_KEY
ControlClick, Next, Bad Company, Registration Code
winwait, Bad Company, Setup Wizard will install
sleep 500
ControlClick, Button1, Bad Company, Setup Wizard
winwait, Bad Company, License Agreement
sleep 500
ControlClick, Button1, Bad Company, License Agreement
ControlClick, Button3, Bad Company, License Agreement
"
2" "BFBC2Game.exe"
load_braid()
{
if ! test -f "$W_CACHE/$W_PACKAGE/braid_windows_r3.exe"
then
w_download http://mirror.3fl.net.au/games/arcade/braid/client/braid_wind
ows_r3.exe 7ea08ddbf5f2fb2f38057d930389b5af7d737e2c
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run, braid_windows_r3.exe
if ( w_opt_unattended > 0 ) {
winwait, Braid, install
controlclick, TButton1
winwait, Braid, Destination
controlclick, TButton3
winwait, Braid, Ready to Install
controlclick, TButton3
winwait, Setup, Finishing installation
sleep 5000
; Workaround_winebug 21761
ifwinactive, Setup, ShellExecuteEx failed
{
controlclick, Button1
}
}
winwait, Braid, finished
if ( w_opt_unattended > 0 )
controlclick, TButton3
winwaitclose, Braid, finished
"
if w_workaround_wine_bug 22161
then
w_call d3dx9_36
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Braid" "braid.exe"
w_read_key
cd "$W_DRIVE_C"
w_ahk_do "
SetTitleMatchMode, 2
run, run-$W_PACKAGE.bat
winwait, Braid, Enter Registration
controlclick, Button4
winwait, Enter Registration
send {Raw}$W_RAW_KEY
controlclick, Button1
sleep 5000
process, close, braid.exe
"
# Fix resolution for user:
if [ -x "`which xrandr`" ]
then
xrandr -s 0
else
w_warn "Xrandr is not available, not sure how to fix resolution, sorry!"
fi
}
#---------------------------------------------------------------w_metadata cnc_tiberian_sun games \
title="Command and Conquer: Tiberian Sun (2010 edition)" \
publisher="EA" \
year="1999" \
media="download" \
file1="OfficialCnCTiberianSun.rar" \
installed_exe1="$W_PROGRAMS_X86_WIN\\EA Games\\Command & Conquer The First D
ecade\\Command & Conquer(tm) Tiberian Sun(tm)\\SUN\\Game.exe"
load_cnc_tiberian_sun()
{
w_download http://lvlt.bioware.cdn.ea.com/u/f/eagames/cnc3/cnc3tv/Classic/$f
ile1 591aabd639fb9f2d2476a2150f3c00b1162674f5
cd "$W_PROGRAMS_X86_UNIX"
# FIXME: we need a progress indicator when unpacking large archives
w_info "Unpacking rar file. This will take a minute."
w_try_unrar "$W_CACHE/$W_PACKAGE/$file1"
w_declare_exe \
"$W_PROGRAMS_X86_WIN\\EA Games\\Command & Conquer The First Decade\\Comm
and & Conquer(tm) Tiberian Sun(tm)\\SUN" \
Game.exe
}
#---------------------------------------------------------------w_metadata cnc3_demo games \
title="Command and Conquer 3 Demo" \
publisher="EA" \
year="2007" \
media="download" \
file1="CnC3Demo.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Command & Conquer 3 Tibe
rium Wars Demo/CNC3Demo.exe"
load_cnc3_demo()
{
w_download "http://largedownloads.ea.com/pub/demos/CommandandConquer3/CnC3De
mo.exe" f6af21eba2d17eb6d8bb6a131b501b41c3a7eaf7
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run, CnC3Demo.exe
winwait, Conquer 3, free space to install
if ( w_opt_unattended > 0 ) {
controlclick, button1
winwait, WinZip, After installation
controlclick, button1
winwait, Conquer 3, InstallShield
controlclick, button1
winwait, Conquer 3, license
controlclick, button3
controlclick, button5
winwait, Conquer 3, setup type
controlclick, button5
winwait, Conquer 3, EA Link
controlclick, button1
winwait, Conquer 3, GameSpy
controlclick, button1
}
winwait, Conquer 3, Launch the program
if ( w_opt_unattended > 0 )
controlclick, button1
"
if w_workaround_wine_bug 19159
then
w_call vd=800x600
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Electronic Arts\\Command & Conquer 3 Tib
erium Wars Demo" "CNC3Demo.exe"
}
#---------------------------------------------------------------w_metadata cnc_redalert3_demo games \
title="Command & Conquer Red Alert 3 Demo" \
publisher="EA" \
year="2008" \
media="manual_download" \
file1="RedAlert3Demo.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Red Alert 3 Demo/RA3Demo
.exe"
load_cnc_redalert3_demo()
{
w_download_manual 'http://www.fileplanet.com/194888/190000/fileinfo/Command&-Conquer:-Red-Alert-3-Demo' RedAlert3Demo.exe f909b87cc12e386a51be51ede70863434
8c8af48
cd "$W_CACHE/$W_PACKAGE"
if test ! "$W_OPT_UNATTENDED"
then
w_try "$WINE" $file1
else
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run $file1
winwait, Demo, readme
send {enter}
;
winwait, Demo, Agreement
ControlFocus, TNewCheckListBox1, accept
send {space}
;
sleep 1000
send N
;
winwait, Demo, Agreement ; DirectX
ControlFocus, TNewCheckListBox1, accept
send {space}
;
Install button
accept license
Next
accept license
fi
"
sleep 1000
send N
winwait, Demo, Next
send N
winwait, Demo, Install
send {enter}
winwait, Demo, Finish
send F
WinWaitClose
; Next
; Next
; Really install
; finish
w_download_manual http://www.fileplanet.com/218762/210000/fileinfo/Cities-in
-Motion-Demo cim-demo-1-0-8.exe d40408b59bc0e6e33b564e9bbb55dbab6c44c630
cd "$W_CACHE/$W_PACKAGE"
w_try "$WINE" cim-demo-1-0-8.exe ${W_OPT_UNATTENDED:+ /sp- /silent /norestar
t}
w_declare_exe "$W_PROGRAMS_X86_WIN\\Cities In Motion Demo" "Cities In Motion
.exe"
}
#---------------------------------------------------------------w_metadata cod_demo games \
title="Call of Duty demo" \
publisher="Activision" \
year="2003" \
media="manual_download" \
file1="call_of_duty_demo.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Call of Duty Single Player Demo/CoDSP.ex
e"
load_cod_demo()
{
w_download_manual http://www.gamefront.com/files/968870/call_of_duty_demo_ex
e Call_Of_Duty_Demo.exe 1c480a1e64a80f7f97fd0acd9582fe190c64ad8e
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run Call_Of_Duty_Demo.exe
WinWait,Call of Duty Single Player Demo,Welcome
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick Button1 ; next
WinWait,Call of Duty Single Player Demo,License
sleep 1000
WinActivate
send A
; I Agree
WinWait,Call of Duty Single Player Demo,System
sleep 1000
send n
; Next
WinWait,Call of Duty Single Player Demo,Location
sleep 1000
send {Enter}
WinWait,Call of Duty Single Player Demo,Select
sleep 1000
send n
WinWait,Call of Duty Single Player Demo,Start
sleep 1000
send i
; Install
WinWait,Create Shortcut
sleep 1000
send n
; No
}
WinWait,Call of Duty Single Player Demo, Complete
if ( w_opt_unattended > 0 ) {
sleep 1000
send {Enter}
; Finish
}
WinWaitClose
"
if w_workaround_wine_bug 21558
then
# Work around a buffer overflow - not really Wine's fault
setvar="@if not defined %__GL_ExtensionStringVersion% then echo \"If you
get a buffer overflow error, set __GL_ExtensionStringVersion=17700 before start
ing Wine. See http://bugs.winehq.org/show_bug.cgi?id=21558.\""
else
setvar=
fi
cat > "$W_DRIVE_C/run-$W_PACKAGE.bat" <<__EOF__
$setvar
c:
cd "$W_PROGRAMS_X86_WIN\\Call of Duty Single Player Demo"
CoDSP.exe %*
__EOF__
}
#---------------------------------------------------------------w_metadata cod1 games \
title="Call of Duty" \
publisher="Activision" \
year="2003" \
media="dvd" \
file1="CoD1.iso" \
file2="CoD2.iso"
load_cod1()
{
# FIXME: port load_harder from winetricks and use it when caching first disc
w_mount CoD1
w_read_key
__GL_ExtensionStringVersion=17700 w_ahk_do "
SetTitleMatchMode, 2
run ${W_ISO_MOUNT_LETTER}:setup.exe
WinWait, CD Key, enter
if ( w_opt_unattended > 0 ) {
send {Raw}$W_KEY
ControlClick Button1
WinWait, CD Key, valid
ControlClick Button1
WinWait, Call of Duty, Welcome
ControlClick Button1
WinWait, Call of Duty, License
ControlClick Button3
WinWait, Call of Duty, Minimum
ControlClick Button4
WinWait, Call of Duty, Location
ControlClick Button1
WinWait, Call of Duty, Folder
ControlClick Button1
WinWait, Call of Duty, Start
ControlClick Button1
}
WinWait, Insert CD, Please insert the Call of Duty CD 2
"
publisher="Activision" \
year="2007" \
media="manual_download" \
file1="CoD4MWDemoSetup_v2.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Activision/Call of Duty 4 - Modern Warfa
re Demo/iw3sp.exe"
load_cod4mw_demo()
{
w_download http://download.cnet.com/Call-of-Duty-4-Modern-Warfare/3000-7441_
4-11277584.html CoD4MWDemoSetup_v2.exe 690a5f789a44437ed10784acfdd6418ca4a21886
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run, CoD4MWDemoSetup_v2.exe
WinWait,Modern Warfare,Welcome
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick Button1 ; Next
WinWait,Modern Warfare, License
Sleep 500
ControlClick Button5 ; accept
Sleep 2000
ControlClick Button2 ; Next
WinWait,Modern Warfare, System Requirements
Sleep 500
ControlClick Button1 ; Next
Sleep 500
ControlClick Button4 ; Next
WinWait,Modern Warfare, Typical
Sleep 500
ControlClick Button4 ; License
Sleep 500
ControlClick Button1 ; Next
WinWait,Question, shortcut
Sleep 500
ControlClick Button1 ; Yes
WinWait,Microsoft DirectX Setup, license
Sleep 500
ControlClick Button1 ; Yes
WinWait,Modern Warfare, finished
Sleep 500
ControlClick Button1 ; Finished
}
WinWaitClose,WinZip Self-Extractor - CoD4MWDemoSetup_v2
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Activision\\Call of Duty 4 - Modern Warf
are Demo" "iw3sp.exe"
}
#---------------------------------------------------------------w_metadata cod5_waw games \
title="Call of Duty 5: World at War" \
publisher="Activision" \
year="2008" \
media="dvd" \
file1="5330161c7960f0770e6b05f498ab9fd13be4cfad.iso" \
fi
ne."
else
w_warn "This game is copy-protected, and requires the real disc in a rea
l drive to run."
fi
}
#---------------------------------------------------------w_metadata cojbib_demo games \
title="Call of Juarez: Bound in Blood Demo" \
publisher="Ubisoft" \
year="2009" \
media="manual_download" \
file1="CoJ2PC_20090713_DEMO_16_buy_now_INSTALLER.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Demo/Techland/Call of Juarez - B
ound in Blood SP Demo/CoJBiBDemo_x86.exe"
load_cojbib_demo()
{
w_download_manual http://www.gamefront.com/files/14274183/CoJ2PC-20090713-DE
MO-16-buy-now-INSTALLER.exe/ CoJ2PC_20090713_DEMO_16_buy_now_INSTALLER.exe 64261
01f6c77bacd57c8449b12a3c76db7f761f0
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode 2
SetWinDelay 500
run CoJ2PC_20090713_DEMO_16_buy_now_INSTALLER.exe
winwait Setup, language
if ( w_opt_unattended > 0 ) {
controlclick button1 ; next
winwait Call of Juarez, Welcome
controlclick button1 ; next
winwait Call of Juarez, License
controlclick button2 ; yes
winwait Call of Juarez, Location
controlclick button1 ; next
winwait Call of Juarez, Start
controlclick button1 ; next
}
winwait Call of Juarez, Complete
if ( w_opt_unattended > 0 )
controlclick button2 ; next
"
cd "$W_CACHE/$W_PACKAGE"
w_try_unzip Civilization4_Demo.zip -d "$W_TMP"
cd "$W_TMP/$W_PACKAGE"
chmod +x setup.exe
w_ahk_do "
SetTitleMatchMode, 2
run, setup.exe
winwait, Choose Setup Language
if ( w_opt_unattended > 0 ) {
sleep 1000
Send {enter}
winwait, Civilization 4, Welcome
ControlClick &Next >, Civilization 4
winwait, Civilization 4, I &accept the terms of the license agreemen
ControlClick I &accept, Civilization 4
ControlClick &Next >, Civilization 4
winwait, Civilization 4, Express Install
ControlClick &Next >, Civilization 4
winwait, Civilization 4, begin installation
ControlClick &Install, Civilization 4
winwait, Civilization 4, InstallShield Wizard Complete
ControlClick Finish, Civilization 4
"
}
winwaitclose
if w_workaround_wine_bug 6856
then
w_call msxml3
fi
if w_workaround_wine_bug 6856 # part 2, still need to file a bug
then
w_call d3dx9_26
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Firaxis Games\\Sid Meier's Civilization
4 Demo" "Civilization4.exe"
}
#---------------------------------------------------------------w_metadata crayonphysics_demo games \
controlclick, Button1
; accept
sleep 500
;controlclick, Button3
; next
send {Enter}
; Again for DirectX
winwait, Setup, Please read the following End
;controlclick, Button1
; accept
send a
sleep 1000
;controlclick, Button3
; next
send {Enter}
winwait,Setup, Ready to install
controlclick, Button1
"
}
winwait, Setup, Click the Finish button
if ( w_opt_unattended > 0 ) {
controlclick, Button5
; Don't install EA Download Manager
controlclick, Button1
; Finish
}
winwaitclose
if w_workaround_wine_bug 26283
then
w_warn "The game has some nasty flickering, see http://bugs.winehq.org/s
how_bug.cgi?id=26283"
fi
}
#---------------------------------------------------------------w_metadata csi6_demo games \
title="CSI: Fatal Conspiracy Demo" \
publisher="Ubisoft" \
year="2010" \
media="manual_download" \
file1="CSI6_PC_Demo_05.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Telltale Games/CSI - Fatal Consp
iracy Demo/CSI6Demo.exe"
load_csi6_demo()
{
w_download_manual http://www.fileplanet.com/217175/download/CSI:-Fatal-Consp
iracy-Demo CSI6_PC_Demo_05.exe 28473b4dc9760b659f24a397192b74d170b593bb
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run, CSI6_PC_Demo_05.exe
winwait, Installer Language, Please select
if ( w_opt_unattended > 0 ) {
ControlClick, Button1 ; Accept default (english)
;send {Enter} ; Accept default (english)
winwait, CSI - Fatal Conspiracy Demo Setup
send {Enter} ; Next
winwait, CSI - Fatal Conspiracy Demo Setup, License
send {Enter} ; Agree
winwait, CSI - Fatal Conspiracy Demo Setup, Location
send {Enter} ; Install
"
}
winwait, CSI - Fatal Conspiracy Demo Setup, Finish
if ( w_opt_unattended > 0 ) {
ControlClick Button4
send {Enter} ; Finish
WinWaitClose
}
if w_workaround_wine_bug 23041
then
w_call d3dx9_36
fi
it
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Electronic Arts\\Darkspore\\DarksporeBin
" "Darkspore.exe"
}
#---------------------------------------------------------------w_metadata dcuo games \
title="DC Universe Online" \
publisher="EA" \
year="2011" \
media="dvd" \
file1="DCUO - Disc 1.iso" \
file2="DCUO - Disc 2.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/Sony Online Entertainment/Installed Game
s/DC Universe Online Live/LaunchPad.exe"
load_dcuo()
{
# The installer would take care of this, but let's do it first
w_call flash
if w_workaround_wine_bug 26298 "Installing microsoft runtime libraries"
then
w_call vcrun2005
fi
if w_workaround_wine_bug 27279 "Installing microsoft XAct audio"
then
w_call xact
fi
if w_workaround_wine_bug 25906 "Installing ie8"
then
w_call ie8
fi
w_mount "DCUO - Disc 1"
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run, ${W_ISO_MOUNT_LETTER}:setup.exe
if ( w_opt_unattended > 0 ) {
winwait, DC Universe, Anti-virus
ControlClick, Button1 ; next
winwait, DC Universe, License
ControlClick, Button5 ; accept
sleep 500
ControlClick, Button2 ; next
winwait, DC Universe, Shortcut
ControlClick, Button3 ; next
Loop
{
IfWinExist, DC Universe, not enough space
{
exit 1
; dang, have to quit
}
IfWinExist, DC Universe, Ready
{
break
}
Sleep 1000
}
"
}
winwait, Setup Needs The Next Disk, Please insert disk 2
e"
load_deadspace()
{
w_mount DEADSPACE
if w_workaround_wine_bug 23324
then
msvcrun_me_harder="
winwait, Microsoft
controlclick, Button1
"
else
msvcrun_me_harder=""
fi
w_read_key
w_ahk_do "
SetTitleMatchMode, 2
; note: if this is the second run, the installer skips the registration
code prompt
run, ${W_ISO_MOUNT_LETTER}:EASetup.exe
winwait, Dead
send {Enter}
winwait, Dead, Registration Code
send {RAW}$W_KEY
Sleep 1000
controlclick, Button2
$msvcrun_me_harder
winwait, Setup, License
Sleep 1000
controlclick, Button1
Sleep 1000
send {Enter}
winwait, Setup, License
Sleep 1000
controlclick, Button1
Sleep 1000
send {Enter}
winwait, Setup, Destination
Sleep 1000
controlclick, Button1
winwait, Setup, begin
Sleep 1000
controlclick, Button1
winwait, Setup, Finish
Sleep 1000
controlclick, Button5
controlclick, Button1
"
if w_workaround_wine_bug 26079
then
w_call d3dx9_36
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Electronic Arts\\Dead Space" "Dead Space
.exe"
}
#---------------------------------------------------------------w_metadata deadspace2 games \
title="Dead Space 2 (drm broken on wine)" \
publisher="EA" \
year="2011" \
media="dvd" \
file1="Disc1.iso" \
file2="Disc2.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/EA Games/Dead Space 2/deadspace2.exe" \
wine_showstoppers="25853"
load_deadspace2()
{
if w_workaround_wine_bug 25853
then
w_warn "Non-steam versions of this game do not run on Wine because Wine
does not support the version of SecuROM they use. Proceed only if you want to r
un into this problem."
fi
w_read_key
w_mount Disc1
# Work around bug 25963 (fails to switch discs)
w_warn "Copying discs to hard drive. This will take a few minutes."
cd "$W_TMP"
# Copy takes a LONG time, so offer a way to avoid copy while debugging verb
# You'll need to comment out the five "rm -rf"'s, too.
if test ! -f easetup.exe
then
w_try cp -R "$W_ISO_MOUNT_ROOT"/* .
# Make the directories writable, else 2nd disc copy will fail.
w_try chmod -R +w .
w_mount Disc2
# On Linux, use symlinks for disc 2. (On Cygwin, we'd have to copy.)
w_try ln -s "$W_ISO_MOUNT_ROOT"/*.dat .
mkdir -p movies/en movies/fr
w_try ln -s "$W_ISO_MOUNT_ROOT"/movies/en/* movies/en/
w_try ln -s "$W_ISO_MOUNT_ROOT"/movies/fr/* movies/fr/
# Make the files writable, otherwise you'll get errors when trying to re
move the temp directory.
chmod -R +w .
fi
# Install takes a long time, so offer a way to skip installation
# and go straight to activation while debugging that
if ! test -f "$W_PROGRAMS_X86_UNIX/EA Games/Dead Space 2/deadspace2.exe"
then
w_ahk_do "
run easetup.exe
if ( w_opt_unattended > 0 ) {
SetTitleMatchMode, 2
; Not all systems need the Visual C++ runtime
loop
{
ifwinexist, Microsoft Visual C++ 2008 Redistributable Setup
{
sleep 500
controlclick, Button12 ; Next
winwait, Visual C++, License
sleep 500
controlclick, Button11 ; Agree
sleep 500
controlclick, Button8 ; Install
winwait, Setup, configuring
winwaitclose
winwait, Visual C++, Complete
sleep 500
controlclick, Button2 ; Finish
break
}
ifwinexist, Setup, Dead Space
{
break
}
sleep 1000
}
winwait, Setup, License
; Dead Space license
sleep 500
controlclick Button1 ; accept
controlclick Button3 ; next
SetTitleMatchMode, slow
; since word DirectX in next dialog c
an only be read 'slowly'
winwait, Setup, DirectX
; DirectX license
sleep 500
controlclick Button1 ; accept
controlclick Button3 ; next
winwait, Setup, Ready to install
sleep 500
controlclick Button1 ; Install
}
winwait, Setup, Completed
if ( w_opt_unattended > 0 ) {
controlclick Button5 ; (Don't) install EA Download Manager
controlclick Button1 ; Finish
}
winwaitclose
"
fi
# Activate the game
cd "$W_PROGRAMS_X86/EA Games/Dead Space 2"
w_ahk_do "
run activation.exe
if ( w_opt_unattended > 0 ) {
SetTitleMatchMode, 2
WinWait, Product activation
sleep 500
controlclick TBitBtn2 ; Next
WinWait, Product activation, Serial
sleep 500
send $W_KEY
controlclick TBitBtn3 ; Next
WinWait, Information
sleep 4000
; let user see what happened
send {Enter}
}
"
if w_workaround_wine_bug 21230
then
w_call d3dx9_36
fi
}
X2.exe"
}
#---------------------------------------------------------------w_metadata diablo2 games \
title="Diablo II" \
publisher="Blizzard" \
year="2000" \
media="cd" \
file1="INSTALL.iso" \
file2="PLAYDISC.iso" \
file3="CINEMATICS.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/Diablo II/Diablo II.exe"
load_diablo2()
{
w_download http://ftp.blizzard.com/pub/diablo2/patches/PC/D2Patch_113c.exe c
78761bfb06999a9788f25a23a1ed30260ffb8ab
w_read_key
w_mount INSTALL
w_ahk_do "
SetWinDelay 500
run ${W_ISO_MOUNT_LETTER}:setup.exe
winwait, Diablo II Setup
send {i}
winwait, Choose Installation Size
send {u}
send {Enter}
send {Raw}$LOGNAME
send {Tab}{Raw}$W_KEY
send {Enter}
winwait, Diablo II - choose install directory
send {Enter}
winwait, Desktop Shortcut
send {N}
winwait, Insert Disc"
w_mount PLAYDISC
# Needed by patch 1.13c to avoid disc swapping
cp "$W_ISO_MOUNT_ROOT"/d2music.mpq "$W_PROGRAMS_UNIX/Diablo II/"
w_ahk_do "
send, {Enter}
Sleep 1000
winwait, Insert Disc"
w_mount CINEMATICS
w_ahk_do "
send, {Enter}
Sleep 1000
winwait, Insert Disc"
w_mount INSTALL
w_ahk_do "
send, {Enter}
Sleep 1000
winwait, View ReadMe?
ControlClick &No, View ReadMe?
winwait, Register Diablo II Electronically?
send {N}
winwait, Diablo II Setup - Video Test
if w_workaround_wine_bug 23532
then
w_call gfw
fi
if w_workaround_wine_bug 24868
then
w_call d3dx9_36
fi
cd "$W_TMP/$W_PACKAGE"
w_ahk_do "
Run, "Setup.exe"
WinWait, Choose Setup Language, Select
if ( w_opt_unattended > 0 ) {
sleep 500
ControlClick Button1
;next
WinWait, DiRT2 Demo - InstallShield Wizard, Welcome
sleep 500
ControlClick Button1
;next
WinWait, DiRT2 Demo - InstallShield Wizard, License
sleep 500
ControlClick Button3
;i accept
sleep 500
ControlClick Button1
;next
WinWait, DiRT2 Demo - InstallShield Wizard, Setup
sleep 500
ControlClick Button4
;next
WinWait, InstallShield Wizard, In order
sleep 500
ControlClick Button1
;next
WinWait, DiRT2 Demo - InstallShield Wizard, Ready
sleep 500
ControlClick Button1
;next
}
WinWait, DiRT2 Demo - InstallShield Wizard, Complete
if ( w_opt_unattended > 0 ) {
sleep 500
ControlClick Button4
;finish
}
WinWaitClose, DiRT2 Demo - InstallShield Wizard, Complete
"
}
fi
if w_workaround_wine_bug 25329
then
w_call wmp9
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Divinity II - Ego Draconis - Demo\\Bin"
"Divinity2_Demo.exe"
}
#---------------------------------------------------------------w_metadata demolition_company_demo games \
title="Demolition Company demo" \
publisher="Giants Software" \
year="2010" \
media="manual_download" \
file1="DemolitionCompanyDemoENv2.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Demolition Company Demo/DemolitionCompan
y.exe"
load_demolition_company_demo()
{
w_download_manual http://www.demolitioncompany-thegame.com/demo.php Demoliti
onCompanyDemoENv2.exe
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run, DemolitionCompanyDemoENv2.exe
winwait, Setup - Demolition, This will install
if ( w_opt_unattended > 0 ) {
sleep 1000
controlclick, TNewButton1, Setup - Demolition, This will install
winwait, Setup - Demolition, License Agreement
sleep 1000
controlclick, TNewRadioButton1, Setup - Demolition, License Agreemen
sleep 1000
controlclick, TNewButton2, Setup - Demolition,
winwait, Setup - Demolition, Setup Type
sleep 1000
controlclick, TNewButton2, Setup - Demolition,
winwait, Setup - Demolition, Ready to Install
sleep 1000
controlclick, TNewButton2, Setup - Demolition,
winwait, Setup - Demolition, Completing
sleep 1000
controlclick, TNewButton2, Setup - Demolition,
}
winwaitclose, Setup - Demolition
License Agreement
Setup Type
Ready to Install
Completing
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Demolition Company Demo\\" "DemolitionCo
mpany.exe"
}
#---------------------------------------------------------------w_metadata dragonage games \
title="Dragon Age: Origins" \
publisher="Bioware / EA" \
year="2009" \
media="dvd" \
file1="DragonAge.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/Dragon Age/bin_ship/daorigins.exe"
load_dragonage()
{
w_read_key
if w_workaround_wine_bug 22191 "Installer has a non-fatal crash on exit"
then
w_call nocrashdialog
fi
# game can do this, why do we need to?
w_call physx
if w_workaround_wine_bug 24837 "Installing C++ runtime library"
then
w_call vcrun2005
fi
if test "$WINETRICKS_OPT_KEEPISOS" != 1 && \
test ! -f "$W_CACHE/dragonage/DragonAge.iso" && \
w_workaround_wine_bug 26459 "Making and mounting an .iso to work around
'Failed to authenticate the disk' error. After each reboot, you'll need to do [
sudo mount -o ro,loop '$W_CACHE/dragonage/DragonAge.iso' /mnt/winetricks] to pla
y Dragon Age. Someday this will be automated."
then
WINETRICKS_OPT_KEEPISOS=1 w_mount DragonAge
else
w_mount DragonAge
fi
w_ahk_do "
SetWinDelay 1000
Run, ${W_ISO_MOUNT_LETTER}:Setup.exe
SetTitleMatchMode, 2
winwait, Installer Language
if ( w_opt_unattended > 0 ) {
WinActivate
send {Enter}
winwait, Dragon Age: Origins Setup
ControlClick Next, Dragon Age: Origins Setup
winwait, Dragon Age: Origins Setup, End User License
;ControlClick Button4, Dragon Age: Origins Setup ; agree
send {Tab}a ; agree
;ControlClick I agree, Dragon Age: Origins Setup
send {Enter} ; continue
SetTitleMatchMode, 1
winwait, Dragon Age: Origins, Registration
send $W_KEY
send {Enter}
}
winwait, Dragon Age: Origins Setup, Install Type
if ( w_opt_unattended > 0 )
send {Enter}
winwaitclose
"
# Since the installer explodes on exit, just wait for the
# last file it's known to create
# Annoyingly, it runs a webrowser so you can activate the extra stuff. Disab
le that, and w_warn the user after install:
WINEDLLOVERRIDES="winebrowser.exe="
export WINEDLLOVERRIDES
w_ahk_do "
SetTitleMatchMode, 2
SetTitleMatchMode, slow
SetWinDelay 1000
Run, ${W_ISO_MOUNT_LETTER}:Setup.exe
winwait, Installer, English
if ( w_opt_unattended > 0 ) {
ControlClick Button1, Installer, English
winwait, Dragon Age: Origins Setup
ControlClick Button2, Dragon Age: Origins Setup
winwait, Dragon Age: Origins Setup, License Agreement
ControlClick Button4, Dragon Age: Origins Setup
ControlClick Button2, Dragon Age: Origins Setup
winwait, Dragon Age: Origins, Registration
controlclick, Edit1
sleep 1000
send $W_KEY
send {Enter}
winwait, Dragon Age: Origins Setup, Install Type
controlclick, Button2, Dragon Age: Origins Setup, Install Type
winwait, Dragon Age: Origins Setup, expanded content
controlclick, Button1
}
winwait, Insert Disc...
"
w_mount DRAGONAGE data/ultimate_en.rar 2
w_ahk_do "
sleep 5000
SetTitleMatchMode, 2
if ( w_opt_unattended > 0 ) {
controlclick, Button2, Insert Disc...
winwait, Dragon Age, Setup was completed
controlclick, Button2, Dragon Age, Setup
}
winwait, Dragon Age, Click Finish to close
if ( w_opt_unattended > 0 ) {
controlclick, Button5, Dragon Age, Click
controlclick, Button2, Dragon Age, Click
}
winwaitclose
"
successfully
was completed successfully
Finish to close
Finish to close
if w_workaround_wine_bug 22307
then
w_warn "Turn off frame buffer effects to avoid blurry cut scenes. See h
ttp://bugs.winehq.org/show_bug.cgi?id=22307"
fi
if w_workaround_wine_bug 22383
then
w_try_winetricks strictdrawordering=enabled
fi
if w_workaround_wine_bug 23730
then
w_warn "Run with WINEDEBUG=-all to reduce flickering."
fi
if w_workaround_wine_bug 23081
then
w_warn "If you still see flickering, try applying the patch from http://
bugs.winehq.org/show_bug.cgi?id=23081"
fi
w_warn "To activate the additional content, visit http://social.bioware.com/
redeem_code.php?path=/dragonage/pc/dlcactivate/en"
}
w_call d3dx9_36
w_call d3dx11_43
fi
if w_workaround_wine_bug 26211 "installing native devenum to get sound in lo
go movie"
then
w_call devenum
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Dragon Age 2 Demo" "DragonAge2Launcher.e
xe"
}
#---------------------------------------------------------------w_metadata eve games \
title="EVE Online Tyrannis" \
publisher="CCP Games" \
year="2011" \
media="download" \
file1="EVE_Online_Installer_561078.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/CCP/EVE/eve.exe"
load_eve()
{
# http://www.eveonline.com/download/?fallback=1&
w_download http://content.eveonline.com/561078/EVE_Online_Installer_561078.e
xe 5b5f0cd4fbd42f82b1d1cccb2e22ddeed97d1d3a
if w_workaround_wine_bug 18221
then
w_call corefonts
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
run, $file1
WinWait, EVE Online
if ( w_opt_unattended > 0 ) {
WinActivate
send {Enter}
; Next
WinWait, EVE,License Agreement
WinActivate
send {Enter}
; Next
WinWait, EVE,Choose Install
WinActivate
send {Enter}
; Install
WinWait, EVE,has been installed
WinActivate
;Send {Tab}{Tab}{Tab} ; select Launch
;Send {Space}
; untick Launch
ControlClick Button4 ; untick Launch
Send {Enter}
; Finish (Button2)
}
WinWaitClose, EVE Online
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\CCP\\EVE" "eve.exe"
#----------------------------------------------------------------
w_ahk_do "
SetTitleMatchMode, 2
WinWait,Fable,Disk 3
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick Button2 ; Retry
}
WinWait,Fable,Disk 4
"
w_mount "FABLE DISK 4"
w_ahk_do "
SetTitleMatchMode, 2
WinWait,Fable,Disk 4
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick Button2 ; Retry
}
WinWait,Fable,Disk 1
WinKill
"
# Now tell game what the real disc is so user can insert disc 1 and run the
game!
# FIXME: don't guess it's D:
cat > "$W_TMP"/$W_PACKAGE.reg <<_EOF_
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData
\S-1-5-18\Products\D3BE9C3CAF4226447B48E06CAACF2DDD\InstallProperties]
"InstallSource"="D:\\"
_EOF_
try_regedit "$W_TMP_WIN"\\$W_PACKAGE.reg
# Also accept EULA
cat > "$W_TMP"/$W_PACKAGE.reg <<_EOF_
REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Fable TLC]
"FIRSTRUN"=dword:00000001
_EOF_
try_regedit "$W_TMP_WIN"\\$W_PACKAGE.reg
if w_workaround_wine_bug 24912
then
# kill off lingering installer
w_ahk_do "
SetTitleMatchMode, 2
WinKill,Fable
"
w_killall IDriverT.exe
w_killall IDriver.exe
fi
if w_workaround_wine_bug 25352
then
w_call devenum
w_call quartz
fi
w_call wmp9
if w_workaround_wine_bug 20074
then
w_call d3dx9_36
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Microsoft Games\\Fable - The Lost Chapte
rs" "Fable.exe"
}
#---------------------------------------------------------------w_metadata farmsim2011_demo games \
title="Farming Simulator 2011 Demo" \
publisher="Astragon" \
year="2011" \
media="manual_download" \
file1="FarmingSimulator2011DemoEN.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Farming Simulator 2011 Demo/game.exe"
load_farmsim2011_demo()
{
# From http://www.landwirtschafts-simulator.de/demo.php
w_download_manual http://www.landwirtschafts-simulator.de/demo.php FarmingSi
mulator2011DemoEN.exe c1221110e55625a3e797a3060c4bf5e3219bf2f0
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 500
SetTitleMatchMode, 2
run, FarmingSimulator2011DemoEN.exe
if ( w_opt_unattended > 0 ) {
WinWait, Setup - Farming Simulator 2011 Demo
ControlClick TNewButton1 ; Next
WinWait, Setup - Farming Simulator 2011 Demo, License Agreement
ControlClick TNewRadioButton1 ; Accept
ControlClick TNewButton2 ; Next
WinWait, Setup - Farming Simulator 2011 Demo, Setup Type
ControlClick TNewButton2 ; Next
WinWait, Setup - Farming Simulator 2011 Demo, Ready to Install
ControlClick TNewButton2 ; Install
}
WinWait, Setup - Farming Simulator 2011 Demo, finished
if ( w_opt_unattended > 0 )
ControlClick TNewButton2 ; Finish
WinWaitClose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Farming Simulator 2011 Demo" game.exe
ent
ent
w_ahk_do "
SetTitleMatchMode, 2
run, EASetup.exe
winwait, Microsoft Visual C++ 2008, wizard
if ( w_opt_unattended > 0 ) {
sleep 1000
controlclick, Button12, Microsoft Visual C++ 2008, wizard
winwait, Microsoft Visual C++ 2008, License Terms
sleep 1000
controlclick, Button11, Microsoft Visual C++ 2008, License Terms
sleep 1000
controlclick, Button8, Microsoft Visual C++ 2008, License Terms
winwait, Setup, is configuring
winwaitclose
winwait, Microsoft Visual C++ 2008, Setup Complete
sleep 1000
controlclick, Button2
; There are two license agreements...one is for Directx
winwait, FIFA 11, I &accept the terms in the End User License Agreem
sleep 1000
controlclick, Button1
sleep 1000
controlclick, Button3
winwaitclose
winwait, FIFA 11, I &accept the terms in the End User License Agreem
sleep 1000
controlclick, Button1, FIFA 11, I &accept the terms in the End User
License Agreement
sleep 1000
controlclick, Button3, FIFA 11, I &accept the terms in the End User
License Agreement
winwait, FIFA 11, Ready to install FIFA 11
sleep 1000
controlclick, Button1, FIFA 11, Ready to install FIFA 11
}
winwait, FIFA 11, Click the Finish button to exit the Setup Wizard.
if ( w_opt_unattended > 0 ) {
sleep 1000
controlclick, Button5, FIFA 11, Click the Finish button to exit the
Setup Wizard.
sleep 1000
controlclick, Button1, FIFA 11, Click the Finish button to exit the
Setup Wizard.
}
WinWaitClose
"
if w_workaround_wine_bug 22161
then
w_call d3dx9_36
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\EA Sports\\FIFA 11 Demo\\Game" "fifa.exe
"
}
ash"
then
fi
year="2010" \
media="manual_download" \
file1="HoO2Demo.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Hordes of Orcs 2 Demo/HoO2.exe"
load_hordesoforcs2_demo()
{
w_download_manual http://www.fileplanet.com/216619/download/Hordes-of-Orcs-2
-Demo HoO2Demo.exe 1ba26d35697e359f89a30915140e471fadc675da
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
SetWinDelay 500
SetTitleMatchMode, slow
run HoO2Demo.exe
WinWait,Orcs
if ( w_opt_unattended > 0 ) {
WinActivate
ControlFocus, Button1, Hordes ; Next
sleep 500
Send n
; next
WinWait,Orcs,conditions
ControlFocus, Button4, Hordes, agree
Send {Space}
Send {Enter} ; next
WinWait,Orcs,files
Send {Enter} ; next
WinWait,Orcs,exist
; Destination does not exist, create
Send {Enter} ; yes
WinWait,Orcs,Start
Send {Enter} ; Start
"
}
}
WinWait,Orcs,successfully
if ( w_opt_unattended > 0 ) {
Send {Space} ; Finish
}
winwaitclose Orcs
omplain.
w_try ln -s "$W_ISO_MOUNT_ROOT"/* .
# Make the files writable, otherwise you'll get errors when trying t
o remove bothdiscs.
chmod -R +w .
# If you leave it mounted, it doesn't ask for the second disk to be
inserted.
.
else
fi
cd bothdiscs
else
fi
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run setup.exe,,,mfs_pid
winwait, Microsoft Flight Simulator X, To continue, click Install
ControlClick, Button1, Microsoft Flight Simulator X, To continue
; Accept license:
winwait, Flight Simulator X - End User License Agreement
controlclick, Button1, Flight Simulator X - End User License Agreement
winwait, Microsoft Flight Simulator X Product Activation Wizard
izard
nly
"
sleep 1000
controlclick, Button5, Microsoft Flight Simulator X Product Activation W
; Close main window:
winwait, Microsoft Flight Simulator, LEARNING CENTER
; A winclose/winkill isn't forceful enough:
process, close, fsx.exe
; Setup doesn't close on its own, because this process doesn't exit clea
process, close, IDriver.exe
ion
"
Select Components
Select Start Menu
Select Additional
Ready to Install
Information
}
winwait, Setup - ArcaniA, Completing
if ( w_opt_unattended > 0 ) {
sleep 1000
; The two checkboxes share the same button id. App/Wine bug?
mousemove, 190, 155
click
sleep 1000
mousemove, 190, 180
click
sleep 1000
controlclick, TNewButton4, Setup - ArcaniA, Completing
}
winwaitclose
if w_workaround_wine_bug 21939
then
w_call wmp9
fi
if w_workaround_wine_bug 24250
then
w_call vcrun2008
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\JoWooD Entertainment AG\\ArcaniA - Gothi
c 4 Demo" "Arcania.exe"
}
#---------------------------------------------------------------w_metadata gta_vc games \
title="Grand Theft Auto: Vice City" \
publisher="Rockstar" \
year="2003" \
media="cd" \
file1="GTA_VICE_CITY.iso" \
file2="VICE_CITY_PLAY.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/Rockstar Games/Grand Theft Auto Vice Cit
y/gta-vc.exe"
load_gta_vc()
{
w_mount GTA_VICE_CITY
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
Run, ${W_ISO_MOUNT_LETTER}:Setup.exe
winwait, Choose Setup Language
if ( w_opt_unattended > 0 ) {
Send {enter}
winwait, Grand Theft Auto Vice City, Welcome to the InstallShield Wi
zard
Send {enter}
winwait, Grand Theft Auto Vice City, License Agreement
Send !a
send {enter}
winwait, Grand Theft Auto Vice City, Customer Information
controlclick, edit1
send $LOGNAME
send {tab}
send company ; installer won't proceed without something here
send {enter}
winwait, Grand Theft Auto Vice City, Choose Destination Location
controlclick, Button1
winwait, Grand Theft Auto Vice City, Select Components
controlclick, Button2
winwait, Grand Theft Auto Vice City, Ready to Install the Program
send {enter}
}
winwait, Setup Needs The Next Disk, Please insert disk 2
"
w_mount VICE_CITY_PLAY
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
winwait, Setup Needs The Next Disk, Please insert disk 2
if ( w_opt_unattended > 0 ) {
controlclick, Button2
}
winwait, Grand Theft Auto Vice City, InstallShield Wizard Complete
if ( w_opt_unattended > 0 ) {
send {enter}
}
winwaitclose
"
if w_workaround_wine_bug 26322 "Setting virtual desktop"
then
w_call vd=800x600
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Rockstar Games\\Grand Theft Auto Vice Ci
ty" gta-vc.exe
myexec="Exec=env WINEPREFIX=\"$WINEPREFIX\" wine cmd /c 'C:\\\\\\\\Run-gta_v
c.bat'"
mymenu="$XDG_DATA_HOME/applications/wine/Programs/Rockstar Games/Grand Theft
Auto Vice City/Play GTA Vice City.desktop"
if test -f "$mymenu" && w_workaround_wine_bug 26304 "Fixing system menu"
then
fi
if w_workaround_wine_bug 25767
then
w_warn "This game works, but has some rendering glitches in Wine."
fi
#
#
#
#
#
w_download "http://www.longbowgames.com/downloads/Hegemony%20Gold%20Installe
r.exe" 36634314f571e345d082bdefe1150c76ef5610a7 HegemonyGoldInstaller.exe
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 500
SetTitleMatchMode, 2
Run, HegemonyGoldInstaller.exe
WinWait,Hegemony
if ( w_opt_unattended > 0 ) {
ControlClick Button2 ; Next
WinWait,Hegemony, License
ControlClick Button2 ; Agree
WinWait,Hegemony, Components
Click, Left, 187, 185
Sleep 500
ControlClick Button2 ; Next
WinWait,Hegemony, Location
ControlClick Button2 ; Next
WinWait,Hegemony, shortcuts
ControlClick Button2 ; Install
WinWait,Hegemony, Completing
ControlFocus,Button4,launch
Sleep 1000
Send {Space}
Sleep 500
ControlClick Button2 ; finish
}
WinWaitClose,Hegemony
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Longbow Digital Arts\\Hegemony Gold" "He
gemony Gold.exe"
}
#---------------------------------------------------------------w_metadata hegemony_demo games \
title="Hegemony: Philip of Macedon Demo" \
publisher="Longbow Games" \
year="2010" \
media="download" \
file1="Hegemony_Philip_of_Macedon_Installer.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Longbow Digital Arts/Hegemony Philip of
Macedon/Hegemony Philip of Macedon.exe"
load_hegemony_demo()
{
"
load_imvu()
{
w_download http://static-akm.imvu.com/imvufiles/installers/InstallIMVU_465.0
_st_c.exe 3a5c6c335227a5709c5772f91d8407edd07d4012
if w_workaround_wine_bug 28541 "Installing Visual C++ 2008 runtime to avoid
crash on startup"
then
w_call vcrun2008
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
SetWinDelay 500
Run, $file1
if ( w_opt_unattended > 0 ) {
WinWait,IMVU Setup, IMVU Extension
ControlClick Button4 ; Don't install extension
Sleep 500
ControlClick Button2 ; Finish
; There's no way to tell it not to launch
WinWait,IMVU Login, chrome
Click, Left, 29, 230 ; Uncheck [run on startup]
Sleep 500
Click, Left, 416, 11 ; Click X on window decoration to close
Sleep 500
WinKill,IMVU Login, chrome ; and then close harshly, just in case?
}
winwaitclose
"
w_declare_exe "c:\\users\\$LOGNAME\\Application Data\\IMVUClient" "IMVUClien
t.exe"
}
#---------------------------------------------------------------w_metadata kotor1 games \
title="Star Wars: Knights Of The Old Republic" \
publisher="Lucas Arts" \
year="2003" \
media="cd" \
file1="KOTOR_1.iso" \
file2="KOTOR_2.iso" \
file3="KOTOR_3.iso" \
file4="KOTOR_4.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/LucasArts/SWKotOR/swkotor.exe"
load_kotor1()
{
controlclick button2
winwait Question, DirectX
controlclick button2 ;don't install directx
"
}
}
winwait Star Wars, Complete
if ( w_opt_unattended > 0 ) {
controlclick button1 ;don't launch game
controlclick button4
}
winwaitclose Star Wars, Complete
w_umount
w_mount "K2_UK_v_1_0_dsc_"
w_ahk_do "
SetTitleMatchMode 2
winwait Next Disk, disk 3
if ( w_opt_unattended > 0 )
controlclick button2
winwait Next Disk, disk 4
"
w_umount
w_mount "K2_UK_v_1_0_dsc_"
w_ahk_do "
SetTitleMatchMode 2
winwait Next Disk, disk 4
if ( w_opt_unattended > 0 )
controlclick button2
winwait Next Disk, Play disc
"
w_umount
w_mount "K2_UK_v_1_0_dsc_"
w_ahk_do "
SetTitleMatchMode 2
SetWinDelay 500
winwait Next Disk, Play disc
if ( w_opt_unattended > 0 ) {
controlclick button2
winwait Question, shortcut
controlclick button1
winwait Question, DirectX
controlclick button2
}
winwait Star Wars, Wizard Complete
if ( w_opt_unattended > 0 ) {
controlclick button1
controlclick button2
controlclick button4
}
winwaitclose Star Wars, Wizard Complete
"
# download 1.0a and 1.0b patches
w_download ftp://ftp.lucasarts.com/patches/pc/KotOR2%20Patch%20v201420%20UK.
exe ab97a0d41ae15782418d0fd1b2ad43ccf35ca070
w_download ftp://ftp.lucasarts.com/patches/pc/sw_pc_uk_from201420_to211427.e
xe cf4ed797a0314b3ca047012f732321c6ba9a2388
cd "$W_CACHE/$W_PACKAGE"
# install 1.0a patch
w_ahk_do "
SetTitleMatchMode 2
SetWinDelay 500
run KotOR2 Patch v201420 UK.exe
winwait RTPatch Software, 1.0a
if ( w_opt_unattended > 0 ) {
controlclick button1
winwait RTPatch Software, updated
controlclick button1
}
winwaitclose RTPatch Software
"
# install 1.0b patch
w_ahk_do "
SetTitleMatchMode 2
SetWinDelay 500
run sw_pc_uk_from201420_to211427.exe
winwait RTPatch Software, 1.0b
if ( w_opt_unattended > 0 ) {
controlclick button1
winwait Update1_0b.txt
winclose Update1_0b.txt ;close readme that pops up
winwait RTPatch Software, updated
controlclick button1
}
winwaitclose RTPatch Software
"
}
ControlClick
WinWait,Lost
Sleep 500
ControlClick
WinWait,Lost
Sleep 500
ControlClick
"
Button2 ;Next
Horizon Demo - InstallShield Wizard,features
Button4 ;Next
Horizon Demo - InstallShield Wizard,begin
Button1 ;Next
}
WinWaitClose
WinWait,Lost Horizon Demo - InstallShield Wizard,Complete
if ( w_opt_unattended > 0 ) {
ControlFocus,Button2,Lost Horizon
Sleep 500
Send {Space}
Sleep 500
ControlClick Button4 ; Finish
}
WinWaitClose
if ( w_opt_unattended > 0 ) {
controlclick, Button1
winwait, LEGO, License
controlclick, Button1
controlclick, Button2
winwait, LEGO, installation method
controlclick, Button2
}
winwait, LEGO, Finish
if ( w_opt_unattended > 0 )
controlclick, Button1
"
if w_workaround_wine_bug 23397
then
w_warn "If sound stutters, try switching to OSS sound in winecfg (winetr
icks sound=oss)"
fi
# Work around locale issues by symlinking the app's directory to not have a
funny char
# Won't really work on cygwin, but that's ok.
cd "$W_PROGRAMS_X86_UNIX/WB Games"
ln -s LEGO*Harry\ Potter*DEMO LEGO_Harry_Potter_DEMO
w_declare_exe "$W_PROGRAMS_X86_WIN\\WB Games\\LEGO_Harry_Potter_DEMO" "LEGOH
arryPotterDEMO.exe"
}
#---------------------------------------------------------------w_metadata lswcs games \
title="Lego Star Wars Complete Saga" \
publisher="Lucasarts" \
year="2009" \
media="dvd" \
file1="LEGOSAGA.iso" \
installed_file1="$W_PROGRAMS_X86_WIN/LucasArts/LEGO Star Wars - The Complete
Saga/LEGOStarWarsSaga.exe"
load_lswcs()
{
w_mount LEGOSAGA
w_ahk_do "
run ${W_ISO_MOUNT_LETTER}:setup.exe
SetTitleMatchMode, 2
winwait, Choose Setup Language
if ( w_opt_unattended > 0 ) {
send {Enter}
winwait, LEGO, License Agreement
send a{Enter}
}
winwait, LEGO, method
if ( w_opt_unattended > 0 ) {
ControlClick Easy Installation
sleep 1000
}
winwaitclose, LEGO
"
# Installer crashes at end (http://bugs.winehq.org/show_bug.cgi?id=22529) bu
t this doesn't seem to hurt.
# Wait for all processes to exit, else unmount will fail
#$W_WINESERVER -w
w_declare_exe "$W_PROGRAMS_X86_WIN\\LucasArts\\LEGO Star Wars - The Complete
Saga" "LEGOStarWarsSaga.exe"
w_warn "This game is copy-protected, and requires the real disc in a real dr
ive to run."
}
#---------------------------------------------------------------w_metadata lemonysnicket games \
title="Lemony Snicket: A Series of Unfortunate Events" \
publisher="Activision" \
year="2004" \
media="cd" \
file1="Lemony Snicket.iso"
load_lemonysnicket()
{
w_mount "Lemony Snicket"
w_ahk_do "
SetTitleMatchMode, 2
Run, ${W_ISO_MOUNT_LETTER}:setup.exe
WinWait, Lemony, Welcome
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick, Button1 ; Next
WinWait, Lemony, License
sleep 1000
ControlClick, Button2 ; Accept
WinWait, Lemony, Minimum System
sleep 1000
ControlClick, Button2 ; Yes
WinWait, Lemony, Destination
sleep 1000
ControlClick, Button1 ; Next
WinWait, Lemony, Select Program Folder
sleep 1000
ControlClick, Button2 ; Next
WinWait, Lemony, Start Copying
sleep 1000
ControlClick, Button1 ; Next
WinWait, Question, Would you like to add a desktop shortcut
sleep 1000
ControlClick, Button2 ; No
WinWait, Question, Would you like to register
sleep 1000
ControlClick, Button2 ; No
;WinWait, Information, Please register
;sleep 1000
;ControlClick, Button1 ; OK
WinWait, Lemony, Complete
sleep 1000
ControlClick, Button4 ; Finish
WinWait, Lemony, Play
sleep 1000
ControlClick, Button6 ; Exit
WinWait, Lemony, Are you sure
sleep 1000
ControlClick, Button1 ; Yes already
"
}
WinWaitClose, Lemony
load_masseffect2()
{
w_mount MassEffect2
w_read_key
if w_workaround_wine_bug 22091 "May hang or crash at end of install, but sho
uld install ok."
then
w_call nocrashdialog
fi
if w_workaround_wine_bug 23126 "Installing C runtime library" 1.3.0,
then
w_call vcrun2005
fi
if w_workaround_wine_bug 23125 "Installing d3dx10 libraries" 1.3.0,
then
w_call d3dx10
fi
# FIXME: only do this for nvidia cards
if w_workaround_wine_bug 23151 "Disabling glsl"
then
w_call glsl=disabled
fi
if w_workaround_wine_bug 22919 "Installing physx"
then
w_call physx
fi
w_ahk_do "
SetTitleMatchMode, 2
run, ${W_ISO_MOUNT_LETTER}:Setup.exe
winwait, Installer Language
if ( w_opt_unattended > 0 ) {
send {Enter}
winwait, Mass Effect
send {Enter}
winwait, Mass Effect, License
ControlClick, Button4
ControlClick, Button2
winwait, Mass Effect, Registration Code
send $W_KEY
ControlClick, Button2
winwait, Mass Effect, Install Type
ControlClick, Button2
}
winwait, Insert Disc
"
sleep 5
w_mount ME2_Disc2
w_ahk_do "
SetTitleMatchMode, 2
if ( w_opt_unattended > 0 ) {
winwait, Insert Disc
ControlClick, Button4
; on windows, the first click doesn't seem to do it, so press enter,
too
sleep 1000
send {Enter}
}
; Some installs may not get to this point due to an installer hang/crash
(bug 22919)
; The hang/crash happens after the Physx install but does not seem to af
fect gameplay
loop
{
ifwinexist, Mass Effect, Finish
{
if ( w_opt_unattended > 0 ) {
winkill, Mass Effect
}
break
}
Process, exist, Installer.exe
me2pid = %ErrorLevel%
if me2pid = 0
break
sleep 1000
}
"
w_workaround_wine_bug 6971 "Please upgrade to wine-1.3.23 or later; see http
://wiki.winehq.org/Bug6971" 1.3.23,
E"
}
fi
# FIXME: only do this for nvidia cards
if w_workaround_wine_bug 23151 "Disabling glsl"
then
w_call glsl=disabled
fi
if w_workaround_wine_bug 22919 "Installing physx"
then
w_call physx
fi
# Don't let self-extractor write into $W_CACHE
case "$OS" in
"Windows_NT")
cp "$W_CACHE/$W_PACKAGE/MassEffect2DemoEN.exe" "$W_TMP"
chmod +x "$W_TMP"/MassEffect2DemoEN.exe ;;
*)
ln -sf "$W_CACHE/$W_PACKAGE/MassEffect2DemoEN.exe" "$W_TMP" ;;
esac
cd "$W_TMP"
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
run, MassEffect2DemoEN.exe
winwait, Mass Effect 2 Demo
if ( w_opt_unattended > 0 ) {
send {Enter}
winwait, Mass Effect 2 Demo, conflicts
send {Enter}
winwait, Mass Effect, License
ControlClick, Button4
;ControlClick, Button2
send {Enter}
winwait, Mass Effect, Install Type
ControlClick, Button2
}
; Some installs may not get to this point due to an installer hang/crash
(bug 22919)
; The hang/crash happens after the Physx install but does not seem to af
fect gameplay
loop
{
ifwinexist, Mass Effect, Finish
{
if ( w_opt_unattended > 0 ) {
winkill, Mass Effect
}
break
}
Process, exist, Installer.exe
me2pid = %ErrorLevel%
if me2pid = 0
break
sleep 1000
}
"
if test `which wine-hotfix-6971` 2> /dev/null
then
if w_workaround_wine_bug 6971 "Pointing menu and icon at wine-hotfix-697
1 so mouse will work, assuming your X supports XInput2"
then
}
WinWaitClose
"
cd "$W_DRIVE_C/SHINY/MDK"
w_try_unzip "$W_CACHE/$W_PACKAGE"/patch-mdk3dfx.zip
cd "$W_ISO_MOUNT_ROOT"
w_ahk_do "
SetTitleMatchMode, 2
SetTitleMatchMode, slow
run ${W_ISO_MOUNT_LETTER}:setup.exe
winwait, Select Setup Language, Select the language
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick, TNewButton1, Select Setup Language, Select the languag
REEMENT
NT
"
}
#----------------------------------------------------------------
then
# Doesn't crash, but you only get a black screen and a flood of d3dx fix
me's without native d3dx9_36
w_call d3dx9_36
fi
if w_workaround_wine_bug 24545
then
# Game wants to install directx, but we delete it. It really only needs
xact for x3daudio?_?.dll
w_call xact
fi
if w_workaround_wine_bug 24547
then
# It really does need vcrun2005, for msvp80.dll (and potentially one stu
b from msvcr80)
w_call vcrun2005
fi
mkdir -p "$W_TMP/$W_PACKAGE"
cd "$W_TMP/$W_PACKAGE"
# Don't extract DirectX/dotnet35 installers, they just take up extra time an
d aren't needed. Luckily, MISE copes well and just skips them if they are missin
g:
w_try unzip "$W_CACHE/$W_PACKAGE"/SecretOfMonkeyIslandSE_ddsetup.zip -x Dire
ctX* dotnet*
w_ahk_do "
SetTitleMatchMode, 2
run, setup.exe
WinWait, The Secret of Monkey Island, This wizard will guide you
sleep 1000
ControlClick, Button2
WinWait, The Secret of Monkey Island, License Agreement
sleep 1000
ControlSend, RichEdit20A1, {CTRL}{END}
sleep 1000
ControlClick, Button4
sleep 1000
ControlClick, Button2
WinWait, The Secret of Monkey Island, Setup Type
sleep 1000
ControlClick, Button2
WinWait, The Secret of Monkey Island, Click Finish
sleep 1000
ControlClick, Button2
"
# FIXME: This app has two different keys - you can use either one. How do w
e handle that with w_read_key?
if test -f "$W_CACHE"/$W_PACKAGE/activationcode.txt
then
MISE_KEY=`cat "$W_CACHE"/$W_PACKAGE/activationcode.txt`
w_ahk_do "
SetTitleMatchMode, 2
run, $W_PROGRAMS_X86_WIN\\LucasArts\\The Secret of Monkey Island Spe
cial Edition\\MISE.exe
winwait, Product Activation
"
elif test -f "$W_CACHE"/$W_PACKAGE/unlockcode.txt
then
MISE_KEY=`cat "$W_CACHE"/$W_PACKAGE/unlockcode.txt`
w_ahk_do "
SetTitleMatchMode, 2
run, $W_PROGRAMS_X86_WIN\\LucasArts\\The Secret of Monkey Island Spe
cial Edition\\MISE.exe
winwait, Product Activation
ControlClick, Edit3 ; Unlock Code
send $MISE_KEY
ControlClick Button6 ; Activate manual
winClose
sleep 1000
Process, Close, MISE.exe
"
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\LucasArts\\The Secret of Monkey Island S
pecial Edition" "MISE.exe"
}
#---------------------------------------------------------------w_metadata myth2_demo games \
title="Myth II demo 1.7.2" \
publisher="Project Magma" \
year="2011" \
media="download" \
file1="Myth2_Demo_172.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Myth II Demo/Myth II Demo.exe" \
homepage="http://projectmagma.net/"
load_myth2_demo()
{
# Originally a 1998 game by Bungie; according to Wikipedia, they handed the
# source code to Project Magma for further development.
# 1 May 2011 1.7.2 sha1sum e0a8f707377e71314a471a09ad2a55179ea44588
w_download http://tain.totalcodex.net/items/download/myth-ii-demo-windows \
e0a8f707377e71314a471a09ad2a55179ea44588 $file1
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
SetWinDelay 500
run, $file1
winwait, Setup, Welcome
if ( w_opt_unattended > 0 ) {
winactivate
send {Enter} ; next
winwait, Setup, Components
send {Enter} ; next
}
winwait, Setup, Complete
if ( w_opt_unattended > 0 ) {
controlclick, Button4 ; Do not run
controlclick, Button2 ; Finish
}
winwaitclose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Myth II Demo" "Myth II Demo.exe"
Sleep 1000
send {Enter}
winwait, Setup, DirectX
Sleep 1000
send {Space}
Sleep 1000
send {Enter}
winwait, Setup, Destination
Sleep 1000
send {Enter}
winwait, Setup, begin
Sleep 1000
controlclick, Button1
"
}
winwait, Setup, Finish
if ( w_opt_unattended > 0 ) {
Sleep 1000
controlclick, Button5
controlclick, Button1
}
winwaitclose, Setup, Finish
fi
if w_workaround_wine_bug 28652 "Installing gdiplus so launcher does not look
horrible (and to work around crash bug 33880, too)"
then
w_call gdiplus
fi
if test "$W_OPT_UNATTENDED" && w_workaround_wine_bug 25961 "Installing vcrun
2008 just to make unattended install easier"
then
w_call vcrun2008
fi
if w_workaround_wine_bug 26915 "installing corefonts so help works"
then
w_call corefonts
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 500
SetTitleMatchMode, 2
run $file1
winwait, Language
if ( w_opt_unattended > 0 ) {
ControlClick TNewButton1
; Next
winwait Setup - Need For Speed
ControlClick TNewButton1
; Next
winwait Setup - Need For Speed, License
ControlClick TNewRadioButton1 ; Accept
sleep 1000
ControlClick TNewButton2
; Next
winwait Setup - Need For Speed, be installed
ControlClick TNewButton3
; Next
winwait Setup - Need For Speed, be downloaded
ControlClick TNewButton4
; Next
winwait Setup - Need For Speed, shortcuts
ControlClick TNewButton5
; Next
winwait Setup - Need For Speed, Tasks
ControlClick TNewButton5
; Next
winwait Setup - Need For Speed, Ready to Install
ControlClick TNewButton5
; Next
}
winwait Setup - Need For Speed, Completing
if ( w_opt_unattended > 0 ) {
send {Space}
; uncheck readme
send {Tab}
send {Space}
; uncheck launch
sleep 1000
; let launch uncheck take effect?
ControlClick TNewButton5
; Finish
}
winwaitclose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Electronic Arts\\Need For Speed World" G
ameLauncher.exe
}
#----------------------------------------------------------------
else
then
fi
w_call d3dx9_36
exe"
}
cd "$W_CACHE/$W_PACKAGE"
"$WINE" PenPenXmasOlympics100.exe $W_UNATTENDED_SLASH_S
w_declare_exe "$W_PROGRAMS_X86_WIN\\PPO" "PPO.exe"
year="2009" \
media="download" \
file1="PlantsVsZombiesSetup.exe" \
installed_file1="$W_PROGRAMS_X86_WIN/PopCap Games/Plants vs. Zombies/PlantsV
sZombies.exe"
load_plantsvszombies()
{
w_download "http://downloads.popcap.com/www/popcap_downloads/PlantsVsZombies
Setup.exe" c46979be135ef1c486144fa062466cdc51b740f5
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
run PlantsVsZombiesSetup.exe
winwait, Plants vs. Zombies Installer
if ( w_opt_unattended > 0 ) {
sleep 1000
send {Enter}
winwait, Plants vs. Zombies License Agreement
ControlClick Button1
}
winwait, Plants vs. Zombies Installation Complete!
if ( w_opt_unattended > 0 ) {
sleep 1000
send {Space}{Enter}
ControlClick, x309 y278, Plants vs. Zombies Installation Complete!,,
,, Pos
}
WinWaitClose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\PopCap Games\\Plants vs. Zombies" "Plant
sVsZombies.exe"
}
#---------------------------------------------------------------w_metadata popfs games \
title="Prince of Persia The Forgotten Sands" \
publisher="Ubisoft" \
year="2010" \
media="dvd" \
file1="PoP_TFS.iso" \
installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Prince of Persia The Forgotten S
ands/Prince of Persia.exe"
load_popfs()
{
w_mount PoP_TFS
w_ahk_do "
SetTitleMatchMode, 2
run, ${W_ISO_MOUNT_LETTER}:Setup.exe
winwait, Prince of Persia, Language
if ( w_opt_unattended > 0 ) {
sleep 500
ControlClick, Button3
winwait, Prince of Persia, Welcome
sleep 500
ControlClick, Button1
"
}
winwait, Prince of Persia, Click Finish
if ( w_opt_unattended > 0 ) {
sleep 500
ControlClick, Button4
}
ControlClick Button5
Sleep 500
ControlClick Button2
WinWait,Puzzle Agent
Sleep 500
ControlClick Button2
WinWait,Puzzle Agent
Sleep 500
ControlClick Button2
WinWait,Puzzle Agent
Sleep 500
ControlClick Button4
Sleep 500
ControlClick Button5
Sleep 500
ControlClick Button2
"
;DirectX
; Next
Setup, before
; Agree
Setup, different
; Install
Setup, your
; Play
; will
; Finish
}
WinWaitClose, Puzzle Agent
}
#---------------------------------------------------------------w_metadata qqintl apps \
title="QQ International Instant Messenger 2.0" \
publisher="Tencent" \
year="2013" \
media="download" \
file1="QQIntl2.0.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Tencent/QQIntl/Bin/QQ.exe" \
homepage="http://www.imqq.com" \
unattended="no"
load_qqintl()
{
w_download http://proxy.imqq.com/QQIntl2.0.exe e9a335b265544a77ae470d6f3a3fc
a0de25a6cb5
cd "$W_CACHE/$W_PACKAGE"
if w_workaround_wine_bug 33086 "Installing native riched20 to allow typing i
n username"
then
w_call riched20
fi
if w_workaround_wine_bug 34566 "Installing native ctf to work around crash"
then
w_call msctf
fi
if w_workaround_wine_bug 30083 "Installing native ie7 to avoid crash in sett
ings and other dialogs"
then
w_call ie7
fi
w_try "$WINE" "$file1"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Tencent\\QQIntl\\Bin" QQ.exe
}
#---------------------------------------------------------------w_metadata ragnarok games \
title="Ragnarok" \
publisher="GRAVITY" \
year="2002" \
media="manual_download" \
file1="iRO-13.2.2-FullInstall-20110421-1717.msi" \
installed_exe1="$W_PROGRAMS_X86_WIN/Gravity/Ragnarok Online/Ragnarok.exe"
load_ragnarok()
{
if w_workaround_wine_bug 657 "Visual C++ 6 runtime"
then
w_call vcrun6
fi
if w_workaround_wine_bug 28228 "Installing Visual C++ 2008 runtime"
then
w_call vcrun2008
fi
# publisher puts SHA1 checksums on download page, nice
# BDA295E3A2A57CD02BD122ED7BF4836AC012369A
w_download_manual http://www.playragnarok.com/downloads/clientdownload.aspx
iRO-13.2.2-FullInstall-20110421-1717.msi bda295e3a2a57cd02bd122ed7bf4836ac012369
a
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
Run, msiexec /i $file1
SetTitleMatchMode, 2
WinWait, Ragnarok Online Setup, Please read the Ragnarok Online License
Agreement
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick Button1
Sleep 500
ControlClick Button3
}
WinWait, Ragnarok Online Setup, Completed the Ragnarok Online Setup
Wizard
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick Button1 ;Direct
}
"
# Game autoupdates:
w_killall "Ragnarok.exe"
w_ahk_do "
SetWinDelay 500
SetTitleMatchMode, 2
run ${W_ISO_MOUNT_LETTER}:setup-rtc3.exe
if ( w_opt_unattended > 0 ) {
WinWait, Select Setup Language
controlclick, TButton1 ; accept
WinWait Setup - RollerCoaster Tycoon 3, Welcome
controlclick, TButton1 ; Next
WinWait Setup - RollerCoaster Tycoon 3, License
controlclick, TRadioButton1 ; Accept
sleep 500
controlclick, TButton2 ; Next
WinWait Setup - RollerCoaster Tycoon 3, Destination
controlclick, TButton3 ; Next
WinWait Setup - RollerCoaster Tycoon 3, Start Menu
controlclick, TButton4 ; Next
WinWait Setup - RollerCoaster Tycoon 3, Additional
controlclick, TButton4 ; Next
WinWait Setup - RollerCoaster Tycoon 3, begin
controlclick, TButton4 ; Install
WinWait, Atari Product Registration
controlclick, Button6 ; Close
WinWait, Product Registration, skip
controlclick, Button2 ; Yes, skip
}
WinWait Setup - RollerCoaster Tycoon 3, finished
if ( w_opt_unattended > 0 ) {
controlclick, TNewCheckListBox1 ; uncheck Launch
controlclick, TButton4 ; Finish
}
WinWaitClose Setup - RollerCoaster Tycoon 3, finished
"
}
w_ahk_do "
SetWinDelay 500
SetTitleMatchMode, 3
Run, SETUP.EXE
WinWaitActive, UBI Soft Installer - Language Choice
if ( w_opt_unattended > 0 ) {
ControlClick button1 ; OK
WinWait, Ubi Soft Installer - Rayman 2 Demo
ControlClick button1 ; Install
WinWait, Ubi Soft Installer - Configuration choice
ControlClick button1 ; Install
WinWait, Ubi Soft Installer - Installation Directory
ControlClick button1 ; OK
WinWait, Ubi Soft Installer - Shortcut Choice
ControlClick button1 ; OK
WinWait, Ubi Soft Installer - Information file
ControlClick button2 ; No
}
WinWait, Ubi Soft Installer - Rayman 2 Demo
if ( w_opt_unattended > 0 ) {
ControlClick button4 ; Quit
}
WinWaitClose
"
myexec="Exec=env WINEPREFIX=\"$WINEPREFIX\" wine "'C:\\\\\\\\windows\\\\\\\\
UbiSoft\\\\\\\\SetupUbi.exe -play Rayman2'
mymenu="$HOME/Desktop/To Play Rayman 2 Demo.desktop"
if test -f "$mymenu" && w_workaround_wine_bug 26303 "Fixing desktop entry"
then
# this is a hack, hopefully the wine bug will be fixed soon
sed -i "s,Exec=.*,$myexec," "$mymenu"
fi
mymenu="$XDG_DATA_HOME/applications/wine/Programs/Ubi Soft Games/Rayman 2 De
mo/1 To Play Rayman 2 Demo.desktop"
if test -f "$mymenu" && w_workaround_wine_bug 26304 "Fixing system menu"
then
# this is a hack, hopefully the wine bug will be fixed soon
sed -i "s,Exec=.*,$myexec," "$mymenu"
fi
}
db95ee
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run RiseOfNationsTrial.exe
WinWait,Rise Of Nations Trial Setup
if ( w_opt_unattended > 0 ) {
sleep 2500
ControlClick CButtonClassName2
WinWait,Rise Of Nations Trial Setup, installed
sleep 2500
ControlClick CButtonClassName7
}
WinWaitClose
"
if w_workaround_wine_bug 9027
then
w_call directmusic
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Microsoft Games\\Rise of Nations Trial"
"nations.exe"
}
#---------------------------------------------------------------w_metadata secondlife games \
title="Second Life Viewer" \
publisher="Linden Labs" \
year="2003-2011" \
media="download" \
file1="Second_Life_3-2-8-248931_Setup.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/SecondLifeViewer/SecondLife.exe"
load_secondlife()
{
w_download http://download.cloud.secondlife.com/Viewer-3/Second_Life_3-2-8-2
48931_Setup.exe e08c16edc4d2fb68bb6275bed11a259a74918da5
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
SetWinDelay 500
run, $file1
if ( w_opt_unattended > 0 ) {
winwait, Installer Language
send {Enter}
winwait, Installation Folder
send {Enter}
}
winwait, Second Life, Start Second Life now
if ( w_opt_unattended > 0 ) {
send {Tab}{Enter}
}
winwaitclose
"
}
winwaitclose
"
w_umount
send uuuuuu{Tab}{Tab}{Enter}
WinWait, Sims, License
ControlClick Button3 ; Accept
sleep 1000
ControlClick Button1 ; Next
sleep 1000
send {Raw}$W_KEY
send {Enter}
winwait, - InstallShield Wizard, Setup Type
ControlClick &Complete
; was not defaulting to complete?
send {Enter}
winwait, - InstallShield Wizard, Click Install to begin
send {Enter}
; Handle optional dialogs
; In Wine-1.3.16 and lower, before
; http://www.winehq.org/pipermail/wine-cvs/2011-March/076262.html,
; wine didn't claim to already have .net 4 installed,
; and ran into bug 25535.
Loop
{
; .net 4 install sometimes fails nicely
ifWinExist,, .NET Framework 4 has not been installed
{
ControlClick Button3
; Finish
}
; .net 4 install sometimes explodes
ifWinExist .NET Framework Initialization Error
{
send {Enter}
}
ifWinExist, Sims, Customer Experience Improvement
{
send {Enter}
; Next
}
ifWinExist, - InstallShield Wizard, Complete
break
sleep 1000
}
"
}
winwait, - InstallShield Wizard, Complete
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Do not view readme
send {Enter}
; Finish
}
winwaitclose
"
run ${W_ISO_MOUNT_LETTER}:Sims3EP04Setup.exe
winwait, - InstallShield Wizard
if ( w_opt_unattended > 0 ) {
send {Enter}
loop
{
SetTitleMatchMode, 2
ifwinexist, - InstallShield Wizard, Setup will now attempt to up
date
The Sims
}
ifwinexist, Sims, License
{
winactivate, Sims, License
sleep 1000
ControlClick, Button3
sleep 1000
ControlClick, Button1
sleep 1000
break
}
sleep 1000
}
winwait, Sims, Please enter the entire Registration Code
sleep 1000
send {Raw}$W_KEY
send {Enter}
winwait, - InstallShield Wizard, Setup Type
ControlClick &Complete
; was not defaulting to complete?
send {Enter}
winwait, - InstallShield Wizard, Click Install to begin
send {Enter}
winwait, - InstallShield Wizard, Would you like to install the lates
sleep 1000
ControlClick, Button4 ; No thanks
sleep 1000
ControlClick, Button1
sleep 1000
"
}
winwait, - InstallShield Wizard, Complete
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Do not view readme
send {Enter}
; Finish
}
winwaitclose
"
"
"
sleep 500
if ( w_opt_unattended > 0 ) {
controlclick, Button1
sleep 500
controlclick, Button2
sleep 500
controlclick, Button4
}
winwaitclose, SPORE, complete
do
done
else
}
"
}
}
ControlClick, x800 y500 ; Finish
winwaitclose
; no way to tell game to not start?
process, wait, SC2.exe
sleep 2000
process, close, SC2.exe
Sleep 500
ControlClick TNewButton1 ;OK
WinWait,Setup - The UnderGarden, License
Sleep 500
ControlClick TNewRadioButton1 ; accept
Sleep 500
ControlClick TNewButton2 ; Next
WinWait,Setup - The UnderGarden, different
Sleep 500
ControlClick TNewButton3 ;Next
WinWait,Setup - The UnderGarden, shortcuts
Sleep 500
ControlClick TNewButton4 ;OK
WinWait,Setup - The UnderGarden, additional
Sleep 500
ControlFocus,TNewCheckListBox1,desktop
Sleep 500
Send {Space}
Sleep 500
ControlClick TNewButton4 ; Next
WinWait,Setup - The UnderGarden, review
Sleep 500
ControlClick TNewButton4 ;Install
WinWait,Microsoft Visual C, Visual
Sleep 500
ControlClick Button13 ;Cancel
WinWait,Microsoft Visual C, want
Sleep 500
ControlClick Button1 ;Yes
WinWait,Microsoft Visual C, chosen
Sleep 500
ControlClick Button2 ;Finish
WinWait,Framework 3, Press
Sleep 500
ControlClick Button21 ;Cancel
WinWait,Framework 3, want
Sleep 500
ControlClick Button1 ;Yes
WinWait,Installing Microsoft, Runtime
Sleep 500
ControlClick Button6 ;Cancel
"
}
}
WinWait,Setup,launched
if ( w_opt_unattended > 0 ) {
Sleep 500
ControlClick TNewButton4 ;Finish
}
WinWaitClose,Setup,launched
file1="tmnationsforever_setup.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/TmNationsForever/TmForever.exe"
load_tmnationsforever()
{
if w_workaround_wine_bug 20915
then
# FIXME: script this?
w_warn "To fix choppy sound/low fps, try setting Settings/Advanced/Audio
to portaudio when starting the game."
fi
# Before:
cab0cf66db0471bc2674a3b1aebc35de0bca6ed0
# 29 Mar 2011: 23388798d5c90ad4a233b4cd7e9fcafd69756978
w_download "http://files.trackmaniaforever.com/tmnationsforever_setup.exe" 2
3388798d5c90ad4a233b4cd7e9fcafd69756978
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
Run, tmnationsforever_setup.exe
WinWait,Select Setup Language
if ( w_opt_unattended > 0 ) {
Sleep 1000
ControlClick TNewButton1 ; OK
WinWait,Setup - TmNationsForever,Welcome
Sleep 1000
ControlClick TNewButton1 ; Next
WinWait,Setup - TmNationsForever,License
Sleep 1000
ControlClick TNewRadioButton1 ; Accept
Sleep 1000
ControlClick TNewButton2 ; Next
WinWait,Setup - TmNationsForever,Where
Sleep 1000
ControlClick TNewButton3 ; Next
WinWait,Setup - TmNationsForever,shortcuts
Sleep 1000
ControlClick TNewButton4 ; Next
WinWait,Setup - TmNationsForever,perform
Sleep 1000
ControlClick TNewButton4 ; Next
WinWait,Setup - TmNationsForever,installing
Sleep 1000
ControlClick TNewButton4 ; Install
}
WinWait,Setup - TmNationsForever,finished
if ( w_opt_unattended > 0 ) {
Sleep 1000
ControlFocus, TNewCheckListBox1, TmNationsForever, finished
Sleep 1000
Send {Space} ; don't start game
ControlClick TNewButton4 ; Finish
}
WinWaitClose
"
}
send a
; accept
send {Enter}
; Next
winwait Trainz Paint Shed, Destination
send {Enter}
winwait Trainz Paint Shed, Install
send {Enter}
}
winwait Trainz Paint Shed, Complete
if ( w_opt_unattended > 0 ) {
send {Enter}
; Finish
}
winwaitclose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Auran\\Trainz Paint Shed" "Trainz Paint
Shed.exe" paintshed
}
#---------------------------------------------------------------w_metadata sammax301_demo games \
title="Sam & Max 301: The Penal Zone" \
publisher="Telltale Games" \
year="2010" \
media="manual_download" \
file1="SamMax301_PC_Setup.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Telltale Games/Sam and Max - The Devil's
Playhouse/The Penal Zone/SamMax301.exe"
load_sammax301_demo()
{
w_download_manual "http://www.fileplanet.com/211314/210000/fileinfo/Sam-&-Ma
x:-Devil's-Playhouse---Episode-One-Demo" SamMax301_PC_Setup.exe 83f47b7f3a5074a6
e29bdc9b4f1fd2c4471d9641
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
SetWinDelay 500
run SamMax301_PC_Setup.exe
winwait Sam and Max The Penal Zone Setup, Welcome
if ( w_opt_unattended > 0 ) {
controlclick button2 ; Next
winwait Sam and Max The Penal Zone Setup, DirectX
controlclick button5 ; Uncheck check directx
controlclick button2 ; Next
winwait Sam and Max The Penal Zone Setup, License
controlclick button2 ; I Agree
winwait Sam and Max The Penal Zone Setup, Location
controlclick button2 ; Install
winwait Sam and Max The Penal Zone Setup, Finish
controlclick button4 ; Uncheck play now
controlclick button5 ; Uncheck create shortcut
controlclick button2 ; Finish
}
winwaitclose Sam and Max The Penal Zone Setup
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\Telltale Games\\Sam and Max - The Devil'
s Playhouse\\The Penal Zone" "SamMax301.exe"
}
31749db346ac3a87a675787c81eb1ca8cb5909
if w_workaround_wine_bug 24819 "Disabling gameux"
then
w_override_dlls disabled gameux
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 1000
SetTitleMatchMode, 2
Run, Tropico3Demo.exe
WinWait,Installer
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; OK
WinWait,Tropico,Welcome
ControlClick Button2 ; Next
WinWait,Tropico,License
ControlClick Button2 ; Agree
WinWait,Tropico,Typical
ControlClick Button2 ; Next
}
WinWait,Tropico,Completing
if ( w_opt_unattended > 0 ) {
ControlClick Button4 ; Uncheck Run Now
ControlClick Button2 ; Finish
}
WinWaitClose
"
w_workaround_wine_bug 16328 "seawater is invisible in this wine, please upda
te to 1.3.9 or later" 1.3.9,
if w_workaround_wine_bug 24845 "disabling mmdevapi to fix sound" 1.3.21,
then
w_override_dlls disabled mmdevapi
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Kalypso\\Tropico 3 Demo" "Tropico3 Demo.
exe"
}
REGEDIT4
[HKEY_CURRENT_USER\Software\Activision\Singularity]
"DepthOfField"=dword:00000000
_EOF_
fi
w_try_regedit "$W_TMP_WIN"\\dof.reg
cd "$W_CACHE/$W_PACKAGE"
# FIXME: a bit fragile, if you're browsing the web while installing, it some
times gets stuck.
w_ahk_do "
SetTitleMatchMode, 2
run stkcop-bench-setup.exe
WinWait,Setup - Call Of Pripyat Benchmark
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick TNewButton1 ; Next
WinWait,Setup - Call Of Pripyat Benchmark,License
sleep 1000
ControlClick TNewRadioButton1 ; accept
sleep 1000
ControlClick TNewButton2 ; Next
WinWait,Setup - Call Of Pripyat Benchmark,Destination
sleep 1000
ControlClick TNewButton3 ; Next
WinWait,Setup - Call Of Pripyat Benchmark,shortcuts
sleep 1000
ControlClick TNewButton4 ; Next
WinWait,Setup - Call Of Pripyat Benchmark,performed
sleep 1000
ControlClick TNewButton4 ; Next
WinWait,Setup - Call Of Pripyat Benchmark,ready
sleep 1000
ControlClick, TNewButton4 ; Next (nah, who reads doc?)
}
WinWait,Setup - Call Of Pripyat Benchmark,finished
if ( w_opt_unattended > 0 ) {
sleep 1000
Send {Space} ; uncheck launch
sleep 1000
ControlClick TNewButton4 ; Finish
}
WinWaitClose,Setup - Call Of Pripyat Benchmark,finished
"
if w_workaround_wine_bug 24868
then
w_call d3dx9_31
w_call d3dx9_42
fi
e"
}
w_mount "Torchlight"
w_ahk_do "
SetTitleMatchMode, 2
Run, ${W_ISO_MOUNT_LETTER}:Torchlight.exe
WinWait, Torchlight Setup, This wizard will guide
if ( w_opt_unattended > 0 ) {
sleep 1000
ControlClick, Button2, Torchlight Setup, This wizard will guide
WinWait, Torchlight Setup, Please review the license terms
sleep 1000
ControlClick, Button2, Torchlight Setup, Please review the license t
erms
etup Wizard
rmers
send {Enter}
winwait, Transformers, The InstallShield Wizard will install Transfo
sleep 1000
controlclick, Button1, Transformers, The InstallShield Wizard will i
nstall Transformers
winwait, Transformers, License Agreement
sleep 1000
controlclick, Button5, Transformers, License Agreement
sleep 1000
controlclick, Button2, Transformers, License Agreement
winwait, Transformers, Minimum System Requirements
sleep 1000
controlclick, Button1, Transformers, Minimum System Requirements
winwait, Transformers, Select the setup type to install
sleep 1000
controlclick, Button4, Transformers, Select the setup type to instal
l
}
; Installer exits silently. Prevent an early umount
Loop
{
sleep 1000
IfWinExist, Transformers
continue
IfWinExist, Activision
continue
sleep 1000
IfWinExist, Transformers
continue
IfWinExist, Activision
continue
break
}
"
if w_workaround_wine_bug 6971 "Setting mwo=force... please upgrade to wine-1
.3.23" 1.3.23,
then
w_call mwo=force
fi
w_declare_exe "$W_PROGRAMS_X86_WIN\\Activision\\Transformers - War for Cyber
tron\\Binaries" "TWFC.exe"
# Clean up crap left over in c:\ when the installer runs the vc 2008 redistr
ibutable installer
cd "$W_DRIVE_C"
rm -f VC_RED.* eula.*.txt globdata.ini install.exe install.ini install.res.*
.dll vcredist.bmp
}
#---------------------------------------------------------------w_metadata typingofthedead_demo games \
title="Typing of the Dead Demo" \
publisher="Sega" \
year="1999" \
media="download" \
file1="Tod_e_demo.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/SEGA/TOD-Demo/Tod_e_demo.exe"
load_typingofthedead_demo()
{
w_download "http://downloads.pcworld.com/pub/new/fun_and_games/other/tod-dem
o.zip" 96fe3edb2431210932af840e29c59bce6b7fc80f
cd "$W_CACHE/$W_PACKAGE"
mkdir "$W_TMP"
cd "$W_TMP"
w_try_unzip "$W_CACHE/$W_PACKAGE/tod-demo.zip"
w_ahk_do "
SetTitleMatchMode, 2
run SETUP.EXE
if ( w_opt_unattended > 0 ) {
WinWait,InstallShield Wizard,where
sleep 1000
ControlClick Button1 ; Next
WinWait,InstallShield Wizard,icons
sleep 1000
ControlClick Button2 ; Next
}
; installer crashes here?
Sleep 20000
"
}
"
}
WinWait, , InstallShield Wizard Complete
if ( w_opt_unattended > 0 ) {
ControlClick Button4 ; Finish
}
WinWaitClose
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetTitleMatchMode, 2
run UT3Patch5.exe
WinWait, License
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; Accept
WinWait, End User License Agreement
ControlClick Button1 ; Accept
WinWait, Patch UT3
ControlClick Button1 ; Yes
}
WinWait, , UT3 was successfully patched!
if ( w_opt_unattended > 0 ) {
ControlClick Button1 ; OK
}
WinWaitClose
"
if w_workaround_wine_bug 6971 "Setting mwo=force... please upgrade to wine-1
.3.23" 1.3.23,
then
w_call mwo=force
w_warn "Mouse will be disabled in in-game menu. Must use keyboard to nav
igate. Alternately, patch wine as described in bug 6971 to use xinput2."
fi
if ! test -f "$W_CACHE/wog/WorldOfGooDemo.1.0.exe"
then
# Get temporary download location
w_download "http://www.worldofgoo.com/dl2.php?lk=demo&filename=WorldOfGo
oDemo.1.0.exe"
URL=`cat "$W_CACHE/wog/dl2.php?lk=demo&filename=WorldOfGooDemo.1.0.exe"
|
grep WorldOfGooDemo.1.0.exe | sed 's,.*http,http,;s,".*,,'`
rm "$W_CACHE/wog/dl2.php?lk=demo&filename=WorldOfGooDemo.1.0.exe"
fi
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 500
run WorldOfGooDemo.1.0.exe
winwait, World of Goo Setup, License Agreement
if ( w_opt_unattended > 0 ) {
sleep 1000
WinActivate
send {Enter}
winwait, World of Goo Setup, Choose Components
send {Enter}
winwait, World of Goo Setup, Choose Install Location
send {Enter}
winwait, World of Goo Setup, Thank you
ControlClick, Make me dirty right now, World of Goo Setup, Thank you
send {Enter}
}
winwaitclose, World of Goo Setup
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\WorldOfGooDemo" WorldOfGoo.exe
cd "$W_CACHE/$W_PACKAGE"
w_ahk_do "
SetWinDelay 500
run $file1
winwait, Setup - World of Tanks
if ( w_opt_unattended > 0 ) {
ControlClick, TNewButton1 ; Next
winwait, Setup - World of Tanks, Select Destination
ControlClick, TNewButton3 ; Next
winwait, Setup - World of Tanks, Select Start
ControlClick, TNewButton4 ; Next
winwait, Setup - World of Tanks, Select Additional
ControlClick, TNewButton4 ; Next
winwait, Setup - World of Tanks, Ready
ControlClick, TNewButton4 ; Next
}
winwait, Setup - World of Tanks, Completing
if ( w_opt_unattended > 0 ) {
ControlFocus, TNewCheckListBox1
send {space}
; uncheck Wiki
sleep 500
ControlClick, TNewButton4 ; Finish
winwaitclose
}
"
w_declare_exe "c:\\Games\\World_of_Tanks" WorldOfTanks.exe
SetTitleMatchMode, 2
run WOW-4.0.0.12911-enUS-Trial.exe
winwait, World of Warcraft Installer
if ( w_opt_unattended > 0 ) {
; Wait for it to find servers
sleep 6000
controlclick, x400 y440 ; Install
winwait, End User License Agreement
sleep 1000
controlclick, Button2 ; Accept
winwait, World of Warcraft Installer
sleep 1000
controlclick, x680 y560 ; OK
}
winwait, World of Warcraft v4, Play
if ( w_opt_unattended > 0 ) {
; Wait until left side of progress bar is green; that means the game
is playable.
;Loop
;{
;
PixelGetColor, color, 33, 592
;
FileAppend, loop1 color is %color%, log.txt
;
ifEqual, color, 0x017425
;
{
;
break
;
}
;
sleep 5000
;}
; Wait until left side of progress bar goes blackish, that means gam
e is fully loaded
Loop
{
PixelGetColor, color, 33, 592
;FileAppend, loop2 color is %color%, log.txt
ifEqual, color, 0x003C10
{
break
}
sleep 5000
}
; All done downloading, so quit
winclose
}
winwaitclose
"
w_declare_exe "$W_PROGRAMS_X86_WIN\\World of Warcraft" WoW.exe
}
#---------------------------------------------------------------w_metadata zootycoon2_demo games \
title="Zoo Tycoon 2 demo" \
publisher="Microsoft" \
year="2004" \
media="download" \
file1="Zoo2Trial.exe" \
installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Zoo Tycoon 2 Trial Versi
on/zt2demoretail.exe"
load_zootycoon2_demo()
installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/alien swarm/swarm
.exe"
load_alienswarm_steam()
{
w_steam_install_game 630 "Alien Swarm"
}
#---------------------------------------------------------------w_metadata bioshock2_steam games \
title="Bioshock 2 (Steam)" \
publisher="2k" \
year="2010" \
media="download" \
wine_showstoppers="7065" \
installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/bioshock2/blort.e
xe"
load_bioshock2_steam()
{
w_steam_install_game 8850 "BioShock 2"
}
#---------------------------------------------------------------w_metadata borderlands_steam games \
title="Borderlands (Steam, nonfree)" \
publisher="2K Games" \
year="2009" \
media="download" \
installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/borderlands/Binar
ies/Borderlands.exe"
load_borderlands_steam()
{
w_steam_install_game 8980 "Borderlands"
}
#---------------------------------------------------------------w_metadata civ5_demo_steam games \
title="Civ V Demo (Steam)" \
publisher="2K Games" \
year="2010" \
media="download" \
installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/sid meier's civil
ization v - demo/CivilizationV.exe"
load_civ5_demo_steam()
{
# Start autohotkey watching for directx9 option in the background, and selec
t it when it comes up
w_ahk_do "
SetWinDelay 500
loop
{
ifWinExist, Sid Meier's Civilization V - Demo - Steam
{
winactivate
click 26,108
sleep 500
click 200,150
; select directx9
; Play
}
ifWinExist, Updating Sid Meier's Civilization V - Demo
{
break
}
sleep 1000
}
" &
_job=$!
# While that's running, install the game.
# You'll see *two* Autohotkey icons until that first script
# finds the dialog it's looking for, clicks, and exits.
w_info "If you already own the full Civ 5 game on steam, the installer w
on't even appear."
w_steam_install_game 65900 "Sid Meier's Civilization V - Demo"
kill -s HUP $_job # just in case
}
#---------------------------------------------------------------w_metadata ruse_demo_steam games \
title="Ruse Demo (Steam)" \
publisher="Ubisoft" \
year="2010" \
media="download" \
installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/r.u.s.e. demo/Rus
e.exe"
load_ruse_demo_steam()
{
w_steam_install_game 33310 "R.U.S.E."
if w_workaround_wine_bug 21939 "Installing Windows Media so game can start"
then
w_call wmp9
fi
"
rine_launcher.exe"
}
#---------------------------------------------------------------w_metadata wormsreloaded_demo_steam games \
title="Worms Reloaded Demo (Steam)" \
publisher="Team17" \
year="2010" \
media="download" \
installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/worms reloaded/Wo
rmsReloaded.exe"
load_wormsreloaded_demo_steam()
{
if w_workaround_wine_bug 26646 "Installing xact to enable sound"
then
w_call xact
fi
w_steam_install_game 22690 "Worms Reloaded Demo"
}
#---------------------------------------------------------------# Settings
#---------------------------------------------------------------# Direct3D settings
winetricks_set_wined3d_var()
{
# Filter out/correct bad or partial values
# Confusing because dinput uses 'disable', but d3d uses 'disabled'
# see wined3d_dll_init() in dlls/wined3d/wined3d_main.c
# and DllMain() in dlls/ddraw/main.c
case $2 in
disable*) arg=disabled;;
enable*) arg=enabled;;
hard*) arg=hardware;;
repack) arg=repack;;
backbuffer|fbo|gdi|none|opengl|readdraw|readtex|texdraw|textex|auto) arg=$2;
;
[0-9]*) arg=$2;;
*) w_die "illegal value $2 for $1";;
esac
echo "Setting Direct3D/$1 to $arg"
cat > "$W_TMP"/set-wined3d.reg <<_EOF_
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"$1"="$arg"
_EOF_
w_try_regedit "$W_TMP_WIN"\\set-wined3d.reg
}
#---------------------------------------------------------------w_metadata glsl=enabled settings \
title_uk=" glsl ( )" \
title="Enable glsl shaders (default)"
}
#---------------------------------------------------------------w_metadata strictdrawordering=enabled settings \
title_uk=" StrictDrawOrdering" \
title="Enable StrictDrawOrdering"
w_metadata strictdrawordering=disabled settings \
title_uk=" StrictDrawOrdering ( )" \
title="Disable StrictDrawOrdering (default)"
load_strictdrawordering()
{
winetricks_set_wined3d_var StrictDrawOrdering $1
}
#---------------------------------------------------------------w_metadata rtlm=auto settings \
title_uk=" RenderTargetLockMode ( )" \
title="Set RenderTargetLockMode to auto (default)"
w_metadata rtlm=disabled settings \
title_uk=" RenderTargetLockMode" \
title="Set RenderTargetLockMode to disabled"
w_metadata rtlm=readdraw settings \
title_uk=" RenderTargetLockMode readdraw" \
title="Set RenderTargetLockMode to readdraw"
w_metadata rtlm=readtex settings \
title_uk=" RenderTargetLockMode readtex" \
title="Set RenderTargetLockMode to readtex"
w_metadata rtlm=texdraw settings \
title_uk=" RenderTargetLockMode texdraw" \
title="Set RenderTargetLockMode to texdraw"
w_metadata rtlm=textex settings \
title_uk=" RenderTargetLockMode textex" \
title="Set RenderTargetLockMode to textex"
load_rtlm()
{
winetricks_set_wined3d_var RenderTargetLockMode $1
}
#---------------------------------------------------------------# AlwaysOffscreen settings
w_metadata ao=enabled settings \
title_uk=" AlwaysOffscreen" \
title="Enable AlwaysOffscreen"
w_metadata ao=disabled settings \
title_uk=" AlwaysOffscreen ( )" \
title="Disable AlwaysOffscreen (default)"
load_ao()
{
winetricks_set_wined3d_var AlwaysOffscreen $1
}
#---------------------------------------------------------------# DirectDraw settings
_EOF_
w_try_regedit "$W_TMP"/set-wmd.reg
}
w_metadata windowmanagermanaged=y settings \
title_uk=" ( )" \
title="Allow the window manager to control windows (default)"
w_metadata windowmanagermanaged=n settings \
title_uk=" " \
title="Prevent the window manager from controling windows"
load_windowmanagermanaged()
{
case $1 in
y|n) arg=$1;;
*) w_die "illegal value $1 for Managed";;
esac
echo "Setting Managed to $arg"
cat > "$W_TMP"/set-wmm.reg <<_EOF_
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"Managed"="$arg"
_EOF_
w_try_regedit "$W_TMP"/set-wmm.reg
}
#---------------------------------------------------------------# Other settings
#---------------------------------------------------------------w_metadata alldlls=default settings \
title_uk=" DLL" \
title="Remove all DLL overrides"
w_metadata alldlls=builtin settings \
title_uk=" DLL " \
title="Override most common DLLs to builtin"
load_alldlls()
{
case $1 in
default) w_override_no_dlls ;;
builtin) w_override_all_dlls ;;
esac
}
w_metadata fontsmooth=disable settings \
title_uk=" " \
title="Disable font smoothing"
w_metadata fontsmooth=bgr settings \
title_uk=" BGR LCD " \
title="Enable subpixel font smoothing for BGR LCDs"
w_metadata fontsmooth=rgb settings \
title_uk=" RGB LCD " \
title="Enable subpixel font smoothing for RGB LCDs"
w_metadata fontsmooth=gray settings \
title_uk=" " \
FontSmoothingType=0;
FontSmoothingType=1;
FontSmoothingType=2;
FontSmoothingType=2;
"ShowCrashDialog"=dword:00000000
_EOF_
cd "$W_TMP"
w_try_regedit crashdialog.reg
}
#---------------------------------------------------------------w_metadata nt40 settings \
title_uk=" Windows NT 4.0" \
title="Set windows version to Windows NT 4.0"
load_nt40()
{
w_set_winver nt40
}
#---------------------------------------------------------------w_metadata sandbox settings \
title_uk=" wineprefix - HOME" \
title="Sandbox the wineprefix - remove links to \$HOME"
load_sandbox()
{
w_skip_windows sandbox && return
# Unmap drive Z
rm -f "$WINEPREFIX/dosdevices/z:"
_olddir="`pwd`"
cd "$WINEPREFIX/drive_c/users/$USER"
for x in *
do
if test -h "$x" && test -d "$x"
then
rm -f "$x"
mkdir -p "$x"
fi
done
cd "$_olddir"
unset _olddir
# 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\CurrentVer
sion\Explorer\Desktop\Namespace\{9D20AAE8-0625-44B0-9CA7-71889C2254D9}'
# Disable recreation of the above key - or any updating of the registry - wh
en running with a newer version of Wine.
echo disable > "$WINEPREFIX/.update-timestamp"
}
#---------------------------------------------------------------w_metadata sound=alsa settings \
title_uk=" ALSA" \
;;
640x480" \
800x600" \
1024x768" \
1280x1024" \
1440x900" \
[1-9]*x[1-9]*)
cat > "$W_TMP"/vd.reg <<_EOF_
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Explorer]
"Desktop"="Default"
[HKEY_CURRENT_USER\Software\Wine\Explorer\Desktops]
"Default"="$size"
_EOF_
*)
;;
w_die "you want a virtual desktop of $size? I don't understand."
;;
esac
w_try_regedit "$W_TMP_WIN"/vd.reg
3dmark05:size_MB=1255,time_sec=208 \
3dmark06:size_MB=2627,time_sec=461 \
3dmark2000:size_MB=165,time_sec=71 \
3dmark2001:size_MB=260,time_sec=141 \
7zip:size_MB=53,time_sec=9 \
abiword:size_MB=119,time_sec=15 \
adobeair:size_MB=132,time_sec=8 \
algodoo_demo:size_MB=165,time_sec=52 \
allcodecs:size_MB=48,time_sec=3 \
allfonts:size_MB=132,time_sec=114 \
amstream:size_MB=48,time_sec=2 \
aoe3_demo:size_MB=4472,time_sec=422 \
aoe_demo:size_MB=164,time_sec=35 \
art2kmin:size_MB=363,time_sec=36 \
atmlib:size_MB=454,time_sec=73 \
autohotkey:size_MB=53,time_sec=4 \
baekmuk:size_MB=138,time_sec=3 \
bioshock_demo:size_MB=7510,time_sec=1543 \
bladekitten_demo:size_MB=1444,time_sec=174 \
cjkfonts:size_MB=48,time_sec=4 \
cmake:size_MB=85,time_sec=8 \
cnc3_demo:size_MB=5244,time_sec=1022 \
cod4mw_demo:size_MB=5730,time_sec=1108 \
cod_demo:size_MB=574,time_sec=115 \
colorprofile:size_MB=47,time_sec=1 \
comctl32:size_MB=49,time_sec=1 \
comdlg32ocx:size_MB=49,time_sec=1 \
controlpad:size_MB=69,time_sec=4 \
corefonts:size_MB=62,time_sec=2 \
crypt32:size_MB=178,time_sec=71 \
crysis2:size_MB=8259,time_sec=1200 \
crysis2_demo_mp:size_MB=5259,time_sec=1473 \
d3dcompiler_43:size_MB=138,time_sec=51 \
d3dx10:size_MB=50,time_sec=4 \
d3dx11_43:size_MB=48,time_sec=1 \
d3dx9:size_MB=126,time_sec=3 \
d3dx9_26:size_MB=48,time_sec=2 \
d3dx9_28:size_MB=48,time_sec=1 \
d3dx9_31:size_MB=48,time_sec=2 \
d3dx9_35:size_MB=50,time_sec=2 \
d3dx9_36:size_MB=48,time_sec=1 \
d3dx9_42:size_MB=48,time_sec=1 \
d3dxof:size_MB=48,time_sec=2 \
dc2ba_demo:size_MB=209,time_sec=38 \
deadspace2:size_MB=12693,time_sec=720 \
devenum:size_MB=59,time_sec=2 \
diablo2:size_MB=2577,time_sec=37 \
dinput:size_MB=48,time_sec=1 \
dinput8:size_MB=61,time_sec=2 \
dirac:size_MB=50,time_sec=4 \
directmusic:size_MB=63,time_sec=4 \
directplay:size_MB=61,time_sec=3 \
directx9:size_MB=387,time_sec=12 \
dirt2_demo:size_MB=6241,time_sec=977 \
divinity2_demo:size_MB=2906,time_sec=2627 \
dmsynth:size_MB=57,time_sec=2 \
dotnet11:size_MB=94,time_sec=15 \
dotnet20:size_MB=360,time_sec=64 \
dotnet30:size_MB=645,time_sec=302 \
dotnet35:size_MB=1149,time_sec=445 \
dragonage:size_MB=23771,time_sec=673 \
dragonage2_demo:size_MB=4014,time_sec=1428 \
droid:size_MB=63,time_sec=8 \
dsound:size_MB=48,time_sec=1 \
dxdiag:size_MB=75,time_sec=6 \
dxdiagn:size_MB=48,time_sec=1 \
eufonts:size_MB=58,time_sec=2 \
eve:size_MB=5313,time_sec=1568 \
eve:size_MB=11215,time_sec=467 \
farmsim2011_demo:size_MB=48,time_sec=4 \
ffdshow:size_MB=53,time_sec=4 \
fifa11_demo:size_MB=4932,time_sec=845 \
flash:size_MB=57,time_sec=3 \
fontfix:size_MB=47,time_sec=0 \
fontxplorer:size_MB=51,time_sec=5 \
gdiplus:size_MB=50,time_sec=2 \
gecko110:size_MB=47,time_sec=0 \
gfw:size_MB=211,time_sec=11 \
glut:size_MB=47,time_sec=1 \
gothic4_demo:size_MB=7719,time_sec=1402 \
guildwars:size_MB=224,time_sec=392 \
hegemony_demo:size_MB=1927,time_sec=315 \
hegemonygold_demo:size_MB=2339,time_sec=247 \
hon:size_MB=1536,time_sec=337 \
hphbp_demo:size_MB=2898,time_sec=556 \
icodecs:size_MB=60,time_sec=29 \
ie6:size_MB=340,time_sec=58 \
ie7:size_MB=181,time_sec=44 \
ie8:size_MB=202,time_sec=39 \
imvu:size_MB=194,time_sec=17 \
jet40:size_MB=54,time_sec=3 \
l3codecx:size_MB=60,time_sec=5 \
lhp_demo:size_MB=3200,time_sec=645 \
liberation:size_MB=50,time_sec=3 \
lucida:size_MB=51,time_sec=1 \
masseffect2_demo:size_MB=8291,time_sec=1397 \
mb_warband_demo:size_MB=1495,time_sec=35 \
mdac25:size_MB=97,time_sec=6 \
mdac27:size_MB=70,time_sec=3 \
mdac28:size_MB=75,time_sec=4 \
mfc40:size_MB=48,time_sec=0 \
mfc42:size_MB=47,time_sec=1 \
mingw:size_MB=132,time_sec=3 \
mozillabuild:size_MB=891,time_sec=26 \
mpc:size_MB=87,time_sec=2 \
msasn1:size_MB=178,time_sec=3 \
mshflxgd:size_MB=47,time_sec=0 \
msi2:size_MB=62,time_sec=4 \
msls31:size_MB=48,time_sec=0 \
msmask:size_MB=47,time_sec=0 \
mspaint:size_MB=49,time_sec=0 \
msscript:size_MB=48,time_sec=0 \
msxml3:size_MB=49,time_sec=1 \
msxml4:size_MB=55,time_sec=0 \
msxml6:size_MB=54,time_sec=1 \
nfsshift_demo:size_MB=4877,time_sec=157 \
ogg:size_MB=54,time_sec=1 \
opensymbol:size_MB=49,time_sec=1 \
openwatcom:size_MB=274,time_sec=12 \
osmos_demo:size_MB=67,time_sec=5 \
pdh:size_MB=48,time_sec=0 \
penpenxmas:size_MB=49,time_sec=6 \
physx:size_MB=213,time_sec=5 \
plantsvszombies:size_MB=156,time_sec=24 \
pngfilt:size_MB=49,time_sec=0 \
puzzleagent_demo:size_MB=495,time_sec=36 \
python26:size_MB=160,time_sec=9 \
python26_comtypes:size_MB=46,time_sec=1 \
quartz:size_MB=62,time_sec=3 \
quicktime72:size_MB=219,time_sec=9 \
quicktime76:size_MB=237,time_sec=6 \
rayman2_demo:size_MB=239,time_sec=146 \
riched20:size_MB=49,time_sec=0 \
riched30:size_MB=48,time_sec=0 \
richtx32:size_MB=48,time_sec=0 \
safari:size_MB=210,time_sec=4 \
sammax301_demo:size_MB=1419,time_sec=341 \
sammax304_demo:size_MB=1642,time_sec=88 \
secondlife:size_MB=266,time_sec=24 \
secur32:size_MB=47,time_sec=0 \
shockwave:size_MB=134,time_sec=6 \
sims3:size_MB=12884,time_sec=584 \
sketchup:size_MB=319,time_sec=15 \
spotify:size_MB=59,time_sec=4 \
starcraft2_demo:size_MB=5241,time_sec=211 \
tahoma:size_MB=48,time_sec=0 \
takao:size_MB=176,time_sec=3 \
tmnationsforever:size_MB=1871,time_sec=116 \
uff:size_MB=47,time_sec=0 \
unifont:size_MB=51,time_sec=0 \
usp10:size_MB=50,time_sec=0 \
ut3:size_MB=7355,time_sec=426 \
utorrent:size_MB=48,time_sec=1 \
vb2run:size_MB=48,time_sec=0 \
vb3run:size_MB=47,time_sec=0 \
vb4run:size_MB=49,time_sec=0 \
vb5run:size_MB=49,time_sec=0 \
vb6run:size_MB=50,time_sec=1 \
vc2005express:size_MB=1614,time_sec=173 \
vc2005trial:size_MB=7156,time_sec=53 \
vcrun2003:size_MB=47,time_sec=0 \
vcrun2005:size_MB=60,time_sec=2 \
vcrun2008:size_MB=60,time_sec=2 \
vcrun2010:size_MB=71,time_sec=7 \
vcrun6:size_MB=51,time_sec=0 \
vcrun6sp6:size_MB=109,time_sec=2 \
vjrun20:size_MB=319,time_sec=57 \
vlc:size_MB=221,time_sec=7 \
wenquanyi:size_MB=50,time_sec=0 \
windowscodecs:size_MB=53,time_sec=2 \
winhttp:size_MB=49,time_sec=0 \
wininet:size_MB=47,time_sec=0 \
wme9:size_MB=136,time_sec=5 \
wmi:size_MB=62,time_sec=12 \
wmp10:size_MB=161,time_sec=7 \
wmp9:size_MB=143,time_sec=12 \
wog:size_MB=124,time_sec=5 \
wsh56js:size_MB=45,time_sec=0 \
xact:size_MB=60,time_sec=6 \
xinput:size_MB=47,time_sec=2 \
xmllite:size_MB=50,time_sec=4 \
xvid:size_MB=54,time_sec=2 \
zootycoon2_demo:size_MB=299,time_sec=32 \
do
cmd=${data%%:*}
file="`echo "$WINETRICKS_METADATA"/*/$cmd.vars`"
if test -f "$file"
then
case $data in
*size_MB*)
size_MB=${data##*size_MB=}
# remove anything before value
size_MB=${size_MB%%,*}
# remove anything after value
echo size_MB=$size_MB >> "$file"
;;
esac
case $data in
*time_sec*)
time_sec=${data##*time_sec=}
time_sec=${time_sec%%,*}
echo time_sec=$time_sec >> "$file"
esac
fi
unset size_MB time_sec
done
'"
fi
winetricks_stats_log_command()
{
# log what we execute for possible later statistics reporting
echo "$*" >> "$WINETRICKS_WORKDIR"/breadcrumbs
# and for the user's own reference later, when figuring out what he did
case "$OS" in
"Windows_NT") _W_LOGDIR="$W_WINDIR_UNIX"/Temp ;;
*) _W_LOGDIR="$WINEPREFIX" ;;
esac
mkdir -p "$_W_LOGDIR"
echo "$*" >> "$_W_LOGDIR"/winetricks.log
unset _W_LOGDIR
case $WINETRICKS_GUI in
none)
$SHELL
;;
*)
for term in gnome-terminal konsole Terminal xterm
do
if test `which $term` 2> /dev/null
then
$term
break
fi
done
;;
esac
)
# Late options
-*)
if ! winetricks_handle_option $1
then
winetricks_usage
exit 1
fi
;;
gs
# Hard-coded verbs
main) WINETRICKS_CURMENU=main ;;
help) w_open_webpage http://winetricks.org/help ;;
list) winetricks_list_all ;;
list-cached) winetricks_list_cached ;;
list-download) winetricks_list_download ;;
list-manual-download) winetricks_list_manual_download ;;
list-installed) winetricks_list_installed ;;
list-all)
old_menu="$WINETRICKS_CURMENU"
for WINETRICKS_CURMENU in apps benchmarks dlls fonts games prefix settin
do
done
WINETRICKS_CURMENU="$old_menu"
;;
unattended) winetricks_set_unattended 1 ;;
attended) winetricks_set_unattended 0 ;;
showbroken) W_OPT_SHOWBROKEN=1 ;;
hidebroken) W_OPT_SHOWBROKEN=0 ;;
prefix=*) winetricks_set_wineprefix "$arg" ;;
annihilate) winetricks_annihilate_wineprefix ;;
folder) w_open_folder "$WINEPREFIX" ;;
winecfg) "$WINE" winecfg ;;
regedit) "$WINE" regedit ;;
taskmgr) "$WINE" taskmgr & ;;
shell) winetricks_shell ;;
# These have to come before *=disabled to avoid looking like dlls
fontsmooth=disable*) w_call fontsmooth=disable ;;
glsl=disable*) w_call glsl=disabled ;;
multisampling=disable*) w_call multisampling=disabled ;;
mwo=disable*) w_call mwo=disable ;; # FIXME: relax matching so we can hand
le these spelling differences in verb instead of here
psm=disable*) w_call psm=disabled ;;
rtlm=disable*) w_call rtlm=disabled ;;
sound=disable*) w_call sound=disabled ;;
ao=disable*) w_call ao=disabled ;;
strictdrawordering=disable*) w_call strictdrawordering=disabled ;;
# Use winecfg if you want a gui for plain old dll overrides
alldlls=*) w_call $1 ;;
*=native) w_do_call native $cmd;;
*=builtin) w_do_call builtin $cmd;;
*=default) w_do_call default $cmd;;
*=disabled) w_do_call disabled $cmd;;
vd=*) w_do_call $cmd;;
if ! test "$WINETRICKS_LIB"
then
# If user opted out, save that preference now.
winetricks_stats_save
# If user specifies menu on commandline, execute that command, but don't com
mit to commandline mode
# FIXME: this code is duplicated several times; unify it
if echo "$WINETRICKS_CATEGORIES" | grep -w "$1" > /dev/null
then
WINETRICKS_CURMENU=$1
shift
fi
case "$1" in
die) w_die "we who are about to die salute you." ;;
volnameof=*)
# Debug code. Remove later?
# Since linux's volname command can't handle dvds, winetricks has its ow
n,
"")
# implemented using dd, old gum, and some string I had laying around.
# You can try it like this:
# winetricks volnameof=/dev/sr0
# or
# winetricks volnameof=foo.iso
# This will read the volname from the given image and put it to stdout.
winetricks_volname ${1#volnameof=}
;;
fi
prefix=*)
# prefix menu is special, it only returns one verb, and the
# verb can contain spaces
execute_command "$verbs"
# after picking a prefix, want to land in main.
WINETRICKS_CURMENU=main ;;
*)
for verb in $verbs
do
execute_command "$verb"
done
case "$WINETRICKS_CURMENU"-"$WINETRICKS_OPT_SHAREDPREFIX" in
prefix-*|apps-0|benchmarks-0|games-0)
# After installing isolated app, return to prefix picker
WINETRICKS_CURMENU=prefix
;;
*)
# Otherwise go to main menu.
WINETRICKS_CURMENU=main
;;
esac
;;
esac
*)
done
;;
winetricks_stats_init
# Commandline case
winetricks_detect_sudo
# User gave commandline arguments, so just run those verbs and exit
for verb
do
case $verb in
*.verb)
# Load the verb file
case $verb in
*/*) . $verb ;;
*) . ./$verb ;;
esac
# And forget that the verb comes from a file
verb="`echo $verb | sed 's,.*/,,;s,.verb,,'`"
;;
esac
execute_command "$verb"
done
;;
esac
fi
winetricks_stats_report