Skip to content

Commit 388dc6f

Browse files
committed
only standard QtWebKit and no Perl Distribution Compactor
1 parent f09f21b commit 388dc6f

File tree

11 files changed

+50
-2716
lines changed

11 files changed

+50
-2716
lines changed

CREDITS.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,10 @@ https://github.com/richmoore/qt-examples/tree/master/sitespecificbrowser
4444
https://github.com/OtterBrowser/otter-browser/blob/master/src/modules/backends/web/qtwebengine/QtWebEnginePage.cpp
4545
https://github.com/OtterBrowser/otter-browser/blob/master/src/modules/backends/web/qtwebengine/QtWebEnginePage.h
4646
https://github.com/NixOS/nixpkgs/issues/16327
47-
https://github.com/annulen/webkit
4847

49-
https://doc.qt.io/archives/4.6/webkit-fancybrowser-mainwindow-cpp.html
5048
https://doc.qt.io/archives/qt-5.5/qwebpage.html#windowCloseRequested
5149
https://doc.qt.io/qt-4.8/qmake-advanced-usage.html
52-
https://doc.qt.io/qt-4.8/qwebframe.html
5350
https://doc.qt.io/qt-4.8/signalsandslots.html
54-
https://doc.qt.io/qt-4.8/qfileinfo.html
5551
https://doc.qt.io/qt-4.8/qwebinspector.html
5652
https://doc.qt.io/qt-4.8/qinputdialog.html
5753
https://doc.qt.io/qt-5/qtglobal.html
@@ -124,23 +120,14 @@ https://github.com/skaji/relocatable-perl
124120
http://strawberryperl.com/
125121

126122
https://perldoc.perl.org/Encode.html
127-
https://perldoc.perl.org/File/Basename.html
128-
https://perldoc.perl.org/File/Path.html
129-
130-
https://metacpan.org/pod/File::Copy::Recursive
131-
https://metacpan.org/pod/Module::ScanDeps
132-
133-
https://www.perl.com/article/37/2013/8/18/Catch-and-Handle-Signals-in-Perl/
123+
https://perldoc.perl.org/File/Temp.html
134124

135125
https://www.perlmonks.org/bare/?node_id=768448 "Permanently sort a hash"
136126
https://www.perlmonks.org/?node_id=27443 "Checking to see if a particular Module is installed"
137-
https://www.perlmonks.org/?node_id=982572 "ScanDeps usage"
138127

139128
https://stackoverflow.com/questions/4510550/using-perl-how-do-i-decode-or-create-those-encodings-on-the-web
140129
https://stackoverflow.com/questions/5741101/easy-way-to-print-perl-array-with-a-little-formatting
141130
https://stackoverflow.com/questions/15210532/use-utf8-gives-me-wide-character-in-print
142-
https://stackoverflow.com/questions/787899/how-do-i-use-a-perl-module-from-a-relative-location
143-
https://stackoverflow.com/questions/229357/what-is-the-best-way-in-perl-to-copy-files-into-a-yet-to-be-created-directory-tr
144131

145132
https://perlmaven.com/manipulating-perl-arrays
146133
https://perlmaven.com/how-to-sort-a-hash-in-perl

doc/APPIMAGE.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22

33
## PEB AppImage Maker
44

