#!/bin/bash
#!/bin/bash
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
Title=
"FarCry"
if
[
"$POL_LANG"
==
"fr"
];
then
LNG_WAIT_END=
"Appuyez sur \\"
Suivant\\" UNIQUEMENT quand l'installation
du
jeu sera
terminée sous peine de devoir recommencer l'installation."
LNG_FILEPATCH=
"Selectionner le patch à installer"
LNG_INST=
"Patch pour $Title installé avec succès"
LNG_PAT=
"Voulez-vous patcher votre jeu en version 1.4?"
LNG_INST=
"Que voulez-vous faire?"
else
LNG_WAIT_END=
"Click on \\"
Next\\" ONLY when the game installation
is finished or you will have to redo the installation.."
LNG_FILEPATCH=
"Select patch file"
LNGINST=
"Patch for $Title has been installed successfully"
LNGPAT=
"Do you want to patch your game with patch 1.4?"
LNG_INST=
"What do you want to do?"
fi
patch_farcry()
{
POL_SetupWindow_install_wine
"1.0.1"
Use_WineVersion
"1.0.1"
POL_SetupWindow_browse
"$LNG_FILEPATCH"
"$Title"
""
wine
"$APP_ANSWER"
if
[ ! -e game.zip ];
then
cd
$REPERTOIRE
/tmp
wget http:
//sd-1
.archive-host.com
/membres/up/51568577817080088/game
.zip
cd
"$WINEPREFIX/drive_c/Program Files/Ubisoft/Crytek/Far Cry"
unzip
"$REPERTOIRE/tmp/game.zip"
fi
POL_SetupWindow_message
"$LNG_INST"
"$Title"
}
cd
$REPERTOIRE
/tmp
rm
*.jpg
wget http:
//sd-1
.archive-host.com
/membres/images/51568577817080088/FarCry
.jpg --output-document=left.jpeg
POL_SetupWindow_Init
""
"$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_menu
"$LNG_INST"
"Actions"
"Patch game~Install Game"
"~"
if
[
"$APP_ANSWER"
==
"Patch game"
];
then
select_prefixe
"$REPERTOIRE/wineprefix/$Title"
patch_farcry
POL_SetupWindow_Close
exit
else
[
"$APP_ANSWER"
==
"Install Game"
]
then
POL_SetupWindow_install_wine
"1.1.29"
select_prefixe
"$REPERTOIRE/wineprefix/$Title"
POL_SetupWindow_prefixcreate
cd
"$REPERTOIRE/ressources"
export
POL_TITLE=
"$Title"
tricks d3dx9
POL_SetupWindow_textbox
"Your Memory Graphic ?"
"Memory Graphic"
VMS=
"$APP_ANSWER"
cd
"$WINEPREFIX/drive_c/windows/temp"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"
> OGL.reg
echo
"\\"
VideoMemorySize\\
"=\\"
$VMS\\
""
>> OGL.reg
echo
"\\"
Multisampling\\
"=\\"
enabled\\
""
>> OGL.reg
regedit OGL.reg
Set_OS winxp
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"setup.exe"
wine
"$CDROM/setup.exe"
POL_SetupWindow_message
"$LNG_WAIT_END"
"$Title"
POL_SetupWindow_make_shortcut
"$Title"
"$PROGRAMFILES/Ubisoft/Crytek/Far Cry/Bin32"
"FarCry.exe"
""
"$Title"
POL_SetupWindow_question
"$LNG_PAT"
"$Title"
if
[
"$APP_ANSWER"
==
"TRUE"
] ;
then
patch_farcry
fi
Set_WineVersion_Assign
"1.1.29"
"$Title"
POL_SetupWindow_Close
exit
fi