Hello,
I wrote script which installs Prototype. It also can patch the game after it's been installed
Wine version : 1.1.24
Distribution : Fedora
Distribution Version : 11 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 185.18.14
Comments:
-movies don't work
Icon for the game:
#!/bin/bash
# Date : (2009-06-05 13-00)
# Last revision : (2009-06-26 18-00)
# Wine version used : 1.1.24
# Distribution used to test : Fedora 11
# Author : NSLW
# Licence : Retail
# Depend : unzip, icoutils
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
TYTUL="Prototype"
PREFIX="Prototype"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "Radical Entertainment" "www.prototypegame.com" "NSLW" "$PREFIX"
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
#asking about patching or updating Wine version
if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
POL_SetupWindow_menu "What do you want to do?" "Actions" "Patch game" "~"
if [ "$APP_ANSWER" == "Patch game" ]; then
patch_prototype
fi
POL_SetupWindow_Close
exit
fi
cd "$REPERTOIRE/ressources/"
#determining which Version is the latest
wget http://mulx.playonlinux.com/wine/linux-i386/LIST --output-document=LIST
cat LIST | sed -e 's/\\.//g' | cut -d';' -f2 | sort -n | tail -n1 >& LatestVersion.txt
x=`cat LatestVersion.txt | cut -c1-1`
y=`cat LatestVersion.txt | cut -c2-2`
z=`cat LatestVersion.txt | cut -c3-4`
LATESTVERSION=$x.$y.$z
CHOSENWINEVERSION=$LATESTVERSION
POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
Use_WineVersion "$CHOSENWINEVERSION"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
POL_SetupWindow_message_image "Please install icoutils\\nif you wan't to have nice icon for the game in PlayOnLinux main menu" "Note about icon" "/usr/share/playonlinux/themes/tango/info.png"
POL_SetupWindow_prefixcreate
cd "$REPERTOIRE/ressources"
#downloading winetricks
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "bf24bc6d84a40a836d7ce6de41ff04f910b34434" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi
WINETRICKSDX=`cat winetricks | grep \\/directx | cut -d'_' -f2`
WINETRICKSDXLINK=`cat winetricks | grep \\/directx | cut -d'/' -f5,6,7,8`
#downloading DirectX
if [ ! -e "$HOME/.winetrickscache/directx_${WINETRICKSDX}_redist.exe" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "Downloading DirectX 9.0c libraries" "$TITLE" "http://download.microsoft.com/download/$WINETRICKSDXLINK/directx_${WINETRICKSDX}_redist.exe"
fi
#adding CD-ROM as drive d: to winecfg
cd "$WINEPREFIX/dosdevices"
ln -s $CDROM d:
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > cdrom.reg
echo "\\"d:\\"=\\"cdrom\\"" >> cdrom.reg
regedit cdrom.reg
#POL_SetupWindow_message "Wait 5 seconds then click next" "$TYTUL"
sleep 5
#starting installation
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
cd $CDROM
wine "setup.exe" #may hang at the end of setup.exe
POL_SetupWindow_detect_exit
#modyfing winetricks
cd "$WINEPREFIX/drive_c/windows/temp"
cat "$REPERTOIRE/ressources/winetricks" | sed -e 's/set_winver\\ win2k/set_winver\\ winxp/' > winetricks
#installing DirectX
POL_SetupWindow_wait_next_signal "Installing DirectX 9.0c libraries..." "$TYTUL"
bash winetricks -q directx9 xact
POL_SetupWindow_detect_exit
cd "$WINEPREFIX/drive_c/windows/temp/"
#setting OffscreenRenderingMode to fbo
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > fbo.reg
echo "\\"OffscreenRenderingMode\\"=\\"fbo\\"" >> fbo.reg #shouldn't be needed for Wine-1.1.23
regedit fbo.reg
#asking about memory size
POL_SetupWindow_menu_list "How much memory do your graphic card have got?" "$TYTUL" "32-64-128-256-384-512-768-1024-2048" "-" "256"
VMS="$APP_ANSWER"
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
regedit vms.reg
cd "$WINEPREFIX/drive_c/windows/temp/"
#The failing component is bink video codec (binkw32.dll) by Andras Kovacs
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Activision/Prototype"
mv movies.rcf movies.rcf.bak
#extracting icon
wrestool -x -t14 "prototypef.exe" > "$WINEPREFIX/drive_c/windows/temp/prototypef.ico"
icotool -x --index=11 "$WINEPREFIX/drive_c/windows/temp/prototypef.ico" -o "$REPERTOIRE/icones/32/$TYTUL"
#cleaning temp
cd "$WINEPREFIX/drive_c/windows/temp"
rm -rf *
#making shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Activision/Prototype" "prototypef.exe" "" "$TYTUL" "" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
#asking about patching
POL_SetupWindow_question "Do you want to patch your game?" "$TYTUL"
if [ "$APP_ANSWER" == "TRUE" ] ;then
patch_prototype
fi
POL_SetupWindow_message_image "Please note that this game has a copy protection system\\nand sadly, it prevents Wine from running the game.\\n\\nPlayOnLinux will not provide any help concerning any illegal\\nstuff." "Note about copy protection" "/usr/share/playonlinux/themes/tango/warning.png"
POL_SetupWindow_Close
exit