Besides the original check (-n $WAYLAND_DISPLAY), do not use the bundled
libraries also when there are the libwayland* in system (so not needed).
This allows `uv -d sdl:driver=KMSDRM` even from console when
WAYLAND_DISPLAY is not defined but Wayland is run in a different session.
If the WAYLAND_DISPLAY is defined but the not all libwayland* are found
in the system, now the bundled version is used (changed- was not
previously).
ilibpipewire-0.3.so.0 was added to excludelist causing the distcheck fail,
see [1]
We do not need to exclude the lib, because we already handle the preload
in data/scripts/Linux-AppImage/AppRun:282 (the case is similar as for
libjack.so.0 as also mentioned in the related AppImage issue).
[1]:
04af461f47
Doesn't seem to be required and nwo (since the new PPA use) causes following error:
```
ultragrid_vidcap_rtsp.so: /lib/x86_64-linux-gnu/libgnutls.so.30: undefined symbol: nettle_siv_gcm_aes256_decrypt_message, version NETTLE_8
``
(obviously) when libgnutls30 is not installed, eg. in Ubuntu 24.04.
Check if bundled libavcodec has all dependencies satisfied from system
libva, if not do not use the system ones.
Fixes the error message:
```
undefined symbol: vaMapBuffer2 (./squashfs-root/usr/lib/libavutil.so.59)
```
on (some) current Ubuntu 22.04 with current continuous AI.
If run from within the AppImage, -h shows help of the AppImage wrapper
itself, not the one of UltraGrid. So add --ug-help as an alternative for
`-o uv -h`.
First considered was a shortopt -H, but this is currently mapped by UG
for --full-help (which can be used directly), so keep the long variant
in order not to make it confusing.
In the current AppImages, the bundled libavcodec depends just on
libva.so.2 but libavutil depends on libva.so.2, libav-drm.so.2 and
libva-x11.so.2. Since the availability of any of libva-*.so was not
detected, even if those are not present (eg. in GRML 24.02 libva-x11.so.2
is missing), the system library was used.
As a solution, check the availability of all libav.* that is bundled
libavcodec and libavutil depending on.
if it happens that parent dir is /tmp, eg.:
`ug.AppImage -t testcard:file=/tmp/img.pam`
do not whitelist /tmp, otherwise following error occurs:
`Error: invalid whitelist path /tmp`
This respawns the process instead of the script. The advantage is that
when the AppImage process is killed, UG is killed as well, eg. in this
case:
```
UltraGrid-continuous-x86_64.AppImage -t testcard & (sleep 3; kill $!)
```
Otherwise just the parent process (the shell) is killed, leaving the child
(UG) running on background, which is undesirable. See also:
<https://stackoverflow.com/questions/8533377/why-child-process-still-alive-after-parent-process-was-killed-in-linux>
For the above command, `kill -SIGTERM -$!` would be required to do
the job, but the parent shell process keeps "running" in the background
and `bg` needs to be run.
Do not bundle SDL_SOUNDFONT instead of the SoundFont now included in
sources. This is a bit contra-intuitive, since the user may have set
the SDL_SOUNDFONT for its primary reason. Using the variable was just
a workaround to find _any_ usable soundfont, which is now unneeded.
Also, the user-selected soundfont may have hundreds of MB (as usually
the general-purpose soundfonts have).
The size is only some 90 kB when compressed so it is perhaps not worth
downloading from external source and depend on it.
It could be even bundled directly, not by CI. Now it is actually the case
in Linux (create-appimage.sh) but it is also possible for other platforms.
It is not needed to split the string like this:
```
a="potentially long string on"\
"multiple lines"
```
but it is better rather to put the '\' inside the string:
```
a="potentially long string on\
multiple lines"
```
+ removed the subshell
The redirection is actually no longer neeeded - we do not need to bother
where the output goes but the reason for the redirection is no longer
valid - the created AppImage is no longer outputted.
mkappimage now tries to automatically upload the asset if it detects
running in GitHub CI, which is not the behavior we perhaps want because
it deletes and recreates our _continuous_ release.
See following failed run:
https://github.com/CESNET/UltraGrid/actions/runs/5575039257/jobs/10185765784
+ fixed `wget` presence check in `create-appimage.sh`
The caller can now provide its own FIREJAIL_OPTS (if something is
needed).
+ do not pass explicitly UG_FONT_DIR to firejail - the environment isn't
entirely pruned, the env vars usually pass to the Firejail, except of
some, including LD_PRELOAD, LD_LIBRARY_PATH and TMPDIR, which are
already passed.
- TMPDIR was not writtable - `--read-only=/tmp` after
`--read-write=/tmp/something` overrides read-write, order needs to be
reversed
- for args file, filename, make parent directory writtable - it may not
only be read, but also written (like `--protocol sdp:file=out.sdp`)
+ FIREJAIL_DEBUG to print assembled Firejail arguments
If $ULTRAGRID_AUTOUPDATE is set to >= 0, use it as update interval (in
days).
Since the value 0 was used to suppress the update warning, the value
to suppress the warning was required to change to -1.
The command-line tools used here (eg. stat) may use our custom libraries
(like libselinux) which may not be entirely compatible (it just most
likely ends up with a warning).
+ do the same for get_tools() and set_libva_ld_preload()
+ use original (if any) LD_LIBRARY_PATH for set_ld_preload()
+ removed unneeded `exit $?` (it is implicit)
libpipewire is incompatible with preloaded jack on current Arch and
causes a crash (unsatisfied jack pipewire function dependency).
Anyways, the pipewire screen capture didn't work with the bundled
library, anyways, so we certainly need one from system.
Setting LD_LIBRARY_PATH would override the library path also for tput
executable, leading to possible incompatible version of ncurses in
bundle, leading to following error:
tput: /tmp/.mount_UG-20-oJoJEf/usr/lib/libncursesw.so.6: version `NCURSES6_TINFO_6.2.20211010' not found (required by tput)
(and of course the color escape sequence is not returned)
Don't use bundled Wayland libraries when running on Wayland but use it
otherwise to satisfy possibly unsatisfied dependencies.
See also previous commit - Wayland libraries seem not to be portable and
prevent SDL2 native run on Wayland. After this change, SDL2 runs on
U22.04 in Weston (without Xwayland).