screentinker/tizen/build-wgt.sh
ScreenTinker 5396cf9896 chore(tizen): dev-signing setup + support@screentinker.net author email
- config.xml author email -> support@screentinker.net
- build-wgt.sh: stage app files only before signing (keeps README/build script
  out of the .wgt), auto-add the Tizen CLI to PATH if installed.
- README: document the configured 'ScreenTinker' signing profile (self-signed
  author + default Tizen distributor) — installs on dev-mode TVs / emulator;
  production retail needs a Samsung distributor cert.

Signed .wgt + the author cert are not committed (build artifact / secret).
2026-06-09 19:10:28 -05:00

30 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
# Build the ScreenTinker Tizen .wgt.
# - If the Tizen CLI is available, sign with a security profile (arg 1, default
# "ScreenTinker") and emit a signed, TV-installable .wgt.
# - Otherwise, emit an UNSIGNED .wgt (plain zip) — fine for inspection / the
# URL-Launcher path, but TVs need a signed package.
# Only the app files are packaged (README/build script/.gitignore are excluded).
set -e
cd "$(dirname "$0")"
OUT="ScreenTinker.wgt"
FILES="config.xml index.html icon.png css js"
# Make the Tizen CLI discoverable if installed in the default location.
[ -d "$HOME/tizen-studio/tools/ide/bin" ] && export PATH="$HOME/tizen-studio/tools/ide/bin:$PATH"
rm -f "$OUT"
if command -v tizen >/dev/null 2>&1; then
PROFILE="${1:-ScreenTinker}"
echo "Tizen CLI found — signing with profile '$PROFILE'…"
STAGE="$(mktemp -d)"
cp -r $FILES "$STAGE"/
tizen package -t wgt -s "$PROFILE" -- "$STAGE" -o "$PWD" >/dev/null
rm -rf "$STAGE"
echo "Signed $OUT ready ($(du -h "$OUT" | cut -f1))."
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 TV)."
fi