Closing it only hides the window; a bar at the bottom opens it again. The Mac build also links compiler-rt, which the GPU recogniser needs and the installer was missing.
77 lines
2.5 KiB
Rust
77 lines
2.5 KiB
Rust
fn main() {
|
|
// The keychain and local FTP commands get ACL permissions, so the web app loaded from the server (a remote origin) can be
|
|
// granted them explicitly in capabilities/default.json.
|
|
tauri_build::try_build(tauri_build::Attributes::new().app_manifest(
|
|
tauri_build::AppManifest::new().commands(&[
|
|
"refresh_token_get",
|
|
"refresh_token_set",
|
|
"refresh_token_clear",
|
|
"ftp_start",
|
|
"ftp_stop",
|
|
"ftp_status",
|
|
"ftp_check",
|
|
"ftp_take",
|
|
"ftp_retry",
|
|
"ftp_read",
|
|
"ftp_sent",
|
|
"ftp_open_folder",
|
|
"ftp_save_settings",
|
|
"local_original",
|
|
"local_original_changed",
|
|
"ftp_preview",
|
|
"ftp_info",
|
|
"catalog_folders",
|
|
"catalog_add",
|
|
"catalog_remove",
|
|
"catalog_scan",
|
|
"catalog_status",
|
|
"catalog_cancel",
|
|
"card_scan",
|
|
"card_ingest",
|
|
"card_settings",
|
|
"card_save_settings",
|
|
"faces_local",
|
|
"faces_scan",
|
|
"faces_cancel",
|
|
"faces_remember",
|
|
"faces_read",
|
|
"update_check",
|
|
"update_install",
|
|
"ui_status",
|
|
"ui_check",
|
|
"delivery_machine",
|
|
"delivery_folders",
|
|
"delivery_folder_pick",
|
|
"delivery_write",
|
|
"import_upload_profiles",
|
|
]),
|
|
))
|
|
.expect("failed to run tauri-build");
|
|
link_coreml_compiler_rt();
|
|
}
|
|
|
|
/// ONNX Runtime's Core ML objects call `___isPlatformVersionAtLeast`. That helper lives in compiler-rt, which Rust's
|
|
/// linker does not pull in, so the desktop build (deployment target 11) fails on the arm64 slice.
|
|
fn link_coreml_compiler_rt() {
|
|
let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
|
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();
|
|
if os != "macos" || arch != "aarch64" {
|
|
return;
|
|
}
|
|
let Ok(output) = std::process::Command::new("xcrun")
|
|
.args(["--sdk", "macosx", "clang", "-print-file-name=libclang_rt.osx.a"])
|
|
.output()
|
|
else {
|
|
return;
|
|
};
|
|
if !output.status.success() {
|
|
return;
|
|
}
|
|
let path = String::from_utf8(output.stdout).unwrap_or_default();
|
|
let path = path.trim();
|
|
if path.is_empty() || !std::path::Path::new(path).is_file() {
|
|
return;
|
|
}
|
|
println!("cargo:rustc-link-arg={path}");
|
|
}
|