Das Forum

[Script]Freelancer

Autor Antworten
Berillions Sunday 14 June 2009 at 20:33
Berillions

Bonsoir,

Me revoilà pour un second script pour PoL. Cette fois-ci, il s'agit de Freelancer. Mais il se trouve qu'il existe un petit inconvénient. En effet, il n'a pas l'air de fonctionner sous un PC ayant comme carte graphique une ATI.

Car j'ai une ATI 4850HD et Wine stoppe lorsque je lance une nouvelle partie. Contrairement au fait que j'arrive à jouer convenablement avec le PC de mes parents qui ont une Nvidia 6600Gt.

Bon, trève de bla-bla voici le script qui je pense devra être modifié sous l'oeil attentif d'experts :p

#!/bin/bash

# Date: (2009-06-14 19-45)
# Last revision: (2009-06-17 16-50)
# Distribution used to test: Ubuntu Jaunty
# Wine version used: 1.1.22 
# Licence: Free
# Author: Berillions

PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3} 

#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0 

#Charger les librairies
source "$PLAYONLINUX/lib/sources"

Title="Freelancer"

if [ "$POL_LANG" == "fr" ]; then
LNG_DLL="PlayOnLinux est en train de télécharger les .dll nécessairent au bon fonctionnement du jeu"
LNG_MEM="La taille de votre mémoire graphique?"
LNG_WAIT_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du jeu sera
terminée sous peine de devoir recommencer l'installation."
else
LNG_MEM="How much memory do your graphic card have got?."
LNG_DLL="Downloading .dll to launch correctly the game"
LNG_WAIT_END="Click on \\"Next\\" ONLY when the game installation
is finished or you will have to redo the installation."
fi

POL_SetupWindow_Init "" "" 
 
#Presentation
POL_SetupWindow_presentation "Freelancer" "Microsoft" "http://www.microsoft.com/games/PC/freelancer.asp" "Berillions" "Freelancer"

#Installation de Wine
POL_SetupWindow_install_wine "1.1.22"

#Préparation de Wine
select_prefix "$REPERTOIRE/wineprefix/Freelancer"
POL_SetupWindow_prefixcreate
 
cd "$REPERTOIRE/ressources"
#téléchargement DllFreelancer.zip (size 1.56MB)
if [ ! -e DllFreelancer.zip ]; then
POL_SetupWindow_download "$LNG_DLL" "$Title" "http://sd-1.archive-host.com/membres/up/51568577817080088/DllFreelancer.zip"
fi 

#téléchargement winetricks
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "f8502d31624862bc29f1143473e9a79580176981" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi

#téléchargement DirectX
if [ ! -e "$HOME/.winetrickscache/directx_mar2009_redist.exe" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "Downloading DirectX 9.0c libraries" "$Title" "http://download.microsoft.com/download/3/C/4/3C46A69A-CB0F-4CCA-B1E8-248D43270D5F/directx_mar2009_redist.exe"
fi

#téléchargement vcrun06
if [ ! -e "$HOME/.winetrickscache/vc6redistsetup_enu.exe" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "Downloading vcrun6" "$Title" "http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe"
fi

#téléchargement msxml3
if [ ! -e "$HOME/.winetrickscache/msxml3.msi" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "Downloading msxml3" "$Title" "http://download.microsoft.com/download/8/8/8/888f34b7-4f54-4f06-8dac-fa29b19f33dd/msxml3.msi"
fi

#téléchargement msxml4
if [ ! -e "$HOME/.winetrickscache/msxml4-KB927978-enu.exe" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "Downloading msxml4" "$Title" "http://download.microsoft.com/download/e/2/e/e2e92e52-210b-4774-8cd9-3a7a0130141d/msxml4-KB927978-enu.exe"
fi

#téléchargement msxml6
if [ ! -e "$HOME/.winetrickscache/msxml6.msi" ]; then
mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
POL_SetupWindow_download "Downloading msxml6" "$Title" "http://download.microsoft.com/download/2/e/0/2e01308a-e17f-4bf9-bf48-161356cf9c81/msxml6.msi"
fi

#Déplacement des fichiers .dll
cd "$WINEPREFIX/drive_c/windows/system32"
unzip "$REPERTOIRE/ressources/DllFreelancer.zip"

cd "$REPERTOIRE/ressources"

#Installation Directx9
POL_SetupWindow_wait_next_signal "Installing DirectX 9.0c libraries..." "$Title"
bash winetricks -q directx9
POL_SetupWindow_detect_exit

POL_SetupWindow_reboot

#Installation vcrun06
POL_SetupWindow_wait_next_signal "Installing VCrun06" "$Title"
bash winetricks -q vcrun6
POL_SetupWindow_detect_exit

#Installation msxml3
POL_SetupWindow_wait_next_signal "Installing MSXML3" "$Title"
bash winetricks -q msxml3
POL_SetupWindow_detect_exit

#Installation msxml4
POL_SetupWindow_wait_next_signal "Installing MSXML4" "$Title"
bash winetricks -q msxml4
POL_SetupWindow_detect_exit

#Installation msxml6
POL_SetupWindow_wait_next_signal "Installing MSXML6" "$Title"
bash winetricks -q msxml6
POL_SetupWindow_detect_exit

#Configuration de Wine
Set_OS winXP

#Taille de la mémoire graphique
POL_SetupWindow_menu_list "$LNG_MEM" "$Title" "32 64 128 256 384 512 768 1024 2048" " "
VMS="$APP_ANSWER"

#Réglage DirectDrawRenderer
cd "$WINEPREFIX/drive_c/windows/temp"
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > OGL.reg
echo "\\"Multisampling\\"=\\"enabled\\"" >> OGL.reg
echo "\\"OffscreenRenderingMode\\"=\\"fbo\\"" >> OGL.reg
echo "\\"PixelShaderMode\\"=\\"enabled\\"" >> OGL.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> OGL.reg
regedit OGL.reg

#Détection du cd-rom
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "SETUP.EXE" 

#Lancement de l'installeur
wine $CDROM/SETUP.EXE
 
POL_SetupWindow_message "$LNG_WAIT_END" "$Title"

#Création Launcher 
POL_SetupWindow_make_shortcut "Freelancer" "$PROGRAMFILES/Microsoft Games/Freelancer/EXE" "Freelancer.exe" "" "Freelancer"

Set_WineVersion_Assign "1.1.22" "Freelancer"

POL_SetupWindow_Close
exit

Editiert von: Berillions


Quentin PÂRIS Sunday 14 June 2009 at 20:35
Quentin PÂRISAnonymous

echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]" > override.reg
echo "\\"d3d8\\"=\\"builtin\\"" >> override.reg
echo "\\"d3d9\\"=\\"builtin\\"" >> override.reg
echo "\\"d3dim\\"=\\"native\\"" >> override.reg
echo "\\"d3drm\\"=\\"native\\"" >> override.reg
echo "\\"d3dx8\\"=\\"native\\"" >> override.reg
echo "\\"d3dxof\\"=\\"native\\"" >> override.reg
echo "\\"dciman32\\"=\\"native\\"" >> override.reg
echo "\\"ddrawex\\"=\\"native\\"" >> override.reg
echo "\\"devenum\\"=\\"native\\"" >> override.reg
echo "\\"dinput\\"=\\"builtin\\"" >> override.reg
echo "\\"dinput8\\"=\\"native\\"" >> override.reg
echo "\\"dmband\\"=\\"native\\"" >> override.reg
echo "\\"dmcompos\\"=\\"native\\"" >> override.reg
echo "\\"dmime\\"=\\"native\\"" >> override.reg
echo "\\"dmloader\\"=\\"native\\"" >> override.reg
echo "\\"dmscript\\"=\\"native\\"" >> override.reg
echo "\\"dmstyle\\"=\\"native\\"" >> override.reg
echo "\\"dmsynth\\"=\\"native\\"" >> override.reg
echo "\\"dmusic\\"=\\"native\\"" >> override.reg
echo "\\"dmusic32\\"=\\"native\\"" >> override.reg
echo "\\"dnsapi\\"=\\"native\\"" >> override.reg
echo "\\"dplay\\"=\\"native\\"" >> override.reg
echo "\\"dpnaddr\\"=\\"native\\"" >> override.reg
echo "\\"dpnet\\"=\\"native\\"" >> override.reg
echo "\\"dpnhpast\\"=\\"native\\"" >> override.reg
echo "\\"dpnlobby\\"=\\"native\\"" >> override.reg
echo "\\"dsound\\"=\\"builtin\\"" >> override.reg
echo "\\"dswave\\"=\\"native\\"" >> override.reg
echo "\\"dxdiagn\\"=\\"native\\"" >> override.reg
echo "\\"mscoree\\"=\\"native\\"" >> override.reg
echo "\\"msdmo\\"=\\"native\\"" >> override.reg
echo "\\"msxml3\\"=\\"native, builtin\\"" >> override.reg
echo "\\"qcap\\"=\\"native\\"" >> override.reg
echo "\\"quartz\\"=\\"native\\"" >> override.reg
echo "\\"streamci\\"=\\"native\\"" >> override.reg

Ça j'aime pas trop ...

Aussi il faudrait que ton script soit par défaut en anglais
Berillions Sunday 14 June 2009 at 20:41
Berillions

Ok, mais comment faire pour mettre en anglais par défaut?
Puis pour le fichier .reg avec les DLL, je vois pas vraiment comment faire d'une autre manière.

Pour cela que je t'ai posé la question hier soir :D

Editiert von: Berillions


Quentin PÂRIS Sunday 14 June 2009 at 20:47
Quentin PÂRISAnonymous

Je t'ai répondu pour les DLL ;)

Pour la langue en fait c'est bon
Berillions Sunday 14 June 2009 at 20:56
Berillions

Tiens, chose interressante. NSLW m'a expliqué que je n'étais pas obligé de faire cette partie d'écriture dans un fichier .reg . Car winetricks le fait automatique.

Et je viens de tester en ayant supprimé cette partie et cela fonctionne.

Editiert von: Berillions


Ghostofkendo Wednesday 17 June 2009 at 12:13
Ghostofkendo

Salut Berillions,

- Même remarque à propos du "1 4" en fin de la commande de présentation qu'ICI.

- Il n'y a plus besoin de mettre cfg_check dans les scripts (comme tu peux le voir ).

Bye
Berillions Wednesday 17 June 2009 at 16:52
Berillions

Petites corrections effectués. En attente du left.jpg pour en faire un script officiel.

obi1-46 Friday 19 June 2009 at 21:55
obi1-46

Berillions, j'ai travaillé pour toi sur l'autre post ;)

GNU/Linux, y'a moins bien mais c'est plus cher!
Berillions Friday 19 June 2009 at 22:39
Berillions

Ok je te remercie ;)

nohl Tuesday 19 February 2013 at 14:29
nohlAnonymous

bonjour, j'ai essayé d'installer Freelancer avec ton script, mais il ne marche pas...ou plus.

Quand je vais dans débug, voici ce que j'ai : 

Running wine-1.1.22 Freelancer.exe (Working directory : /home/max/.PlayOnLinux/wineprefix/Freelancer/drive_c/Program Files/Microsoft Games/Freelancer/EXE)
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  18 (X_ChangeProperty)
  Resource id in failed request:  0x220000a
  Serial number of failed request:  533
  Current serial number in output stream:  536