Skip to content

Fix blank DMG background#119

Merged
Jam-Cai merged 3 commits into
mainfrom
fix/build-test-dmg-script
May 21, 2026
Merged

Fix blank DMG background#119
Jam-Cai merged 3 commits into
mainfrom
fix/build-test-dmg-script

Conversation

@FuJacob

@FuJacob FuJacob commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes the sips --resampleHeightWidth call in normalize_background_image
  • The background asset (dmg_background.png) is already authored at 2x resolution (1080×1520 px for a 540×760 pt window) — downsampling it to 1x point size made it too small for Finder to apply as a background on Retina displays, causing a blank DMG window

Test plan

  • Run bash scripts/build_test_dmg.sh
  • Open the resulting /tmp/Tabby-test.dmg and verify the background image appears

🤖 Generated with Claude Code

Greptile Summary

This PR fixes the blank DMG background by replacing the previous single-PNG approach (where the 2x image was being downsampled to 1x point size by sips, making it too small for Finder on Retina displays) with a proper multi-rep TIFF generated via tiffutil -cathidpicheck — the canonical macOS approach Apple's own installers use.

  • The asset split creates a true 1x PNG (dmg_background.png) and a dmg_background@2x.png, combined at build time into a multi-rep TIFF so Finder selects the right resolution per display.
  • build_test_dmg.sh gains a PEP 668–safe isolated venv for Homebrew Python environments and CODE_SIGNING_ALLOWED=NO for local dev builds without a signing cert.
  • The volume name is consistently renamed from tabbyTabby across CI and the test script.

Confidence Score: 5/5

Safe to merge — the change is additive and well-scoped, touching only DMG packaging assets and scripts with no impact on the app binary or update pipeline.

The root-cause fix (blank background on Retina displays) is addressed correctly: tiffutil -cathidpicheck is the canonical macOS mechanism for multi-rep HiDPI backgrounds, the 1x/2x asset split is consistent across CI and the test script, and the CI workflow already has dmgbuild installed before the new tiffutil call runs. No logic errors or broken contracts were found in the changed paths.

No files require special attention. The open items (stale docstrings, version-pin mismatch) were flagged in previous review rounds and are style-level concerns that do not affect packaging correctness.

Important Files Changed

Filename Overview
scripts/build_release_dmg.py Replaces sips resampling with tiffutil -cathidpicheck to produce a multi-rep TIFF; adds --background-2x-path CLI arg; stale docstring references (sips, step 3 description) were flagged in previous review rounds and remain unaddressed.
scripts/build_test_dmg.sh Adds PEP 668-safe venv, CODE_SIGNING_ALLOWED=NO for local builds, passes --background-2x-path; removes the duplicate eject loop; the
.github/workflows/release.yml Adds --background-2x-path pointing to the new asset and renames the volume from tabby to Tabby; CI already installs dmgbuild==1.6.7 in the Install DMG packaging dependencies step, so the new tiffutil path will work without any dependency changes.
assets/release/dmg_background.png Replaced with the proper 1x (540x760 pt) version; the former 2x content was moved to dmg_background@2x.png.
assets/release/dmg_background@2x.png New file containing the original 1080x1520 px (2x) background art, now properly identified and used as the HiDPI resolution source for tiffutil.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["dmg_background.png (1x · 540×760)"] --> C[tiffutil -cathidpicheck]
    B["dmg_background@2x.png (2x · 1080×1520)"] --> C
    C --> D["dmg-background.tiff (multi-rep HiDPI)"]
    D --> E[dmgbuild settings.py]
    G["tabby.app (signed)"] --> H[ditto → staging-root]
    H --> E
    E --> F[dmgbuild]
    F --> I[Tabby.dmg]
    I --> J{Finder display}
    J -->|Retina| K[2x rep · crisp]
    J -->|Non-Retina| L[1x rep · correct size]
Loading

Comments Outside Diff (3)

  1. scripts/build_release_dmg.py, line 73-75 (link)

    P2 The run_command docstring still lists sips as one of the "system-tool boundaries" it crosses, but sips is no longer called anywhere in the script after this change. The mention will mislead future readers who try to trace which external tools this script depends on.

    Fix in Codex Fix in Claude Code

  2. scripts/build_release_dmg.py, line 106-107 (link)

    P2 The install hint in ensure_dmgbuild_available still pins ==1.6.7, while build_test_dmg.sh now uses >=1.6.0. Anyone following the error message to install the package will end up with a different version than the test script installs, which could mask compatibility issues. The two should agree on a version constraint.

    Fix in Codex Fix in Claude Code

  3. scripts/build_release_dmg.py, line 10 (link)

    P2 The module-level docstring step 3 still says "Normalize the committed background art to the Finder window size we want", which described the old resampling behaviour. After this change the function only copies the file, so the description is slightly misleading.

    Fix in Codex Fix in Claude Code

Reviews (5): Last reviewed commit: "Update DMG background assets and build s..." | Re-trigger Greptile

Comment thread scripts/build_test_dmg.sh
@Jam-Cai Jam-Cai force-pushed the fix/build-test-dmg-script branch from f2a7234 to 6f47d35 Compare May 21, 2026 06:34
FuJacob and others added 3 commits May 21, 2026 02:40
The background asset is authored at 2x (1080×1520 px), matching the
540×760 pt Finder window at Retina resolution. The previous sips
--resampleHeightWidth call shrank it to 1x point size, making it too
small for Finder to apply as a DMG background on Retina displays.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DS_Store stores the background path as /Volumes/Tabby/.background.png.
If old DMGs are still mounted, the new one mounts as /Volumes/Tabby 2/
and the path doesn't match, causing a blank background.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jam-Cai Jam-Cai force-pushed the fix/build-test-dmg-script branch from 6f47d35 to d4a2ea2 Compare May 21, 2026 06:41
@Jam-Cai Jam-Cai self-requested a review May 21, 2026 06:44
@Jam-Cai Jam-Cai merged commit 00c971f into main May 21, 2026
3 checks passed
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.

2 participants