libssl.so and libcrypto.so are embedded in the appimage so that it can
work on newer systems having a deceptively backward incompatible
version of OpenSSL.
The fix includes patching the libQt5Network.so library so that aria2's CA
certificate bundle (being included in the appimage before this change)
is used as a fallback if no certificates can be found in various
locations used for certificate stores on different major Linux
distributions. To this end, the AppRun entry point of the AppImage is
changed from a symlink to the kiwix-desktop binary to a small shell
script that creates a temporary symlink at a hardcoded path
(/tmp/cert_bundle_provided_by_kiwix.crt) pointing to the said
certificate bundle within the AppImage filesystem.
LinuxDeployQt check for the libc version to not being to recent.
As we have change the version of libc by moving to focal, we have to
update the version of LinuxDeployQt.
We have added those libraries to fixkiwix/kiwix-destop#14,
ie allow appimage build on recent system to run on older ones by packaging
the libc and libstdc++ library in the appimage.
But by packaging libstdc++, we force kiwix-desktop to use the packaged one.
On some recent system, the mesa drivers need a recent version of libstdc++ and,
as we are force to use the packaged one, we may use a "old" one.
The workaround forcing a driver was bypassing the problem by forcing a driver
not using a recent libstdc++. But with time, it is more and more difficult
to find one.
This commit means that new appimage generated will works only on equal or
more recent system that the one on which it has been generated.
For now we generate the appimage on Ubuntu bionic (18.04 LTS).
This reverts commit 05c0a691ec.
If it is the first time the script is run, $APPDIR doesn't exist, so,
by definition, `$APPDIR/lib` doesn't exists neither.
We must check the library dir in `$INSTALLDIR` which is the "source"
directory for script.
* use appropriate value for SYSTEMLIBDIR automatically
* do not stop on absence of lib/libmagic.so*
* do not download AppImage tools again on further script runs