Standardization, what is this thing?

To improve script readability, maintainability, debugging, and translation, scripts are standardized. This means that things need to be added or modified so that scripts will look and behave in a similar fashion.

Let us go over the details...

Make your script available under Mac OS X using PlayOnMac

It may be useful to clarify (for those who would not know) that PlayOnLinux and PlayOnMac are really the same software, sharing the same code. Only the name changes depending on the operating system. So, making your script available to PlayOnMac users can be very easy. You just have to check that your script runs fine under Mac OS X. Even if you don't have any Mac OS X at hand, for small and simple software one can expect that, if it works correctly under GNU/Linux, there's a 99% probability that it will also work under Mac OS X.

To make your script available under Mac OS X, check the box "PlayOnMac compatible" of the new script submission form of the PlayOnLinux website. Read more here:

Some informations about the script

It is recommended to provide some information near the beginning of the script, right after the #!/bin/bash line. Headers like this are standard practice in any script or source code, and should be applied as such.

Enable debugging

PlayOnLinux has a script debugging mode that must be enabled through a command. It is mandatory to enable it, even if you have no use for it; if some user experiences a problem with your script, it will allow him to sent a bug report to the PlayOnLinux website.

Syntax:

POL_Debug_Init

This command should be put right after the command POL_SetupWindow_Init.

Some more information

Random information that does not fit into previous chapters.

It is forbidden to use sudo

Commands sudo, su, gksudo, kdesu and similar are forbidden for the sake of security. However, if you really need sudo (for example to display hidden files from hybrid PC/MAC DVDs, using mount command), you can use the following command:

Syntax:

POL_Call POL_Function_RootCommand "command using sudo; exit"

Winetricks forbidden in scripts

Winetricks, or a similar script, is forbidden in PlayOnLinux scripts. Instead, you can use the very similar command POL_Call.