From 20a83ce8d845139cd020860e66d1815065b21bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 27 Oct 2026 12:24:34 +0100 Subject: [PATCH] fix(packaging): give hdiutil an explicit .dmg size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v0.1.0 tag build failed twice on the osx-x64 .dmg with "No space left on device" while hdiutil copied the executable into the image it had sized from -srcfolder itself. The arm64 build of the same script passed. The script now measures the staged app and passes -size with 50 % plus 20 MB of headroom. UDZO compresses the finished .dmg back down to its content. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- packaging/macos/build-dmg.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packaging/macos/build-dmg.sh b/packaging/macos/build-dmg.sh index 1063fa6..d3a3dc0 100755 --- a/packaging/macos/build-dmg.sh +++ b/packaging/macos/build-dmg.sh @@ -56,5 +56,9 @@ codesign --force --deep --sign - "$APP_DIR" ln -s /Applications "$STAGE/Applications" mkdir -p "$OUT_DIR" DMG="$OUT_DIR/freizeichen-${VERSION}-macos-${ARCH}.dmg" -hdiutil create -volname "Freizeichen" -srcfolder "$STAGE" -ov -format UDZO "$DMG" 1>&2 +# hdiutil sizes the image from -srcfolder on its own and came up short for the x64 app ("No space +# left on device" while copying the executable). Measure the staged app and give it headroom; the +# UDZO compression shrinks the finished .dmg back to its content either way. +SIZE_MB=$(( $(du -sm "$APP_DIR" | cut -f1) * 3 / 2 + 20 )) +hdiutil create -volname "Freizeichen" -srcfolder "$STAGE" -size "${SIZE_MB}m" -ov -format UDZO "$DMG" 1>&2 echo "$DMG"