macOS DMG: branded window background and icon layout

The DMG opened as a plain Finder window. It now shows the app icon's figure on
the GridCraft colour, with GridCraft.app and the Applications link side by side.
Same approach as PhotoCraft's and VectorCraft's (storytold/photocraft#1201,
storytold/vectorcraft#493).

- packaging/macos/dmg/: background.svg (source; text outlined, no paper grain,
  the figure an <image> of assets/app-icon), background.tiff (1x + 2x HiDPI,
  16-colour palette, Deflate, sRGB; ~26 KB)
  and dmg-layout.DS_Store (Finder view settings: window, icon size 128,
  positions, background).
- generate.py writes the TIFF and the layout on any OS, byte-for-byte
  reproducible, with nothing from the machine that ran it (no paths, users,
  disk names or volume UUIDs).
- package.sh copies them into the staging folder; the image is still built with
  hdiutil makehybrid. Nothing extra runs in the signing job.
- The volume name drops the version: the layout finds the background through
  an alias that includes the volume name. The DMG file name keeps the version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Xus Badia
2026-10-09 07:43:50 +02:00
co-authored by Claude Opus 5.5
parent fb823899c5
commit be33eba7d1
8 changed files with 244 additions and 1 deletions
+3
View File
@@ -101,6 +101,9 @@ and upload their artifacts, the environment refuses macOS and Windows, and no re
- **Notarization:** the app is zipped and sent with `xcrun notarytool submit --wait`, then
stapled. The DMG (with an `Applications` link) is signed, notarized and stapled too, and
checked with `codesign --verify --strict`, `stapler validate` and `spctl -a -vvv`.
Its Finder window (background, icon size and positions) comes from
[`packaging/macos/dmg/`](../packaging/macos/dmg/README.md), and its volume is named `GridCraft`
without the version, which the window's background needs; the DMG file name keeps the version.
- **CLI:** the universal `gridcraft-cli` is signed, zipped and notarized.
Locally, without certificates, the script signs ad-hoc (`codesign -s -`) and skips notarization: