SPB Git

Repository Public License

screenshots.sh 3.2 KB 56 lines shellscript

1#!/usr/bin/env bash2# ORIX Arcade3# File: Scripts/screenshots.sh4# Description: Captures real simulator screenshots of the running app into docs/screenshots (the built-in bots play; nothing is rendered offline).5#              Also collects the frame-time logs written by -ORIXPerfLog into build/perf. Pause screens come from the UI tests.6#7# Author: Simon-Pierre Boucher8# Contact: contact@spboucher.ai9set -euo pipefail10cd "$(dirname "$0")/.."11SIM="${ORIX_SIM:-ORIXArcade iPhone}"12ID=ai.spboucher.orix.arcade13OUT=docs/screenshots14APP="${ORIX_DD:-build/DerivedData}/Build/Products/Debug-iphonesimulator/ORIXArcade.app"15mkdir -p "$OUT" build/perf16xcrun simctl bootstatus "$SIM" -b >/dev/null17xcrun simctl install "$SIM" "$APP"18go() { xcrun simctl launch --terminate-running-process "$SIM" $ID -ORIXSaveName shots -ORIXMute YES -ORIXPerfLog YES "$@" >/dev/null; }19shot() { xcrun simctl io "$SIM" screenshot "$OUT/$1.png" >/dev/null 2>&1; echo "  $1.png"; }2021go -ORIXReset YES;                                   sleep 1.0; shot 01-splash22sleep 4;                                                        shot 02-lobby-first-launch23# Domino City: the bot plays the reference solutions of all 15 levels.24go -ORIXSkipIntro YES -ORIXGame dominoCity -ORIXLevel 1 -ORIXDominoAim YES;  sleep 4; shot 10-domino-tutorial-aim25go -ORIXSkipIntro YES -ORIXGame dominoCity -ORIXLevel 1 -ORIXAutoplay YES26sleep 5; shot 11-domino-level-01-chain27for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22; do sleep 10; shot "12-domino-autoplay-$(printf %02d $i)"; done28go -ORIXSkipIntro YES -ORIXGame dominoCity;          sleep 4;   shot 13-domino-level-select29# Dig to Core.30go -ORIXSkipIntro YES -ORIXGame digToCore;           sleep 4;   shot 20-dig-hangar31go -ORIXSkipIntro YES -ORIXGame digToCore -ORIXDive YES -ORIXAutoplay YES -ORIXSeed 1132sleep 10; shot 21-dig-loam-gardens33for i in 1 2 3 4 5 6 7 8 9 10 11 12; do sleep 10; shot "22-dig-first-dive-$(printf %02d $i)"; done34go -ORIXSkipIntro YES -ORIXGame digToCore -ORIXDigShop YES;                 sleep 4;  shot 23-dig-upgrade-shop35n=2436for depth in 130 320 560 820; do37  go -ORIXSkipIntro YES -ORIXGame digToCore -ORIXDive YES -ORIXAutoplay YES -ORIXSeed 11 -ORIXDigDepth $depth -ORIXDigMax YES38  sleep 9; shot "$n-dig-biome-at-${depth}m"; n=$((n+1))39done40# Traffic Mayhem.41go -ORIXSkipIntro YES -ORIXGame trafficMayhem;       sleep 4;   shot 30-traffic-junction-select42for layout in 0 1 2; do43  go -ORIXSkipIntro YES -ORIXGame trafficMayhem -ORIXLayout $layout -ORIXMode rush -ORIXAutoplay YES -ORIXSeed 544  sleep 22; shot "3$((layout+1))-traffic-layout-$layout-a"; sleep 16; shot "3$((layout+1))-traffic-layout-$layout-b"45  sleep 34; shot "3$((layout+4))-traffic-layout-$layout-results"46done47# Lobby, awards and settings with the progress earned above.48go -ORIXSkipIntro YES;                               sleep 4;   shot 40-lobby49go -ORIXSkipIntro YES -ORIXTab awards;               sleep 3;   shot 41-awards50go -ORIXSkipIntro YES -ORIXTab settings;             sleep 3;   shot 42-settings51xcrun simctl terminate "$SIM" $ID || true52DATA=$(xcrun simctl get_app_container "$SIM" $ID data)53cp "$DATA"/Documents/perf-*.json build/perf/ 2>/dev/null || true54cp "$DATA"/Documents/domino-autoplay.json build/perf/ 2>/dev/null || true55ls build/perf56
Files main
Menu

Theme