Files
vectorcraft/packaging/macos/Info.plist.in
T
bflatasticandClaude Opus 5.5 b2c6764472 Fix #295: open files from the macOS Finder and Dock
Finder, Open With, a drop on the Dock icon and `open -a` failed with "VectorCraft cannot open
files in the PDF document format":

- The release Info.plist declared no document types, so Launch Services refused the files before
  the app saw them. Info.plist.in now declares every format File › Open reads (the engine's
  OPEN_EXTS; a test keeps them in step): VectorCraft owns its own documents and templates and is an
  alternate for the others, so it takes over no other app's files. `cargo xtask bundle` now fills
  in the same template instead of its own, shorter plist.
- macOS delivers such files as open-document events, not arguments. winit 0.30's application
  delegate has no `application:openURLs:`, so AppKit fell back to NSDocumentController, which
  refuses every file of a non-NSDocument app (the error in both issues). The new
  `open_documents` module adds that method to the delegate's class when the app is about to finish
  launching (before AppKit delivers launch files), queues the paths and wakes the UI, which opens
  them with `io::open_path` like command-line files; errors go to the status bar too.

New direct macOS dependencies `objc2-foundation` 0.3 and `block2` 0.6 were already in Cargo.lock
(through winit, muda and rfd). The module allows `unsafe_code` for the Objective-C runtime call.

Fixes #354

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 05:28:50 +07:00

141 lines
5.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Template: packaging/macos/package.sh (release) and `cargo xtask bundle` (development)
substitute @VERSION@ (full, e.g. 0.2.0-rc.1), @SHORT_VERSION@ (numeric X.Y.Z) and @BUILD_SHA@. -->
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>VectorCraft</string>
<key>CFBundleName</key>
<string>VectorCraft</string>
<key>CFBundleExecutable</key>
<string>VectorCraft</string>
<key>CFBundleIdentifier</key>
<string>ai.storyteller.vectorcraft</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>@SHORT_VERSION@</string>
<key>CFBundleVersion</key>
<string>@SHORT_VERSION@</string>
<key>VectorCraftVersion</key>
<string>@VERSION@</string>
<key>VectorCraftBuildCommit</key>
<string>@BUILD_SHA@</string>
<key>CFBundleIconFile</key>
<string>VectorCraft</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.graphics-design</string>
<!-- Must match MACOSX_DEPLOYMENT_TARGET in package.sh. Big Sur is the first release on
Apple silicon and has the Metal feature set wgpu targets. -->
<key>LSMinimumSystemVersion</key>
<string>11.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>NSRequiresAquaSystemAppearance</key>
<false/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © the VectorCraft authors. MIT OR Apache-2.0.</string>
<!-- Every format File › Open reads (OPEN_EXTS in crates/engine/src/cmd/fileio/mod.rs; a test in
apps/vectorcraft checks this list), so Finder offers VectorCraft for them (Open With,
double-click, Dock drop). VectorCraft owns its own formats; for the others it is an
alternate, so it doesn't take over another app's files. The app isn't NSDocument-based (no
NSDocumentClass): it opens these files itself (apps/vectorcraft/src/open_documents.rs). -->
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key><string>VectorCraft Document</string>
<key>LSItemContentTypes</key><array><string>ai.storyteller.vectorcraft.document</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Owner</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>VectorCraft Template</string>
<key>CFBundleTypeExtensions</key><array><string>vctemplate</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Owner</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>SVG</string>
<key>CFBundleTypeExtensions</key><array><string>svg</string><string>svgz</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>PDF</string>
<key>CFBundleTypeExtensions</key><array><string>pdf</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>PDF-compatible .ai</string>
<key>CFBundleTypeExtensions</key><array><string>ai</string><string>ait</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>EPS</string>
<key>CFBundleTypeExtensions</key><array><string>eps</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>DXF</string>
<key>CFBundleTypeExtensions</key><array><string>dxf</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>EMF and WMF</string>
<key>CFBundleTypeExtensions</key><array><string>emf</string><string>wmf</string></array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
<dict>
<key>CFBundleTypeName</key><string>Image</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>png</string><string>jpg</string><string>jpeg</string><string>gif</string>
<string>webp</string><string>tif</string><string>tiff</string><string>bmp</string>
</array>
<key>CFBundleTypeRole</key><string>Editor</string>
<key>LSHandlerRank</key><string>Alternate</string>
</dict>
</array>
<!-- VectorCraft's own format (.drawcraft is its name from before the rename). -->
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>ai.storyteller.vectorcraft.document</string>
<key>UTTypeDescription</key>
<string>VectorCraft Document</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.image</string>
</array>
<key>UTTypeIconFile</key>
<string>VectorCraft</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array><string>vectorcraft</string><string>drawcraft</string></array>
<key>public.mime-type</key>
<array><string>application/x-vectorcraft</string></array>
</dict>
</dict>
</array>
</dict>
</plist>