diff options
Diffstat (limited to 'src/macos')
| -rwxr-xr-x | src/macos/build-e2e.sh | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/macos/build-e2e.sh b/src/macos/build-e2e.sh deleted file mode 100755 index e9ccebcd..00000000 --- a/src/macos/build-e2e.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# Link the offscreen end-to-end harness: the app's own Swift shell, plus -# test/macos_e2e.swift as the entry point, against the same libpardes.a. Run it -# through `zig build macos-e2e -Dplatform=macos`, or by hand with the install -# prefix as $1 and the deployment target as $2. -# -# A SECOND BINARY rather than a `--e2e` flag on the app, for two reasons. -# -# Test scaffolding does not ship inside the product. A flag would put the script -# interpreter, the /tmp world-builder and the golden differ into the thing a -# user launches, and would give the app a mode in which it rewrites files under -# /tmp and calls exit() — none of which anyone should be one argv typo away from. -# -# And src/macos/Sources/main.swift holds top-level code, which IS an entry -# point: a module cannot contain both top-level statements and a @main type, so -# the harness could not join that link even if the first reason went away. Every -# other Swift file the app builds from is compiled here, so this link is also -# what proves the shell still compiles as a library rather than as an app. -set -eu - -root=$(cd "$(dirname "$0")/../.." && pwd) -out=${1:-"$root/zig-out"} -# Keep in step with macos_min_version in build.zig, which passes it in. The -# default is only for a by-hand run. Same string the app's own link uses, and -# for the same reason: -target is what decides LC_BUILD_VERSION and turns on -# the availability diagnostics. -minver=${2:-13.0} -lib="$out/lib/libpardes.a" -bin="$out/bin/pardes-macos-e2e" - -[ -f "$lib" ] || { echo "missing $lib — run: zig build -Dplatform=macos" >&2; exit 1; } -command -v swiftc >/dev/null || { echo "swiftc not found (needs macOS + Command Line Tools)" >&2; exit 1; } - -mkdir -p "$out/bin" -# Bundle.main.resourceURL is the executable directory for this standalone -# harness. Put the same committed source there that the real app installs into -# Contents/Resources, so the shader path is exercised rather than bypassed. -cp "$root/shaders/crt.ci.metal" "$out/bin/crt.ci.metal" - -# -import-objc-header and -lc++ are the app link's, unchanged, and have to stay -# that way: this link exists to exercise the app's link, so anything that -# differs here is something the harness cannot vouch for. -# -# -O for the same reason. A debug build of the CoreText pass and the effect -# drain settles on different timings than a user sees, and `stable` waits on -# exactly those timings. -swiftc -O -target "$(uname -m)-apple-macos$minver" \ - -import-objc-header "$root/src/macos/pardes.h" \ - -o "$bin" \ - "$root/src/macos/Sources/PardesView.swift" \ - "$root/src/macos/Sources/ScenePostprocessor.swift" \ - "$root/src/macos/Sources/FileWatcher.swift" \ - "$root/src/macos/Sources/AppDelegate.swift" \ - "$root/test/macos_e2e.swift" \ - "$lib" -lc++ \ - -framework AppKit -framework CoreText -framework CoreGraphics \ - -framework CoreImage -framework Metal - -echo "built $bin" |
