Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deploy/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ mod open_external;

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// https://github.com/tauri-apps/tauri/issues/9304: webkit2gtk is broken under 2.44 with Nvidia GPUs
// "KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied" [https://github.com/secluso/core/issues/113]
// WEBKIT_DISABLE_DMABUF_RENDERER falls back to portable compositing
#[cfg(target_os = "linux")]
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");

tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.plugin(tauri_plugin_dialog::init())
Expand Down
28 changes: 28 additions & 0 deletions releases/lib/docker_deploy/run_tauri_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,30 @@ ensure_libgpg_error_bundled_with_libgcrypt() {
fi
}


# New version of Mesa has some dependency issues with libwayland-client if it is bundled
# https://github.com/AppImageCommunity/pkg2appimage/pull/559
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11316
# Bundled libwayland-client/server/egl carries private protocol-interface pointers that must match the running compositor.
# If we use our own copy makes the client lib and the host's Wayland server disagree
# So we drop them so the loader falls back to the host libraries
prune_appdir_wayland_libs() {
local appdir="$1"
[[ -n "$appdir" && -d "$appdir" ]] || return 0

local removed=0 lib
while IFS= read -r -d '' lib; do
echo "==> excluding bundled $(basename "$lib") (use host copy)"
rm -f "$lib"
removed=1
done < <(find "$appdir" \( -type f -o -type l \) \
\( -name 'libwayland-client.so*' \
-o -name 'libwayland-server.so*' \
-o -name 'libwayland-egl.so*' \) -print0 2>/dev/null)

[[ "$removed" -eq 1 ]] || echo "==> no bundled libwayland-{client,server,egl} found in AppDir"
}

canonicalize_linux_bundle_outputs_deterministically() {
[[ "$TAURI_TARGET" == *"-unknown-linux-"* ]] || return 0

Expand Down Expand Up @@ -949,6 +973,10 @@ canonicalize_linux_bundle_outputs_deterministically() {
echo "==> error: failed to bundle libgpg-error alongside libgcrypt in $appdir" >&2
return 1
}
prune_appdir_wayland_libs "$appdir" || {
echo "==> error: failed to prune bundled libwayland from $appdir" >&2
return 1
}
fi
local appimage_path
while IFS= read -r appimage_path; do
Expand Down
Loading