Files
deckcraft/apps/deckcraft/Cargo.toml
T
cohenmendyandClaude Opus 5.5 12085b1153 fix(macos): open .pptx and .deckcraft files from Finder
The macOS bundle declared the .deckcraft and .pptx types but listed no
CFBundleDocumentTypes, so DeckCraft never appeared under Open With and
couldn't be made the default app for presentations. Finder opens also
arrive as a kAEOpenDocuments Apple event, not argv, which winit doesn't
handle, so a double-clicked file wouldn't have loaded anyway.

- Info.plist.in: document types for DeckCraft Presentation (Owner) and
  PowerPoint Presentation (Alternate, so PowerPoint/Keynote stay
  preferred unless the user picks DeckCraft).
- apple_events.rs: register an open-documents handler with the pinned
  fmv-macos-events crate GridCraft already uses, and open the paths each
  frame; failures show in the status bar.
- Ignore the -psn_ argument older macOS passes on a Finder launch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WxAm8VMKHa5w6kwkjBaT3D
2026-10-17 12:17:45 +05:00

41 lines
1.4 KiB
TOML

[package]
name = "deckcraft"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "DeckCraft desktop app"
publish = false
default-run = "deckcraft"
[lints]
workspace = true
[dependencies]
deckcraft-engine = { workspace = true }
deckcraft-ui-egui = { workspace = true }
deckcraft-media = { workspace = true }
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "links", "wayland", "x11"] }
egui = { workspace = true }
serde_json = { workspace = true }
log = { workspace = true }
[build-dependencies]
# Icon + VERSIONINFO for deckcraft.exe; build.rs only uses it when the target is Windows.
winresource = "0.1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rfd = { workspace = true }
arboard = { workspace = true, features = ["image-data"] }
image = { workspace = true }
cpal = "0.16"
[target.'cfg(target_os = "macos")'.dependencies]
# Finder double-click, Open With, Dock drops and `open -a DeckCraft deck.pptx` arrive as a
# kAEOpenDocuments Apple event, which winit 0.30 doesn't handle. This audited crate (also used by
# GridCraft, PdfCraft and PhotoCraft) registers the handler (Objective-C interop needs unsafe, which
# our workspace forbids) behind a safe API. Pinned exactly: review the diff before bumping.
fmv-macos-events = "=0.1.0"
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
winit = { version = "0.30", default-features = false, features = ["x11"] }