mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-10 18:39:51 -06:00
- brand.toml is the only place the product name lives; every crate and app
reads it through dac-brand (env vars with legacy fallback, settings folder
with copy-only migration, default library, preset extensions, i18n {app})
- cargo xtask brand check|test, run|install|package, docs, rename-crates,
deny and immich; packaging files are templates rendered from brand.toml
- icons regenerated from brand/icon.svg; upstream branding removed
- MIT licence (segment and fetch stay Apache-2.0); cargo deny licence policy
- clean-room rules in AGENTS.md/CLAUDE.md; docs/upstream-merge.md
- plan/ rebuilt and committed; parity tracker reopens Classic rows, adds
PLAN.md section 2 rows and the IMM Immich section; plan/immich.md and a
pinned Immich test server
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
45 lines
2.7 KiB
Markdown
45 lines
2.7 KiB
Markdown
# macOS DMG window
|
||
|
||
What Finder shows when the DMG opens: a 660 × 400 pt background with the app icon and the
|
||
`Applications` link side by side. `package.sh` copies these files into the image; nothing here is
|
||
generated at build time, so the DMG still builds with `hdiutil makehybrid` (no mounted device, no
|
||
Finder scripting on CI, nothing extra installed in the signing job).
|
||
|
||
| File | What |
|
||
|---|---|
|
||
| `background.svg` | Source of the background: the app icon (`brand/icon.svg`, linked, not copied) cropped as a cover on the brand colour field (`#f2a516`), Ink and Paper. Its text (Inter, JetBrains Mono) is outlined, so rendering it needs no fonts. |
|
||
| `background.tiff` | The background at 1x (660 × 400 px, 72 dpi) and 2x (1320 × 800 px, 144 dpi) in one HiDPI TIFF (Deflate, sRGB). Goes to `.background/background.tiff`. |
|
||
| `dmg-layout.DS_Store` | Finder's view settings for the volume: window size, icon size 128, `<display_name>.app` at (326, 205), `Applications` at (574, 205), and the background. Goes to `.DS_Store` in the image; named so it isn't mistaken for (or ignored like) a Finder-generated `.DS_Store`. |
|
||
| `generate.py` | Writes `background.tiff` and `dmg-layout.DS_Store` from the SVG and the layout above. |
|
||
|
||
## The volume name has no version
|
||
|
||
The mounted volume is called `<display_name>` (brand.toml), not `<display_name> <version>`; after changing the name, rerun `generate.py` so `dmg-layout.DS_Store` matches. The layout points at the background
|
||
through an alias that includes the volume name, and Finder resolves it by that name: with a
|
||
versioned name the window keeps its size and icon positions but shows no background (tested).
|
||
The DMG file name (`<binary>-<version>-macos-<arch>.dmg`) still carries the version.
|
||
|
||
## Rules
|
||
|
||
- **Finder draws the icon labels in black in light and dark mode** when a window has a background,
|
||
so the area under both icons stays light (Paper).
|
||
- **Nothing goes inside the icon boxes:** artwork keeps 10 pt clear of each 128 pt icon box and of
|
||
the label strip under it.
|
||
|
||
## Regenerate
|
||
|
||
Edit `background.svg` (or the layout constants in `generate.py`), then run, on any OS:
|
||
|
||
```sh
|
||
pip install 'pillow>=12' ds_store==1.3.3 mac_alias==2.2.3
|
||
python3 packaging/macos/dmg/generate.py # needs resvg on PATH
|
||
```
|
||
|
||
Both outputs are byte-for-byte reproducible and carry nothing from the machine that ran it: the
|
||
SVG renders without any fonts, and `dmg-layout.DS_Store` is written from scratch, its background
|
||
alias holding only the volume name and `/.background/background.tiff`. If you add text to the SVG,
|
||
outline it (`usvg` from resvg converts text to paths). The window is 660 × 432 with Finder's 32 pt
|
||
title bar; the content area is 660 × 400.
|
||
|
||
This follows VectorCraft's `packaging/macos/dmg/` (storytold/vectorcraft#493).
|