El Foro

Age of Empires II : The Conquerors

la célèbre extension

Autor Respuestas
Ghostofkendo Monday 19 May 2008 at 22:44
Ghostofkendo

Salux,

Voici le script que j'ai fait pour l'extension d'AoE II, The Conquerors :
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"

cfg_check

#Game and script presentation
presentation "Age of Empires II : The Conquerors" "Microsoft" "http://www.microsoft.com/games/age2/default.htm" "Ghostofkendo" "AOE2" 1 5

#Language variables for the script's translation
if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
LNG_WAIT_END="Cliquez sur "Suivant" UNIQUEMENT lorsque l'installation est finie"
LNG_DL="Des dlls vont être téléchargées puis installées pour
faire fonctionner le multijoueur"
else
LNG_WAIT_END="Click on "Next" ONLY when the installation is finished"
LNG_DL="Some dlls will be downloaded then installed in order to
get the multiplayer working"
fi

#Check if Age of Empires II : The Age of Kings is installed
verifier_installation_e "AOE2"

#Ask for the path to the game's CD-Rom and check the installer's presence
Ask_For_cdrom 2 5
Check_cdrom "aocsetup.exe"

#Display a message to warn the user that the game won't run without a NoCD patch but using it is illigal. So we don't provide it and we aren't reponsible of what the user choose to do.
protection_warning

#Game's prefix selection
cd $REPERTOIRE/wineprefix/AOE2
select_prefix "$(pwd)"

#Set Wine with Windows 2000 parameters. Mandatory to run the game.
Set_OS "win2k"

#Game's installation
wine $CDROM/aocsetup.exe
message "$LNG_WAIT_END" "" 3 5

#Cleaning PlayOnLinux's temporary folder if needed
if [ -d "$REPERTOIRE/tmp/AOE2TheConquerors/" ]; then
rm $REPERTOIRE/tmp/AOE2TheConquerors/ -R
fi

#Creating a temporary folder for the remaining part of the installation
mkdir $REPERTOIRE/tmp/AOE2TheConquerors

#Download dlls, then move them and override them to get multiplayer working
cd $REPERTOIRE/tmp/AOE2TheConquerors/
download "$LNG_DL" "http://www.thehandofagony.com/alex/dll/dplaydlls-win98se.tar.bz2" "" 4 5 1
tar -xjvf dplaydlls-win98se.tar.bz2
mv *.dll $REPERTOIRE/wineprefix/AOE2/drive_c/windows/system32/
echo "[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]" > $REPERTOIRE/tmp/AOE2TheConquerors/dll.reg
echo "\"dplayx\"=\"native,builtin\"" >> $REPERTOIRE/tmp/AOE2TheConquerors/dll.reg
echo "\"dpnet\"=\"native,builtin\"" >> $REPERTOIRE/tmp/AOE2TheConquerors/dll.reg
echo "\"dpnhpast\"=\"native,builtin\"" >> $REPERTOIRE/tmp/AOE2TheConquerors/dll.reg
echo "\"dpwsockx\"=\"native,builtin\"" >> $REPERTOIRE/tmp/AOE2TheConquerors/dll.reg
regedit $REPERTOIRE/tmp/AOE2TheConquerors/dll.reg

#Simulate the Windows' reboot
simulate_reboot 5 5

#Create a launcher for the game if the user agree
creer_lanceur "AOE2" "Program Files/Microsoft Games/Age of Empires II/age2_x1/" "age2_x1.exe" "Age of Empires II The Conquerors.ico" "Age of Empires II : The Conquerors"

#Cleanning PlayOnLinux's temporary folder
rm $REPERTOIRE/tmp/AOE2TheConquerors/ -R

end_install
exit

L'icône pour le lanceur est disponible ICI (taille 16x16)

Attention, le jeu crash au lancement sans patch NoCD.

Je l'ai essayé avec Wine 0.9.61 sous openSUSE. Il fonctionne bien à l'exception des textes du menu principal qui sont en noir au lieu de blanc (il sont donc difficillement lisibles) et le jeu qui lag un tout petit peu (mais ça reste tout à fait jouable).

Testez ce script s'il vous plaît et faites vos retours d'expérience ici.

@+
Toumeno Friday 25 July 2008 at 19:18
Toumeno

J'ai converti le script en v3, je l'ai testé, il marche, je l'ai donc rentré dans les dépots POL. En auteur du script j'ai mis "Ghostofkendo and Toumeno"