El Foro

SIm City 3000

Autor Respuestas
thib25 Tuesday 7 September 2010 at 16:45
thib25Anonymous

Bonjour à tous, je viens de créer un script pour un jeu plus tout jeune, il s'agit de Sim City 3000. Ceci est la version normale du jeu, s'il existe d'autres versions du jeu comme ce fut le cas de son successeur merci de me le dire je verrais pour créer un script. Sinon je suis désolé aux scripteurs, je l'ai déjà mis en validation, je n'avais pas trop le temps de le faire au moment où j'ai demandé sa validation.

Version de Wine : 1.3.1
Distribution : Ubuntu
Version : 10.04 (32 bits)
Carte graphique : ATi Radeon HD 4870 512 Mo
Pilotes de la carte graphique : ATi catalyst 10.8
Commentaires :
Le jeu a l'air de bien fonctionné, il peut y avoir quelques ralentissements, les musiques du jeu n'ont pas l'air de fonctionner (mais bon qui parmis nous joue à Sim City en laissant sa musique monotone ?), enfin un patch no-cd sera suremment nécessaire pour pouvoir jouer au jeu.

Icône du jeu :


Script :
#!/bin/bash
# Date : (2010-02-04 14-35)
# Last revision : (2010-02-04 14-35)
# Wine version used : 1.3.1
# Distribution used to test : Ubuntu 10.04
# Author : thib25
# Licence : Retail

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

NAME="Sim City 3000"
PREFIX="SimCity3000"

if [ "$POL_LANG" == "fr" ]; then
INSTALLATION="Installation en cours.."
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"
POLEND="$NAME a été installé avec succès"
else
INSTALLATION="Installation in progress..."
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" 
POLEND="$NAME has been installed succesfully"
fi

wget	 http://www.pwned.com/gamecovers/pc/120a7865a493d2f044154bf08fc72ba2-Simcity_3000.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
 
wget http://g.imagehost.org/0115/SimCity_3000.jpg --output-document="$REPERTOIRE/tmp/topnotscaled.jpeg"
convert "$REPERTOIRE/tmp/topnotscaled.jpeg" -scale 60x60\\! "$REPERTOIRE/tmp/top.jpeg"
 
POL_SetupWindow_Init "$REPERTOIRE/tmp/top.jpeg" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$NAME" "EA Games - Maxis" "http://www.simcity.ea.com/" "thib25" "$PREFIX"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "LAUNCHER/Launcher.exe"

POL_SetupWindow_install_wine "1.3.1"
Use_WineVersion "1.3.1"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
 
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

POL_SetupWindow_wait_next_signal "$INSTALLATION" "$NAME"
wine "$CDROM/LAUNCHER/Launcher.exe"
POL_SetupWindow_detect_exit

#Création Icone
convert "$HOME/.local/share/icons/c0de_sc3.0.png" -geometry 32x32 "$REPERTOIRE/icones/32/$NAME"

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Maxis/SimCity 3000/Game" "SC3.exe" "$NAME" "$NAME"

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

POL_SetupWindow_Close
exit 
Quentin PÂRIS Sunday 12 September 2010 at 18:48
Quentin PÂRISAnonymous

