sdfsdf
This commit is contained in:
1 parent
a59be0fc9c
commit
4cd68793c9
41 files changed
+287
-129
No files matched your search
@@ -1,12 +1,14 @@
|
||||
#!/usr/bin/env sh
|
||||
# Captures all website screenshots from the real Ink app (read only) into src/assets/screens/.
|
||||
# Usage: scripts/capture/run.sh (env: INK_APP, OUT, SCENES)
|
||||
# Captures all website screenshots from the released Ink AppImage into src/assets/screens/.
|
||||
# Usage: scripts/capture/run.sh Ink-1.0.0-beta-x86_64.AppImage (env: OUT, SCENES)
|
||||
set -e
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
INK_APP="${INK_APP:-$HERE/../../../../App/Ink}"
|
||||
INK_APP="$(cd "$INK_APP" && pwd)"
|
||||
export INK_APP
|
||||
APPIMAGE="$(realpath "${1:-${INK_APPIMAGE:?pass the AppImage path}}")"
|
||||
WORK="$(mktemp -d)"
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
# Extract in an empty directory of its own; the AppImage is only unpacked, never run from here.
|
||||
(cd "$WORK" && cp "$APPIMAGE" ink.AppImage && chmod +x ink.AppImage && ./ink.AppImage --appimage-extract >/dev/null)
|
||||
export INK_BIN="$WORK/squashfs-root/ink"
|
||||
for theme in dark light; do
|
||||
THEME=$theme "$INK_APP/node_modules/.bin/electron" "$HERE/capture.cjs" \
|
||||
--ozone-platform=headless --force-device-scale-factor=1.5 --no-sandbox 2>&1 | grep -E 'saved|FAILED|Error' || true
|
||||
THEME=$theme node "$HERE/capture.cjs" 2>&1 | grep -E 'saved|FAILED|Error' || true
|
||||
done
|
||||
Reference in new issue
Block a user