#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
if [ "$POL_LANG" == "fr" ]; then
LNG_CNC3_UPDATE_WELCOME="Bienvenue dans le script d'installation du patch 1.09 pour Command & Conquer 3 - Kane Edition"
LNG_CNC3_UPDATE_INFO1="Je vais télécharger le patch sur le site officiel. Cette opération peut nécessiter du temps.\nCliquez sur valider pour commencer."
LNG_CNC3_UPDATE_DL="Patientez pendant le téléchargement du patch...\nCette opération peut prendre quelques minutes selon la vitesse de votre connexion."
LNG_CNC3_UPDATE_INSTALL="Téléchargement terminé. Installation du patch"
LNG_CNC3_UPDATE_FINISHED="Le patch a été correctement installé"
else
LNG_CNC3_UPDATE_WELCOME="Welcome in the patch 1.09 Installation script for Command & Conquer 3 - Kane Edition"
LNG_CNC3_UPDATE_INFO1="I will download the path on the official website. This opération may take time.\nClick to begin."
LNG_CNC3_UPDATE_DL="Wait while the patch is downloading...\nThis operation can take time, depending of you connexion."
LNG_CNC3_UPDATE_INSTALL="Donwload finished. Patch installation will begin"
LNG_CNC3_UPDATE_FINISHED="Patch installed successfully"
fi
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/cnc3/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_free_presentation "Command And Conquer 3 - Tiberium Wars" "$LNG_CNC3_UPDATE_WELCOME"
POL_SetupWindow_checkexist()
{
if [ ! -e $REPERTOIRE/wineprefix/$1 ]; then
if [ "$POL_LANG" == "fr" ]; then
LNG_PREFIX_NOT_EXIST="Le jeu n'est pas installé."
else
LNG_PREFIX_NOT_EXIST="Game is not installed."
fi
POL_SetupWindow_message_image "$LNG_PREFIX_NOT_EXIST" "Game Checker" "$PLAYONLINUX/themes/tango/warning.png"
exit
fi
}
POL_SetupWindow_checkexist "CommandAndConquer3-KaneEdition"
Use_WineVersion "1.1.6-patched"
select_prefixe "$REPERTOIRE/wineprefix/CommandAndConquer3-KaneEdition/"
POL_SetupWindow_message "$LNG_CNC3_UPDATE_INFO1" "Command And Conquer 3 - Tiberium Wars"
cd $REPERTOIRE/tmp
if [ "$POL_LANG" == "fr" ]; then
#POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_french.exe"
echo "toto"
elif [ "$POL_LANG" == "de" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_german(KaneEdition).exe"
elif [ "$POL_LANG" == "es" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_spanish.exe"
elif [ "$POL_LANG" == "it" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_italian.exe"
elif [ "$POL_LANG" == "ru" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_russian.exe"
elif [ "$POL_LANG" == "pl" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_polish.exe"
elif [ "$POL_LANG" == "hu" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_hungarian.exe"
elif [ "$POL_LANG" == "ko" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_korean.exe"
elif [ "$POL_LANG" == "cs" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_czech.exe"
elif [ "$POL_LANG" == "nl" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_dutch.exe"
elif [ "$POL_LANG" == "sv" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_swedish.exe"
elif [ "$POL_LANG" == "th" ]; then
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_thai.exe"
else
POL_SetupWindow_download "$LNG_CNC3_UPDATE_DL" "Command And Conquer 3 - Tiberium Wars" "ftp://ftp.ea.com/pub/eapacific/cnc3/CNC3_patch109_english.exe"
fi
POL_SetupWindow_message "$LNG_CNC3_UPDATE_INSTALL" "Command And Conquer 3 - Tiberium Wars"
if [ "$POL_LANG" == "fr" ]; then
wine CNC3_patch109_french.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-french/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-french/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-french/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-french/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-french/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-french/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_french_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_french.exe
elif [ "$POL_LANG" == "de" ]; then
wine "CNC3_patch109_german(KaneEdition).exe"
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-german/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-german/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-german/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-german/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-german/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-german/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_german_1.9.SkuDef CNC3_english_1.9.SkuDef
rm "$REPERTOIRE/tmp/CNC3_patch109_german(KaneEdition).exe"
elif [ "$POL_LANG" == "es" ]; then
wine CNC3_patch109_spanish.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-spanish/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-spanish/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-spanish/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-spanish/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-spanish/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-spanish/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_spanish_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_spanish.exe
elif [ "$POL_LANG" == "it" ]; then
wine CNC3_patch109_italian.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-italian/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-italian/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-italian/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-italian/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-italian/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-italian/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_italian_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_german.exe
elif [ "$POL_LANG" == "ru" ]; then
wine CNC3_patch109_russian.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-russian/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-russian/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-russian/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-russian/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-russian/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-russian/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_russian_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_russian.exe
elif [ "$POL_LANG" == "pl" ]; then
wine CNC3_patch109_polish.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-polish/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-polish/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-polish/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-polish/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-polish/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-polish/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_polish_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_polish.exe
elif [ "$POL_LANG" == "hu" ]; then
wine CNC3_patch109_hungarian.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-hungarian/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-hungarian/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-hungarian/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-hungarian/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-hungarian/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-hungarian/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_hungarian_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_hungarian.exe
elif [ "$POL_LANG" == "ko" ]; then
wine CNC3_patch109_korean.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-korean/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-korean/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-korean/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-korean/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-korean/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-korean/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_korean_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_korean.exe
elif [ "$POL_LANG" == "cs" ]; then
wine CNC3_patch109_czech.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-czech/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-czech/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-czech/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-czech/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-czech/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-czech/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_czech_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_czech.exe
elif [ "$POL_LANG" == "nl" ]; then
wine CNC3_patch109_dutch.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-dutch/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-dutch/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-dutch/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-dutch/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-dutch/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-dutch/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_dutch_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_dutch.exe
elif [ "$POL_LANG" == "sv" ]; then
wine CNC3_patch109_swedish.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-swedish/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-swedish/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-swedish/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-swedish/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-swedish/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-swedish/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_swedish_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_swedish.exe
elif [ "$POL_LANG" == "th" ]; then
wine CNC3_patch109_thai.exe
cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/
echo "add-big ../Lang-thai/1.1/patch1.big" >> RetailExe/1.1/config.txt
echo "add-big ../Lang-thai/1.5/patch5.big" >> RetailExe/1.5/config.txt
echo "add-big ../Lang-thai/1.6/patch5.big" >> RetailExe/1.6/config.txt
echo "add-big ../Lang-thai/1.7/patch7.big" >> RetailExe/1.7/config.txt
echo "add-big ../Lang-thai/1.8/patch8.big" >> RetailExe/1.8/config.txt
echo "add-big ../Lang-thai/1.9/patch9.big" >> RetailExe/1.9/config.txt
cp CNC3_thai_1.9.SkuDef CNC3_english_1.9.SkuDef
rm $REPERTOIRE/tmp/CNC3_patch109_thai.exe
else
wine CNC3_patch109_english.exe
rm $REPERTOIRE/tmp/CNC3_patch109_english.exe
fi
## Cursor fix for vanilla wine
#cd $REPERTOIRE/tmp/
#if [ ! -e $REPERTOIRE/tmp/cnc3-cursors.tar.gz ]; then
#wget $SITE/divers/cnc3-cursors.tar.gz
#fi
#cd $WINEPREFIX/drive_c/Program\ Files/Electronic\ Arts/Command\ \&\ Conquer\ 3/RetailExe/1.9/Data/Cursors/
#mkdir original-cursors
#mv *.ani original-cursors
#tar zxfv $REPERTOIRE/tmp/cnc3-cursors.tar.gz
POL_SetupWindow_message "$LNG_CNC3_UPDATE_FINISHED" "Command And Conquer 3 - Tiberium Wars"
POL_SetupWindow_Close
exit