Forums

Mirror's Edge

Auteur Réponses
Berillions Dimanche 11 Octobre 2009 à 17:57
Berillions

Hello, i create a script for Mirror's Edge. Works correctly, no graphic bug. :)

Wine version : 1.1.31
Distribution : Frugalware-Current
Carte Graphique : Nvidia, GeForce GTX275
Drivers carte graphique : 185.18.36

Icone du jeu :


#!/bin/bash
# Date: (2009-10-11 15-23)
# Distribution used to test: Frugalware Current
# Wine version used: 1.1.30 
# Author: Berillions
# Graphic Card : GeForce GTX275
# Drivers : 185.18.36

#fetching PROGRAMFILES environmental variable
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"
 

if [ "$POL_LANG" == "fr" ]; then
LNG_MEM="La taille de votre mémoire graphique? (Minimum 256Mo)"
LNG_WAIT_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du jeu sera\\nterminée sous peine de devoir recommencer l'installation."
LNG_FILEPATCH="Selectionner le patch à installer"
LNG_INST="Patch pour $Title installé avec succès"
LNG_ACTION="Que voulez-vous faire?"
LNG_WAIT="Patientez durant l'installation"
$LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 256Mo de mémoire."
else
LNG_MEM="How much memory do your graphic card have got? (Minimum 256Mo)"
LNG_WAIT_END="Click on \\"Next\\" ONLY when the game installation
is finished or you will have to redo the installation."
LNG_FILEPATCH="Select patch file"
LNGINST="Patch for $Title has been installed successfully"
LNG_ACTION="What do you want to do?"
LNG_WAIT="Wait during the installation"
LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 256Mo of memory."
fi

patch_mirror()
{
POL_SetupWindow_browse "$LNG_FILEPATCH" "$Title" ""
wine "$APP_ANSWER"
POL_SetupWindow_message "$LNG_INST" "$Title"
}

Prefix="MirrorsEdge"
Title="Mirror's Edge"

TEMP="$WINEPREFIX/drive_c/Program Files/EA Games/Mirror's Edge"

cd "$REPERTOIRE/tmp"
rm *.jpg
wget http://upload.wikimedia.org/wikipedia/en/9/97/Mirror%27s_Edge.jpg --output-document="$REPERTOIRE/tmp/$Prefix.jpg"
convert "$REPERTOIRE/tmp/$Prefix.jpg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpg"

POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
 
#Presentation
POL_SetupWindow_presentation "$Title" "EA Digital Illusions CE" "http://www.mirrorsedge.com/" "Berillions" "$Prefix"

#Installation de Wine
POL_SetupWindow_install_wine "1.1.31"

POL_SetupWindow_menu "$LNG_INST" "Actions" "Install Game~Patch Game" "~"
 
if [ "$APP_ANSWER" == "Patch Game" ]; then
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
patch_mirror
POL_SetupWindow_Close
exit
fi 

#Détection du cd-rom
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Setup.exe"

select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
 
#Taille de la mémoire graphique
POL_SetupWindow_menu_list "$LNG_NFSUC_VMS" "$FULL_NAME" "32-64-128-256-384-512-768-896-1024-2048" "-" "256"
VMS="$APP_ANSWER"

if [ "$VMS" -lt "256" ]; then
	POL_SetupWindow_message_image "$LNG_VMS_ERROR" "$Title" "$PLAYONLINUX/themes/tango/warning.png"
fi

#Réglage Direct3d
cd "$WINEPREFIX/drive_c/windows/temp"
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > OGL.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> OGL.reg
regedit OGL.reg
 
#Configuration de Wine
Set_OS winxp
 
wine "$CDROM/Setup.exe"

POL_SetupWindow_message "$LNG_WAIT_END" "$Title"

POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/EA Games/Mirror's Edge/Binaries/" "MirrorsEdge.exe" "" "$Title"

#Création Icone
convert  "$TEMP/ME_Icon.ico" -geometry 32X32 "$REPERTOIRE/icones/32/Mirror's Edge"

Set_WineVersion_Assign "1.1.31" "$Title"

POL_SetupWindow_message_image "Please note that this game has a copy protection system\\nand sadly, it prevents Wine from running the game.\\n\\nPlayOnLinux will not provide any help concerning any illegal\\nstuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"
 
POL_SetupWindow_Close
exit


Screens :

Edité par Berillions


NSLW Dimanche 11 Octobre 2009 à 18:56
NSLW

1) Use
select_prefix
instead of
select_prefixe
2) Did you though about quoting?
$CDROM/Setup.exe
3) :) I could bet I've seen that somewhere
POL_SetupWindow_menu "$LNG_INST" "Actions" "Patch game~Install Game" "~"
I found better way to do this which I already used in Fallout 3 script . It's better because it doesn't bother user about patching when he has to choose install.
4) Program Files won't work in all languages
5)
#Taille de la mémoire graphique
POL_SetupWindow_textbox "$LNG_MEM" "$Title"
VMS="$APP_ANSWER"
And what if user gives five hundred twelve
6) I think it's better to ask about CD-ROM before creating prefix.
Berillions Dimanche 11 Octobre 2009 à 20:50
Berillions

1-2) It's corrected

3) It's Good?

4) How to make if Program Files doesn't work in all languages ?

5) I think that it is better explained?
LNG_MEM="How much memory do your graphic card have got? (Ex : 512)"


6) It's corrected

NSLW Dimanche 11 Octobre 2009 à 22:44
NSLW

3) It's Good?

Citer

I don't understand
4)
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
then use $PROGRAMFILES for Program Files

5) I think that it is better explained?

Citer

As you wish but why not to use?
POL_SetupWindow_menu_list
Berillions Lundi 12 Octobre 2009 à 7:19
Berillions

3) It's correct? :p
4) Ok
5) For me, it is simpler      to write the graphic memory in the textbox... :p

NSLW Lundi 12 Octobre 2009 à 21:08
NSLW

3) It's correct? :p

Quote from Berillions

I thing you didn't caught that.

5) For me, it is simpler      to write the graphic memory in the textbox... :p

Quote from Berillions

It's new and script won't look the same, won't be unified. When I started writing scripts I looked how does other scriptors made it e.g. from this script i took the idea of taking memory graphic from user.
Berillions Lundi 12 Octobre 2009 à 22:12
Berillions

Ok Ok, so I'm going to correct it...

Gnom Dimanche 14 Aoüt 2011 à 12:26
GnomAnonymous

Hi!

I tried using your scripts. It installs the game allright, and the game works... kind of... First of all, the wine version set in the script gives a lot of graphic glitches (textures appearing and disappearing, 3D models floating on screen). This was easily fixed by using a more recent version.

But the real problem is, the game randomly freezes, usually somewhere between one and two minutes after gameplay started (by that I mean when the 3D engine is loaded, just after the video intro).

So, did you have to use any trick in order to make the game work ? I tried some things, but nothing worked so far...

Edité par Gnom

Vous êtes ici: Index > Your creations. > Mirror's Edge