Forums

[Script] Microsoft Visio 2010

Auteur Réponses
ManuelStahl Mardi 25 Février 2014 à 19:53
ManuelStahlAnonymous

No fancy stuff, just installs and creates a link.
[code language=playonlinux]#!/bin/bash
# Date : (2014-02-25 20:00)
# Last revision : (2014-02-25 20:00)
# Wine version used : 1.7.13
# Distribution used to test : Debian 7
# Author : Manuel Stahl
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Visio 2010"
PREFIX="Visio2010"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Manuel Stahl" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
export POL_WINEVERSION="1.7.13"
POL_SetupWindow_prefixcreate
POL_SetupWindow_browse "$(eval_gettext "Please select the install file.")" "$TITLE"
SETUP_PATH="$APP_ANSWER"
POL_SetupWindow_wait "$(eval_gettext 'PlayOnLinux is installing your application...')" "$TITLE"
POL_Wine "$SETUP_PATH"
POL_Wine_WaitExit
POL_Shortcut "VISIO.EXE" "Microsoft Visio 2010"
POL_SetupWindow_Close
exit[/code]

Edité par ManuelStahl

petch Mardi 25 Février 2014 à 21:40
petch

Hi,
No major problem in your script, just some things who do not match the latest style recommendations:

[code language=playonlinux]
export POL_WINEVERSION="1.7.13"
POL_SetupWindow_prefixcreate
[/code]
That's probably POL3 style, use
[code language=playonlinux]
POL_Wine_PrefixCreate "1.7.13"
[/code]
instead in POL4

[code language=playonlinux]
POL_SetupWindow_browse "$(eval_gettext "Please select the install file.")" "$TITLE"
[/code]
To avoid more work from the translation team, use the standard message
[code language=playonlinux]
POL_SetupWindow_message "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
[/code]
(See http://www.playonmac.com/en/dev-documentation-10.html)

[code language=playonlinux]
POL_SetupWindow_wait "$(eval_gettext 'PlayOnLinux is installing your application...')" "$TITLE"
[/code]
Just use
[code language=playonlinux]
POL_Wine_WaitBefore "$TITLE"
[/code]
to the same effect. Normally it's not necessary to use both
POL_Wine_WaitBefore and POL_Wine_WaitExit around some statement, 
as one should be sufficient, depending on whether the statements
between the two are blocking or not (if they're blocking then
WaitBefore is sufficient; if they're asynchronous, WaitExit
is sufficient).
I suspect that with WaitBefore, the WaitExit statement will become
redundant, but only experimentation will tell.

Regards, Pierre.

Edité par petch

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com