R4: Originality and licence audit
- docs/ASSET_PROVENANCE.md traces each of the 162 files under assets/ to
the script that generates it, or to its hand-written original (the app
icon's SVG). It's written by tools/provenance.gd, and the new
test_asset_provenance fails on a file with no rule, a rule naming a
generator that doesn't exist, or a stale document. The release package
and the .deb now ship it next to PROVENANCE.md (make dist-check and
make deb-check pass).
- Searched code, data, assets, docs and packaging for commercial game
names, characters, item and place names: none. The only matches are the
genre wording ("battle royale") and, in the DEVLOG, an open-source engine
another task uses. Item and place names are Tidewall's own (dock carbine,
fowling piece, tern chapel...).
- Licence notices: the Godot engine's licence and its third-party notices
(ENGINE-LICENSES.txt, generated from the engine) already ship in the
tarball and the .deb's copyright; there are no other libraries, addons or
fonts. CREDITS.md links the new trace.
- Name check for "Tidewall" noted on R7 (#66).
Closes #63
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,7 @@ install -m 0644 packaging/deb/copyright "$doc/copyright"
|
||||
install -m 0644 packaging/dist/README.md "$doc/README.md"
|
||||
install -m 0644 "$package/server.cfg" "$doc/examples/server.cfg"
|
||||
gzip -9n -c "$package/PROVENANCE.md" >"$doc/PROVENANCE.md.gz"
|
||||
gzip -9n -c "$package/ASSET_PROVENANCE.md" >"$doc/ASSET_PROVENANCE.md.gz"
|
||||
gzip -9n -c "$package/ENGINE-LICENSES.txt" >"$doc/ENGINE-LICENSES.gz"
|
||||
{
|
||||
printf 'tidewall (%s) unstable; urgency=medium\n\n' "$debversion"
|
||||
|
||||
+2
-1
@@ -20,7 +20,7 @@
|
||||
# tidewall.png the application icon
|
||||
# server.cfg an example server configuration
|
||||
# ENGINE-LICENSES.txt the Godot engine's licence and its third-party notices
|
||||
# LICENSE, LICENSE-ASSETS, README.md, PROVENANCE.md, VERSION
|
||||
# LICENSE, LICENSE-ASSETS, README.md, PROVENANCE.md, ASSET_PROVENANCE.md, VERSION
|
||||
set -euo pipefail
|
||||
|
||||
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
@@ -87,6 +87,7 @@ install -m 0644 LICENSE LICENSE-ASSETS "$package/"
|
||||
install -m 0644 packaging/server/server.cfg "$package/server.cfg"
|
||||
install -m 0644 packaging/dist/README.md "$package/README.md"
|
||||
install -m 0644 assets/PROVENANCE.md "$package/PROVENANCE.md"
|
||||
install -m 0644 docs/ASSET_PROVENANCE.md "$package/ASSET_PROVENANCE.md"
|
||||
install -m 0755 packaging/dist/tidewall "$package/tidewall"
|
||||
install -m 0755 packaging/dist/install-desktop-entry.sh "$package/install-desktop-entry.sh"
|
||||
install -m 0644 assets/icons/app/tidewall-256.png "$package/tidewall.png"
|
||||
|
||||
+1
-1
@@ -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="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"
|
||||
expected="ASSET_PROVENANCE.md 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")"
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
## R4: traces every file under assets/ to the script that makes it, or to its original
|
||||
## hand-written source, and writes the per-file table in docs/ASSET_PROVENANCE.md.
|
||||
## `test_asset_provenance` fails if a file has no rule, a rule names a generator that
|
||||
## doesn't exist, or the document is out of date.
|
||||
## tools/godot.sh --script res://tools/provenance.gd
|
||||
extends SceneTree
|
||||
|
||||
const ASSETS: String = "res://assets"
|
||||
const DOC: String = "res://docs/ASSET_PROVENANCE.md"
|
||||
|
||||
## Path pattern (relative to assets/, `*` wildcards) -> [source, how]. First match wins.
|
||||
const RULES: Array[Array] = [
|
||||
["PROVENANCE.md", "written by hand", "The summary of how each kind of asset is made."],
|
||||
["audio/manifest.json", "tools/audio/generate.gd", "Each sound's category, length, SHA-256, peak and loudness, written as the sounds are baked."],
|
||||
["audio/music_*.wav", "tools/audio/score.gd", "A layer of the original score: note lists written for Tidewall, synthesized by tools/audio/dsp.gd."],
|
||||
["audio/*.wav", "tools/audio/recipes.gd", "Synthesized from seeded noise, oscillators, filters and decaying modes (tools/audio/dsp.gd)."],
|
||||
["models/items/*", "tools/models/items.py", "An item model (OBJ and MTL) and its grip data (JSON), built from primitives in headless Blender."],
|
||||
["icons/items/*.png", "tools/models/items.py", "The item's model rendered with Cycles on the CPU in headless Blender."],
|
||||
["models/figure/*", "tools/models/figure.py", "A part of the player figure (OBJ and MTL) or its joint data (JSON), built from primitives in headless Blender."],
|
||||
["icons/app/tidewall.svg", "written by hand", "The application icon, an SVG written for Tidewall in Palette colours."],
|
||||
["icons/app/tidewall-*.png", "tools/app_icon.gd", "The hand-written SVG rasterised by the engine's SVG loader."],
|
||||
]
|
||||
|
||||
const HEADER: String = """# Asset provenance, file by file
|
||||
|
||||
Every file under `assets/` and where it comes from: the script in this repository that
|
||||
generates it, or "written by hand" for an original source written for Tidewall. Nothing
|
||||
is sampled, recorded, downloaded or taken from a third party. How each kind of asset is
|
||||
made is described in [assets/PROVENANCE.md](../assets/PROVENANCE.md); the licence is
|
||||
CC BY-SA 4.0 ([LICENSE-ASSETS](../LICENSE-ASSETS)).
|
||||
|
||||
Code-built art (terrain, sea, points of interest, props, build pieces, the barge, sea
|
||||
chests and effects) isn't a file here: it's drawn by the scripts under `src/client/`.
|
||||
|
||||
This file is written by `tools/godot.sh --script res://tools/provenance.gd`, and
|
||||
`test/test_asset_provenance.gd` fails if it falls out of date or a file has no source.
|
||||
|
||||
| File | Source | What it is |
|
||||
|---|---|---|
|
||||
"""
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
var problems: Array[String] = problems_with(rows())
|
||||
if not problems.is_empty():
|
||||
for problem: String in problems:
|
||||
push_error(problem)
|
||||
quit(1)
|
||||
return
|
||||
var file: FileAccess = FileAccess.open(DOC, FileAccess.WRITE)
|
||||
file.store_string(render())
|
||||
file.close()
|
||||
print("asset provenance: %d files in %s" % [rows().size(), DOC])
|
||||
quit(0)
|
||||
|
||||
|
||||
## Every file under assets/, sorted, without the engine's .import and .uid sidecars.
|
||||
static func files(dir: String = ASSETS, prefix: String = "") -> Array[String]:
|
||||
var found: Array[String] = []
|
||||
for name: String in DirAccess.get_files_at(dir):
|
||||
if name.ends_with(".import") or name.ends_with(".uid"):
|
||||
continue
|
||||
found.append(prefix + name)
|
||||
for sub: String in DirAccess.get_directories_at(dir):
|
||||
found.append_array(files(dir.path_join(sub), prefix + sub + "/"))
|
||||
found.sort()
|
||||
return found
|
||||
|
||||
|
||||
## [path, source, how] for each file, with an empty source where no rule matches.
|
||||
static func rows() -> Array[Array]:
|
||||
var out: Array[Array] = []
|
||||
for path: String in files():
|
||||
var row: Array = [path, "", ""]
|
||||
for rule: Array in RULES:
|
||||
if path.match(rule[0]):
|
||||
row = [path, rule[1], rule[2]]
|
||||
break
|
||||
out.append(row)
|
||||
return out
|
||||
|
||||
|
||||
static func problems_with(table: Array[Array]) -> Array[String]:
|
||||
var found: Array[String] = []
|
||||
for row: Array in table:
|
||||
var source: String = row[1]
|
||||
if source.is_empty():
|
||||
found.append("assets/%s: no recorded source; add a rule to tools/provenance.gd" % row[0])
|
||||
elif source != "written by hand" and not FileAccess.file_exists("res://" + source):
|
||||
found.append("assets/%s: its generator %s doesn't exist" % [row[0], source])
|
||||
return found
|
||||
|
||||
|
||||
static func render() -> String:
|
||||
var lines: Array[String] = []
|
||||
for row: Array in rows():
|
||||
var source: String = row[1]
|
||||
var shown: String = source if source == "written by hand" else "`%s`" % source
|
||||
lines.append("| `assets/%s` | %s | %s |" % [row[0], shown, row[2]])
|
||||
return HEADER + "\n".join(lines) + "\n"
|
||||
@@ -0,0 +1 @@
|
||||
uid://bj441upyje41c
|
||||
Reference in New Issue
Block a user