Skip to content

build(dmg): shrink download by trimming icon slot and using ULFO#19

Merged
BlackHole1 merged 1 commit into
mainfrom
reduce-sieze
Jun 15, 2026
Merged

build(dmg): shrink download by trimming icon slot and using ULFO#19
BlackHole1 merged 1 commit into
mainfrom
reduce-sieze

Conversation

@BlackHole1

Copy link
Copy Markdown
Member

The arm64 DMG had grown to 4.4M, dominated by the app-icon bitmaps actool bakes into Assets.car. Those bitmaps are already lzfse-packed, so they barely compress further inside the DMG — the only lever left on the icon side is dropping a redundant slot, so the 512x512@2x (1024px) rendition and its source PNG are removed.

For everything else, switch hdiutil from the historical UDZO (zlib) to ULFO (LZFSE), which squeezes the Mach-O binary and the embedded Sparkle framework harder. LZFSE is Apple's own codec, decoded in userspace by the host's DiskImages helper, so mountability tracks the host macOS version (floor 14.0), never the contained CPU arch. Together this brings the DMG down to 2.4M.

The arm64 DMG had grown to 4.4M, dominated by the app-icon bitmaps
actool bakes into Assets.car. Those bitmaps are already lzfse-packed,
so they barely compress further inside the DMG — the only lever left
on the icon side is dropping a redundant slot, so the 512x512@2x
(1024px) rendition and its source PNG are removed.

For everything else, switch hdiutil from the historical UDZO (zlib)
to ULFO (LZFSE), which squeezes the Mach-O binary and the embedded
Sparkle framework harder. LZFSE is Apple's own codec, decoded in
userspace by the host's DiskImages helper, so mountability tracks
the host macOS version (floor 14.0), never the contained CPU arch.
Together this brings the DMG down to 2.4M.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4caf9372-5b38-4043-a848-f6f64f3d1fad

📥 Commits

Reviewing files that changed from the base of the PR and between db5b696 and cdc1309.

⛔ Files ignored due to path filters (1)
  • Sources/LockIME/Assets.xcassets/AppIcon.appiconset/icon_1024.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • Sources/LockIME/Assets.xcassets/AppIcon.appiconset/Contents.json
  • scripts/make-dmg.sh
💤 Files with no reviewable changes (1)
  • Sources/LockIME/Assets.xcassets/AppIcon.appiconset/Contents.json

Summary by CodeRabbit

  • Chores
    • Removed unused app icon variant
    • Updated macOS installer compression format for improved efficiency

Walkthrough

Two unrelated asset/packaging changes are included. In AppIcon.appiconset/Contents.json, the icon_1024.png image entry is removed from the images array, leaving the array ending after the icon_512.png variants. In scripts/make-dmg.sh, the hdiutil create invocation is updated to use -format ULFO instead of -format UDZO, switching the DMG compression codec from zlib to LZFSE. An expanded comment block is added at that location describing the rationale for ULFO/LZFSE, mountability and architecture behavior, and CI responsibilities for signing and notarization.

Possibly related PRs

  • oomol-lab/LockIME#2: Changes the icon generation pipeline to produce pre-masked shipped PNGs, directly related to which icon asset entries are present in AppIcon.appiconset/Contents.json.
  • oomol-lab/LockIME#8: Modifies the AppIcon generation pipeline for grid-correct icon composition, which is consistent with the removal of the icon_1024.png entry in this PR.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format with type(scope): subject and clearly summarizes the main changes.
Description check ✅ Passed The description is directly related to the changeset, providing detailed context for the DMG size reduction and icon removal changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch reduce-sieze

Comment @coderabbitai help to get the list of available commands and usage tips.

@BlackHole1 BlackHole1 merged commit 51e6866 into main Jun 15, 2026
3 checks passed
@BlackHole1 BlackHole1 deleted the reduce-sieze branch June 15, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant