Skip to content

macOS DMG: branded window background and icon layout - #8

Merged
echelon merged 1 commit into
storytold:mainfrom
XusBadia:dmg-background
Oct 9, 2026
Merged

echelon merged 1 commit into
storytold:mainfrom
XusBadia:dmg-background

Conversation

@XusBadia

@XusBadia XusBadia commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What

The macOS DMG opened as a plain white Finder window. It now opens like this:

DeckCraft DMG window in Finder

The icon's figure as a cover on the DeckCraft colour field, DeckCraft.app and the Applications link side by side on Paper, and a small DeckCraft-specific touch: the arrow and the mono line under the title come from the app's craft. Ink, Paper and the app colour only; Inter and JetBrains Mono.

How

Same approach as PhotoCraft's and VectorCraft's, which have landed (storytold/photocraft#1201, storytold/vectorcraft#493):

  • packaging/macos/dmg/background.svg: the source. Its text is outlined, so rendering it needs no fonts, and the figure is an <image> of the existing icon in assets/app-icon/.
  • background.tiff: 1x 660×400 + 2x 1320×800 in one HiDPI TIFF (16-colour palette, Deflate, sRGB; 18 KB). No paper grain: noise doesn't compress, and this keeps the binary small.
  • dmg-layout.DS_Store: Finder's view settings (window 660×400 content, icon size 128, DeckCraft.app at (326, 205), Applications at (574, 205), the background). It's named so it isn't mistaken for, or ignored like, a Finder-generated .DS_Store.
  • generate.py: writes both from the SVG on any OS (pip install 'pillow>=12' ds_store==1.3.3 mac_alias==2.2.3, resvg on PATH). The output is byte-for-byte reproducible and carries nothing from the machine that ran it: no paths, users, disk names or volume UUIDs.
  • package.sh copies the TIFF and the layout into the staging folder. The image is still built with hdiutil makehybrid, and nothing extra runs in the signing job.

One behaviour change: the volume name drops the version

.DS_Store points at the background through an alias that includes the volume name. With DeckCraft <version> Finder kept the window and icon positions but lost the background (tested). So the mounted volume is now called DeckCraft; the DMG file name still carries the version.

Tested

  • Built the image with the exact package.sh steps (staging folder, makehybrid, UDZO) around a stub DeckCraft.app with the real icon, mounted it and opened it in Finder on macOS: the screenshot above is that DMG.
  • Finder draws icon labels in black in both light and dark appearance when the window has a background (checked in both), so the label area stays light.
  • Margin check: no artwork within 10 pt of either 128 pt icon box or of the label strips (pixel diff of the background against the same background without artwork).
  • shellcheck clean; cargo xtask assets passes where the repo has it; generate.py reproduces the committed files byte for byte (6 runs).
  • Not run: a full signed and notarized release build (needs the Developer ID secrets).

Across the suite

Matching PRs for every Crafting App, same layout, each with its own figure and colour:

Crafting Apps DMG windows

🤖 Generated with Claude Code

The DMG opened as a plain Finder window. It now shows the app icon's figure on
the DeckCraft colour, with DeckCraft.app and the Applications link side by side.
Same approach as PhotoCraft's and VectorCraft's (storytold/photocraft#1201,
storytold/vectorcraft#493).

- packaging/macos/dmg/: background.svg (source; text outlined, no paper grain,
  the figure an <image> of assets/app-icon), background.tiff (1x + 2x HiDPI,
  16-colour palette, Deflate, sRGB; ~18 KB)
  and dmg-layout.DS_Store (Finder view settings: window, icon size 128,
  positions, background).
- generate.py writes the TIFF and the layout on any OS, byte-for-byte
  reproducible, with nothing from the machine that ran it (no paths, users,
  disk names or volume UUIDs).
- package.sh copies them into the staging folder; the image is still built with
  hdiutil makehybrid. Nothing extra runs in the signing job.
- The volume name drops the version: the layout finds the background through
  an alias that includes the volume name. The DMG file name keeps the version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@echelon
echelon merged commit baff6a2 into storytold:main Oct 9, 2026
@echelon

echelon commented Oct 9, 2026

Copy link
Copy Markdown
Member

Merged — thank you @XusBadia! The branded DMG window looks great, and thanks for doing the whole Crafting Apps suite with each app's own icon and colour.

We'd love to have you in the community Discord if you're not already there: https://discord.gg/artcraft

@echelon

echelon commented Oct 9, 2026

Copy link
Copy Markdown
Member

Thank you, @XusBadia, for the DMG window. Reproducible outputs with nothing machine-specific in the .DS_Store made it easy to trust.

If you're not on our Discord yet, come join us: https://discord.gg/artcraft

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…wers to the keyboard

- On hybrid-graphics laptops wgpu picked the discrete GPU (egui-wgpu defaults
  to HighPerformance). NVIDIA's can lose or corrupt its memory across suspend
  and screen lock, which matches the illegible window in storytold#8. PrintCraft now
  asks for the low-power adapter unless WGPU_POWER_PREF is set; one-GPU
  machines are unaffected, and it saves battery.
- "Save changes?" had no keyboard: Enter saves, Escape cancels, and Don't save
  takes Cmd/Ctrl+D (macOS) or Alt+D / Alt+N (the mnemonics the reporter tried).
  Its keys are read before the canvas (which took Escape), and no other
  shortcut runs underneath it (Cmd+D opened Document properties).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…k) and never load Vulkan drivers

wgpu's default backends on Windows include Vulkan, and creating a Vulkan
instance loads every installed Vulkan driver into the process. On the
reporter's machine Intel's (igvk64.dll) crashed PrintCraft with an access
violation before its window appeared; WGPU_BACKEND=dx12 or gl started it
normally. PrintCraft now asks for D3D12 with OpenGL as the fallback, unless
WGPU_BACKEND says otherwise. The issue storytold#8 low-power preference is kept in
the same configure_gpu, and a unit test (run by the Windows CI job) checks
Vulkan is left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
storytold#105)

* Issue storytold#96: on Linux, draw on the GPU that drives the monitors

Preferring the low-power GPU (issue storytold#8) picked the integrated GPU on
desktops whose monitors are all on the discrete one, so the window was
black (Hyprland) or the app panicked with "surface isn't supported"
(GNOME). On Linux, pick an adapter that supports the window's surface
and whose PCI ids match a GPU with a connected monitor (from
/sys/class/drm); integrated still wins among those, so hybrid laptops
keep the issue storytold#8 behaviour. WGPU_POWER_PREF still overrides.

* Use the PdfCraft name for the fake sysfs test folder

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
… on each GPU (storytold#558)

On Linux, `pick_adapter` preferred the integrated GPU whenever it drove
any display, to keep hybrid laptops (storytold#8) on their low-power GPU. A desktop
with one monitor on the Intel iGPU and one on an NVIDIA card looked the
same, so wgpu picked the iGPU, which accepted the Wayland surface but then
failed to configure it, and egui-wgpu panicked.

`linux_display_gpus` now also records whether a GPU drives a built-in
panel connector (eDP, LVDS or DSI). When several GPUs drive a display,
the one driving the built-in panel wins (laptops, unchanged); with no
built-in panel anywhere, the discrete GPU wins. Tests cover the desktop
topology from the issue, the laptop case, connector classification and
reading the panel flag from a fake /sys/class/drm tree.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
… Windows (storytold#631)

* Fix storytold#378: draw on the GPU that drives the primary display on Windows

The low-power preference picked the AMD Ryzen integrated GPU on a desktop
whose monitors all hang off an NVIDIA card. Presenting from the headless
iGPU to a window on another GPU took the AMD display driver down, blacking
out every monitor for two minutes before PdfCraft exited.

Windows now gets the display-aware adapter choice Linux already had:
EnumDisplayDevices (through the safe `winsafe` crate, MIT) says which
adapter drives each desktop display and which is primary; `pick_adapter`
matches that to the wgpu adapters by PCI ids. The GPU driving the primary
display wins, as the built-in panel does on Linux (storytold#8). The log names the
GPU chosen, the first question when a window stays black.

Synthetic tests cover the Windows device-id parser and the primary-display
rule; a live test checks the enumeration on the running machine. Verified
on a Ryzen 7000 + RTX 3090 desktop: the app now starts on the 3090.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBMGuLLMhs1h8orSxcJXER

* 631: the winsafe feature comment says user (and kernel)

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
)

On a hybrid laptop whose Wayland compositor runs on the discrete GPU
(Hyprland with AQ_DRM_DEVICES naming the NVIDIA card first), the built-in
panel still hangs off the integrated GPU, so the panel rule (storytold#8) picked it,
and the window stayed empty: the compositor took the frames and showed
nothing, with no error anywhere.

Which GPU drives a display stands in for which GPU the compositor draws
with. Under Wayland the compositor says so itself: the main_device of its
linux-dmabuf feedback (version 4), the device it imports client buffers on,
which Mesa's Vulkan device-select layer reads for the same purpose.
compositor_gpu.rs asks for it on a short-lived connection, maps the dev_t
to PCI ids through /sys/dev/char, and pick_adapter ranks that adapter
first. No answer (X11, an older compositor, a GPU no adapter matches)
leaves the existing rules in charge, and WGPU_POWER_PREF still overrides.

wayland-client and wayland-protocols are already in the tree through winit;
they become direct Linux-only dependencies.
ArturLauche pushed a commit to ArturLauche/deckcraft that referenced this pull request Nov 10, 2026
…quence-coverage

Cover the animation sequence commands: the gallery, removing one, reordering one and its timing
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