Het forum

Blender 2.67

Auteur Antwoorden
Morrio Zondag 12 Mei 2013 om 10:50
Morrio

Bonjour,

Pouvez-vous m'aider à corriger mes erreurs ?

#!/bin/bash
# date :
# Last version :
# Wine version used : 1.4
# Distribution used to test : Ubuntu 13.04
# Author : Morrio
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
POL_SetupWindow_Init
POL_Debug_Init
#PHRASE
        DL_BLENDER="Please wait during downlad of Blender"
        DL_PYTHON="Please wait during download of Python 2.5"
#used variables :
TITRE="Blender 2.67"
PREFIX="Blender_2.67"
AUTHOR="Morrio"
EDITOR="Fondation Blender"
WEBSITE="http://www.blender.org"

#presentation :
POL_SetupWindow_presentation "$TITRE" "$EDITOR" "$WEBSITE" "$AUTHOR" "$WEBSITE"

#Selection and creation of the prefix :
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate

#Installation
POL_SetupWindow_download "$PH_BLENDER" "Blender" "................................................................."
POL_SetupWindow_download "$PH_PYTHON" "PYTHON" "................................................................."

POL_SetupWindow_wait_next_signal "Please wait while blender is installed" "Blender"
wine msiexec.exe /i /q "python-2.5.1.msi"
wine "blender-2.45-windows.exe" /quiet

#Execution

POL_Wine start /unix "chemin/vers/un/fichier.exe"
POL_Wine_PrefixCreate "1.3.4"

POL_SetupWindow_Close
exit
petch Zondag 12 Mei 2013 om 11:38
petch

Bonjour,

DL_BLENDER="Please wait during downlad of Blender"
DL_PYTHON="Please wait during download of Python 2.5"

L'internationalisation des scripts passe maintenant par la fonction eval_gettext, voir http://www.playonlinux.com/fr/dev-documentation-10.html

TITRE="Blender 2.67"

Cette variable doit impérativement se nommer TITLE, c'est nécessaire pour les fonctionnalités de débogage (et le rapport de bugs).

POL_SetupWindow_download "$PH_BLENDER" "Blender" "................................................................."

à remplacer par POL_Download "URL" "MD5 attendu du fichier"

wine msiexec.exe /i /q "python-2.5.1.msi"

Pour la fonctionnalité de débogage, on ne peut plus appeler wine directement, il faut toujours utiliser POL_Wine (qui attend les mêmes paramètres).

POL_Wine start /unix "chemin/vers/un/fichier.exe"

start /unix est dans la très grande majorité des cas inutile, à éviter.

POL_Wine_PrefixCreate "1.3.4"

Euh, pourquoi cette commande à cet endroit là ? Le disque virtuel devrait déjà être créé à ce moment.

Par contre il manque un POL_Shortcut pour pouvoir lancer le programme installé.

D'une manière générale je conseille la (re)lecture de la Documentation du scripteur :
http://www.playonlinux.com/fr/documentation.html
Morrio Zondag 12 Mei 2013 om 12:04
Morrio

Merci, de m'avoir aider mais comment j'utilise "eval_gettext" je ne comprend pas.


Voici une correction :

#!/bin/bash
# date :
# Last version :
# Wine version used : 1.4
# Distribution used to test : Ubuntu 13.04
# Author : Morrio
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

POL_SetupWindow_Init
POL_Debug_Init
#PHRASE
DL_BLENDER="Please wait during downlad of Blender"
DL_PYTHON="Please wait during download of Python 2.5"
#used variables :
TITLE="Blender 2.67"
PREFIX="Blender_2.67"
AUTHOR="Morrio"
EDITOR="Fondation Blender"
WEBSITE="http://www.blender.org"

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

#Selection and creation of the prefix :
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.3.4"

#Installation
POL_SetupWindow_download "$PH_BLENDER" "$TITRE" ".................................................................""md5"
POL_SetupWindow_download "$PH_PYTHON" "PYTHON" ".................................................................""md5"

POL_SetupWindow_wait_next_signal "Please wait while blender is installed" "$TITLE"
POL_Wine "python-2.5.1.msi"
POL_Wine "blender-2.45-windows.exe"

#Execution
POL_Shortcut

POL_SetupWindow_Close
exit

Aangepast door Morrio

petch Zondag 12 Mei 2013 om 12:38
petch

Qu'est-ce qui n'est pas clair dans
http://www.playonlinux.com/fr/dev-documentation-10.html ?
Morrio Zondag 12 Mei 2013 om 12:41
Morrio

Citation : La commande eval_gettext prend en argument le message en anglais, et renvoie le message dans la langue de l'utilisateur (qui est déterminée automatiquement).

D’accord mais dans mon cas je fais comme sa ?

eval_gettext DL_BLENDER="Please wait during downlad of Blender"
eval_gettext DL_PYTHON="Please wait during download of Python 2.5"
petch Zondag 12 Mei 2013 om 12:45
petch

Il y a même un exemple en bas de page...
Morrio Maandag 13 Mei 2013 om 15:26
Morrio

#!/bin/bash
# date :
# Last version : 2.67
# Wine version used : 1.4
# Distribution used to test : Ubuntu 13.04
# Author : Morrio
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

POL_SetupWindow_Init
POL_Debug_Init
#PHRASE
eval_gettext DL_BLENDER="Please wait during downlad of Blender"
     eval_gettext DL_PYTHON="Please wait during download of Python 2.5"
#used variables :
TITLE="Blender 2.67"
PREFIX="Blender_2.67"
AUTHOR="Morrio"
EDITOR="Fondation Blender"
WEBSITE="http://www.blender.org"

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

#Selection and creation of the prefix :
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "1.3.4"

#Installation
POL_SetupWindow_download "$PH_BLENDER" "$TITRE" ".................................................................""md5"
POL_SetupWindow_download "$PH_PYTHON" "PYTHON" ".................................................................""md5"

POL_SetupWindow_wait_next_signal "Please wait while blender is installed" "$TITLE"
POL_Wine "python-2.5.1.msi"
POL_Wine "blender-2.45-windows.exe"

#Execution
POL_Shortcut

POL_SetupWindow_Close
exit



C'est juste la ?
petch Maandag 13 Mei 2013 om 20:23
petch

Si tu n'es pas plus débrouillard que ça, ça m'étonnerait que tu finisses ton script avant que ça ne me fatigue.

Pour tester tes scripts, il y a deux possibilités :
- Par les menus de PoL : Outils > Exécuter un script local
- En ligne de commande : playonlinux-bash nomduscript
La deuxième méthode est préférable quand on a un peu l'habitude, c'est beaucoup plus rapide.
Aymeric P. Maandag 13 Mei 2013 om 21:56
Aymeric P.

Bonsoir,
Puis-je savoir pourquoi installer Blender pour Windows sous Linux alors qu'il existe une version officielle de Blender pour Linux (qui doit offrir de meilleures performance qu'en passant par WIne)?

Sans raison claire et valable ce script ne sera sûrement pas accepter.

Former member.
Morrio Dinsdag 14 Mei 2013 om 14:15
Morrio

Bonjour,

Blender sous Linux est effectivement mal coder et des problèmes de stabilité. Il y a des addons de blender qui marche uniquement sous windows.
Je bent hier: Index > Vos créations > Blender 2.67