From bec7833a6c29ed9d1a5ab53e1c2cdd80e66cd272 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Thu, 9 Dec 2021 22:38:01 +0100 Subject: [PATCH] fix(bundler): bundle additional webkit files. patch absolute paths in libwebkit*.so files. fixes #2805,#2689 (#2940) --- .changes/bundler-fix-appimage.md | 5 +++++ tooling/bundler/src/bundle/linux/templates/appimage | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changes/bundler-fix-appimage.md diff --git a/.changes/bundler-fix-appimage.md b/.changes/bundler-fix-appimage.md new file mode 100644 index 000000000..fcaf8b4db --- /dev/null +++ b/.changes/bundler-fix-appimage.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': patch +--- + +Fixes AppImage crashes caused by missing WebKit runtime files. diff --git a/tooling/bundler/src/bundle/linux/templates/appimage b/tooling/bundler/src/bundle/linux/templates/appimage index 7a7355525..8525bfbd8 100644 --- a/tooling/bundler/src/bundle/linux/templates/appimage +++ b/tooling/bundler/src/bundle/linux/templates/appimage @@ -12,6 +12,11 @@ cp -r ../appimage_deb/data/usr "{{app_name}}.AppDir" cd "{{app_name}}.AppDir" +# Copy WebKit files. +find /usr/lib* -name WebKitNetworkProcess -exec mkdir -p $(dirname '{}') \; -exec cp --parents '{}' "." \; || true +find /usr/lib* -name WebKitWebProcess -exec mkdir -p $(dirname '{}') \; -exec cp --parents '{}' "." \; || true +find /usr/lib* -name libwebkit2gtkinjectedbundle.so -exec mkdir -p $(dirname '{}') \; -exec cp --parents '{}' "." \; || true + wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 || wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-aarch64 chmod +x AppRun @@ -22,7 +27,7 @@ ln -s "usr/share/applications/{{app_name}}.desktop" "{{app_name}}.desktop" cd .. -wget -q -4 -O linuxdeploy-plugin-gtk.sh "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" +wget -q -4 -O linuxdeploy-plugin-gtk.sh "https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" wget -q -4 -O linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod +x linuxdeploy-plugin-gtk.sh