R2: Debian package, desktop entry, launcher and application icon

- make deb (tools/deb.sh) builds tidewall_<version>-1_amd64.deb with
  dpkg-deb: launchers in /usr/games, the game in /usr/lib/tidewall, a
  validated desktop entry, hicolor icons, man pages, a DEP-5 copyright,
  the engine's licences and md5sums. No maintainer scripts. Depends on
  libc6 (>= 2.28), from the binary's GLIBC symbol versions.
- make deb-check (tools/deb_check.sh) checks it in a throwaway debian:13
  container: apt install with no recommends, desktop-file-validate,
  icons, man pages and licences, tidewall on a user's PATH, the server
  and the game headless as a user, lintian, and a purge that leaves
  nothing behind.
- The tarball gains a tidewall launcher (any directory, through a
  symlink), install-desktop-entry.sh (per-user menu entry, --remove),
  tidewall.png and ENGINE-LICENSES.txt (Godot's MIT text and bundled
  notices, which R1 lacked). make dist-check covers the launcher and the
  menu entry.
- Application icon: a hand-written SVG in palette colours, rendered to
  16-512 px by make app-icon, and set as the window icon.
  test_app_icon checks the renders, the colours and the setting.
- Fix: looping ambience played into the Dummy audio driver could be
  reported as resources in use at exit. Directors play nothing without
  real audio output (SoundBank.has_output()) and stop their voices on
  exit.

Tests: make check (648), make dist-check, make deb-check all pass.

Closes #61

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 03:12:47 -05:00
co-authored by Claude Opus 5.5
parent 9b5064d7a8
commit f3161bf46c
47 changed files with 1078 additions and 4 deletions
+25 -1
View File
@@ -37,7 +37,7 @@ package="$work/$name"
export HOME="$work/home" XDG_DATA_HOME="$work/home/data" XDG_CONFIG_HOME="$work/home/config" XDG_CACHE_HOME="$work/home/cache" XDG_STATE_HOME="$work/home/state"
mkdir -p "$HOME"
expected="LICENSE LICENSE-ASSETS PROVENANCE.md README.md VERSION server.cfg tidewall-server tidewall.pck tidewall.x86_64"
expected="ENGINE-LICENSES.txt LICENSE LICENSE-ASSETS PROVENANCE.md README.md VERSION install-desktop-entry.sh server.cfg tidewall tidewall-server tidewall.pck tidewall.png tidewall.x86_64"
actual="$(cd "$package" && ls -A | LC_ALL=C sort | tr '\n' ' ' | sed 's/ $//')"
[[ "$actual" == "$expected" ]] || fail "the package holds '$actual', expected '$expected'"
version="$(sed -n 's/^Tidewall //p' "$package/VERSION")"
@@ -89,6 +89,30 @@ playing="$(sed -n 's/.*"frames_playing":\([0-9]*\).*/\1/p' <<<"$report")"
grep -q '"event":"player_joined".*"name":"Mara"' "$server_log" || fail "the server never saw the game join"
grep -q '"errors":0,"event":"stop"' "$server_log" || fail "the server logged errors"
echo " game: joined, in the match for ${playing:-0} frames"
echo "dist-check: the launcher from another directory, and the menu entry" >&2
mkdir -p "$work/elsewhere"
ln -s "$package/tidewall" "$work/elsewhere/tidewall-link"
launch_log="$work/launch.log"
(cd / && timeout --signal=KILL 120 nice -n 15 "$work/elsewhere/tidewall-link" --headless -- --offline --autoplay --client-seconds=8 >"$launch_log" 2>&1)
launch_code=$?
[[ "$launch_code" -eq 0 ]] || fail "the launcher, through a symlink from /, exited $launch_code"
grep -q '"event":"client"' "$launch_log" || fail "the launcher's game said nothing"
if grep -qE '^(ERROR|SCRIPT ERROR|WARNING: .*leaked)' "$launch_log"; then
grep -m3 -E '^(ERROR|SCRIPT ERROR|WARNING)' "$launch_log" | sed 's/^/ /'
fail "the launcher's game logged errors"
fi
menu="$work/menu"
XDG_DATA_HOME="$menu" "$package/install-desktop-entry.sh" >/dev/null || fail "install-desktop-entry.sh failed"
entry="$menu/applications/tidewall.desktop"
[[ -s "$entry" && -s "$menu/icons/hicolor/256x256/apps/tidewall.png" ]] || fail "no menu entry or icon after install-desktop-entry.sh"
grep -qx "Exec=\"$package/tidewall\"" "$entry" || fail "the menu entry doesn't run this folder's launcher"
if command -v desktop-file-validate >/dev/null; then
desktop-file-validate "$entry" || fail "the menu entry doesn't validate"
fi
XDG_DATA_HOME="$menu" "$package/install-desktop-entry.sh" --remove >/dev/null
[[ ! -e "$entry" ]] || fail "--remove left the menu entry"
echo " launcher: played offline through a symlink from /; menu entry added, validated and removed"
if [[ -n "$(ls -A "$HOME/data" 2>/dev/null | grep -v '^godot$')" ]]; then
fail "the package wrote outside the engine's user data: $(ls -A "$HOME/data")"
fi