The forum

FarCry

Author Replies
Smon Monday 24 January 2011 at 18:39
SmonAnonymous

hi, i made a Script to install and run FarCry

#!/bin/bash
# Wine version used : 1.3.0
# Distribution used to test : Aptosid 64bit
# Driver used to test : fglrx
# Author : Smon
# Visit : http://smon.mine.nu
# Licence : retail
# Known issues:
# Cant turn around with mouse : Reset keyboard config, restart the Game.
# Shoot sound laggs : Disable compatible Sound, restart the Game.
# Game doesnt act anymore after changing settings or exiting the Game : Press Strg+Alt+F6, then Strg+Alt+F7
# graphic errors : Set light to high, shadow to middle

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Far Cry"
PREFIX="farcry"
WORKING_WINE_VERSION="1.3.0"

#starting the script
POL_SetupWindow_Init

#TEST
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"

#asking for CDROM and checking if it's correct one
POL_SetupWindow_message "Please insert $TITLE media into your disk drive."
POL_SetupWindow_cdrom
cd "$CDROM"
CHECK=$(find . -iwholename ./setup.exe | cut -d'/' -f2)
POL_SetupWindow_check_cdrom "$CHECK"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

#downloading specific Wine
POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
Use_WineVersion "$WORKING_WINE_VERSION"

#fetching PROGRAMFILES environmental variable
POL_LoadVar_PROGRAMFILES

#Installing mandatory dependencies
#POL_Call POL_Install_vcrun2005
#POL_Call POL_Install_d3dx9
#POL_Call POL_Install_gecko
#POL_Call POL_Install_tahoma
#POL_Call POL_Install_dotnet20
#POL_Call POL_Install_vcrun2008

#starting installation
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TITLE"
mkdir "$WINEPREFIX/drive_c/windows/temp/"
wget -O "$WINEPREFIX/drive_c/windows/temp/patch.exe" http://www.ubi.com/US/Downloads/DownloadFile.aspx\\?dfId=3429 &
wine "$CDROM/$CHECK"
POL_SetupWindow_detect_exit

POL_SetupWindow_wait_next_signal "Patching..." "$TITLE"
wine "$WINEPREFIX/drive_c/windows/temp/patch.exe"
POL_SetupWindow_detect_exit


## PlayOnMac Section
[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
## End Section

#cleaning temp
if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
     rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
     chmod -R 777 "$REPERTOIRE/tmp/"
     rm -rf "$REPERTOIRE/tmp/*"
fi

#making shortcut
POL_SetupWindow_auto_shortcut "$PREFIX" "FarCry.exe" "$TITLE" "" ""
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"

cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" e:

cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > cdrom.reg
echo "\\"e:\\"=\\"cdrom\\"" >> cdrom.reg
regedit cdrom.reg

cd "$WINEPREFIX/drive_c/"

##cat system.cfg | sed 's/r_Driver = "Direct3D9"/r_Driver = "OpenGL"/g' > system.cfg

POL_SetupWindow_message "$TITLE has been installed successfully." "$TITLE"

#POL_SetupWindow_message "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." $TITLE"

POL_SetupWindow_Close
exit
You are here: Index > Your creations. > FarCry

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com