Create a script for PlayOnLinux - Annexes

The PlayOnLinux's variables

$REPERTOIRE = $HOME/.PlayOnLinux

$POL_LANG : User's language

$PLAYONLINUX = PlayOnlinux installation's directory (/usr/share/playonlinux for the .deb package)

PlayOnLinux's directories

$HOME/.PlayOnLinux/wineprefix = Wine Prefixes

$HOME/.PlayOnLinux/fonts = Microsoft fonts

$HOME/.PlayOnLinux/configurations/installed = Launchers

$PLAYONLINUX/lang = Supported languages of PlayOnLinux

PlayOnLinux version 2's power

Since PlayOnLinux version 2, the commands were improved to include step numbers, a "Cancel" button. I will show you an example for the message command. For the others, feel free to read MulX's documentation

Syntax:

message "Message" "Title" "Step number" "Total number of steps" "Cancel button [0 = No, 1 = Yes]" "Image (in $PLAYONLINUX/themes/crystal ; letting it empty will use the default image)" "Next button"

Example:

message "Hello World" "A super title" 1 2 1 "" "Go on ! "

Clicking on Cancel stops the script for any command except menu, select_file and text_field

Detecting cancel on a menu or a field

You must use the following condition

menu "Text" "Item1 Item2 Item3"
if [ "$?" = "1" ]
then
# Place here the commands to run if the cancel button has been pressed
fi

Changing the separator of a menu

You must change the eighth setting. An example:

menu "What do you want to eat?" "Some carrots~A lot of potatoes~A few chips" "Title" 0 0 0 "" "~"

Note: If you use "--cut-line" as separator, a "new line return" (made with the "Enter" button) will be considered as the separator