AtlatestRepositorylantern

lantern / treerun-transparency-test.sh

1#!/usr/bin/env bash
2# Visual cert for Lantern window transparency (task lantern-translucency).
3#
4# ./run-transparency-test.sh
5#
6# Opens the static semi-transparent CSS page (examples/transparency-test) in a
7# transparent-capable Lantern window. If the Lantern side works, your desktop
8# shows through the tinted page background and fully through the dashed cutout,
9# while the blue panel stays solid. Zero Slate dependency — isolates the
10# GtkWindow RGBA + alpha-0 webview change.
12# Wraps the invocation in an ephemeral `guix shell` (the GTK4 + WebKitGTK + Mesa
13# graphics stack from gl-manifest.scm). If the window never maps, re-run with
14# LANTERN_SOFTWARE_RENDER=1 (the Mesa GL loader-path gotcha).
15set -euo pipefail
17HERE="$(cd "$(dirname "$0")" && pwd)"
18PAGE="${1:-$HERE/examples/transparency-test}"
19LANTERN_BIN="$HERE/build/native/bin/lantern"
21[ -x "$LANTERN_BIN" ] || { echo "missing $LANTERN_BIN — run: sigil build lantern-cli --config native" >&2; exit 1; }
22[ -f "$PAGE/index.html" ] || { echo "no index.html at $PAGE" >&2; exit 1; }
24echo "==> page: $PAGE"
25echo "==> lantern: $LANTERN_BIN"
26exec guix shell -m "$HERE/gl-manifest.scm" -- bash -c '
27 export LD_LIBRARY_PATH="$GUIX_ENVIRONMENT/lib"
28 export LANTERN_LIB_DIR="$GUIX_ENVIRONMENT/lib"
29 exec "$0" run "$1" --title "Transparency test" --transparent
30' "$LANTERN_BIN" "$PAGE"