El Foro

Colin Mcrae Rally 04

Autor Respuestas
thib25 Saturday 27 February 2010 at 18:41
thib25Anonymous

EDIT : Voici la dernière version du script :
#!/bin/bash
# Date : (2010-01-27  16-10)
# Last revision : (2010-03-05 18-35)
# Wine version used : 1.1.37
# Distribution used to test : Ubuntu 9.10
# Author : thib25
# Licence : Retail 

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

NAME="Colin Mcrae Rally 04"
PREFIX="CMR4"

if [ "$POL_LANG" == "fr" ]; then
INSTALLATION="Installation en cours..."
POLEND="$NAME a été installé avec succès"
ATTENTION="Veuillez noter que ce jeu a une protection anti-copie\\net que malheuresement, cela empêche wine de lancer le jeu.\\n\\nPlayOnLinux ne fournira aucune aide concernant tout travail\\nillégal."
ATTENTIONT="Note à propos de la protection anti-copie"
else
INSTALLATION="Installation in progress..."
POLEND="$NAME has been installed succesfully"
ATTENTION="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."
ATTENTIONT="Note about copy protection" 
fi

wget http://upload.wikimedia.org/wikipedia/en/7/75/Colin_McRae_Rally_04.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$NAME" "Codemasters" "http:://www.codemasters.com/" "thib25" "$PREFIX"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate

POL_SetupWindow_install_wine "1.1.37"
Use_WineVersion "1.1.37"

#Création Icone
convert "$CDROM/CMR4.ico" -geometry 32x32 "$REPERTOIRE/icones/32/$NAME"

PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

POL_SetupWindow_wait_next_signal "$INSTALLATION" "$NAME"
wine start /unix "$CDROM/setup.exe"
POL_SetupWindow_detect_exit

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Codemasters/Colin McRae Rally 04/" "cmr4.exe" "$NAME" "$NAME"

Set_WineVersion_Assign "1.1.37" "$NAME"

POL_SetupWindow_message_image "$ATTENTION" "$ATTENTIONT" "$PLAYONLINUX/themes/tango/warning.png"
POL_SetupWindow_message "$POLEND" "$NAME"

POL_SetupWindow_Close
exit

[secret]Bonjour voilà j'ai créé un script pour Colin Mcrae Rally 04, ce jeu marche plutôt bien avec wine mais j'ai un problème avec mon script. En effet le jeu est sur 4 CD et je suis obligé de copier les fichiers dans un dossier temporaire pour pouvoir installer le jeu car je ne peux pas éjecter le cd. Le problème se situe au niveau de la copie des cd 2 et 3, j'ai droit à :
cp: ne peut créer le fichier régulier `CMR4setup/': est un dossierou
cp: ne peut créer le fichier régulier `./CMR4setup': Permission non accordée
Voici le script :
#!/bin/bash
# Date : (2010-01-27  16-10)
# Last revision : (2010-01-27 16-10)
# Wine version used : 1.1.37
# Distribution used to test : Ubuntu 9.10
# Author : thib25
# Licence : Retail 

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

NAME="Colin Mcrae Rally 04"
PREFIX="CMR4"

if [ "$POL_LANG" == "fr" ]; then
INSTALLATION="Installation en cours..."
POLEND="$NAME a été installé avec succès"
ATTENTION="Veuillez noter que ce jeu a une protection anti-copie\\net que malheuresement, cela empêche wine de lancer le jeu.\\n\\nPlayOnLinux ne fournira aucune aide concernant tout travail\\nillégal."
ATTENTIONT="Note à propos de la protection anti-copie"
CMR4_WAIT="Patientez pendant la préparation de l'installation"
CMR4_CD1="Veuillez insérer le CD 1 et cliquer sur Suivant"
CMR4_CD2="Veuillez insérer le CD 2 et cliquer sur Suivant"
CMR4_CD3="Veuillez insérer le CD 3 et cliquer sur Suivant"

else
INSTALLATION="Installation in progress..."
POLEND="$NAME has been installed succesfully"
ATTENTION="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."
ATTENTIONT="Note about copy protection" 
CMR4_WAIT="Please wait during the installation's preparation"
CMR4_CD1="Please insert the CD 1 and click on Next"
CMR4_CD2="Please insert the CD 2 and click on Next"
CMR4_CD3="Please insert the CD 3 and click on Next"

fi

wget http://upload.wikimedia.org/wikipedia/en/7/75/Colin_McRae_Rally_04.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$NAME" "Codemasters" "http:://www.codemasters.com/" "thib25" "$PREFIX"

select_prefix "$REPERTOIRE/winprefix/$PREFIX"
POL_SetupWindow_prefixcreate

POL_SetupWindow_install_wine "1.1.37"

PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

# Copie CD1
POL_SetupWindow_message "$CMR4_CD1"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

cd "$REPERTOIRE/tmp"
mkdir CMR4setup

POL_SetupWindow_wait_next_signal "$CMR4_WAIT" "$NAME"
cp -vR $CDROM/* ./CMR4setup/
POL_SetupWindow_detect_exit

# Copie CD2
POL_SetupWindow_message "$CMR4_CD2"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "data3.cab"

POL_SetupWindow_wait_next_signal "$CMR4_WAIT" "$NAME"
cp -vR $CDROM/* ./CMR4setup/
POL_SetupWindow_detect_exit

# Copie CD3
POL_SetupWindow_message "$CMR4_CD3"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "data4.cab"

POL_SetupWindow_wait_next_signal "$CMR4_WAIT" "$NAME"
cp -vR $CDROM/* ./CMR4setup/
POL_SetupWindow_detect_exit

cd CMR4setup
POL_SetupWindow_wait_nex_signal "$INSTALLATION" "$NAME"
wine "setup.exe"
POL_SetupWindow_detect_exit

rm -rf "$REPERTOIRE/tmp/CMR4setup"

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Codemasters/Colin McRae Rally 04/" "cmr4.exe" "" "$NAME"

Set_WineVersion_Assign "1.1.37" "$NAME"

POL_SetupWindow_message_image "$ATTENTION" "$ATTENTIONT" "$PLAYONLINUX/themes/tango/warning.png"
POL_SetupWindow_message "$POLEND" "$NAME"

POL_SetupWindow_Close
exit

Je pense que j'ai du faire une faute quelque part mais je ne sais pas où :sad: .[/secret]

Editado por: thib25

Berillions Monday 1 March 2010 at 19:24
Berillions

Peux-tu modifier ton script pour faire en sorte qu'il ne copie pas les 4 CD sur le disque dur mais qu'il lance l'installation à partir du CD 1. Avec un petit changement à faire.

Au lieu de faire :
wine "$CDROM/setup.exe"

Ecris cette ligne de commande :
wine start /unix "$CDROM/setup.exe"

Cette ligne de commande permet d'ejecter les cdroms correctement et re-teste ton script.

Merci

Editado por: Berillions


thib25 Tuesday 2 March 2010 at 10:26
thib25Anonymous

Bon bah ça marche super bien ta méthode, alors maintenant le jeu s'installe correctement et il marche correctement mis à part quelques légers problèmes de son ainsi que les vidéos qui ne s'affichent pas. Je vais essayer d'arranger ça;-). Sinon voici le script actuel :

#!/bin/bash
# Date : (2010-01-27  16-10)
# Last revision : (2010-01-27 16-10)
# Wine version used : 1.1.37
# Distribution used to test : Ubuntu 9.10
# Author : thib25
# Licence : Retail 

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

NAME="Colin Mcrae Rally 04"
PREFIX="CMR4"

if [ "$POL_LANG" == "fr" ]; then
INSTALLATION="Installation en cours..."
POLEND="$NAME a été installé avec succès"
ATTENTION="Veuillez noter que ce jeu a une protection anti-copie\\net que malheuresement, cela empêche wine de lancer le jeu.\\n\\nPlayOnLinux ne fournira aucune aide concernant tout travail\\nillégal."
ATTENTIONT="Note à propos de la protection anti-copie"
else
INSTALLATION="Installation in progress..."
POLEND="$NAME has been installed succesfully"
ATTENTION="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."
ATTENTIONT="Note about copy protection" 
fi

wget http://upload.wikimedia.org/wikipedia/en/7/75/Colin_McRae_Rally_04.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$NAME" "Codemasters" "http:://www.codemasters.com/" "thib25" "$PREFIX"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate

POL_SetupWindow_install_wine "1.1.37"

#Création Icone
convert "$CDROM/CMR4.ico" -geometry 32x32 "$REPERTOIRE/icones/32/$NAME"

PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

POL_SetupWindow_wait_nex_signal "$INSTALLATION" "$NAME"
wine start /unix "$CDROM/setup.exe"
POL_SetupWindow_detect_exit

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Codemasters/Colin McRae Rally 04/" "cmr4.exe" "$NAME" "$NAME"

Set_WineVersion_Assign "1.1.37" "$NAME"

POL_SetupWindow_message_image "$ATTENTION" "$ATTENTIONT" "$PLAYONLINUX/themes/tango/warning.png"
POL_SetupWindow_message "$POLEND" "$NAME"

POL_SetupWindow_Close
exit