-
-
Notifications
You must be signed in to change notification settings - Fork 218
fix: synchronize pending Linux and subtitle fixes #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| #!/usr/bin/env bash | ||
| # Make Tauri's default AppImage safe on hosts newer than the build image. | ||
| # | ||
| # linuxdeploy copies core Wayland/GLib/GStreamer libraries into the AppImage. | ||
| # Those libraries must stay in sync with the host Mesa and desktop stack; mixing | ||
| # the Ubuntu 22.04 copies with a newer host causes WebKitGTK to abort while | ||
| # creating its EGL display. This script keeps application libraries (including | ||
| # WebKitGTK) bundled, but defers the desktop-stack libraries to the host. | ||
| set -euo pipefail | ||
|
|
||
| if [ "$#" -ne 2 ]; then | ||
| echo "Usage: $0 <AppImage> <main-binary-name>" >&2 | ||
| exit 64 | ||
| fi | ||
|
|
||
| appimage=$1 | ||
| main_binary=$2 | ||
|
|
||
| if [ ! -f "$appimage" ]; then | ||
| echo "AppImage does not exist: $appimage" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| for required_command in dd mksquashfs mktemp; do | ||
| command -v "$required_command" >/dev/null || { | ||
| echo "Missing required command: $required_command" >&2 | ||
| exit 1 | ||
| } | ||
| done | ||
|
|
||
| workspace=$(mktemp -d) | ||
| trap 'rm -rf "$workspace"' EXIT | ||
|
|
||
| appimage_abs=$(cd "$(dirname "$appimage")" && pwd)/$(basename "$appimage") | ||
| cd "$workspace" | ||
|
|
||
| # --appimage-extract works without FUSE. APPIMAGE_EXTRACT_AND_RUN also makes | ||
| # extraction work on GitHub runners where FUSE is unavailable. | ||
| APPIMAGE_EXTRACT_AND_RUN=1 "$appimage_abs" --appimage-extract >/dev/null | ||
| appdir="$workspace/squashfs-root" | ||
|
|
||
| if [ ! -x "$appdir/usr/bin/$main_binary" ]; then | ||
| echo "Expected executable is missing from AppImage: usr/bin/$main_binary" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Keep these ABI-coupled libraries on the host. Do not broaden this list to | ||
| # application dependencies: the goal is to preserve AppImage portability while | ||
| # avoiding the Mesa/Wayland and GLib ABI mismatch that causes EGL_BAD_PARAMETER. | ||
| for pattern in \ | ||
| 'libwayland-*.so*' \ | ||
| 'libxkbcommon*.so*' \ | ||
| 'libglib-2.0.so*' \ | ||
| 'libgio-2.0.so*' \ | ||
| 'libgobject-2.0.so*' \ | ||
| 'libgmodule-2.0.so*' \ | ||
| 'libgst*.so*' \ | ||
| 'libmount.so*' \ | ||
| 'libblkid.so*' \ | ||
| 'libselinux.so*' \ | ||
| 'libpcre2-8.so*' \ | ||
| 'libzstd.so*' \ | ||
| 'libelf.so*' \ | ||
| 'libffi.so*'; do | ||
| find "$appdir/usr/lib" -maxdepth 1 \( -type f -o -type l \) -name "$pattern" -delete | ||
| done | ||
|
|
||
| # Bypass linuxdeploy's AppRun.wrapped, which exports paths for bundled | ||
| # GStreamer/Python/Qt components that Youwee does not ship. In particular, an | ||
| # empty GST_PLUGIN_SYSTEM_PATH prevents WebKitGTK from finding host plugins. | ||
| cat > "$appdir/AppRun" <<APP_RUN | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| APPDIR="\$(cd "\$(dirname "\${BASH_SOURCE[0]}")" && pwd)" | ||
| export APPDIR | ||
|
|
||
| if [ -f "\$APPDIR/apprun-hooks/linuxdeploy-plugin-gtk.sh" ]; then | ||
| # shellcheck disable=SC1091 | ||
| source "\$APPDIR/apprun-hooks/linuxdeploy-plugin-gtk.sh" | ||
| fi | ||
|
|
||
| unset PYTHONHOME PYTHONPATH PERLLIB QT_PLUGIN_PATH | ||
| unset GST_PLUGIN_SYSTEM_PATH GST_PLUGIN_SYSTEM_PATH_1_0 GST_PLUGIN_PATH_1_0 | ||
| unset GST_PLUGIN_SCANNER_1_0 GST_PTP_HELPER_1_0 | ||
| export LD_LIBRARY_PATH="\$APPDIR/usr/lib\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}" | ||
| export PATH="\$APPDIR/usr/bin:\$PATH" | ||
|
|
||
| # WebKitGTK helper processes resolve bundled libraries relative to usr. | ||
| cd "\$APPDIR/usr" | ||
| exec "\$APPDIR/usr/bin/$main_binary" "\$@" | ||
| APP_RUN | ||
| chmod +x "$appdir/AppRun" | ||
|
|
||
| offset=$(APPIMAGE_EXTRACT_AND_RUN=1 "$appimage_abs" --appimage-offset) | ||
| runtime="$workspace/runtime" | ||
| payload="$workspace/payload.squashfs" | ||
| rebuilt="$workspace/$(basename "$appimage")" | ||
|
|
||
| dd if="$appimage_abs" of="$runtime" bs=1 count="$offset" status=none | ||
| mksquashfs "$appdir" "$payload" -noappend -all-root -comp zstd -no-progress >/dev/null | ||
| cat "$runtime" "$payload" > "$rebuilt" | ||
| chmod +x "$rebuilt" | ||
| mv "$rebuilt" "$appimage_abs" | ||
|
|
||
| echo "Rebuilt AppImage with host Wayland/GLib/GStreamer runtime libraries: $appimage_abs" |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signing credentials are scoped to the preceding
tauri-actionstep, so this subsequent shell step does not receiveTAURI_SIGNING_PRIVATE_KEYor its password. On every Linux release, after the AppImage is rebuilt and its original.sigis deleted,tauri signer signwill fail for lack of a private key and the release job cannot publish artifacts. Add the same signing env variables to this step (or promote them to job-level env).Useful? React with 👍 / 👎.