Files
tidewall/tools/engine_licenses.gd
claudeandClaude Opus 5.5 f3161bf46c 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>
2026-11-14 03:12:47 -05:00

69 lines
2.4 KiB
GDScript

## R2: writes the Godot engine's own licence and the notices of the third-party code
## built into it, as the engine reports them (Engine.get_license_text(),
## get_copyright_info(), get_license_info()). The MIT licence and the others need these
## notices to travel with the binary, so the release package and the .deb ship this file.
##
## tools/godot.sh --script res://tools/engine_licenses.gd -- --out=PATH
extends SceneTree
func _init() -> void:
var out: String = ""
for arg: String in OS.get_cmdline_user_args():
if arg.begins_with("--out="):
out = arg.get_slice("=", 1)
if out.is_empty():
printerr("engine_licenses: --out=PATH is required")
quit(2)
return
var file: FileAccess = FileAccess.open(out, FileAccess.WRITE)
if file == null:
printerr("engine_licenses: can't write %s" % out)
quit(1)
return
file.store_string(text())
file.close()
quit(0)
static func text() -> String:
var version: Dictionary = Engine.get_version_info()
var lines: PackedStringArray = PackedStringArray()
lines.append("Tidewall runs on the Godot Engine %s (https://godotengine.org)." % version["string"])
lines.append("The engine's licence, and the copyright notices and licences of the")
lines.append("third-party code built into it, as the engine itself reports them.")
lines.append("")
lines.append("=" .repeat(78))
lines.append("Godot Engine")
lines.append("=" .repeat(78))
lines.append("")
lines.append(Engine.get_license_text().strip_edges())
lines.append("")
lines.append("=" .repeat(78))
lines.append("Components")
lines.append("=" .repeat(78))
for component: Dictionary in Engine.get_copyright_info():
lines.append("")
lines.append("%s" % component["name"])
for part: Dictionary in component["parts"]:
lines.append(" Files: %s" % ", ".join(PackedStringArray(part["files"])))
for holder: String in part["copyright"]:
lines.append(" Copyright: %s" % holder)
lines.append(" License: %s" % part["license"])
lines.append("")
lines.append("=" .repeat(78))
lines.append("Licence texts")
lines.append("=" .repeat(78))
var licenses: Dictionary = Engine.get_license_info()
var names: Array = licenses.keys()
names.sort()
for name: String in names:
lines.append("")
lines.append("-" .repeat(78))
lines.append(name)
lines.append("-" .repeat(78))
lines.append("")
lines.append(String(licenses[name]).strip_edges())
lines.append("")
return "\n".join(lines)