Applications

Choose a category

accessories
Accessories
development
Development
education
Education
games
Games
graphics
Graphics
internet
Internet
multimedia
Multimedia
office
Office
other
Other

Command And Conquer 3 - Tiberium Wars - Kane Edition

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"

cfg_check

if [ "$POL_LANG" == "fr" ]; then
LNG_CNC3_WELCOME="Cet installeur téléchargera une version patchée de\nWine-1.1.6 afin que le jeu fonctionne correctement."
LNG_WAIT_DL="Patientez pendant le téléchargement..."
LNG_WAIT_CP="Patientez pendant la préparation de l'installation..."
LNG_GDI_DL="Téléchargement de gdiplus..."
LNG_DX9_DL="Téléchargement de la mise a jour DirectX9.0c pour Wine..."
LNG_DX9_INSTALL="L'installation de la mise a jour DirectX9.0c pour Wine va débuter."
LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du\njeu sera terminée sous peine de devoir recommencer l'installation."
LNG_WAIT_CONFIG="Patientez pendant la configuration du language français..."
LNG_VC80_DL="Téléchargement de MSvc80..."
LNG_CNC3_VMS="Quelle est la quantité de mémoire (Mo) de votre carte graphique ?\n(minimum pour ce jeu : 64)"
LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 64Mo de mémoire."
else
LNG_CNC3_WELCOME="This installer will download a patched version of\nWine-1.1.6 for this game."
LNG_WAIT_DL="Please wait while downloading..."
LNG_WAIT_CP="Wait while the installation is prepared..."
LNG_GDI_DL="Downloading gdiplus..."
LNG_DX9_DL="Downloading Wine DirectX9.0c Update..."
LNG_DX9_INSTALL="DirectX9.0c Update installation will begin."
LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
LNG_WAIT_CONFIG="Wait while language pack is configured..."
LNG_VC80_DL="Downloading MSvc80..."
LNG_CNC3_VMS="How much memory does your graphics board have?\n(minimum for this game : 64)"
LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 64Mo of memory."
fi

cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/cnc3/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "Command And Conquer 3 - Tiberium Wars - Kane Edition" "Electronic Arts" "http://www.ea.com/cc/tiberium/" "GNU_Raziel" "CommandAndConquer3-KaneEdition"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

if [ ! -e $REPERTOIRE/WineVersions/1.1.6-patched/usr/bin/wine ]; then
POL_SetupWindow_message_image "$LNG_CNC3_WELCOME" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "$PLAYONLINUX/themes/tango/warning.png"
if [ ! -e $REPERTOIRE/tmp/1.1.6-patched.tar.bz2 ]; then
POL_SetupWindow_download "$LNG_WAIT_DL" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "$SITE/divers/wine/1.1.6-patched.tar.bz2"
cd $REPERTOIRE/WineVersion
tar jxfv $REPERTOIRE/tmp/1.1.6-patched.tar.bz2
fi
fi

Use_WineVersion "1.1.6-patched"

select_prefixe "$REPERTOIRE/wineprefix/CommandAndConquer3-KaneEdition/"
POL_SetupWindow_prefixcreate

if [ ! -e $REPERTOIRE/ressources/ ]; then
mkdir -p $REPERTOIRE/ressources/
fi
cd $REPERTOIRE/ressources/
if [ ! -e $REPERTOIRE/ressources/gdiplus.dll.zip ]; then
POL_SetupWindow_download "$LNG_GDI_DL" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "http://www.dllbank.com/zip/g/gdiplus.dll.zip"
fi

if [ ! -e $REPERTOIRE/ressources/D3DX9_XX_dll_\(32Bit_All\).zip ]; then
POL_SetupWindow_download "$LNG_DX9_DL" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "http://mulx.net/file_pol/D3DX9_XX_dll_(32Bit_All).zip"
fi

if [ ! -e $REPERTOIRE/tmp/cnc3-cursors.tar.gz ]; then
wget $SITE/divers/cnc3-cursors.tar.gz
fi

cd $WINEPREFIX/drive_c/windows/temp/
unzip $REPERTOIRE/ressources/D3DX9_XX_dll_\(32Bit_All\).zip
POL_SetupWindow_message "$LNG_DX9_INSTALL" "Command And Conquer 3 - Tiberium Wars - Kane Edition"
cd $WINEPREFIX/drive_c/windows/system32/
unzip $REPERTOIRE/ressources/gdiplus.dll.zip
Set_OS "winxp"
wine c:\\windows\\temp\\D3DX9_XX_dll_\(32Bit_All\)\\Install\\DXSETUP.exe

cd $CDROM
wine autorun.exe
POL_SetupWindow_message "$LNG_WAIT_END" "Command And Conquer 3 - Tiberium Wars - Kane Edition"

if [ "$POL_LANG" == "fr" ]; then
POL_SetupWindow_wait_next_signal "$LNG_WAIT_CONFIG" "Configuration"
cd $REPERTOIRE/tmp/
cabextract $CDROM/Langfr~1.cab
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
mv $REPERTOIRE/tmp/cnc3_french_1.0.skudef CNC3_french_1.0.SkuDef
mv CNC3_english_1.0.SkuDef CNC3_english_1.0.SkuDef.save
cp CNC3_french_1.0.SkuDef CNC3_english_1.0.SkuDef
mkdir -p Lang-french/1.0

echo "add-big French.big" > Lang-french/1.0/config.txt
cp $REPERTOIRE/tmp/french.big Lang-french/1.0/French.big
mv Lang-english/1.0/English.big Lang-english/1.0/English-save.big
mv $REPERTOIRE/tmp/french.big Lang-english/1.0/English.big
echo "add-big ../Lang-french/1.0/French.big" >> RetailExe/1.0/config.txt
echo "REGEDIT4" > $REPERTOIRE/tmp/french.reg
echo "[HKEY_LOCAL_MACHINE\\Software\\Electronic Arts\\Command and Conquer 3]
\"Language\"=\"french\"
\"Locale\"=\"fr_FR\"
[HKEY_LOCAL_MACHINE\\Software\\Electronic Arts\\Electronic Arts\\Command and Conquer 3]
\"Language\"=\"french\"
[HKEY_CURRENT_USER\\Software\\Electronic Arts\\Electronic Arts\\Command and Conquer 3]
\"Language\"=\"french\"" >> $REPERTOIRE/tmp/french.reg
regedit $REPERTOIRE/tmp/french.reg
fi

if [ "$POL_LANG" == "de" ]; then
POL_SetupWindow_wait_next_signal "$LNG_WAIT_CONFIG" "Configuration"
cd $REPERTOIRE/tmp/
cabextract $CDROM/Langge~1.cab
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
mv $REPERTOIRE/tmp/cnc3_german_1.0.skudef CNC3_german_1.0.SkuDef
mv CNC3_english_1.0.SkuDef CNC3_english_1.0.SkuDef.save
cp CNC3_german_1.0.SkuDef CNC3_english_1.0.SkuDef
mkdir -p Lang-german/1.0

echo "add-big German.big" > Lang-german/1.0/config.txt
cp $REPERTOIRE/tmp/german.big Lang-french/1.0/German.big
mv Lang-english/1.0/English.big Lang-english/1.0/English-save.big
mv $REPERTOIRE/tmp/german.big Lang-english/1.0/English.big
echo "add-big ../Lang-german/1.0/German.big" >> RetailExe/1.0/config.txt
echo "[HKEY_LOCAL_MACHINE\\Software\\Electronic Arts\\Command and Conquer 3]
\"Language\"=\"german\"
\"Locale\"=\"de_DE\"
[HKEY_LOCAL_MACHINE\\Software\\Electronic Arts\\Electronic Arts\\Command and Conquer 3]
\"Language\"=\"german\"
[HKEY_CURRENT_USER\\Software\\Electronic Arts\\Electronic Arts\\Command and Conquer 3]
\"Language\"=\"german\"" > $REPERTOIRE/tmp/german.reg
regedit $REPERTOIRE/tmp/german.reg
fi

cd $REPERTOIRE/ressources/
if [ ! -e $REPERTOIRE/ressources/microsoft.vc80.crt.zip ]; then
POL_SetupWindow_download "$LNG_VC80_DL" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "http://www.sweetpotatosoftware.com/files/microsoft.vc80.crt.zip"
fi
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
unzip $REPERTOIRE/ressources/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"

POL_SetupWindow_menu_list "$LNG_CNC3_VMS" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "32-64-128-256-384-512-768-1024-2048" "-" "64"
VMS="$APP_ANSWER"
if [ "$VMS" -lt "64" ]; then
POL_SetupWindow_message_image "$LNG_VMS_ERROR" "Command And Conquer 3 - Tiberium Wars - Kane Edition" "$PLAYONLINUX/themes/tango/warning.png"
fi

echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > $REPERTOIRE/tmp/vms.reg
echo "\"VideoMemorySize\"=\"$VMS\"" >> $REPERTOIRE/tmp/vms.reg
regedit $REPERTOIRE/tmp/vms.reg
echo "[HKEY_CURRENT_USER\Software\Wine\Direct3D]" > $REPERTOIRE/tmp/d3d.reg
echo "\"OffscreenRenderingMode\"=\"fbo\"" >> $REPERTOIRE/tmp/d3d.reg
echo "\"UseGLSL\"=\"enabled\"" >> $REPERTOIRE/tmp/d3d.reg
regedit $REPERTOIRE/tmp/d3d.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

cd $REPERTOIRE/tmp/
rm -rf *
cd $WINEPREFIX/drive_c/windows/temp/
rm -rf *

POL_SetupWindow_make_shortcut "CommandAndConquer3-KaneEdition" "Program Files/Electronic Arts/Command & Conquer 3/" "CNC3.exe" "CommandAndConquer3.xpm" "Command And Conquer 3 - Tiberium Wars - Kane Edition"
Set_WineVersion_Assign "1.1.6-patched" "Command And Conquer 3 - Tiberium Wars - Kane Edition"
POL_SetupWindow_Close
exit

Il n'y a rien à voir ici