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:
parent
187911320b
commit
7901beee1e
1 changed files with 5 additions and 1 deletions
|
|
@ -178,8 +178,12 @@ pub fn run() {
|
||||||
show_main(app);
|
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)))]
|
#[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();
|
let handle = app.handle().clone();
|
||||||
app.deep_link().on_open_url(move |e| handle_deep_link(&handle, &e.urls()));
|
app.deep_link().on_open_url(move |e| handle_deep_link(&handle, &e.urls()));
|
||||||
if let Ok(Some(urls)) = app.deep_link().get_current() {
|
if let Ok(Some(urls)) = app.deep_link().get_current() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue