Skip to content

Commit fb7fedc

Browse files
committed
documentation update
1 parent d741ea0 commit fb7fedc

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

doc/CONSTANTS.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ Perl Executing Browser - Constants
55

66
PEB is created to work from any directory without installation and all file paths are relative to the directory of the PEB executable, which is labeled as ``{PEB_executable_directory}`` within this documentation. ``{PEB_executable_directory}`` may contain only a C++ PEB executable or a Linux [AppImage](https://appimage.org/) with a C++ PEB executable and its Qt libraries all packed in a single file. All names of PEB files and folders are hard coded in C++ code and they are case-sensitive!
77

8+
A typical ``{PEB_executable_directory}`` looks like this:
9+
10+
```bash
11+
.
12+
├── {PEB_executable}
13+
├── perl
14+
│   ├── bin
15+
│   │   └── {perl_interpreter}
16+
│   └── lib
17+
│   └── {perl_modules}
18+
└── resources
19+
   ├── app
20+
   │   └── index.html
21+
   ├── app.png
22+
  ├── data
23+
   | └── {application_data}
24+
└── logs
25+
   └── {application_logs}
26+
```
27+
828
* **Perl Directory:**
929
The Perl directory, if present, must contain the ``bin`` and ``lib`` subdirectories.
1030
The ``bin`` subdirectory must contain the Perl interpreter.
@@ -32,22 +52,6 @@ PEB is created to work from any directory without installation and all file path
3252
PEB application directory pathname is compatible with the [Electron](http://electron.atom.io/) framework.
3353
[Epigraphista](https://github.com/ddmitov/epigraphista) is an application which is runnable by both PEB and [Electron](http://electron.atom.io/).
3454

35-
* **Data Directory:**
36-
Data directory must contain any writable files used or produced by a PEB-based application.
37-
The data directory path must be: ``{PEB_executable_directory}/resources/data``
38-
Perl scripts can access this folder using the environment variable ``PEB_DATA_DIR``:
39-
40-
```perl
41-
my $data_directory = $ENV{'PEB_DATA_DIR'};
42-
```
43-
<a name="log-files-directory"></a>
44-
* **Log Files Directory:**
45-
When logging directory is found during application startup, PEB assumes that logging is required and a separate log file is created for every browser session following the naming convention:
46-
``{executable_name}-started-at-{four_digit_year}-{month}-{day}--{hour}-{minute}-{second}.log``
47-
48-
The log files directory path must be: ``{PEB_executable_directory}/resources/logs``
49-
PEB will not create logging directory on its own and if it is missing, no logs will be written.
50-
5155
* **Entry File:**
5256
PEB starts with one of the following files:
5357
* ``{PEB_executable_directory}/resources/app/index.html``
@@ -59,12 +63,28 @@ PEB is created to work from any directory without installation and all file path
5963

6064
<a name="icon"></a>
6165
* **Icon:**
62-
A PEB-based application can have its own icon and the pathname must be:
66+
A PEB-based application may have its own icon and the pathname must be:
6367
``{PEB_executable_directory}/resources/app/app.png``
6468

6569
If this file is found during application startup, it is used as the icon of the application and all dialog boxes.
6670
If this file is not found, the default icon embedded in the resources of the browser binary is used.
6771

72+
* **Data Directory:**
73+
Data directory may contain any writable files used or produced by a PEB-based application.
74+
The data directory path must be: ``{PEB_executable_directory}/resources/data``
75+
Perl scripts can access this folder using the environment variable ``PEB_DATA_DIR``:
76+
77+
```perl
78+
my $data_directory = $ENV{'PEB_DATA_DIR'};
79+
```
80+
<a name="log-files-directory"></a>
81+
* **Log Files Directory:**
82+
When log files directory is found during application startup, PEB assumes that logging is required and a separate log file is created for every browser session following the naming convention:
83+
``{executable_name}-started-at-{four_digit_year}-{month}-{day}--{hour}-{minute}-{second}.log``
84+
85+
The log files directory path must be: ``{PEB_executable_directory}/resources/logs``
86+
PEB will not create log files directory on its own and if it is missing, no logs will be written.
87+
6888
## Functional Pseudo Filenames
6989
* **About PEB dialog:** ``about-browser.function``
7090

doc/PACKAGING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ Perl Distribution Compactor depends on [Module::ScanDeps](https://metacpan.org/p
1111
## AppImage Support
1212
PEB or any PEB-based application can be easily packed as a 64-bit single-file Linux [AppImage](https://appimage.org/) executable by the [AppImage Maker](https://github.com/ddmitov/perl-executing-browser/blob/master/sdk/appimage-maker.sh) script, which has two modes of operation:
1313

14-
* packing a PEB Perl application together with a PEB binary, its Qt libraries and a relocatable Perl distribution:
14+
* packing a Perl application together with a PEB executable, its Qt libraries and a relocatable Perl distribution:
1515

16-
```
16+
```bash
1717
appimage-maker.sh --include-resources
1818
```
1919

2020
In this case the [AppImage Maker](https://github.com/ddmitov/perl-executing-browser/blob/master/sdk/appimage-maker.sh) invokes the [Perl Distribution Compactor](https://github.com/ddmitov/perl-executing-browser/blob/master/sdk/compactor.pl), which finds all dependencies of all Perl scripts in the ``{PEB_executable_directory}/resources/app`` directory and copies only the necessary Perl modules.
2121

22-
* packing only a PEB binary with its Qt libraries:
22+
* packing only a PEB executable with its Qt libraries:
2323

24-
```
24+
```bash
2525
appimage-maker.sh
2626
```
2727

doc/REQUIREMENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Compiled and tested successfully using:
2323

2424
To compile PEB type in a terminal started in the ``src`` folder:
2525

26-
```
26+
```bash
2727
qmake -qt=qt5
2828
make
2929
```

0 commit comments

Comments
 (0)