So as I can't find official english manual with POL function listing, I want to write about those that I learned when I read POL scripts.
Please remember that english not my native language, so feel free to show me my mistakes.
So, from the beginning:
Console:
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
This is the beginning of the script, which is defined POL belonging, inclusion of libraries and checking dependencies. This part is required!
presentation - this function represents the program and assign prefix name.Structure:
presentation "Program name" "Program creator" "Program's web site" "Script author" "The_name_of_the_directory_where_script_will_create_the_wine-prefix."
If you don't need some of parameters feel free to use empty quotes -
"".
menu - This function creates a dialogue choices, structure:
menu "Text" "$1 $2"
where
"Text" - This is text menu, in which the user is offered a choice.
"$1 $2" - There are proposed options. Meaning, which is chosen, usually used in the condition:
if [ ]; then; else; fi
selectionner_fichier - creates the menu to select a file, returns the full path to user selection, structure:
selectionner_fichier "Text"
erreur - the error message, structure:
erreur "Text" - by the way, here, as in the previous function is commonly used standard message from the language file /usr/share/playonlinux/lang/en_EN.UTF-8 - '$LNG_LI_CHOOSEFILE'
dirname - return path, without the names of the file itself, structure:
dirname "Path to the file" - usually in conjunction with
selectionner_fichier function, which returns the file path
telecharger - file downloads, structure:
telecharger "Message during download" "URL to a file for download" "Message before download"
attendre - menu with progress indicator , in the background is usually performed any actions. Structure:
attendre "Message during action" "unzip file.zip" "Message before action" - second operator is action (in this case, unpacking archive)
select_prefixe - This function selects the directory to create a prefix. Structure:
select_prefixe "path to a prefix" - is used in conjunction with the next described function to create a wine-prefix
creer_prefixe - creates a prefix structure, with all the directories (windows, program files ...) and files
creer_lanceur - creates a script which runs application. Structure:
creer_lanceur "prefix_name" "path to the .exe file" "filename of .exe file" "filename of icon file" "name of the script which runs the application"
Set_WineVersion_Assign - assign WINE version to run the application with it. Structure:
Set_WineVersion_Assign "WINE version number" "prefix name"
simuler_reboot - imitates windows restart
attention - menu with warnings. Structure:
attention "text"
end_install - standard message that the installation is complete.
message - the message, for example, with an explanation of any action. Structure:
message "Text with explanation"
Ask_For_cdrom - request to show CDROM mount point.
Check_cdrom - checks for the file user need to run at a specified installation CD to start installation. Structure:
Check_cdrom "path/filename.exe"
protection_warning - report about incorrect work with copy protection CDROM driver
Set_SoundDriver - change the sound driver in winecfg. Structure:
Set_SoundDriver alsa - the second operator is the name of the driver (alsa, oss, esd, jack, nas)
Set_OS - change the windows version, which will run the application in winecfg. Structure:
Set_OS win98 - the second operator is the windows version (vista, win2003, winxp, win2k, winnt, winme, win98, win95, win31)
Set_Managed "On" - to switch in winecfg the flag of the control "allow the window-manager to control the windows"
Set_DXGrab "On" - to switch in winecfg the flag of the control "allow DirectX apps to stop the mouse leaving their window"
Set_GLSL "On" - to allow GLSL in winecfg
Set_Desktop On 1024 768 - to emulate a virtual desktop with given resolution
If you'll notice numbers at the end of the line, for example
7 8, you have to know that is the way to identify steps in the installation menu, which displays for the user, in the example given - it's step 7 of 8 possible.
In general, you can use standard Bash language.
http://www.gnu.org/software/bash/manual/bashref.html
I am sure that there are not all the functions that can be used in the POL script.
As I try to write a manual about the functions of POL for Russian users, I would be grateful for additions to this reference.
Thank you and sorry for my bad English.