feat: add resonance compressor and Windows CI

This commit is contained in:
nvrl committed 2026-11-05 23:37:24 +01:00
1 parent 3281535a04
commit 3c5b05fdec
31 files changed
+6340 -57

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python3
"""Validate and archive the two Windows CLAP deliverables; no Linux output."""
import hashlib
from pathlib import Path
import struct
import zipfile
root = Path(__file__).resolve().parents[1]
folder = root / "dist/x86_64-pc-windows-gnu"
names = [
"Motif Storyboard.clap", "Resonance Compressor.clap", "LICENSE",
"motif-storyboard-setup.md", "resonance-compressor-setup.md", "Roboto-OFL.txt", "resonance-editor.png",
]
for name in names[:2]:
data = (folder / name).read_bytes()
if data[:2] != b"MZ":
raise SystemExit(f"{name}: expected Windows PE binary")
offset = struct.unpack_from("<I", data, 0x3C)[0]
if data[offset:offset + 4] != b"PE\0\0" or struct.unpack_from("<H", data, offset + 4)[0] != 0x8664:
raise SystemExit(f"{name}: expected x86-64 Windows DLL")
if b"clap_entry\0" not in data:
raise SystemExit(f"{name}: CLAP entry export missing")
checksums = "".join(f"{hashlib.sha256((folder / name).read_bytes()).hexdigest()} {name}\n" for name in names)
(folder / "SHA256SUMS").write_text(checksums, encoding="utf-8")
archive = root / "dist/fl-plugins-windows-x86_64.zip"
with zipfile.ZipFile(archive, "w", compression=zipfile.ZIP_DEFLATED) as output:
for name in names + ["SHA256SUMS"]:
output.write(folder / name, arcname=name)
print(f"Packaged {archive}")