diff --git a/packaging/macos/screenshot.sh b/packaging/macos/screenshot.sh index e6e6684..9dcd4d8 100755 --- a/packaging/macos/screenshot.sh +++ b/packaging/macos/screenshot.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Generated by ship; edit internal/generate/templates and run ship sync. +# Generated by ship (58f1ad43); edit internal/generate/templates and run ship sync. # Photograph the application's own window at a size App Store Connect accepts. # # The counterpart of `packaging/windows/screenshot.ps1`, and written for the diff --git a/packaging/macos/take-shots.sh b/packaging/macos/take-shots.sh index d280df6..4f56616 100755 --- a/packaging/macos/take-shots.sh +++ b/packaging/macos/take-shots.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Generated by ship; edit internal/generate/templates and run ship sync +# Generated by ship (e7bbcdc2); edit internal/generate/templates and run ship sync # # The half of a macOS screenshot set that is the same in every repository. # @@ -29,6 +29,21 @@ # EVERY_SHOT actions run before every shutter, the reference frame # included, for state every coordinate is measured against # +# WHAT THIS PROVIDES BACK +# +# shot one frame: a name, then the actions +# stage the copy a frame opens, in a folder that reads like a +# person's machine +# appearance `appearance light` or `appearance dark`, set on the +# desktop and read back +# +# LIGHT LEADS +# +# A listing's first picture is the one the product page shows largest, an +# application that follows the system appearance is light on a fresh macOS +# installation, and that is what most people see. So a set opens light, and +# dark is worth a frame rather than half the set. +# # and then, at the end: # # . "$(dirname -- "$0")/take-shots.sh" @@ -111,6 +126,41 @@ take_shots() { echo "shots.sh: ${taken} shot(s) in ${OUTDIR}" } +# appearance sets the desktop's appearance and reads it back. +# +# Here rather than in each repository's recipe, where it was written once and +# would have been written five more times. No control in a window changes it, +# so it is set before a launch; the driver stops whatever is running and +# launches again for every frame, so a value set here is read at the start it +# belongs to. +# +# **Asked of System Events, and not written with `defaults`.** `defaults write +# -g AppleInterfaceStyle Dark` writes the value and `defaults read` returns it, +# because both go through the same preferences cache - and the window server is +# never told, so an application launched afterwards still draws light. Measured +# on 2026-09-17: the dark frame came back a pixel-for-pixel duplicate of its +# light pair. System Events sets it the way the Settings pane does, and it is +# already trusted for Accessibility on a runner, which the driver needs anyway. +# +# Read back for the same reason: a frame taken after an appearance that did not +# take is a duplicate of its pair, and a duplicate is the sort of thing that +# reaches a listing. +appearance() { + case "$1" in + light) want=false ;; + dark) want=true ;; + *) echo "shots.sh: appearance is light or dark, not $1" >&2; exit 2 ;; + esac + osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to ${want}" >/dev/null + sleep 1 + got=$(osascript -e 'tell application "System Events" to tell appearance preferences to get dark mode') + [ "$got" = "$want" ] || { + echo "shots.sh: asked for $1 and the desktop reads dark mode ${got}" >&2 + exit 1 + } + echo "shots.sh: desktop set to $1" +} + # stage copies what the shot opens somewhere that reads like a person's machine # rather than like a build: the path is in the frame, and photographing the # checkout put a /private/tmp workspace in the picture. diff --git a/packaging/windows/screenshot.ps1 b/packaging/windows/screenshot.ps1 index 82e9067..b78402a 100644 --- a/packaging/windows/screenshot.ps1 +++ b/packaging/windows/screenshot.ps1 @@ -1,5 +1,5 @@ # Photograph an application's own window at a size the Microsoft Store accepts. -# Generated by ship; edit internal/generate/templates and run ship sync. +# Generated by ship (8001e560); edit internal/generate/templates and run ship sync. # # Screenshots were once listed as something no script could do, and that was an # assumption rather than a measurement. What a script cannot do is decide which diff --git a/packaging/windows/take-shots.ps1 b/packaging/windows/take-shots.ps1 index 755f2ca..fc84994 100644 --- a/packaging/windows/take-shots.ps1 +++ b/packaging/windows/take-shots.ps1 @@ -1,5 +1,5 @@ # Take a set of store screenshots, given the recipes for them. -# Generated by ship; edit internal/generate/templates and run ship sync. +# Generated by ship (e5b476af); edit internal/generate/templates and run ship sync. # # `shots.ps1` beside this is the half that is a product's - which document, # which frames, and what has to happen in the window before each shutter. It