The contact sheet can develop a frame and write the JPEG and XMP beside it. Merged DNGs pin D50 so the colour tags stay. Local FTP sends four originals at once and runs detection off that path.
88 lines
2.8 KiB
Rust
88 lines
2.8 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",
|
|
"local_film_thumb",
|
|
"folder_drop",
|
|
"folder_open",
|
|
"folder_thumb",
|
|
"folder_read",
|
|
"folder_meta",
|
|
"folder_merge_dng",
|
|
"folder_save_dng",
|
|
"folder_save_jpeg",
|
|
"folder_save_xmp",
|
|
"ftp_preview",
|
|
"ftp_info",
|
|
"catalog_folders",
|
|
"catalog_add",
|
|
"catalog_remove",
|
|
"catalog_scan",
|
|
"catalog_status",
|
|
"catalog_cancel",
|
|
"card_scan",
|
|
"card_ingest",
|
|
"card_cancel",
|
|
"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}");
|
|
}
|