Added VST SDK support.

This commit is contained in:
Johannes Findeisen 2026-11-06 18:13:49 +01:00
commit 8e09f58944
25 changed files with 850 additions and 23 deletions

View file

@ -4,6 +4,7 @@ from pathlib import Path
import subprocess
import sys
import tempfile
import platform
binary = str(Path(sys.argv[1]).resolve())
@ -103,6 +104,18 @@ with tempfile.TemporaryDirectory(prefix="xtc-inspect-") as directory:
check("--inspect", project, 2, name + " insert track 0", "missing/unreadable: 1")
project.write_text(document.replace("XTC_PROJECT 17", "XTC_PROJECT 16").replace(chain, ""))
check("--validate", project, 0, "metadata valid")
# A conventional VST3 bundle is inspected without executing its fake binary.
architecture = {"x86_64": "x86_64", "aarch64": "aarch64",
"i386": "i386", "i686": "i386", "armv7l": "arm"}.get(platform.machine())
if architecture:
bundle = root / "Example.vst3"
inner = bundle / "Contents" / (architecture + "-linux") / "Example.so"
inner.parent.mkdir(parents=True)
bundled = document.replace(str(module).encode().hex(), str(bundle).encode().hex())
project.write_text(bundled)
check("--inspect", project, 2, "VST3 insert track 0", "missing/unreadable: 1")
inner.write_text("Not a module: metadata inspection must not execute it")
check("--inspect", project, 0, "VST3 insert track 0", "no plugin code executed", "missing/unreadable: 0")
for text, messages in [
(base.replace("XTC_PROJECT 10", "XTC_PROJECT 999"), ("line 1", "999", "1..17")),
("XTC_PROJECT 10\n", ("line 2", "APP")),