feat: Optimize DMG creation process by implementing staging image for improved efficiency
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions

This commit is contained in:
claudi 2026-04-14 15:40:54 +02:00
parent a9d4514bbc
commit 032d9e6c31

View file

@ -285,15 +285,27 @@ create_dmg() {
# Create symlink to Applications folder
ln -s /Applications "$DMG_TEMP/Applications"
# Create DMG
# Build a small, HFS+ staging image first and then convert to
# compressed UDZO. This avoids oversized APFS container images.
STAGING_DMG="$TEMP_BUILD/${APP_NAME}-staging.dmg"
rm -f "$STAGING_DMG"
hdiutil create \
-volname "$DMG_VOLUME_NAME" \
-srcfolder "$DMG_TEMP" \
-fs HFS+ \
-fsargs "-c c=64,a=16,e=16" \
-format UDRW \
-ov \
"$STAGING_DMG"
hdiutil convert "$STAGING_DMG" \
-format UDZO \
"$DMG_FILE"
-imagekey zlib-level=9 \
-o "$DMG_FILE"
# Clean up
rm -f "$STAGING_DMG"
rm -rf "$DMG_TEMP"
fi