Skip to content

Build a styled DMG with an Applications drop target - #8

Merged
radiosilence merged 1 commit into
mainfrom
feat/pretty-dmg
Sep 29, 2026
Merged

radiosilence merged 1 commit into
mainfrom
feat/pretty-dmg

Conversation

@radiosilence

Copy link
Copy Markdown
Owner

The release DMG was a bare hdiutil create of the app folder, with no Applications shortcut and no layout. It now opens to a fixed 640×400 window: a neon background matching the app icon, the app on the left, an /Applications symlink on the right to drag it onto, and the app icon as the volume icon.

Decisions

  • dmgbuild over create-dmg. dmgbuild writes the .DS_Store layout directly. create-dmg drives Finder through AppleScript, which is unreliable on headless CI runners. It runs through uvx pinned to dmgbuild==1.6.7, so CI installs uv alongside Task.
  • Generated background. Scripts/generate-dmg-background.swift renders 1x and 2x PNGs that tiffutil combines into Resources/dmg-background.tiff, which is committed like AppIcon.icns. Regenerate with task dmg-background. The icon positions in Resources/dmg-settings.py must match the constants in the script.
  • Label plates. Finder draws icon labels in black on an image background even in dark mode, so each label sits on a light plate.
  • ULMO + APFS. LZMA-compressed APFS images are smaller than UDZO/HFS+ and are supported on macOS 14+, which the app already requires. Signing and notarisation of the DMG are unchanged: task notarize still signs the output file.

Verifying

task build-dmg, then open .build/pkg/BrowserSchedule.dmg. The window should show the background with both icons centred in their halos, readable labels, and no clipping at the bottom. Dragging the app onto Applications should install it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YXLtjqcyvZ1VP9uK9jnMuR

dmgbuild writes the Finder layout into the image's .DS_Store, so the
window background, icon positions and Applications symlink work on
headless CI without scripting Finder. The background is generated in
Core Graphics to match the app icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXLtjqcyvZ1VP9uK9jnMuR
@radiosilence radiosilence self-assigned this Sep 29, 2026
@radiosilence radiosilence added the enhancement New feature or request label Sep 29, 2026
@radiosilence
radiosilence merged commit 33bf0d8 into main Sep 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant