vectorcraft/packaging/macos/dmg
bflatastic d0a99faf1e macOS DMG: generate DS_Store and TIFF from a script, attribute the assets (review of #493)
- packaging/macos/dmg/generate.py writes background.tiff and DS_Store on any OS (resvg with
  the repo's fonts; ds_store and mac_alias, as dmgbuild uses). Both are byte-reproducible and
  carry nothing from the machine that made them.
- DS_Store: same window, icon size, positions and background alias as before, without the
  bookmark (pBBk/pBB0) and the alias's disk-image record, which held the author's boot volume
  UUID and name, its creation date and temporary paths.
- background.tiff: the same pixels as before (checked), now opaque RGB with Deflate (1.8 MB to
  1.0 MB) and LittleCMS's built-in sRGB profile instead of an HP profile with no open licence;
  no file names or software tags.
- background.svg: drop an unused pattern and the xlink namespace (renders the same).
- ASSETS.md rows for the three files; README, docs/releasing.md (volume name) and ROADMAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:36:43 +07:00
..
DS_Store macOS DMG: branded window background and icon layout 2026-10-08 20:36:40 +07:00
README.md macOS DMG: generate DS_Store and TIFF from a script, attribute the assets (review of #493) 2026-10-08 20:36:43 +07:00
background.svg macOS DMG: generate DS_Store and TIFF from a script, attribute the assets (review of #493) 2026-10-08 20:36:43 +07:00
background.tiff macOS DMG: branded window background and icon layout 2026-10-08 20:36:40 +07:00
generate.py macOS DMG: generate DS_Store and TIFF from a script, attribute the assets (review of #493) 2026-10-08 20:36:43 +07:00

README.md

macOS DMG window

What Finder shows when the DMG opens: a 660 × 400 pt background with the app icon and the Applications link side by side. package.sh copies these files into the image; nothing here is generated at build time, so the DMG still builds with hdiutil makehybrid (no mounted device, no Finder scripting on CI).

File What
background.svg Source of the background: the app icon (assets/app-icon/vectorcraft-small.svg, linked, not copied) cropped as a cover on the VectorCraft colour field (#e8573f), Ink and Paper, Inter and JetBrains Mono (from assets/fonts, not embedded).
background.tiff The background at 1x (660 × 400 px, 72 dpi) and 2x (1320 × 800 px, 144 dpi) in one HiDPI TIFF (Deflate, sRGB). Goes to .background/background.tiff.
DS_Store Finder's view settings for the volume: window size, icon size 128, VectorCraft.app at (326, 205), Applications at (574, 205), and the background. Goes to .DS_Store.
generate.py Writes background.tiff and DS_Store from the SVG and the layout above.

Rules

  • The volume name has no version (VectorCraft, not VectorCraft <version>). .DS_Store points at the background through an alias that includes the volume name, so a versioned name loses the background. The DMG file name still carries the version.
  • Finder draws the icon labels in black in light and dark mode when a window has a background, so the area under both icons stays light (Paper).
  • Nothing goes inside the icon boxes: artwork keeps 10 pt clear of each 128 pt icon box and of the label strip under it.

Regenerate

Edit background.svg (or the layout constants in generate.py), then run, on any OS:

pip install 'pillow>=12' ds_store==1.3.3 mac_alias==2.2.3
python3 packaging/macos/dmg/generate.py   # needs resvg on PATH, as packaging/icons.sh

It renders the SVG with resvg using only the fonts in assets/fonts, so the pixels are the same on every machine, and writes DS_Store from scratch: the background alias holds the volume name and /.background/background.tiff, nothing from the machine that ran it. The window is 660 × 432 with Finder's 32 pt title bar; the content area is 660 × 400.