fix(deploy): verify CLAP and VST3 install freshness

The script only checked the VST3 existed, so a plugin loaded in the DAW (which
locks its binary and makes the copy fail silently) left a STALE install that
passed verification. Compare install vs build timestamps for both formats and
warn when stale ("loaded in your DAW").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Mikkeli Matlock
2026-06-21 23:13:24 +09:00
parent a420d5dd39
commit f8f652f2c7
+18 -7
View File
@@ -74,11 +74,22 @@ if (Test-Path -LiteralPath '$clapSrc') { Copy-Item -LiteralPath '$clapSrc' -Dest
Start-Process powershell -Verb RunAs -Wait -ArgumentList '-NoProfile','-EncodedCommand',$enc Start-Process powershell -Verb RunAs -Wait -ArgumentList '-NoProfile','-EncodedCommand',$enc
} }
$check = Join-Path $vst3Dst "$vst3Name\Contents\x86_64-win\$vst3Name" # Verify each bundle was actually refreshed. A plugin currently loaded in a DAW keeps its
if (Test-Path $check) { # binary locked, so the copy fails silently and leaves a STALE install — re-scanning then runs
Write-Host "VST3 installed OK -> $check" -ForegroundColor Green # old code. Compare install vs build timestamps to catch exactly that.
Write-Host "In FL Studio: Manage plugins -> 'Rescan previously failed plugins' -> Find installed plugins." -ForegroundColor Yellow function Test-Installed($label, $src, $dst) {
} if (-not (Test-Path $src)) { return } # nothing was built for this format
else { if (-not (Test-Path $dst)) { throw "$label install verification failed: $dst not found" }
throw "Install verification failed: $check not found" $srcT = (Get-Item $src).LastWriteTime
$dstT = (Get-Item $dst).LastWriteTime
if ($dstT -lt $srcT) {
Write-Warning "$label is STALE (installed $dstT < built $srcT). It's almost certainly loaded in your DAW (file locked). Close the plugin/DAW and re-run deploy."
}
else {
Write-Host "$label installed OK -> $dst" -ForegroundColor Green
}
} }
Test-Installed "VST3" (Join-Path $vst3Src "Contents\x86_64-win\$vst3Name") (Join-Path $vst3Dst "$vst3Name\Contents\x86_64-win\$vst3Name")
Test-Installed "CLAP" $clapSrc (Join-Path $clapDst $clapName)
Write-Host "In FL Studio: Manage plugins -> 'Rescan previously failed plugins' -> Find installed plugins." -ForegroundColor Yellow