1.2 KiB
1.2 KiB
Vendoring TargetPrint into ICCery
CI (.gitea/workflows/build-macos.yml) publishes TargetPrint_<tag>-<sha>-vendor-iccery.zip:
vendor-iccery/
macos-x86_64/TargetPrint.app # Intel
macos-aarch64/TargetPrint.app # Apple Silicon
macos-universal/TargetPrint.app # Universal 2 (x86_64 + arm64)
Copy that tree to ICCery as src-tauri/targetprint/ (directory names match ICCery’s existing macos-x86_64 / macos-aarch64 sidecar layout).
Launch fire-and-forget (SPEC §16). TargetPrint owns its run loop and the native print panel; do not wait().
use std::env;
use std::fs;
use std::process::Command;
let json = serde_json::to_string_pretty(&job)?;
let mut path = env::temp_dir();
path.push(format!("iccery_job_{}.json", uuid::Uuid::new_v4()));
fs::write(&path, json)?;
Command::new(targetprint_executable()) // …/TargetPrint.app/Contents/MacOS/TargetPrint
.arg("--job")
.arg(&path)
.spawn()?;
Pick macos-x86_64 or macos-aarch64 for the ICCery slice being built, or ship macos-universal in every macOS build.
TargetPrint is not App Sandboxed (it calls cupsGetPPD). Hardened Runtime stays on.
End users who are not bundling ICCery should use the .dmg for the same tag (app + Applications shortcut).