Repository navigation
Ship a styled drag-to-install dmg, and build it on every PR - #11
Merged
Merged
Conversation
The release dmg was a plain hdiutil image. package-dmg.sh now builds it with dmgbuild, which writes the Finder layout straight into the image: a window with the app on the left, Applications on the right, a hidden .app extension and the app icon as the disk icon. Support/makedmgbackground.swift draws the window background at 1x and 2x in the icon's palette, so nothing binary is committed: haze on the left clearing to the cream of the focused window, a warm glow behind Applications, and an arrow whose haze particles come into focus on the way there. release.yml uses the script, and the CI macos job runs it as a dry run on every PR, like the Windows installer. dmgbuild and its dependencies are pinned and run from a venv that is rebuilt each time.
CI's macos job failed with "DMG<byte>: unbound variable". Apple's bash 3.2 runs
in a Latin-1 locale on the hosted runner, where the first byte of the "…" after
$DMG reads as a letter and becomes part of the variable name. ${DMG} ends the
name explicitly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
macos/package-dmg.shpackagesbuild/OpenHaze.appwith dmgbuild. Opening the image shows the app on the left and Applications on the right, with the.appextension hidden and the app icon as the disk icon.macos/Support/makedmgbackground.swiftdraws the window background at 1x and 2x in the icon's palette, so no image is committed. Haze on the left clears into the cream of the focused window, a warm glow sits behind Applications, and the arrow's haze particles come into focus on the way there.release.ymluses the script instead of a barehdiutil create, and CI's macos job runs it as a dry run on every PR, the same way the Windows job already builds the installer.Why
The release dmg had no layout, so it opened as a plain Finder window. dmgbuild writes the layout straight into the image's
.DS_Store, so it never has to script Finder.How it was tested
--clear.On macOS 27,
hdiutilprints deprecation warnings in favour ofdiskutil image. dmgbuild still callshdiutil, as the old release step did, and the image builds fine.