| POL script reference | New topic - Reply |
| Author | Answers |
| chain2k | Monday 4 February 2008 at 14:36 - [Quote] |
Rank: Membre![]() |
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: #!/bin/bash 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. |
| Ghostofkendo | Monday 4 February 2008 at 19:10 - [Quote] |
Rank: Admin![]() ![]() |
Hi chain2k,
That's a good idea you had.
So to help you, here are some functions you didn't listed: - selectionner_fichier, erreur, telecharger, attendre and attention are available in English too. They are respectively select_file, error, download, run_and_wait and warning. Easier to understand, isn't it
- show_file which ... show the file in argument (I guess). - Set_Iexplore which simulates Internet Explorer's presence in the prefixes. - navigateur which opens user's browser at the url you gave as argument. - OpenWineLookBox which opens the window of theme's choice (thanks to the Wine Look function). (you must give the name of a game as argument) That's it ! Hope it will help. Bye |
| chain2k | Monday 4 February 2008 at 19:43 - [Quote] |
Rank: Membre![]() |
Great thanx)
I'll change the russian reference with your help. still cant understand in which case we may need show_file Edited by chain2k |
| guyx666 | Thursday 6 March 2008 at 0:23 - [Quote] |
Rank: Membre![]() |
Tanxs your a half god.
i hope to make a script to install CoD4 with those info... http://www.quebec666.com/ub666.jpg |
| THAiSi | Thursday 27 March 2008 at 11:12 - [Quote] |
Rank: Membre![]() |
I modified the scripts in the scripts 'dosbox' section to install some old dos games I have in the system, but they don't work. no prefix is made, and no items is in the playonlinux menu. How does this work??
(and i mean, the dosbox support) |
| THAiSi | Thursday 27 March 2008 at 11:35 - [Quote] |
Rank: Membre![]() |
ah never mind, forgot to install the playforlinux-dosbox-support package...
|
| New topic - Reply |
Les forums -> Suggestions about PlayOnLinux v2 -> POL script reference
ptinou : Marieuh has a lot of difficulties with computin
ptinou : g
ptinou : !k PlayOnLinux
ptinou : !op
ptinou : d'oh
ptinou : :D
ramdac-pol : Ok thanx all of u i owe u
100 users online.


