sv ru pl en fr

Create a script for PlayOnLinux - Annexes

PlayOnLinux's variables

$POL_USER_ROOT = $HOME/.PlayOnLinux

$PLAYONLINUX = PlayOnLinux's installation directory (usually /usr/share/playonlinux)

PlayOnLinux's directories

$HOME/.PlayOnLinux/wineprefix = Wine Prefixes

$HOME/.PlayOnLinux/fonts = Microsoft fonts

$HOME/.PlayOnLinux/configurations/installed = Launchers

Create a configurator for your program

You can create a script especially for your program configuration. This script will be available in the "Configure" window like a "Run configuration wizard" button.

In order to do this, you need to instruct your script to create a new file containing the configurator's script (twisted you say?).

Here is the syntax you need to use, it's to be put at the end of your script before the exit:

cat << _EOF_ > "$POL_USER_ROOT/configurations/configurators/Name Of Your Launcher"
#!/bin/bash
[ "\$PLAYONLINUX" = "" ] && exit 0
source "\$PLAYONLINUX/lib/sources" 
POL_SetupWindow_Init

# Your script here

POL_SetupWindow_Close
_EOF_

Note: It is important to use the character \ before each variable so that the variable is not interpreted when the file is being created.

POL_Call

There's now a new function: POL_Call

It allows to call special scripts. Those scripts are the ones in the Functions category.

Simple example:

POL_Call POL_Function_sleep 10

This command will download the script POL_Function_sleep from the Function category and call it with 10 as first argument.

Il n'y a rien à voir ici