rename: src/Formats -> src/Rosetta, @formats -> @rosetta requires, build/luajit/rosetta + rosetta._compat, build/roblox/Rosetta, ROSETTA_* env/globals, writer vendor strings
This commit is contained in:
1 parent
2956576d7f
commit
22ddcd78fa
941 files changed
+3364
-3364
No files matched your search
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# Registry generator (python3 -I tools/gen_registry.py [--check]): scans the format folders
|
||||
# src/Formats/<category>/<fmt>/init.luau and writes
|
||||
# src/Formats/Registry.luau a static list (Roblox has no dynamic require): each format's contract metadata, copied
|
||||
# src/Rosetta/<category>/<fmt>/init.luau and writes
|
||||
# src/Rosetta/Registry.luau a static list (Roblox has no dynamic require): each format's contract metadata, copied
|
||||
# from its init.luau, and a load() that requires the module on first use
|
||||
# docs/FORMATS.md the capability matrix, from each contract's caps
|
||||
# The metadata fields must be one-line literals in the contract table (tools/lint.sh CONTRACT checks the shape):
|
||||
@@ -10,7 +10,7 @@
|
||||
import os, re, sys
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
SRC = os.path.join(ROOT, "src", "Formats")
|
||||
SRC = os.path.join(ROOT, "src", "Rosetta")
|
||||
CATEGORIES = ["image", "audio", "video", "model", "cad", "font", "archive", "data", "vector", "layered", "subtitle",
|
||||
"music", "playlist"]
|
||||
FIELDS = ["name", "category", "extensions", "mime", "deps", "caps"]
|
||||
@@ -82,7 +82,7 @@ def registry(formats):
|
||||
"\t\tdeps = %s," % c["deps"],
|
||||
"\t\tcaps = %s," % c["caps"],
|
||||
"\t\tload = function()",
|
||||
'\t\t\treturn require("@formats/%s")' % c["path"],
|
||||
'\t\t\treturn require("@rosetta/%s")' % c["path"],
|
||||
"\t\tend,",
|
||||
"\t},",
|
||||
]
|
||||
@@ -178,7 +178,7 @@ def main():
|
||||
sys.exit(1)
|
||||
print("gen_registry: up to date (%d formats)" % len(formats))
|
||||
else:
|
||||
print("gen_registry: %d formats -> src/Formats/Registry.luau, docs/FORMATS.md%s" % (
|
||||
print("gen_registry: %d formats -> src/Rosetta/Registry.luau, docs/FORMATS.md%s" % (
|
||||
len(formats), "" if stale else " (unchanged)"))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user