Fixes https://tangled.org/janantos.tngl.sh/brow6el/issues/1.
Two independent problems, one commit each:
-
build_appimage.sh and build_appimage_arm64.sh still bundle libnss3, libnspr4 and other system libraries, which e66bd68 already removed from the CI workflow. NSS loads its other modules from the system at runtime, so the bundled half and the system half do not match and startup aborts with FATAL nss_util.cc nss_error=-5925. That is what the stable AppImage on brow6el.dev (built before e66bd68) does on Debian sid and trixie. This commit applies the e66bd68 change to the scripts and also copies tutorial.html, which they left out.
-
The AppImage keeps the executable in usr/bin and the CEF resources, locales and JS files in usr/, but the code only looks next to the executable. In the current bleeding edge AppImage, hint, mouse, inspect and visual modes cannot load their JS ("Failed to load hint_mode.js from .../usr/bin/hint_mode.js"), and an extracted AppImage (--appimage-extract or --appimage-extract-and-run, the usual way on systems without FUSE) does not start, because CEF is pointed at usr/bin for its resources. A small helper now looks next to the executable first and one level up second, and CEF's resource paths are only set when resources.pak is next to the executable, otherwise CEF uses its default, the libcef.so directory.
Tested with CEF 154 (the version in https://tangled.org/janantos.tngl.sh/brow6el/pulls/1) on Debian sid, before and after, in the portable build directory, in the CI AppImage layout (mounted, extracted and with --appimage-extract-and-run) and in an AppImage made by the fixed build_appimage.sh. With the change all of them render and hint mode loads. Also checked by hand in kitty.
Rebuilding the stable AppImage from v0.3.5 with CEF 154 should close issue 1 for users and also bring in the Chromium security fixes since 143.