From f8f652f2c7a6a5d192d8792412df714e9d31834c Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Sun, 21 Jun 2026 23:13:24 +0900 Subject: [PATCH] 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 --- deploy.ps1 | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/deploy.ps1 b/deploy.ps1 index f686ef8..c292f38 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -74,11 +74,22 @@ if (Test-Path -LiteralPath '$clapSrc') { Copy-Item -LiteralPath '$clapSrc' -Dest Start-Process powershell -Verb RunAs -Wait -ArgumentList '-NoProfile','-EncodedCommand',$enc } -$check = Join-Path $vst3Dst "$vst3Name\Contents\x86_64-win\$vst3Name" -if (Test-Path $check) { - Write-Host "VST3 installed OK -> $check" -ForegroundColor Green - Write-Host "In FL Studio: Manage plugins -> 'Rescan previously failed plugins' -> Find installed plugins." -ForegroundColor Yellow -} -else { - throw "Install verification failed: $check not found" +# Verify each bundle was actually refreshed. A plugin currently loaded in a DAW keeps its +# binary locked, so the copy fails silently and leaves a STALE install — re-scanning then runs +# old code. Compare install vs build timestamps to catch exactly that. +function Test-Installed($label, $src, $dst) { + if (-not (Test-Path $src)) { return } # nothing was built for this format + if (-not (Test-Path $dst)) { throw "$label install verification failed: $dst 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