You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Note that PEB is created to work from any folder without installation and all fi
71
71
*[Perl scripts with STDIN event loops can be repeatedly fed with data.](#interactive-perl-scripts)
72
72
*[Any version of Perl 5 can be used.](#runtime-requirements)
73
73
* PEB can be started from any folder.
74
-
*[Single file or multiple files, new filename, existing or new directory can be selected by user.](#opening-files-and-folders)
74
+
*[Single file or multiple files, new filename, existing or new directory can be selected by user.](#selecting-files-and-folders)
75
75
*[Optional warning for unsaved data in HTML forms](#page-settings)
76
76
*[Custom labels for dialogs and context menu](#page-settings)
77
77
*[Custom icon for windows and message boxes](#icon)
@@ -137,11 +137,11 @@ CONFIG += app_bundle
137
137
PEB can also use any Perl on PATH.
138
138
139
139
## Preparing a Perl Distribution for PEB
140
-
Sometimes it is important to minimize the size of the relocatable (or portable) Perl distribution used by a PEB-based application. ``{PEB_binary_directory}/sdk/compactor.pl`` script is one solution to this problem. It finds all dependencies of all Perl scripts in the ``{PEB_binary_directory}/resources/app`` directory and copies them in a new ``{PEB_binary_directory}/perl/lib`` folder; a new ``{PEB_binary_directory}/perl/bin`` is also created. The original ``bin`` and ``lib`` folders are saved as ``{PEB_binary_directory}/perl/bin-original`` and ``{PEB_binary_directory}/perl/lib-original`` respectively. These directories should be manually archived for future use or removed.
140
+
Sometimes it is important to minimize the size of the relocatable (or portable) Perl distribution used by a PEB-based application. ``{PEB_binary_directory}/sdk/compactor.pl`` script is one solution to this problem. It finds all dependencies of all Perl scripts in the ``{PEB_binary_directory}/resources/app`` directory and copies them in a new ``{PEB_binary_directory}/perl/lib`` folder; a new ``{PEB_binary_directory}/perl/bin`` is also created. The original ``bin`` and ``lib`` folders are saved as ``{PEB_binary_directory}/perl/bin-original`` and ``{PEB_binary_directory}/perl/lib-original`` respectively. These directories should be manually archived for future use or removed.
141
141
142
-
``compactor.pl`` should be started using ``{PEB_binary_directory}/compactor.sh`` on a Linux or a Mac machine and ``{PEB_binary_directory}/compactor.cmd`` on a Windows machine to ensure that only the Perl distribution used by PEB is going to start ``compactor.pl``. This is necessary to avoid dependency mismatches with any other Perl on PATH.
142
+
``compactor.pl`` should be started using ``{PEB_binary_directory}/compactor.sh`` on a Linux or a Mac machine and ``{PEB_binary_directory}/compactor.cmd`` on a Windows machine to ensure that only the Perl distribution used by PEB is going to start ``compactor.pl``. This is necessary to avoid dependency mismatches with any other Perl on PATH.
143
143
144
-
``compactor.pl`` relies on ``Module::ScanDeps`` and ``File::Copy::Recursive`` CPAN modules, which are located in the ``{PEB_binary_directory}/sdk/lib`` folder.
144
+
``compactor.pl`` relies on ``Module::ScanDeps`` and ``File::Copy::Recursive`` CPAN modules, which are located in the ``{PEB_binary_directory}/sdk/lib`` folder.
145
145
146
146
## Perl Scripts API
147
147
Every Perl script run by PEB is called by clicking a link or submitting a form to a pseudo filename composed from the name of the JavaScript object with the settings of the Perl script and a ``.settings`` extension. Perl data output is seamlessly inserted into the HTML DOM of the local page using JavaScript.
@@ -152,11 +152,6 @@ A minimal example of a Perl script settings object:
152
152
var perlScriptObject = {};
153
153
perlScriptObject.path='{app}/test/test.pl';
154
154
perlScriptObject.stdout='test';
155
-
perlScriptObject.requestMethod='POST';
156
-
perlScriptObject.inputDataHarvester=function() {
157
-
var data =document.getElementById('input-box-id').value;
The ``close_command`` object property designates the command used to gracefully shut down an interactive script when the containing PEB window is going to be closed. Upon receiving it, the interactive script must start its shutdown procedure.
200
195
201
-
***close_confirmation:**
196
+
***close_confirmation:**
202
197
Just before exiting an interactive script must print on STDOUT its ``close_confirmation`` to signal PEB that it completed its shutdown. All interactive scripts must exit in 5 seconds after ``close_command`` is given or any unresponsive scripts will be killed and PEB will exit.
203
198
204
199
Perl scripts running for a long time should have ``$|=1;`` among their first lines to disable the built-in buffering of the Perl interpreter. Some builds of Perl may not give any output until the script is finished when buffering is enabled.
@@ -286,7 +281,7 @@ The binary file of the browser, ``peb``, ``peb.app``, ``peb.dmg`` or ``peb.exe``
286
281
Note that start page pathname is case sensitive.
287
282
288
283
<aname="icon"></a>
289
-
***Icon:**
284
+
***Icon:**
290
285
A PEB-based application can have its own icon and it must be located at ``{PEB_binary_directory}/resources/app/app.png``. If this file is found during application startup, it will be used as the icon of all windows and dialog boxes. If this file is not found, the default icon embedded into the resources of the browser binary will be used.
These are Perl scripts that will be started immediately after the local page is loaded.
325
320
326
-
*``closeConfirmation``
321
+
*``closeConfirmation``
327
322
When user starts closing PEB, it checks for any unsaved data in all forms. If any user data in HTML forms is detected, PEB displays a warning using the text of ``pebSettings.closeConfirmation``. If no warning text is found, PEB assumes that no warning has to be displayed and exits immediately.
0 commit comments