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:
@@ -25,6 +25,8 @@ func attach(root: Control) -> void:
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if not SoundBank.has_output():
|
||||
audible = false
|
||||
get_tree().node_added.connect(_hook_later)
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ var _sync: AudioStreamSynchronized
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if not SoundBank.has_output():
|
||||
audible = false
|
||||
SoundBank.ensure_bus(SoundBank.MUSIC_BUS)
|
||||
_sync = AudioStreamSynchronized.new()
|
||||
_sync.stream_count = LAYERS.size()
|
||||
|
||||
@@ -14,6 +14,14 @@ static var _cache: Dictionary = {}
|
||||
|
||||
|
||||
## The stream for a sound by name, or null if there's no such file.
|
||||
## False when the engine has no real audio output: headless runs, or a machine with no
|
||||
## sound device, where Godot falls back to its Dummy driver. Nothing should play then,
|
||||
## since nothing can be heard, and a loop left playing into the Dummy driver can outlive
|
||||
## the program's last frame and be reported as a leak at exit (R2).
|
||||
static func has_output() -> bool:
|
||||
return AudioServer.get_driver_name() != "Dummy"
|
||||
|
||||
|
||||
static func stream(sound: String) -> AudioStream:
|
||||
if _cache.has(sound):
|
||||
return _cache[sound]
|
||||
|
||||
@@ -74,6 +74,8 @@ var _ambience: Dictionary = {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if not SoundBank.has_output():
|
||||
audible = false
|
||||
SoundBank.ensure_bus(SoundBank.EFFECTS_BUS)
|
||||
for index: int in VOICES_3D:
|
||||
var voice: AudioStreamPlayer3D = AudioStreamPlayer3D.new()
|
||||
@@ -96,6 +98,18 @@ func _ready() -> void:
|
||||
_ambience[loop] = bed
|
||||
|
||||
|
||||
## Stops every voice and bed before the nodes go, so the audio server lets go of their
|
||||
## playbacks; a loop still playing when the program quits is otherwise reported as a
|
||||
## leak at exit (R2).
|
||||
func _exit_tree() -> void:
|
||||
for voice: AudioStreamPlayer3D in _voices_3d:
|
||||
voice.stop()
|
||||
for flat: AudioStreamPlayer in _voices_2d:
|
||||
flat.stop()
|
||||
for loop: String in _ambience:
|
||||
(_ambience[loop] as AudioStreamPlayer).stop()
|
||||
|
||||
|
||||
## One frame. `own_id` is the client's own player or 0; `listener` is where the camera is.
|
||||
func update(game: ClientGame, own_id: int, listener: Vector3, delta: float) -> void:
|
||||
cues.clear()
|
||||
|
||||
Reference in New Issue
Block a user