5-
PEB or any PEB-based application can be easily packed as a 64-bit single-file Linux [AppImage](https://appimage.org/) executable by the [PEB AppImage Maker](https://github.com/ddmitov/perl-executing-browser/blob/master/sdk/appimage-maker.sh) script, which has two modes of operation:
5+
PEB and any PEB-based application can be easily packed as a 64-bit single-file Linux [AppImage](https://appimage.org/) executable by the [PEB AppImage Maker](https://github.com/ddmitov/perl-executing-browser/blob/master/sdk/appimage-maker.sh) script, which has two modes of operation:
66

77
* packing a Perl application together with a PEB executable, Qt libraries and a relocatable Perl distribution:
88

99
```bash
1010
./appimage-maker.sh --include-resources
1111
```
1212

13-
In this case, the PEB AppImage Maker 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.
14-
15-
Perl Distribution Compactor depends on [Module::ScanDeps](https://metacpan.org/pod/Module::ScanDeps) and [File::Copy::Recursive](https://metacpan.org/pod/File::Copy::Recursive) CPAN modules, which are included in the ``{PEB_executable_directory}/sdk/lib`` directory.
16-
1713
* packing only a PEB executable and its Qt libraries:
1814

1915
```bash
@@ -32,7 +28,7 @@ The PEB AppImage Maker script must be started from the ``{PEB_executable_directo
3228
``{PEB_executable_directory}/resources/app/appimage/{application_name}.appdata.xml``
3329

3430
``{PEB_executable_directory}/resources/app/{application_name}.desktop``
35-
is mandatory for any PEB-based application which will be packed by the PEB AppImage Maker.
31+
is mandatory for any PEB-based application which is to be packed by the PEB AppImage Maker.
3632
A minimal example of а ``.desktop`` file is available [here](https://github.com/ddmitov/perl-executing-browser/blob/master/resources/app/peb-demo.desktop).
3733
``Icon=app`` in the ``.desktop`` file must not be changed for the proper display of the application icon.
3834
All registered categories in a ``.desktop`` file are available [here](https://standards.freedesktop.org/menu-spec/latest/apa.html).

doc/REQUIREMENTS.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
## Compile-Time Requirements
44

5-
The only Linux and Mac compile-time requirement of PEB is a Qt development bundle version 5.2 or any later version.
5+
The only Linux and Mac compile-time requirement of PEB is a Qt development bundle version 5.2 or higher.
66

7-
Compiling PEB on Windows is subject to the following restrictions:
8-
9-
* PEB source code is not MSVC-compatible and PEB can not be linked against ``QtWebEngine``.
10-
* Windows builds of PEB can only be compiled by a GCC-based MinGW Qt using the ``QtWebKit`` web engine.
11-
* ``QtWebKit`` can be added to MinGW Qt versions 5.6.x or higher from the [repository of Konstantin Tokarev (annulen)](https://github.com/annulen/webkit/releases).
7+
PEB on Windows can be compiled only with a GCC-based MinGW Qt versions 5.2 to 5.6.
128

139
Compiled and tested successfully using:
1410

@@ -27,30 +23,12 @@ qmake -qt=qt5
2723
make
2824
```
2925

30-
Please note that PEB builds using the standard ``QtWebKit`` web engine are single-process applications consuming less memory than PEB builds using the multiprocess ``QtWebEngine``.
26+
Please note that PEB builds using the standard ``QtWebKit`` web engine are single-process applications and they consume less memory than PEB builds using the multiprocess ``QtWebEngine``.
3127

3228
## Compile-Time Settings
3329

3430
PEB compile-time settings can be changed by editing the ``src/peb.pro`` project file according to the following instructions.
3531

36-
* Updated QtWebKit
37-
To use ``QtWebKit`` or ``QtWebEngine`` depending on the Qt version, which is the default setting:
38-
39-
```QMake
40-
ANNULEN_QTWEBKIT = 0
41-
```
42-
43-
The default web engine for Qt versions up to 5.5.x is ``QtWebKit``.
44-
The default web engine for Qt versions 5.6.x or higher is ``QtWebEngine``.
45-
46-
To use [an updated QtWebKit from the repository of Konstantin Tokarev (annulen)](https://github.com/annulen/webkit/releases) with a Qt version 5.6.x or higher:
47-
48-
```QMake
49-
ANNULEN_QTWEBKIT = 1
50-
```
51-
52-
Setting ``ANNULEN_QTWEBKIT`` to ``1`` has no effect on Qt versions 5.5.x or lower.
53-
5432
* Mac Bundle
5533
To make a bundle-less binary, which is the default setting:
5634

resources/app/index-windows.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
<a class="btn btn-primary" href="perl_info.script">Perl Basic Information</a>
132132
<a class="btn btn-primary" href="sqlite.script">SQLite Test</a>
133133
<a class="btn btn-primary" href="javascript:clearTestData();">Clear Test Data</a>
134-
<a class="btn btn-primary" href="javascript:location.reload();">Reload</a>
135134
<a class="btn btn-primary" href="https://www.google.com/">Google</a>
136135
<a class="btn btn-primary" href="javascript:about();" role="button">About</a>
137136
</div>

resources/app/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
<a class="btn btn-primary" href="perl_info.script">Perl Basic Information</a>
109109
<a class="btn btn-primary" href="sqlite.script">SQLite Test</a>
110110
<a class="btn btn-primary" href="javascript:clearTestData();">Clear Test Data</a>
111-
<a class="btn btn-primary" href="javascript:location.reload();">Reload</a>
112111
<a class="btn btn-primary" href="https://www.google.com/">Google</a>
113112
<a class="btn btn-primary" href="javascript:about();" role="button">About</a>
114113
</div>

sdk/appimage-maker.sh

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,19 @@ if [ $mode == "none" ]; then
3535
exit 1
3636
fi
3737

38-
# If no PEB binary is found, it is compiled from source:
39-
if [ ! -e "$(pwd)/peb" ]; then
40-
cd "$(pwd)/src" || exit
38+
# PEB binary is always compiled from sources:
39+
cd "$(pwd)/src" || exit
4140

42-
qmake -qt=qt5
43-
make
41+
rm -rf tmp
42+
rm -f .qmake.stash
43+
rm -f Makefile
4444

45-
cd .. || exit
46-
fi
45+
qmake -qt=qt5
46+
make
47+
48+
cd .. || exit
4749

48-
# If no 'linuxdeployqt' is found, it is downloaded from web:
50+
# If no 'linuxdeployqt' is found, it is downloaded from the web:
4951
linuxdeployqt="linuxdeployqt-continuous-$(arch).AppImage"
5052

5153
if [ ! -x "$linuxdeployqt" ]; then
@@ -78,6 +80,9 @@ if [ $mode == "no-resources" ]; then
7880
cp "$(pwd)/LICENSE.md" "$(pwd)/peb.app/LICENSE.md"
7981
cp "$(pwd)/README.md" "$(pwd)/peb.app/README.md"
8082

83+
# Version:
84+
export VERSION="1.0.0"
85+
8186
# AppImage creation:
8287
"$(pwd)/$linuxdeployqt" "--appimage-extract"
8388
"$(pwd)/squashfs-root/AppRun" "$(pwd)/peb.app/peb" -qmake='qmake -qt=qt5' -no-translations -appimage
@@ -117,7 +122,7 @@ if [ $mode == "include-resources" ]; then
117122
# AppImage metadata file:
118123
if [ -e "$(pwd)/resources/app/appimage/$appimage_name.appdata.xml" ]; then
119124
mkdir -p "$(pwd)/$appimage_name.app/usr/share/metainfo"
120-
cp -f "$(pwd)/resources/app/$appimage_name.appdata.xml" "$(pwd)/$appimage_name.app/usr/share/metainfo/$appimage_name.appdata.xml"
125+
cp -f "$(pwd)/resources/app/appimage/$appimage_name.appdata.xml" "$(pwd)/$appimage_name.app/usr/share/metainfo/$appimage_name.appdata.xml"
121126
fi
122127

123128
# Documentation:
@@ -126,39 +131,15 @@ if [ $mode == "include-resources" ]; then
126131
cp "$(pwd)/LICENSE.md" "$(pwd)/$appimage_name.app/LICENSE.md"
127132
cp "$(pwd)/README.md" "$(pwd)/$appimage_name.app/README.md"
128133

129-
# Copying the contents of the 'resources' directory
130-
# without its 'perl' subdirectory:
131-
mkdir "$(pwd)/$appimage_name.app/resources/"
132-
133-
declare -a RESOURCES
134-
RESOURCES=("$(ls --ignore=perl "$(pwd)"/resources)")
135-
136-
for RESOURCE in "${RESOURCES[@]}"; do
137-
cp -r "$(pwd)/resources/${RESOURCE}" "$(pwd)/$appimage_name.app/resources/${RESOURCE}";
138-
done
139-
140-
# Relocatable Perl packing:
141-
relocatable_perl="$(pwd)/resources/perl/bin/perl"
142-
compactor_script="$(pwd)/sdk/compactor.pl"
143-
144-
if [ -e "$relocatable_perl" ]; then
145-
printf "\\nGoing to compact the relocatable Perl for this copy of Perl Executing Browser.\\n"
146-
"$relocatable_perl" "$compactor_script" "--appimage=$appimage_name"
147-
else
148-
printf "\\nRelocatable Perl is not found for this copy of Perl Executing Browser.\\n"
149-
fi
134+
# Resources:
135+
cp -r "$(pwd)/resources" "$(pwd)/$appimage_name.app/resources"
150136

151137
# File cleaning:
152138
rm -f "$(pwd)/$appimage_name.app/resources/app/$appimage_name.desktop"
153139
rm -f "$(pwd)/$appimage_name.app/resources/app/$appimage_name.appdata.xml"
154140

155-
# File cleaning for the 'peb-demo' package:
156-
if [ "$appimage_name" == "peb-demo" ]; then
157-
export VERSION="1.0.0"
158-
rm -f "$(pwd)/$appimage_name.app/resources/app/index-windows.html"
159-
rm -f "$(pwd)/$appimage_name.app/resources/app/perl-scripts/messenger.pl"
160-
rm -f "$(pwd)/$appimage_name.app/resources/app/perl-scripts/interactive-windows.pl"
161-
fi
141+
# Version:
142+
export VERSION="1.0.0"
162143

163144
# AppImage creation:
164145
"$(pwd)/$linuxdeployqt" "--appimage-extract"

sdk/compactor.pl

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)