Ariver
2026-06-19 9114595d7575b8d79328f7dc0e3401f65414de63
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Round01 real screenshot sample probe. This is a diagnostic entrypoint and
# must not be treated as a product UI.
 
set -euo pipefail
 
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
OUTPUT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
# shellcheck source=build-output-paths.sh
source "$SCRIPT_DIR/build-output-paths.sh"
SOURCE_ROOT="$OUTPUT_ROOT/C1.source"
APP="$BUILD_CURRENT_APP"
SAMPLE_DIR="$BUILD_REPORT_ROOT/round01-screenshot-samples"
SAMPLE_DOCUMENT="$SAMPLE_DIR/document-sample.txt"
 
prepare_sample_windows() {
  mkdir -p "$SAMPLE_DIR"
  printf 'Aligner Round01 screenshot probe document sample.\n' > "$SAMPLE_DOCUMENT"
 
  open "$HOME" >/dev/null 2>&1 || true
  open -a Safari about:blank >/dev/null 2>&1 || true
  open -a Terminal >/dev/null 2>&1 || true
  open -a TextEdit "$SAMPLE_DOCUMENT" >/dev/null 2>&1 || true
  open -b com.apple.systempreferences >/dev/null 2>&1 || open -a "System Settings" >/dev/null 2>&1 || true
 
  sleep "${ALIGNER_SCREENSHOT_PROBE_PREPARE_DELAY:-2}"
}
 
if [[ "${ALIGNER_SKIP_SCREENSHOT_PROBE_PREPARE:-0}" != "1" ]]; then
  prepare_sample_windows
fi
 
cd "$SOURCE_ROOT"
swift build >&2
 
"$SCRIPT_DIR/package-app.sh" >&2
 
"$APP/Contents/MacOS/Aligner" \
  --round0-skip-permissions \
  --round01-screenshot-probe \
  --round01-screenshot-probe-pretty