Désolé, on n'accepte plus les scripts qui :
- Créent une image left.jpg et top.jpg a la volé avec un redimensionnement pas propre (On préfère qu'il n'y ai pas d'image plutôt)
- Utilisent winetricks (Donc la c'est ok)

Si tu peux corriger ton script rapidement, il pourra être remit en validation

Merci beaucoup
thib25 Sunday 12 September 2010 at 22:25
thib25Anonymous

Un redimensionnement pas propre ? Tu veux dire à cause du fait que je fasse manuellement le téléchargement des photos etc.. plutôt que d'utiliser la fonction qui a été créée à cette effet ? Si c'est ça je ne l'ai pas utilisé car les images ne s'affichaient pas correctement mais bon je vais essayé de revoir ça dans la semaine si c'est nécessaire :).
Quentin PÂRIS Sunday 12 September 2010 at 22:59
Quentin PÂRISAnonymous

Non, c'est ça qui me gène :

convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"

L'image que tu télécharge n'est pas du tout faite pour aller la, donc résultat ça rend hyper moche dans les installateurs. Dans ce cas, autant laisser l'image de PlayOnLinux par défaut
thib25 Monday 13 September 2010 at 22:10
thib25Anonymous

Ah ok ! Bon bah je regarderais pour faire quelque chose ;-).

Editado por: thib25

thib25 Tuesday 14 September 2010 at 12:53
thib25Anonymous

Bon bah finalement je met pas d'images, je peux demander sa validation ?

#!/bin/bash
# Date : (2010-02-04 14-35)
# Last revision : (2010-02-04 14-35)
# Wine version used : 1.3.1
# Distribution used to test : Ubuntu 10.04
# Author : thib25
# Licence : Retail

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

NAME="Sim City 3000"
PREFIX="SimCity3000"

if [ "$POL_LANG" == "fr" ]; then
INSTALLATION="Installation en cours.."
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"
POLEND="$NAME a été installé avec succès"
else
INSTALLATION="Installation in progress..."
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" 
POLEND="$NAME has been installed succesfully"
fi

POL_SetupWindow_Init

POL_SetupWindow_presentation "$NAME" "EA Games - Maxis" "http://www.simcity.ea.com/" "thib25" "$PREFIX"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "LAUNCHER/Launcher.exe"

POL_SetupWindow_install_wine "1.3.1"
Use_WineVersion "1.3.1"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
 
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

POL_SetupWindow_wait_next_signal "$INSTALLATION" "$NAME"
wine "$CDROM/LAUNCHER/Launcher.exe"
POL_SetupWindow_detect_exit

#Création Icone
convert "$HOME/.local/share/icons/c0de_sc3.0.png" -geometry 32x32 "$REPERTOIRE/icones/32/$NAME"

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Maxis/SimCity 3000/Game" "SC3.exe" "$NAME" "$NAME"

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

POL_SetupWindow_Close
exit 
GNU_Raziel Tuesday 14 September 2010 at 19:26
GNU_Raziel

euh ça aussi enlève s'il-te-plaît :

#Création Icone
convert "$HOME/.local/share/icons/c0de_sc3.0.png" -geometry 32x32 "$REPERTOIRE/icones/32/$NAME"


C'est aussi crade que la conversion à la volée...

Ensuite si tu veu que l'icône, le left.jpg et le top.jpg soient intégrés, tu fournis les fichiers au bon formats ici même et je les ajouterait à ton script avant validation...

Enfin post un test, même sommaire, dans la section concernée afin de préciser, si besoin, les problèmes/bugs rencontrés.

Editado por: GNU_Raziel

thib25 Tuesday 14 September 2010 at 19:32
thib25Anonymous

Ah oui ? Je savais pas que c'était crade de faire ça. Mais comment je fais alors pour mettre une icône à mon programme ?
GNU_Raziel Tuesday 14 September 2010 at 20:40
GNU_Raziel

Pour faire simple, soit POL arrive a extraire l'icone de l'exe, soit tu le fournis a part et je ferais les modifs pour que l'icône soit correctement installée...même chose pour le left.jpg, le top.jpg et la miniature (qui s'affiche quand on cherche le jeu dans pol). Si tu fournis ses fichiers en bonne qualité, ils seront intégrés :
-Icône - format png ou xpm, 32x32 minimum
-left.jpg - format jpg, 150x356
-top.jpg - format jpg, 64x64
-Miniature - format jpg, 200x150

Voila, si tu préfère ne pas fournir ses fichiers, retire juste le convert et la référence dans make_shortcut et ton script sera validé.

Remarque : il y a une commande plus récente et appropriée pour le lanceur : POL_SetupWindow_auto_shortcut (description ici)
thib25 Tuesday 14 September 2010 at 21:41
thib25Anonymous

Ah ok ! Pour l'histoire des icône et des images, il faudrait presque créer une page dans la docs pour savoir à qui s'adresser et que fournir ;-).
thib25 Wednesday 15 September 2010 at 17:02
thib25Anonymous

Bon, voici la nouvelle version du script sans tout les trucs crados.
#!/bin/bash
# Date : (2010-02-04 14-35)
# Last revision : (2010-02-04 14-35)
# Wine version used : 1.3.1
# Distribution used to test : Ubuntu 10.04
# Author : thib25
# Licence : Retail

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

NAME="Sim City 3000"
PREFIX="SimCity3000"

if [ "$POL_LANG" == "fr" ]; then
INSTALLATION="Installation en cours.."
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"
POLEND="$NAME a été installé avec succès"
else
INSTALLATION="Installation in progress..."
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" 
POLEND="$NAME has been installed succesfully"
fi

POL_SetupWindow_Init

POL_SetupWindow_presentation "$NAME" "EA Games - Maxis" "http://www.simcity.ea.com/" "thib25" "$PREFIX"

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "LAUNCHER/Launcher.exe"

POL_SetupWindow_install_wine "1.3.1"
Use_WineVersion "1.3.1"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
 
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES

POL_SetupWindow_wait_next_signal "$INSTALLATION" "$NAME"
wine "$CDROM/LAUNCHER/Launcher.exe"
POL_SetupWindow_detect_exit

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Maxis/SimCity 3000/Game" "SC3.exe" "" "$NAME"

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

POL_SetupWindow_Close
exit 

Sinon Gnu_Raziel je t'envois un MP pour les images ;-).