Files
raea/tools/release/dmg/render.sh
shinyobjectz 37652ae571 dmg: raea's Mac installer window, drawn by raea
tools/release/dmg makes the Mac download as a disk image: raea.app beside an Applications link in a Finder window
laid out over raea's own picture. background.tsx is one WGSL shader (ShaderMesh) rendered by raea: paper, a pixel
falloff Bayer-dithered into the corners, the cat leaping from the app toward Applications as dithered onion skins,
the rest of its arc as dots with a pixel arrowhead, and a second cat asleep in the corner. render.sh renders it at
1x and 2x into one multi-resolution TIFF (tiffutil -cathidpicheck), committed as background.tiff; --loop renders
the same scene moving (the leap, 3 s at 60 fps), since Finder only ever shows a window's picture still.

dmg.sh APP OUT.dmg [--volname] [--sign ID [--keychain]] [--notarize ENV]: a writable HFS+ image, the app copied in
with ditto, layout.applescript has Finder set the window (680x440 content, icon view, no toolbar, 128 px icons,
the picture, each icon's place) so Finder writes the .DS_Store, then the app's icon as the volume's, then ULFO.
Finder on macOS 27 deletes a .VolumeIcon.icns and clears the custom-icon flag when it opens the volume, so the icon
goes in after the layout. Labels are drawn black over any picture in both appearances, so the window stays light.
check.sh mounts an image read-only and checks its files, the layout's picture and the window Finder reads back.
Built and checked here with a stand-in app; nothing signed or notarized.
2026-11-14 12:09:56 -08:00

24 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# The installer window's picture, rendered by raea from background.tsx: the 1x and 2x stills joined into one
# multi-resolution TIFF (background.tiff, which dmg.sh puts in the image), so Finder draws it sharp on any display.
# With --loop OUT.mp4 it also renders the same scene moving (the leap, 3 s at 60 fps), for places that can play it:
# Finder only ever shows a window's picture still.
# tools/release/dmg/render.sh [--loop OUT.mp4]
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
loop=
[ "${1:-}" = --loop ] && loop=${2:?usage: render.sh [--loop OUT.mp4]}
work=$(mktemp -d)
trap 'rm -rf "${work:?}"' EXIT
raea render "$here/background.tsx" --composition dmg-1x --frame 0 -o "$work/background.png"
raea render "$here/background.tsx" --composition dmg-2x --frame 0 -o "$work/[email protected]"
# Finder reads the 2x picture as 144 dpi
sips -s dpiWidth 72 -s dpiHeight 72 "$work/background.png" >/dev/null
sips -s dpiWidth 144 -s dpiHeight 144 "$work/[email protected]" >/dev/null
tiffutil -cathidpicheck "$work/background.png" "$work/[email protected]" -out "$here/background.tiff"
tiffutil -info "$here/background.tiff" | grep -E "Image Width|Resolution:"
if [ -n "$loop" ]; then
raea render "$here/background.tsx" --composition dmg-loop -o "$loop" --quality master
fi
echo "ok $here/background.tiff"