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
+40
View File
@@ -0,0 +1,40 @@
extends TestCase
## R2: the application icon. The PNGs are renders of the hand-written SVG, in Palette
## colours, and the project uses one as its window icon.
const APP_ICON: GDScript = preload("res://tools/app_icon.gd")
func test_every_size_is_the_svg_rendered_at_that_size() -> void:
var svg: String = FileAccess.get_file_as_string(APP_ICON.SOURCE)
assert_true(svg.begins_with("<?xml"), "the SVG is there")
for side: int in APP_ICON.SIZES:
var path: String = "res://assets/icons/app/tidewall-%d.png" % side
var saved: Image = Image.load_from_file(path)
assert_not_null(saved, path)
if saved == null:
continue
saved.convert(Image.FORMAT_RGBA8)
assert_eq(saved.get_size(), Vector2i(side, side), path)
var fresh: Image = APP_ICON.render(svg, side)
assert_eq(saved.get_data(), fresh.get_data(), "%s is out of date; run make app-icon" % path)
func test_the_svg_uses_only_palette_colours() -> void:
var svg: String = FileAccess.get_file_as_string(APP_ICON.SOURCE)
var allowed: Dictionary = {}
for colour: Color in [Palette.INK, Palette.CANVAS, Palette.DRESSED_STONE, Palette.SEA_PAINT, Palette.SEA_DEEP, Palette.SALT, Palette.OILSKIN, Palette.OCHRE_RED]:
allowed["#" + colour.to_html(false).to_lower()] = true
var found: RegEx = RegEx.create_from_string("#[0-9a-fA-F]{6}")
var used: int = 0
for match: RegExMatch in found.search_all(svg):
used += 1
assert_true(allowed.has(match.get_string().to_lower()), "%s is not a palette colour" % match.get_string())
assert_true(used >= 6)
func test_the_project_uses_it_as_its_icon() -> void:
var icon: String = String(ProjectSettings.get_setting("application/config/icon", ""))
assert_true(icon.begins_with("res://assets/icons/app/"), "application/config/icon is '%s'" % icon)
assert_true(ResourceLoader.exists(icon))
+1
View File
@@ -0,0 +1 @@
uid://ddioojm5kfw65