Restores the custom DMG background image, window size, and icon positioning in macOS releases without relying on Finder AppleScript GUI automation (resolving #189).
Background & Root Cause
In CI environments, running create-dmg with Finder AppleScript (TAURI_BUNDLER_DMG_IGNORE_CI="true") causes a fatal 120s timeout because the CI runner daemon lacks TCC automation permissions to control Finder. Conversely, running with --skip-jenkins (CI="true") disables AppleScript and omits writing .DS_Store, producing a plain DMG without custom layout or background art.
Solution
scripts/build-dmg.py:
Uses dmgbuild (pure-Python, ~100 KB total dependencies) to package ICCery.app into ICCery.dmg.
Directly constructs the binary .DS_Store file with window dimensions (660x400), icon coordinates (ICCery.app @ 180, 220, /Applications @ 480, 220), and background image alias.
Automatically supports Retina displays by generating a multi-resolution HiDPI TIFF combining dmg-background.png (1x) and dmg-background@2x.png (2x).
Requires zero AppleScript, zero Finder interaction, and zero GUI permissions; executes in ~5 seconds headlessly.
Workflow Integration:
Updated .gitea/workflows/build-macos.yml and .github/workflows/build-macos.yml to package the .app bundle using scripts/build-dmg.py inside an isolated runner virtualenv.
### Summary
Restores the custom DMG background image, window size, and icon positioning in macOS releases without relying on Finder AppleScript GUI automation (resolving [#189](https://git.i3omb.com/gronod/ICCery/issues/189)).
#### Background & Root Cause
In CI environments, running `create-dmg` with Finder AppleScript (`TAURI_BUNDLER_DMG_IGNORE_CI="true"`) causes a fatal 120s timeout because the CI runner daemon lacks TCC automation permissions to control Finder. Conversely, running with `--skip-jenkins` (`CI="true"`) disables AppleScript and omits writing `.DS_Store`, producing a plain DMG without custom layout or background art.
#### Solution
1. **`scripts/build-dmg.py`**:
- Uses `dmgbuild` (pure-Python, ~100 KB total dependencies) to package `ICCery.app` into `ICCery.dmg`.
- Directly constructs the binary `.DS_Store` file with window dimensions (`660x400`), icon coordinates (`ICCery.app` @ `180, 220`, `/Applications` @ `480, 220`), and background image alias.
- Automatically supports Retina displays by generating a multi-resolution HiDPI TIFF combining `dmg-background.png` (1x) and `dmg-background@2x.png` (2x).
- Requires zero AppleScript, zero Finder interaction, and zero GUI permissions; executes in ~5 seconds headlessly.
2. **Workflow Integration**:
- Updated `.gitea/workflows/build-macos.yml` and `.github/workflows/build-macos.yml` to package the `.app` bundle using `scripts/build-dmg.py` inside an isolated runner virtualenv.
- Add scripts/build-dmg.py using dmgbuild to generate DMGs with custom background art and icon locations without Finder AppleScript.
- Update .gitea/workflows/build-macos.yml and .github/workflows/build-macos.yml to package the .app bundle using dmgbuild in a headless virtual environment.
- Resolves missing DMG background in CI while preventing AppleScript GUI automation timeouts.
gronod
merged commit 9cc87ca295 into development2026-09-07 18:06:40 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Restores the custom DMG background image, window size, and icon positioning in macOS releases without relying on Finder AppleScript GUI automation (resolving #189).
Background & Root Cause
In CI environments, running
create-dmgwith Finder AppleScript (TAURI_BUNDLER_DMG_IGNORE_CI="true") causes a fatal 120s timeout because the CI runner daemon lacks TCC automation permissions to control Finder. Conversely, running with--skip-jenkins(CI="true") disables AppleScript and omits writing.DS_Store, producing a plain DMG without custom layout or background art.Solution
scripts/build-dmg.py:dmgbuild(pure-Python, ~100 KB total dependencies) to packageICCery.appintoICCery.dmg..DS_Storefile with window dimensions (660x400), icon coordinates (ICCery.app@180, 220,/Applications@480, 220), and background image alias.dmg-background.png(1x) anddmg-background@2x.png(2x)..gitea/workflows/build-macos.ymland.github/workflows/build-macos.ymlto package the.appbundle usingscripts/build-dmg.pyinside an isolated runner virtualenv.