mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 22:19:10 -06:00
Finder hands files to an app as an Apple event, not on the command line. winit doesn't handle it, so AppKit answered "PrintCraft cannot open files in the PDF document format". The bundle also declared no PDF document type: its Info.plist still carried the sibling image editor's types. - Info.plist declares PDF (by extension and MIME type) as a document type, role Editor, rank Alternate: offered under Open With and settable as the default, without taking over on install. - apps/printcraft registers open-documents and quit Apple event handlers through fmv-macos-events (=0.1.0, the audited safe wrapper PhotoCraft uses, since the Objective-C interop needs unsafe), before the launch event arrives. - printcraft-ui-egui gains OsEvent and PrintCraftApp::os_events, polled every frame: Open opens each file as File > Open does; Quit closes the window like its close button, so unsaved changes are asked about. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.2 KiB
TOML
30 lines
1.2 KiB
TOML
[package]
|
|
name = "printcraft"
|
|
description = "PrintCraft desktop app"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
# Help ▸ Check for updates (issue #28): one HTTPS request to GitHub, over rustls with the OS's
|
|
# trusted roots. No bundled root list (webpki-roots and webpki-root-certs are CDLA-licensed).
|
|
ureq = { version = "3.4", default-features = false, features = ["rustls-no-provider", "_ring"] }
|
|
rustls-native-certs = "0.8"
|
|
printcraft-ui-egui = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "persistence", "links"] }
|
|
egui = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# Finder double-click / Open With / Dock drops arrive as Apple events (#73); this small audited
|
|
# crate registers the handler (Objective-C interop needs unsafe, which our workspace forbids)
|
|
# behind a safe API. Same version as PhotoCraft. Pinned exactly: review the diff before bumping.
|
|
fmv-macos-events = "=0.1.0"
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for printcraft.exe; build.rs only uses it when targeting Windows.
|
|
winresource = "0.1"
|