Bundle libwebkit2gtk-4.1 in AppImages - #201
Merged
Merged
Conversation
Use linuxdeploy to automatically bundle all ldd-detected shared libraries into AppImages. Additionally bundle WebKit helper processes, GLib schemas, GIO modules, and GDK pixbuf loaders which are not detected by ldd but required at runtime. AppImages grow from ~9 MB to ~100-150 MB but now work on systems without webkit2gtk installed (e.g. SteamOS/Steam Deck). Closes #194
- generate_desktop in release.yml now uses actual binary name for Exec and desktop ID for Icon (linuxdeploy validates Exec against AppDir) - Add find-based fallback for WebKit helper detection on Ubuntu
- Add command -v check before gdk-pixbuf-query-loaders in release.yml - Install libgdk-pixbuf2.0-bin in appimage CI job
linuxdeploy creates AppRun as a symlink to the binary. Writing to it via cat > follows the symlink and overwrites the actual binary with the shell script, corrupting the AppImage.
WEBKIT_EXEC_PATH only works in developer builds of webkit2gtk. Production builds hardcode the helper path at compile time. Patch libwebkit2gtk-4.1.so.0 to replace /usr with ././ (same byte length), making paths relative. AppRun now cd's to the AppDir root so the relative paths resolve correctly. This is the same approach used by Tauri's AppImage bundler.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
linuxdeployto bundle all shared library dependencies into AppImagesLD_LIBRARY_PATH,WEBKIT_EXEC_PATH,GIO_MODULE_DIR,GDK_PIXBUF_MODULE_FILE,GSETTINGS_SCHEMA_DIRin AppRunChanges
build_all.sh: Updatedgenerate_appimage()with linuxdeploy download, library bundling, and AppRun env varsrelease.yml: Split monolithic AppImage step into Prepare → Bundle → AppRun → Build, added system deps and linuxdeployTest plan
Closes #194