Scripts
Script for Track Mania Nations For Ever
#!/bin/bash
#Vérifier que PlayOnLinux est bien exécuté avant
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
#Charger les librairies
source "$PLAYONLINUX/lib/sources"
#Verifier les dépendences
cfg_check
#presentation
presentation "TrackMania - Nations For Ever" "Focus Home Interactive" "http://www.trackmaniaunited.com/" "Chriswill" "TMNations" 1 21
if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
LNG_QUEST_TMN="Où se trouve le fichier d'installation de TrackMania - Nations Forever ?"
LNG_QUEST_DL="le fichier d'installation de TrackMania Nations Forever est necessaire avant de continuer....
L'avez vous téléchargé ?
si tel n'est pas le cas, cliquez sur non et rendez vous sur http://www.trackmaniaunited.com/"
LNG_AVE_DX="Il est necessaire d'installer une version complète de directxpour assurer un fonctionnement correct du jeu"
LNG_DLL_DL="Téléchargement des Dll nécessaires..."
LNG_DLL_INST="Installation des Dll"
LNG_DLL_INSC="Inscription des Dll dans la base de registre"
LNG_DX_DL=" Téléchargement de Directx Mars 2008.....
L'installation débutera à la suite"
LNG_DX2_INST=" Une seconde installation de la même version de directx est nécessaire......"
LNG_TMN_INST="Cliquez pour commencer l'installation du jeu.
ATTENTION
A la fin du programme d'installation, Veillez à quitter sans lancer le jeu (case à décocher)"
LNG_REG_WINE="réglage des paramètres de wine pour l'utilisation du jeu"
LNG_SND_DL="Téléchargement et installation de la DLL gèrant le son"
LNG_PARAM_TMN="Un fichier Sounds_Settings comportant la configuration à appliquer pour le son a été créé
dans le dossier TrackMania de votre répertoire personnel ...."
else
LNG_QUEST_TMN="Where is the installation file of TrackMania - Nations Forever ?"
LNG_QUEST_DL="The Track mania Nations for ever file is needed before to continue....
did you download it ?
in case of not, click on no and go to http://www.trackmaniaunited.com/"
LNG_AVE_DX="It's necessary to install a complete version of directx to be sure that the game will run correctly"
LNG_DLL_DL="Downloading of necessary DLL ...."
LNG_DLL_INST="DLL installation ...."
LNG_DLL_INSC="DLL inscription in registry"
LNG_DX_DL=" Download of Directx Mars 2008 will begin.....
Installation of the game will begin after"
LNG_DX2_INST="Directx must be installed a second time......"
LNG_TMN_INST="Click on next to begin the game's installation.
BE CARREFULL
At the end of the installation's software, Do not run the game by put off the cross in the box"
LNG_REG_WINE="settings of wine to run the game"
LNG_SND_DL="Downloading and installation of the DLL file for the sound"
LNG_PARAM_TMN="A file named Sounds_Settings that include the settings for the sound was created
in the TrackMania's file of your personal's directory ...."
fi
# Avertissement
REPONSE=$(question "$LNG_QUEST_DL" "" 1 17)
if [ "$REPONSE" = "1" ]
then
exit 0
fi
#Préparation de Wine
mkdir -p $REPERTOIRE/wineprefix/TMNations
select_prefixe "$REPERTOIRE/wineprefix/TMNations"
creer_prefixe 2 17
Set_OS "win2k"
simuler_reboot
message "$LNG_AVE_DX" "" 3 17
#Directx
#####preparation
cd $REPERTOIRE/tmp
message "$LNG_DLL_DL" "" 4 17
if [ ! -e $REPERTOIRE/tmp/mscoree.dll.zip ]; then
telecharger "mscoree.dll.zip" "http://www.dllbank.com/zip/m/mscoree.dll.zip" "" 5 17
fi
if [ ! -e $REPERTOIRE/tmp/streamci.dll.zip ]; then
telecharger "streamci.dll.zip" "http://www.dllbank.com/zip/s/streamci.dll.zip" "" 6 17
fi
cd $REPERTOIRE/wineprefix/TMNations/drive_c/windows/system32/
message "$LNG_DLL_INST" "" 7 17
unzip $REPERTOIRE/tmp/mscoree.dll.zip
unzip $REPERTOIRE/tmp/streamci.dll.zip
#inscription des dll de directx
echo "[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]" > $REPERTOIRE/tmp/dll.reg
echo "\"fusion\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"d3d8\"=\"builtin\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"d3d9\"=\"builtin\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"d3dim\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"d3drm\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"d3dx8\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"d3dxof\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dciman32\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"ddrawex\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"devenum\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dinput\"=\"builtin\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dinput8\"=\"builtin\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmband\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmcompos\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmime\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmloader\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmscript\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmstyle\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmsynth\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmusic\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dmusic32\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dnsapi\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dplay\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dplayx\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dpnaddr\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dpnet\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dpnhpast\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dpnlobby\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dsound\"=\"builtin\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dswave\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"dxdiagn\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"mscoree\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"msdmo\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"qcap\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"quartz\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
echo "\"streamci\"=\"native\"" >> $REPERTOIRE/tmp/dll.reg
cd $REPERTOIRE/tmp
message "$LNG_DLL_INSC" "" 8 17
regedit dll.reg
####installation
cd $REPERTOIRE/tmp
message "$LNG_DX_DL" "" 9 17
if [ ! -e $REPERTOIRE/tmp/directx_mar2008_redist.exe ]; then
telecharger "Directx 9.0c mars 2008" "http://download.microsoft.com/download/6/4/c/64c3d3d6-c5da-47eb-9db4-86e45b9f579e/directx_mar2008_redist.exe" "" 10 17
fi
mkdir directx_tmp
cabextract directx_mar2008_redist.exe -d $REPERTOIRE/tmp/directx_tmp
cd directx_tmp
wine DXSETUP.exe
###seconde installation
message "$LNG_DX2_INST" "" 11 17
wine DXSETUP.exe
simuler_reboot
# installation Track Mania
message "$LNG_TMN_INST" "" 12 17
CHEMIN=$(selectionner_fichier "$LNG_QUEST_TMN" "" 13 17)
wine "$CHEMIN"
#reglage de wine
message "$LNG_REG_WINE" "" 14 17
Set_SoundDriver "oss"
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > $REPERTOIRE/tmp/reglages.reg
echo "\"DirectDrawRenderer\"=\"opengl\"" >> $REPERTOIRE/tmp/reglages.reg
echo "\"OffscreenRenderingMode\"=\"backbuffer\"" >> $REPERTOIRE/tmp/reglages.reg
echo "\"PixelShaderMode\"=\"disabled\"" >> $REPERTOIRE/tmp/reglages.reg
echo "\"RenderTargetLockMode\"=\"auto\"" >> $REPERTOIRE/tmp/reglages.reg
echo "\"UseGLSL\"=\"enabled\"" >> $REPERTOIRE/tmp/reglages.reg
cd $REPERTOIRE/tmp
regedit reglages.reg
#déplacement de d3dx9_36.dll et d3dx30_30.dll
cp $REPERTOIRE/wineprefix/TMNations/drive_c/windows/system32/d3dx9_36.dll $REPERTOIRE/wineprefix/TMNations/drive_c/Program\ Files/TmNationsForever/
cp $REPERTOIRE/wineprefix/TMNations/drive_c/windows/system32/d3dx9_30.dll $REPERTOIRE/wineprefix/TMNations/drive_c/Program\ Files/TmNationsForever/
#remplacement de la dll existente
message "$LNG_SND_DL" "" 15 17
cd $REPERTOIRE/wineprefix/TMNations/drive_c/Program\ Files/TmNationsForever/
mv OpenAL32.dll OpenAL32.dll.old
telecharger "OPenAL32.dll" "http://schmatzler.de/openal32.dll" "" 16 17
mv openal32.dll OpenAL32.dll
#CREATION LANCEUR
creer_lanceur "TMNations" "Program Files/TmNationsForever" "TmForeverLauncher.exe" "" "Track Mania Nations For Ever"
#paramétrage Jeu
attention "$LNG_PARAM_TMN" "" 17 17
cd $HOME/TrackMania
#francais
echo "" >> SoundsSettings.txt
echo "au démarrage du jeu, un lanceur apparaît. Cliquez sur configurer > avancé > Audio (onglet)" > SoundsSettings.txt
echo "Materiel Audio = défaut , Qualité = Basse , décochez les autres cases " >> SoundsSettings.txt
echo "Cliquez sur sauvegarder par la suite" >> SoundsSettings.txt
#english
echo "" >> SoundsSettings.txt
echo "" >> SoundsSettings.txt
echo "When the game begins, a window appears. Click on Settings > Advanced > Sound (tab)" >> SoundsSettings.txt
echo "Audio Hardware = default , Quality = low , shoot the others crosses " >> SoundsSettings.txt
echo "click on save after...." >> SoundsSettings.txt
end_install
exit