Hello, i create a new script for Max Payne to fix current issues. Works correctly, no graphic bug.
Wine version : 1.1.31
Distribution : Ubuntu 9.04
Carte Graphique : Nvidia, GeForce 8800 GTX
Drivers carte graphique : 185.18.36
Game's icon :
On my SVN repo:
http://svn.zedroot.org/PlayOnLinuxScripts/max.payne.sh
#!/bin/bash
# Date : (2009-10-20)
# Last revision : (2009-10-20)
# Wine version used : 1.1.31
# Distribution used to test : Ubuntu 9.04
# Author : zedtux
# Licence : Retail
GAMENAME="Max Payne"
PUBLISHER="RockstarGame"
URL="http://www.rockstargames.com/maxpayne/index.html"
PREFIX="maxpayne"
GAMEPATHFROMPROGRAMFILES="/Max Payne"
GAMEEXECUTABLENAME="MaxPayne.exe"
COVERURL="http://wilibre.free.fr/images/POL/max_payne.jpg"
NEEDEDWINEVERSION="1.1.31"
GAME_SETUP="Disk1/Setup.exe"
MENU_ACTION_INSTALL="Install the game"
MENU_ACTION_PATCH="Patch the game"
PATCH_SOURCE_LOCAL="From my computer"
PATCH_SOURCE_REMOTE="From Internet"
PATCHMIME="application/x-dosexec"
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
# Verify playonlinux dependencies
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
# Get Cover and convert it
wget $COVERURL --output-document="$REPERTOIRE/tmp/$PREFIX.cover.jpeg"
convert "$REPERTOIRE/tmp/$PREFIX.cover.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.$PREFIX.jpeg"
# Initialize the main window
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.$PREFIX.jpeg"
POL_SetupWindow_presentation "$GAMENAME" "$PUBLISHER" "$URL" "zedtux" "$PREFIX"
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
# Provide possibility to run install of a patch for the game
patch_game()
{
POL_SetupWindow_menu "Select the source to patch the game" "Sources" "$PATCH_SOURCE_LOCAL~$PATCH_SOURCE_REMOTE" "~"
# Install Patch from local disk
if [ "$APP_ANSWER" == "$PATCH_SOURCE_LOCAL" ]; then
POL_SetupWindow_browse "Select the patch file for $GAMENAME" "Patching $GAMENAME" ""
if [ "$APP_ANSWER" != "" ] ; then
if [ `file -bi "$APP_ANSWER"` == "$PATCHMIME" ] ; then
POL_SetupWindow_wait_next_signal "Patching $GAMENAME..." "$GAMENAME"
wine "$APP_ANSWER"
POL_SetupWindow_message "$GAMENAME patched successfully" "$GAMENAME"
POL_SetupWindow_Close
exit
else
POL_SetupWindow_message_image "The file that you've selected is not a Microsoft executable." "Wrong Mime Type" "/usr/share/playonlinux/themes/tango/warning.png"
fi
else
POL_SetupWindow_Close
exit
fi
else
# Install Patch from internet
cd "$HOME/.PlayOnLinux/tmp"
POL_SetupWindow_download "Downloading $GAMENAME patch 1.05..." "Downloading patch" "ftp://ftp.3drealms.com/patches/maxpayne1-05patch.exe"
POL_SetupWindow_wait_next_signal "Patching $GAMENAME..." "$GAMENAME"
wine "./maxpayne1-05patch.exe"
rm -f "./maxpayne1-05patch.exe"
POL_SetupWindow_message "$GAMENAME patched successfully" "$GAMENAME"
POL_SetupWindow_Close
exit
fi
}
# Create Wine environnement before install the game
POL_SetupWindow_prefixcreate
#
# Make a menu to select one action
#
# Give the choice to user between install or patch the game
POL_SetupWindow_menu "What do you want to do?" "Actions" "$MENU_ACTION_INSTALL~$MENU_ACTION_PATCH" "~"
if [ "$APP_ANSWER" == "$MENU_ACTION_PATCH" ]; then
patch_game
POL_SetupWindow_Close
fi
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "$GAME_SETUP"
# Launching Installation
POL_SetupWindow_message_image "Please, ignore error messages, the game will work =)" "" "/usr/share/playonlinux/themes/tango/info.png"
POL_SetupWindow_wait_next_signal "Installing $GAMENAME..." "$GAMENAME"
cd "$CDROM"
wine "$GAME_SETUP"
# Defining options of the environnement
POL_SetupWindow_install_wine "$NEEDEDWINEVERSION"
Set_WineVersion_Assign "$NEEDEDWINEVERSION" "$GAMENAME"
# Creating shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES$GAMEPATHFROMPROGRAMFILES" "$GAMEEXECUTABLENAME" "" "$GAMENAME" ""
# Ask for patching the game
POL_SetupWindow_question "Do you want to patch the game now ?" "Max Payne Patch 1.05"
if [ "$APP_ANSWER" == "TRUE" ] ; then
patch_game
fi
POL_SetupWindow_message "$GAMENAME has been installed successfully" "$GAMENAME"
# Close the main window !
POL_SetupWindow_Close
exit