Improve Linux WebKit fallback configuration

Updated the GitHub Actions workflow to simplify package installation for WebKit dependencies on Ubuntu and removed explicit version pinning. Enhanced the Linux WebKit configuration in Rust to apply and log multiple environment variable fallbacks for better handling of EGL issues.
This commit is contained in:
Ludy87
2025-12-01 18:47:05 +01:00
parent 279a307153
commit 388bb439d7
2 changed files with 18 additions and 9 deletions
+3 -8
View File
@@ -89,7 +89,9 @@ jobs:
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt install \
sudo apt install -y \
libwebkit2gtk-4.1-0 \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
@@ -99,13 +101,6 @@ jobs:
libayatana-appindicator3-dev \
librsvg2-dev \
openjdk-17-jre-headless
sudo apt install -y \
libwebkit2gtk-4.1-0=2.44.0-2 \
libwebkit2gtk-4.1-dev=2.44.0-2 \
libjavascriptcoregtk-4.1-0=2.44.0-2 \
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
gir1.2-webkit2-4.1=2.44.0-2;
- name: Setup Node.js
uses: actions/setup-node@v4
+15 -1
View File
@@ -31,9 +31,23 @@ use utils::{add_log, get_tauri_logs};
#[cfg(target_os = "linux")]
fn configure_linux_webview() {
let mut applied_settings = Vec::new();
if std::env::var_os("WEBKIT_DISABLE_COMPOSITING_MODE").is_none() {
std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
add_log("🛠️ Enabling software rendering for WebKit to avoid EGL issues on Linux".to_string());
applied_settings.push("WEBKIT_DISABLE_COMPOSITING_MODE=1 (software rendering)");
}
if std::env::var_os("WEBKIT_DISABLE_DMABUF_RENDERER").is_none() {
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
applied_settings.push("WEBKIT_DISABLE_DMABUF_RENDERER=1 (fallback EGL renderer)");
}
if !applied_settings.is_empty() {
add_log(format!(
"🛠️ Applied Linux WebKit fallbacks to avoid EGL issues: {}",
applied_settings.join(", ")
));
}
}