screentinker/tizen/build-wgt.sh
ScreenTinker 0cfa09046c feat(tizen): Samsung Tizen TV web player (.wgt)
Ports the ScreenTinker player to a Tizen TV / signage web app, speaking the
SAME /device socket.io protocol as the Android player — no server changes; a
Tizen display pairs from the same dashboard.

- app.js: device protocol client — register (pairing_code | device_id+token),
  device:registered/paired/unpaired/playlist-update, 15s heartbeat, keep-awake.
  Always reaches the server prompt until the display is actually paired; a
  saved-but-unreachable server falls back to the prompt (no blank screen); BACK
  returns to it.
- player.js: fullscreen single-zone renderer — image (duration timer), video
  (play-to-end + loop), YouTube (iframe embed), widget (iframe render endpoint).
- config.xml: Tizen TV manifest; build-wgt.sh packages (signs if Tizen CLI
  present, else unsigned); README covers URL-Launcher and signed-.wgt deploy.

Validated: headless protocol test vs the live server passed end-to-end
(register -> pair -> reconnect-auth -> playlist(2) -> content 200); loads +
renders in Chromium with no JS errors.

Not yet ported (fullscreen single-zone covers most signage): multi-zone, video
walls, screenshots, remote control, self-OTA. .wgt is a build artifact (gitignored).
2026-06-09 19:01:58 -05:00

23 lines
889 B
Bash
Executable file

#!/bin/bash
# Build the ScreenTinker Tizen .wgt.
# - If the Tizen CLI is on PATH, sign with a security profile (arg 1, default
# "ScreenTinker"): produces a TV-installable signed .wgt.
# - Otherwise, produce an UNSIGNED .wgt (plain zip) — fine for inspection / the
# URL-Launcher path, but retail Samsung TVs need a signed package.
set -e
cd "$(dirname "$0")"
OUT="ScreenTinker.wgt"
FILES="config.xml index.html icon.png css js"
rm -f "$OUT"
if command -v tizen >/dev/null 2>&1; then
PROFILE="${1:-ScreenTinker}"
echo "Tizen CLI found — signing with profile '$PROFILE'…"
tizen package -t wgt -s "$PROFILE" -- . -o .
echo "Signed $OUT ready."
else
echo "Tizen CLI not found — building UNSIGNED $OUT."
zip -r -X "$OUT" $FILES -x '*.DS_Store' '_*' >/dev/null
echo "Built $OUT ($(du -h "$OUT" | cut -f1), UNSIGNED — sign before installing on a retail TV)."
fi