desktop (Linux): a missing update-desktop-database or xdg-mime no longer stops the app at start (the setup hook failed with 'No such file or directory'); storebound:// registration failure is a host.log warning

This commit is contained in:
CRTkafa 2026-10-13 01:57:57 +08:00
parent 187911320b
commit 7901beee1e

View file

@ -178,8 +178,12 @@ pub fn run() {
show_main(app);
}
});
// Linux: registering runs update-desktop-database and xdg-mime, which a minimal system may not have; a
// missing tool must not stop the app (it then only misses storebound:// links)
#[cfg(any(target_os = "linux", all(debug_assertions, windows)))]
app.deep_link().register_all()?;
if let Err(e) = app.deep_link().register_all() {
logs::host("warn", &format!("storebound:// links not registered: {e}"));
}
let handle = app.handle().clone();
app.deep_link().on_open_url(move |e| handle_deep_link(&handle, &e.urls()));
if let Ok(Some(urls)) = app.deep_link().get_current() {