Scripts
Script for Command And Conquer 3 - Tiberium Wars
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
presentation "Command And Conquer 3 - Tiberium Wars" "Electronic Arts" "http://www.ea.com/cc/tiberium/" "GNU_Raziel" "CommandAndConquer3" 1 12
if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
LNG_GIT_CNC3_WELCOME="le script va maintenant télécharger une version patchée de Wine-0.9.58 afin que le jeu fonctionne correctement."
LNG_WAIT_CP="Patientez pendant la préparation de l'installation..."
LNG_GDI_DL="Téléchargement de gdiplus..."
LNG_DX_DL="Téléchargement de la mise a jour DirectX9.0c pour Wine..."
LNG_DX_INSTALL="L'installation de la mise a jour DirectX9.0c pour Wine va débuter."
LNG_CNC3_WAIT_END="Appuyez sur "Suivant" UNIQUEMENT quand l'installation du jeu sera terminée sous peine de devoir recommencer l'installation."
LNG_VC80_DL="Téléchargement de MSvc80..."
LNG_CNC3_WARNING="Lorsque vous verrez une fenêtre toute blanche apparaître cliquez sur "Suivant" de ce message pour que l'installation continue."
LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 64Mo de mémoire."
else
LNG_GIT_CNC3_WELCOME="This script will now download a patched version of Wine-0.9.58 for this game."
LNG_WAIT_CP="Wait while the installation is prepared..."
LNG_GDI_DL="Downloading gdiplus..."
LNG_DX_DL="Downloading Wine DirectX9.0c Update..."
LNG_DX_INSTALL="DirectX9.0c Update installation will begin."
LNG_CNC3_WAIT_END="Click on "Next" ONLY when the game installation is finished or you will have to redo the installation."
LNG_VC80_DL="Downloading MSvc80..."
LNG_CNC3_WARNING="While a white windows will appear, click on the "Next" button of this message and the installation will continue"
LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 64Mo of memory."
fi
Ask_For_cdrom 2 12
Check_cdrom "setup.exe"
protection_warning
message "$LNG_GIT_CNC3_WELCOME" "" 3 12
cd $REPERTOIRE/tmp/
if [ ! -e $REPERTOIRE/tmp/0.9.58-cnc3.tar.bz2 ]; then
telecharger "$LNG_GIT_DL_UNIVERSAL" http://www.playonlinux.com/script_files/divers/git/0.9.58-cnc3.tar.bz2 "" 4 12
cd $REPERTOIRE/WineVersion
tar jxfv 0.9.58-cnc3.tar.bz2
fi
## Reprise de la proccedure d'installation
TEMP="$HOME/.PlayOnLinux/tmp/CommandAndConquer3"
chmod 777 $TEMP -R
rm $TEMP -R
mkdir -p $REPERTOIRE/wineprefix/CommandAndConquer3
mkdir -p $TEMP
cd $REPERTOIRE/wineprefix/CommandAndConquer3
select_prefixe "$(pwd)"
creer_prefixe 5 12
cd $WINEPREFIX/drive_c/windows/
mkdir temp
cd $WINEPREFIX/dosdevices
rm ./*
ln -s ../drive_c c:
ln -s / z:
ln -s $TEMP d:
attendre "$LNG_WAIT_CP" "cp -r $CDROM/* $TEMP" "" 6 12
chmod 777 $TEMP -R
cd $REPERTOIRE/tmp/
if [ ! -e $REPERTOIRE/tmp/gdiplus.dll.zip ]; then
telecharger "$LNG_GDI_DL" http://www.dllbank.com/zip/g/gdiplus.dll.zip "" 7 12
fi
if [ ! -e $REPERTOIRE/tmp/D3DX9_dll_update.zip ]; then
telecharger "$LNG_DX_DL" http://www.threelights.de/page/projects/d3dx9_xx_dll_files/D3DX9_dll_update.zip "" 8 12
fi
cd $WINEPREFIX/drive_c/windows/temp/
unzip $REPERTOIRE/tmp/D3DX9_dll_update.zip
message "$LNG_DX_INSTALL" "" 9 12
cd $WINEPREFIX/drive_c/windows/system32/
unzip $REPERTOIRE/tmp/gdiplus.dll.zip
Set_OS "winxp"
wine c:\\windows\\temp\\D3DX9_dll_update\\Install\\DXSETUP.exe
wine d:\\autorun.exe &
message "$LNG_CNC3_WARNING" "" 10 12
killall -9 EReg.exe
message "$LNG_CNC3_WAIT_END" "" 11 12
cd $REPERTOIRE/tmp/
if [ ! -e $REPERTOIRE/tmp/microsoft.vc80.crt.zip ]; then
telecharger "$LNG_VC80_DL" http://www.sweetpotatosoftware.com/files/microsoft.vc80.crt.zip "" 12 12
fi
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
unzip $REPERTOIRE/tmp/microsoft.vc80.crt.zip
cp Microsoft.VC80.CRT/*.* .
rm -rf Microsoft.VC80.CRT
echo "[HKEY_CURRENT_USER\\Software\\WineDrivers]" > $REPERTOIRE/tmp/drivers.reg
echo "\"Audio\"=\"alsa\"" >> $REPERTOIRE/tmp/drivers.reg
regedit $REPERTOIRE/tmp/drivers.reg
Set_Managed "On"
Set_DXGrab "On"
Set_GLSL "On"
VMS=$(champ "$LNG_WINEBOOSTER_VMS" "64" ) ;
if [ "$VMS" == "" ]; then
WINE_VMS="64"
message "$LNG_VMS_ERROR"
else
WINE_VMS=$VMS
fi
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > $REPERTOIRE/tmp/vms.reg
echo "\"VideoMemorySize\"=\"$WINE_VMS\"" >> $REPERTOIRE/tmp/vms.reg
regedit $REPERTOIRE/tmp/vms.reg
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Network]" > $REPERTOIRE/tmp/net_hack.reg
echo "\"UseBindAddressHack\"=\"enabled\"" >> $REPERTOIRE/tmp/net_hack.reg
regedit $REPERTOIRE/tmp/net_hack.reg
simuler_reboot
chmod 777 $TEMP -R
rm $TEMP -R
cd $WINEPREFIX/dosdevices
rm ./d:
ln -s $CDROM ./d:
creer_lanceur "CommandAndConquer3" "Program Files/Electronic Arts/Command & Conquer 3/" "CNC3.exe" "CommandAndConquer3.xpm" "Command And Conquer 3 - Tiberium Wars"
Set_WineVersion_Assign "0.9.58-cnc3" "Command And Conquer 3 - Tiberium Wars"
end_install
exit