chore: land janitor round 1 and graft integration

Round 1 findings and fixes, all previously uncommitted:
- FXProcessor per-slot DSP history repair (HEAD does not compile without it)
- SynthVoice::getModulationValue, editor control-lock guard
- ExactCompare.h naming the deliberate exact float comparisons
- KnobLookAndFeel replacing the never-installed SerumLookAndFeel
- 55 first-party compiler warnings to 0
- AGENT.md renamed to AGENTS.md across Source/
- graft repository context graph and its hooks
- JANITOR_TASKS.md and UI_UX_AUDIT.md records
This commit is contained in:
biggy committed 2026-10-06 08:50:45 +02:00
1 parent 5c942cad0c
commit e4cea300db
63 files changed
+2360 -805

No files matched your search

+43 -6
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# ---------------------------------------------------------------------------
# build_windows.sh — cross-compile SerumAlt VST3 for Windows using MinGW-w64
# build_windows.sh, cross-compile SerumAlt VST3 for Windows using MinGW-w64
# ---------------------------------------------------------------------------
set -euo pipefail
@@ -23,7 +23,8 @@ fi
for tool in cmake ninja pkg-config "${CC:-cc}" "${CXX:-c++}" \
x86_64-w64-mingw32-gcc x86_64-w64-mingw32-g++ \
x86_64-w64-mingw32-windres x86_64-w64-mingw32-ar \
x86_64-w64-mingw32-ranlib x86_64-w64-mingw32-strip; do
x86_64-w64-mingw32-ranlib x86_64-w64-mingw32-strip \
x86_64-w64-mingw32-objdump; do
if ! command -v "$tool" >/dev/null 2>&1; then
echo "ERROR: $tool not found. See README.md prerequisites." >&2
exit 1
@@ -51,15 +52,51 @@ cmake -S "$SCRIPT_DIR" -B "$BUILD_DIR" -G Ninja \
echo "Building Windows VST3..."
cmake --build "$BUILD_DIR" --config "$BUILD_TYPE" --target SerumAlt_VST3
# 5. Inject the VST3 moduleinfo.json.
# 5. Verify the linked module can load on a stock Windows host.
# The MinGW C++/threading runtimes are not part of this bundle and do not exist
# on a stock Windows machine, so a module that still imports one of them fails
# to load and the host then omits the plugin from its scan list. The static
# -runtime link options in cmake/Plugin.cmake are meant to prevent that; check
# it here so a stale build tree or a dropped flag fails the build loudly
# instead of shipping a bundle that appears nowhere in the host.
VST3_BUNDLE="$BUILD_DIR/${PLUGIN_NAME}_artefacts/$BUILD_TYPE/VST3/$PLUGIN_NAME.vst3"
VST3_BINARY="$VST3_BUNDLE/Contents/x86_64-win/$PLUGIN_NAME.vst3"
if [[ ! -f "$VST3_BINARY" ]]; then
echo "ERROR: cross-build produced no module at $VST3_BINARY" >&2
exit 1
fi
if ! x86_64-w64-mingw32-objdump -f "$VST3_BINARY" | grep -q 'i386:x86-64'; then
echo "ERROR: $VST3_BINARY is not an x86-64 module" >&2
exit 1
fi
VST3_DUMP="$(x86_64-w64-mingw32-objdump -p "$VST3_BINARY")"
for runtime in libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll; do
if grep -qF "DLL Name: $runtime" <<<"$VST3_DUMP"; then
echo "ERROR: $VST3_BINARY still imports $runtime." >&2
echo " A stock Windows host cannot resolve it and will not list the" >&2
echo " plugin. Restore the static-runtime link options in" >&2
echo " cmake/Plugin.cmake and rebuild with a fresh BUILD_DIR." >&2
exit 1
fi
done
# JUCE implements only these three module entry points on Windows; bundleEntry and
# bundleExit are macOS-only, and the VST3 SDK's Windows loader requires only
# GetPluginFactory, treating InitDll/ExitDll as optional.
for entry in GetPluginFactory InitDll ExitDll; do
if ! grep -qE "[[:space:]]${entry}\$" <<<"$VST3_DUMP"; then
echo "ERROR: $VST3_BINARY does not export $entry" >&2
exit 1
fi
done
# 6. Inject the VST3 moduleinfo.json.
# The automatic manifest step is disabled when cross-compiling (see
# cmake/Plugin.cmake), because JUCE's manifest helper is a host tool that would
# otherwise be built as a Windows executable. The moduleinfo content is
# deterministic for this Windows plugin: it depends on the plugin's
# deterministic for this Windows plugin. It depends on the plugin's
# name, manufacturer/plugin codes, and version, so we write the same metadata
# that the native Windows helper generates. Keep it in sync with the metadata
# in CMakeLists.txt and cmake/Plugin.cmake, including the vendored VST3 SDK version.
VST3_BUNDLE="$BUILD_DIR/${PLUGIN_NAME}_artefacts/$BUILD_TYPE/VST3/$PLUGIN_NAME.vst3"
echo "Writing Windows VST3 manifest..."
mkdir -p "$VST3_BUNDLE/Contents/Resources"
cat > "$VST3_BUNDLE/Contents/Resources/moduleinfo.json" <<'EOF'
@@ -122,7 +159,7 @@ cat > "$VST3_BUNDLE/Contents/Resources/moduleinfo.json" <<'EOF'
}
EOF
# 6. Copy the resulting .vst3 bundle to SerumAlt_Windows/ without deleting files.
# 7. Copy the resulting .vst3 bundle to SerumAlt_Windows/ without deleting files.
echo "Staging Windows VST3 in $OUTPUT_DIR..."
cmake -E copy_directory "$VST3_BUNDLE" "$OUTPUT_DIR/$PLUGIN_NAME.vst3"