Skip to content

fix: DMG installer arrow background using dmgbuild#6008

Merged
kodjima33 merged 1 commit into
mainfrom
worktree-fix-auth-activate-app
Mar 24, 2026
Merged

fix: DMG installer arrow background using dmgbuild#6008
kodjima33 merged 1 commit into
mainfrom
worktree-fix-auth-activate-app

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

Switches from create-dmg (broken --skip-jenkins) to dmgbuild. Dark background, white arrow, proper icon positions.

create-dmg with --skip-jenkins silently skips all Finder styling.
dmgbuild writes .DS_Store directly without Finder/AppleScript.
Dark omi-style background with white arrow and install text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kodjima33 kodjima33 merged commit e557565 into main Mar 24, 2026
1 check passed
@kodjima33 kodjima33 deleted the worktree-fix-auth-activate-app branch March 24, 2026 20:23
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 24, 2026

Greptile Summary

This PR replaces the create-dmg tool (broken --skip-jenkins flag in CI) with dmgbuild for both macOS DMG installer workflows. The new approach writes .DS_Store metadata directly without invoking Finder/AppleScript, which is the root cause of the CI hang. A new dmgbuild_settings.py settings file is added under desktop/dmg-assets/, and the background image is updated to a dark theme with a white arrow.

Key changes:

  • Both "Create DMG installer" steps in codemagic.yaml (working_directory: app and working_directory: desktop) now install dmgbuild via pip3 and invoke it with the shared settings file. Relative paths are correct for each workflow's working directory.
  • dmgbuild_settings.py uses defines.get(...) to accept app_path, app_name, and assets_dir via -D flags, keeping the settings file reusable for both workflows.
  • Window size (610×365), icon size (80 px), and icon positions (155,175) / (455,175) are consistent with the updated background image.
  • Minor: badge_icon is used instead of icon when volume_icon is passed (latent bug, not currently triggered since neither workflow passes that flag). dmgbuild is installed without a pinned version in both steps, which is a minor non-determinism risk.

Confidence Score: 4/5

  • Safe to merge — the core fix is correct and both CI paths use consistent, correct relative paths; two minor non-critical issues remain.
  • The migration from create-dmg to dmgbuild is technically sound. Path resolution for both workflows has been verified correct. The one P1 issue (badge_icon vs icon) is dormant today since no workflow passes -D volume_icon, and the unversioned pip install is a low-probability risk. No current code path is broken.
  • desktop/dmg-assets/dmgbuild_settings.py — latent badge_icon/icon mismatch

Important Files Changed

Filename Overview
desktop/dmg-assets/dmgbuild_settings.py New dmgbuild settings file replacing create-dmg. Icon positions and window size match the updated background. Minor issue: badge_icon (line 51) should be icon to set the volume icon correctly if/when volume_icon is passed via -D.
codemagic.yaml Both DMG-creation steps are updated to use dmgbuild. Relative paths for the settings file and assets_dir are correct for each workflow's working_directory (app/ and desktop/). dmgbuild is installed without a pinned version in both steps.
desktop/dmg-assets/background.png Background image updated to dark theme with white arrow; coordinates in dmgbuild_settings.py match the new layout.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Codemagic CI Trigger] --> B{Workflow}
    B -->|working_directory: app| C1[pip3 install dmgbuild]
    B -->|working_directory: desktop| C2[pip3 install dmgbuild]

    C1 --> D1["dmgbuild -s ../desktop/dmg-assets/dmgbuild_settings.py\n-D app_path=APP_PATH\n-D app_name=Omi\n-D assets_dir=$(pwd)/../desktop/dmg-assets"]
    C2 --> D2["dmgbuild -s dmg-assets/dmgbuild_settings.py\n-D app_path=STAGING_DIR/omi.app\n-D app_name=omi\n-D assets_dir=$(pwd)/dmg-assets"]

    D1 --> E[dmgbuild_settings.py]
    D2 --> E

    E --> F["Reads background.png\nSets icon_locations\nCreates .DS_Store directly\n(no Finder/AppleScript)"]
    F --> G[Output: Omi.dmg]
    G --> H[codesign DMG]
    H --> I[notarytool submit + staple]
Loading

Reviews (1): Last reviewed commit: "fix: switch DMG creation to dmgbuild for..." | Re-trigger Greptile

Comment on lines +50 to +51
if icon_path:
badge_icon = icon_path
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 badge_icon should be icon for volume icon

badge_icon composites the supplied image onto the standard macOS folder icon (like a badge). To replicate what create-dmg --volicon did (replace the volume icon entirely with the .icns file), the correct dmgbuild variable is icon:

Suggested change
if icon_path:
badge_icon = icon_path
if icon_path:
icon = icon_path

This code path is currently dormant — neither workflow passes -D volume_icon=... — so it won't break CI today, but if someone later enables it they'll get a badged folder instead of the app icon as the volume icon.

Comment thread codemagic.yaml
- name: Create DMG installer
script: |
set -e
pip3 install --break-system-packages dmgbuild
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unversioned dmgbuild install

pip3 install --break-system-packages dmgbuild installs the latest available release on every build with no version pin. A breaking change in a future dmgbuild release could silently corrupt the DMG layout or fail the build. Consider pinning to a known-good version:

Suggested change
pip3 install --break-system-packages dmgbuild
pip3 install --break-system-packages "dmgbuild==1.6.1"

The same applies to the second workflow's identical install line (line 2289).

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
Switches from create-dmg (broken --skip-jenkins) to dmgbuild. Dark
background, white arrow, proper icon positions.
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