Skip to content

fix(tauri): appimage builds and media loading#850

Open
TastelessVoid wants to merge 5 commits into
SableClient:feat/tauri-integrationfrom
TastelessVoid:feat/tauri-integration
Open

fix(tauri): appimage builds and media loading#850
TastelessVoid wants to merge 5 commits into
SableClient:feat/tauri-integrationfrom
TastelessVoid:feat/tauri-integration

Conversation

@TastelessVoid
Copy link
Copy Markdown
Contributor

Description

Fixes for the Tauri desktop builds, as well as an attempted fix to media on them. User/Room avatars may potentially not load still, but switching between rooms, closing/opening the member list etc. fixes that.

Also I think I messed up pulling the repo, oops

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@TastelessVoid TastelessVoid requested review from 7w1 and hazre as code owners May 15, 2026 14:27
Comment thread src-tauri/src/main.rs
Comment on lines +32 to +76
// AppImage can fail to discover host GStreamer plugins/scanner. Probe
// common distro layouts, but don't override explicit user config.
// Not finding these plugings prevents Sable from launching correctly.
// Maybe there's a better way to do this?
let plugin_dirs = [
"/usr/lib/gstreamer-1.0",
"/usr/lib64/gstreamer-1.0",
"/usr/local/lib/gstreamer-1.0",
"/usr/local/lib64/gstreamer-1.0",
"/usr/lib/x86_64-linux-gnu/gstreamer-1.0",
"/usr/lib/aarch64-linux-gnu/gstreamer-1.0",
"/run/host/usr/lib/gstreamer-1.0",
"/run/host/usr/lib64/gstreamer-1.0",
];
let resolved_plugin_dir = plugin_dirs.iter().find(|dir| Path::new(dir).exists());

if std::env::var_os("GST_PLUGIN_SYSTEM_PATH_1_0").is_none() {
if let Some(dir) = resolved_plugin_dir {
std::env::set_var("GST_PLUGIN_SYSTEM_PATH_1_0", dir);
}
}
if std::env::var_os("GST_PLUGIN_PATH_1_0").is_none() {
if let Some(dir) = resolved_plugin_dir {
std::env::set_var("GST_PLUGIN_PATH_1_0", dir);
}
}
if std::env::var_os("GST_PLUGIN_SCANNER").is_none() {
let mut scanner_candidates: Vec<PathBuf> = vec![
PathBuf::from("/usr/lib/gstreamer-1.0/gst-plugin-scanner"),
PathBuf::from("/usr/lib64/gstreamer-1.0/gst-plugin-scanner"),
PathBuf::from("/usr/libexec/gstreamer-1.0/gst-plugin-scanner"),
PathBuf::from("/usr/lib/x86_64-linux-gnu/gstreamer-1.0/gst-plugin-scanner"),
PathBuf::from("/usr/lib/aarch64-linux-gnu/gstreamer-1.0/gst-plugin-scanner"),
PathBuf::from("/run/host/usr/lib/gstreamer-1.0/gst-plugin-scanner"),
PathBuf::from("/run/host/usr/lib64/gstreamer-1.0/gst-plugin-scanner"),
];

if let Some(path_env) = std::env::var_os("PATH") {
scanner_candidates.extend(std::env::split_paths(&path_env).map(|p| p.join("gst-plugin-scanner")));
}

if let Some(scanner) = scanner_candidates.iter().find(|path| path.exists()) {
std::env::set_var("GST_PLUGIN_SCANNER", scanner.as_os_str());
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of this, we should just enable bundleMediaFramework under appimage option. https://v2.tauri.app/distribute/appimage/#multimedia-support-via-gstreamer

function getCacheRequest(url: string): Request {
const isAbsoluteHttpUrl = /^https?:\/\//i.test(url);
if (!isAbsoluteHttpUrl) {
return new Request(`https://sable-media-cache.invalid/${encodeURIComponent(url)}`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Comment thread src-tauri/src/main.rs
Comment on lines +22 to +30
// WebKit2GTK can hit compositor/DMABUF bugs
// https://github.com/tauri-apps/tauri/issues/14424
// https://github.com/tauri-apps/tauri/issues/9394
if std::env::var_os("WEBKIT_DISABLE_COMPOSITING_MODE").is_none() {
std::env::set_var("WEBKIT_DISABLE_COMPOSITING_MODE", "1");
}
if std::env::var_os("WEBKIT_DISABLE_DMABUF_RENDERER").is_none() {
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already handled by __NV_DISABLE_EXPLICIT_SYNC no? what's the exact error/bug here? tauri-apps/tauri#9394 (comment)

@hazre hazre changed the title Feat/tauri integration fix(tauri): appimage builds and media loading May 15, 2026
@hazre hazre added internal Tauri Issue related to Desktop and Mobile builds labels May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Tauri Issue related to Desktop and Mobile builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants