fix(macos): declare DWG/DXF UTIs, sandbox the QL appex, add signed-build script (#365)

Finder thumbnails and "Open with" registration fail in the field for
three compounding reasons: the app claims com.autodesk.dwg/.dxf but
never declares them (UTImportedTypeDeclarations was missing, so on
systems with no other declarer Launch Services can't bind the
extensions at all); the QuickLook appex only serves com.autodesk.dwg
while machines with AutoCAD installed resolve .dwg to its exported
com.autodesk.autocad.dwg (BricsCAD etc. likewise win with their own
UTIs); and the ad-hoc --deep signature carries no entitlements, but a
QuickLook thumbnail extension must be sandboxed
(com.apple.security.app-sandbox) before macOS will run it.

Import-declare both UTIs, claim and serve the AutoCAD variants too,
add the appex sandbox entitlements, and add
packaging/build_macos_signed.sh — a local mirror of the CI build-macos
job that signs with a Developer ID (hardened runtime, per-component
entitlements), notarizes and staples. DEVELOPER_ID=- reproduces the
CI ad-hoc build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin GriffinandClaude Fable 5 authored and Hakan Seven committed 2026-07-17 10:28:23 +03:00
1 parent 5bd683cf4e
commit 5488d6c13f
4 files changed
+216

No files matched your search

+56
View File
@@ -40,6 +40,10 @@
<key>LSItemContentTypes</key>
<array>
<string>com.autodesk.dwg</string>
<!-- AutoCAD exports its own DWG UTI; when it is installed,
.dwg files bind to this identifier instead, so claim it
too or OCS never appears under "Open with". -->
<string>com.autodesk.autocad.dwg</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
@@ -54,10 +58,62 @@
<key>LSItemContentTypes</key>
<array>
<string>com.autodesk.dxf</string>
<string>com.autodesk.autocad.dxf</string>
</array>
<key>LSHandlerRank</key>
<string>Alternate</string>
</dict>
</array>
<!-- Declare (import) the DWG/DXF UTIs we claim above. Without a
declaration Launch Services cannot map the .dwg/.dxf filename
extensions to these identifiers on systems where no other CAD app
declares them, so "Open with", default-handler binding and the
QuickLook thumbnail extension all silently fail (#365). An *import*
declaration defers to any app that *exports* the same UTI. -->
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>com.autodesk.dwg</string>
<key>UTTypeDescription</key>
<string>AutoCAD Drawing</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>dwg</string>
</array>
<key>public.mime-type</key>
<array>
<string>image/vnd.dwg</string>
</array>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.autodesk.dxf</string>
<key>UTTypeDescription</key>
<string>AutoCAD DXF</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>dxf</string>
</array>
<key>public.mime-type</key>
<array>
<string>image/vnd.dxf</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>