forked from mattcaron/playonlinux
-
Notifications
You must be signed in to change notification settings - Fork 10
/
callofduty-modernwarfare3-steam
110 lines (90 loc) · 3.08 KB
/
callofduty-modernwarfare3-steam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/env playonlinux-bash
# Date : (2012-02-18 12-48)
# Last revision : (2013-03-25 23-58)
# Wine version used : 1.4
# Distribution used to test : Debiann unstable amd64
# Author : Pierre Etchemaite
# based on script by GNU_Raziel
# Licence : Retail
# Playing windowed with forced mouse capture
#
# 1.4-rc4: "flashes" in smoke/dirt textures
# 1.3.37: idem
# 1.3.36: crash at start
# 1.3.35: crash at start
# 1.3.34: flashes in smoke/dirt
# 1.3.30: idem
# 1.3.28: idem
# 1.3.23: idem
# Flashes fixed with StrictDrawOrdering = enabled
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Call of Duty: Modern Warfare 3"
PREFIX="CallOfDutyMW3"
WORKING_WINE_VERSION="1.4"
GAME_VMS="256"
VID="42690"
# Starting the script
rm "$POL_USER_ROOT/tmp/*.jpg"
# POL_GetSetupImages "http://files.playonlinux.com/resources/setups/css/top.jpg" "http://files.playonlinux.com/resources/setups/css/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_SetupWindow_SetID 1058
# Starting debugging API
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Infinity Ward / Sledgehammer Games" "http://www.callofduty.com/mw3" "Pierre Etchemaite" "$PREFIX"
POL_SetupWindow_checkexist()
{
if [ -e "$POL_USER_ROOT/wineprefix/$1" ]; then
STEAM=`find $WINEPREFIX -name "Steam.exe"`
if [ "$STEAM" != "" ]; then
POL_SetupWindow_menu "$(eval_gettext 'Steam installation has been detected\nwould you like to install this game in the same virtual drive?')" "$TITLE" "$(eval_gettext 'Yes')~$(eval_gettext 'No')" "~"
STEAM_USE=$APP_ANSWER
if [ "$STEAM_USE" == "$(eval_gettext 'Yes')" ]; then
STEAM_USE="1"
PREFIX="steam"
else
STEAM_USE="0"
fi
fi
else
STEAM_USE="0"
fi
}
POL_SetupWindow_checkexist "steam"
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
if [ "$STEAM_USE" == "0" ]; then
# Downloading wine if necessary and creating prefix
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
fi
# Installing mandatory dependencies
if [ "$STEAM_USE" == "0" ]; then
POL_Call POL_Install_steam
fi
# Mandatory pre-install fix for steam
POL_Call POL_Install_steam_flags "$VID"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue.')" "$TITLE"
POL_Wine "steam.exe" steam://install/$VID
POL_Wine_WaitExit "$TITLE"
# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
## Fix for this game
# Sound problem fix - pulseaudio related
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
## End Fix
POL_Wine_X11Drv "GrabFullScreen" "Y"
# Fix moire flashes in smoke and dirt
POL_Wine_Direct3D "StrictDrawOrdering" "enabled"
# Cleaning temp
if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
chmod -R 777 "$POL_USER_ROOT/tmp/"
rm -rf "$POL_USER_ROOT/tmp/*"
fi
# Making shortcut
POL_Shortcut "Steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/$VID" "Game;ActionGame;"
POL_SetupWindow_Close
exit 0