Het forum

Divine Divinity

version boite

Auteur Antwoorden
flotux Woensdag 30 Januari 2013 om 21:35
flotuxAnonymous

Bonjour, je propose ce script pour Divinie Divinity qui est déjà en version GOG.com mais je me suis dit qu'une version boîte serait également utile ( déjà à moi-même :D )

J'ai emprunté à d'autres scripts la partie sur le language, le reste est fait maison. c'est mon premier script.

Merci d'avance à tout ceux qui le liront et pour toute critique qui me permaittrait d'améliorer le script.

#!/bin/bash
# date : (2013-01-28 21-00)
# Last version : (2013-01-30 21-15)
# Wine version used : 1.4
# Distribution used to test : Ubuntu 12.04 ( xubuntu )
# Author : Flotux

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

#used variables.
TITLE="Divine Divinity"
PREFIX="DivineDiviniy"
AUTHOR="Flotux"
EDITOR="Larian Studio"
WEBSITE="www.larian.com"

POL_SetupWindow_Init
POL_Debug_Init

if [ "$POL_LANG" == "fr" ]
 then
   LNG_INSTALL_ON="Installation en cours..."
   LNG_SUCCES="$TITLE a été installé avec succès."
 else
   LNG_INSTALL_ON="Installation in progress..."
   LNG_SUCCES="$TITLE has been installed successfully."
fi

#presentation.
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$WEBSITE" "$AUTHOR" "$TITLE"

#definition of video driver.
POL_Wine_SetVideoDriver

#Selection and creation of the prefix.
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate
POL_System_SetArch "auto"

#cdrom verification
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Setup.exe"

#installation
POL_Wine start /unix "$CDROM/Setup.exe"
POL_Wine_WaitExit "$TITLE"

#creation of the laucher
POL_Shortcut "DIV.exe" "$TITLE"

POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"

POL_SetupWindow_Close
exit




petch Woensdag 30 Januari 2013 om 21:45
petch

Bonsoir,

- Pour les traductions, la méthode moderne est d'utiliser $(eval_gettext '...')
http://www.playonlinux.com/fr/dev-documentation-10.html
- il doit y avoir un Setup.exe sur un CDROM d'installation sur trois... Il n'y a pas de fichier plus "spécifique", qui permettrait de reconnaitre ce CDROM avec plus d'assurance?
C'est à peu près tout... Si start /unix n'est pas nécessaire c'est mieux de l'enlever, mais ce n'est pas très grave.
flotux Woensdag 30 Januari 2013 om 22:12
flotuxAnonymous

tout d'abord merci pour ton aide.

j'ai modifier la verification du CDROM :
POL_SetupWindow_check_cdrom "License_frn.txt"

Je pourrais trouver mieux mes il faudrais entrer dans un dossier du CDROM et le fichier en question comporte des espaces. mes sa me parait être déjà "original" comme fichier.

pour la langue c'est rêgler, merci encore.

voila la MAJ :

#!/bin/bash
# date : (2013-01-28 21-00
# Last version : (2013-01-30 21-15)
# Wine version used : 1.4
# Distribution used to test : Ubuntu 12.04 ( xubuntu )
# Author : Flotux

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

#used variables.
TITLE="Divine Divinity"
PREFIX="DivineDiviniy"
AUTHOR="Flotux"
EDITOR="Larian Studio"
WEBSITE="www.larian.com"

POL_SetupWindow_Init
POL_Debug_Init

LNG_INSTALL_ON="$(eval_gettext ' Please wait while $TITLE is installed.')" "$TITLE"
LNG_SUCCES="$(eval_gettext ' $TITLE has been successfully installed.')" "$TITLE"


#presentation.
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$WEBSITE" "$AUTHOR" "$TITLE"

#definition of video driver.
POL_Wine_SetVideoDriver

#Selection and creation of the prefix.
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate
POL_System_SetArch "auto"

#cdrom verification
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "License_frn.txt"

#installation
POL_Wine start /unix "$CDROM/Setup.exe"
POL_Wine_WaitExit "$TITLE"

#creation of the laucher
POL_Shortcut "DIV.exe" "$TITLE"

POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"

POL_SetupWindow_Close
exit



Aangepast door flotux

petch Woensdag 30 Januari 2013 om 22:46
petch

Je pense que ce script peut être soumis tel-quel pour inclusion dans les scripts "officiels" :
- cliques sur "Logiciels supportés" à gauche sur cette page, puis "Nouvel installeur".
- quand toutes les infos sont rentrées, il y a une option pour demander à ce que le script soit signé, et donc après validation visible de tout le monde; Je ne me rappelle pas de l'intitulé exact, mais ça devrait être suffisamment explicite

Pour les ressources graphiques j'utiliserais les mêmes que pour le script GOG, sauf si tu y vois un inconvénient...

Cordialement;
Pierre.

Aangepast door petch

flotux Woensdag 30 Januari 2013 om 22:54
flotuxAnonymous

Je pense que c'est bon :

http://www.playonlinux.com/en/app-1556.html

Pour les ressources graphique je n'y vois pas d'inconvénient dutout.

Un grand merci a toi pour ton aide, j'ai hâte d'attaquer un nouveau script :D
petch Woensdag 30 Januari 2013 om 23:10
petch