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
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:
parent
a9d4514bbc
commit
032d9e6c31
1 changed files with 15 additions and 3 deletions
|
|
@ -284,16 +284,28 @@ create_dmg() {
|
||||||
|
|
||||||
# Create symlink to Applications folder
|
# Create symlink to Applications folder
|
||||||
ln -s /Applications "$DMG_TEMP/Applications"
|
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 \
|
hdiutil create \
|
||||||
-volname "$DMG_VOLUME_NAME" \
|
-volname "$DMG_VOLUME_NAME" \
|
||||||
-srcfolder "$DMG_TEMP" \
|
-srcfolder "$DMG_TEMP" \
|
||||||
|
-fs HFS+ \
|
||||||
|
-fsargs "-c c=64,a=16,e=16" \
|
||||||
|
-format UDRW \
|
||||||
-ov \
|
-ov \
|
||||||
|
"$STAGING_DMG"
|
||||||
|
|
||||||
|
hdiutil convert "$STAGING_DMG" \
|
||||||
-format UDZO \
|
-format UDZO \
|
||||||
"$DMG_FILE"
|
-imagekey zlib-level=9 \
|
||||||
|
-o "$DMG_FILE"
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
rm -f "$STAGING_DMG"
|
||||||
rm -rf "$DMG_TEMP"
|
rm -rf "$DMG_TEMP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue