Files
Mikkeli Matlock 37f34e1175 rename: Codename 206 -> Bari 206
Retires the working codename now rather than at 1.0, because the two identity
constants a DAW uses to recognise a plugin across sessions can only be changed
for free while nothing has saved a project with it. Verified: zero references
to the plugin across all 69 FL project backups, under any identity string.

Derived spellings:
    Cargo package     codename_206        -> bari_206
    bundle / DAW name Codename 206 |
                      206 prototype       -> Bari 206      (unified; drops "prototype")
    Rust types        Codename206(Params) -> Bari206(Params)
    CLAP_ID           com.mikkeli.codename-206
                                          -> org.novoyuuparosk.bari-206
    VST3_CLASS_ID     Codename206Maxi!    -> Bari206Multiband

CLAP_ID moves to reverse-DNS on a domain actually controlled, and stops
disagreeing with a VENDOR that was already Novoyuuparosk. VST3_CLASS_ID stays
exactly 16 bytes and drops "Maxi", which sat close to Image-Line's Maximus and
Maximizer in the same product category.

Author identity converges on Mikkeli Matlock <mikkeli@novoyuuparosk.org>;
Cargo authors had been carrying a personal gmail address while Plugin::EMAIL
already used the org one. VENDOR stays Novoyuuparosk, which is the org rather
than the person, and copyright stays with the person.

Deliberately unchanged: the repo, its remote, the local directory and the
homepage URL all keep "codename-206". Renaming those buys nothing and costs a
Gitea rename, a remote rewrite and a directory move, so the bare "codename-206"
is current branding rather than residue - and is the one spelling the STALE
list must not contain.

Driven by check-branding.sh rather than by grep: setting the canonical block
listed all 26 sites, including .github/workflows/ci.yaml, which no explicit
check covered. That gap is now closed by a positive check on the CI bundle
command, so a future rename fails in seconds instead of after a full compile.
STALE now carries both the retired and the new spellings, so the next rename
is self-checking too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LU1NRL7fAaZTtFMTTPn2b1
2026-08-31 22:55:41 +09:00

96 lines
4.4 KiB
PowerShell

<#
.SYNOPSIS
Build Bari 206 and install the VST3 (and CLAP) into the system plugin folders.
.DESCRIPTION
FL Studio scans `C:\Program Files\Common Files\VST3` by default and ignores
directory junctions, so deployment must place a REAL bundle copy there. That
folder needs admin, so the copy step self-elevates (one UAC prompt).
After deploying, in FL Studio: Options -> Manage plugins ->
tick "Rescan previously failed plugins" -> "Find installed plugins".
.PARAMETER SkipBuild
Install the existing target\bundled output without rebuilding.
.PARAMETER User
Install to the per-user folder %LOCALAPPDATA%\Programs\Common\VST3 instead of
the global one. No admin required; add that path in FL's plugin search paths.
.EXAMPLE
.\deploy.ps1 # build + install to global VST3/CLAP (UAC prompt)
.\deploy.ps1 -SkipBuild # reinstall last build
.\deploy.ps1 -User # no-admin install for a fast dev loop
#>
param(
[switch]$SkipBuild,
[switch]$User,
[string]$Package = "bari_206"
)
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
# rustup installs cargo here; make sure it's reachable even in a fresh shell.
$cargoBin = Join-Path $env:USERPROFILE ".cargo\bin"
if (Test-Path $cargoBin) { $env:Path = "$cargoBin;$env:Path" }
if (-not $SkipBuild) {
Write-Host "Building $Package (release)..." -ForegroundColor Cyan
Push-Location $root
try { cargo xtask bundle $Package --release } finally { Pop-Location }
if ($LASTEXITCODE -ne 0) { throw "cargo xtask bundle failed (exit $LASTEXITCODE)" }
}
$vst3Name = "Bari 206.vst3"
$clapName = "Bari 206.clap"
$bundled = Join-Path $root "target\bundled"
$vst3Src = Join-Path $bundled $vst3Name
$clapSrc = Join-Path $bundled $clapName
if (-not (Test-Path $vst3Src)) { throw "Bundle not found: $vst3Src (build first)" }
if ($User) {
$vst3Dst = Join-Path $env:LOCALAPPDATA "Programs\Common\VST3"
$clapDst = Join-Path $env:LOCALAPPDATA "Programs\Common\CLAP"
New-Item -ItemType Directory -Force -Path $vst3Dst, $clapDst | Out-Null
Write-Host "Installing (per-user, no admin)..." -ForegroundColor Cyan
Remove-Item (Join-Path $vst3Dst $vst3Name) -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item $vst3Src -Destination $vst3Dst -Recurse -Force
if (Test-Path $clapSrc) { Copy-Item $clapSrc -Destination $clapDst -Force }
Write-Host "Installed to $vst3Dst" -ForegroundColor Green
Write-Host "Add that folder to FL's plugin search paths if you haven't." -ForegroundColor Yellow
}
else {
$vst3Dst = Join-Path $env:CommonProgramFiles "VST3"
$clapDst = Join-Path $env:CommonProgramFiles "CLAP"
Write-Host "Installing to $vst3Dst (requires admin - accept the UAC prompt)..." -ForegroundColor Cyan
$cmd = @"
New-Item -ItemType Directory -Force -Path '$clapDst' | Out-Null
Remove-Item -LiteralPath '$vst3Dst\$vst3Name' -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item -LiteralPath '$vst3Src' -Destination '$vst3Dst' -Recurse -Force
if (Test-Path -LiteralPath '$clapSrc') { Copy-Item -LiteralPath '$clapSrc' -Destination '$clapDst' -Force }
"@
$enc = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($cmd))
Start-Process powershell -Verb RunAs -Wait -ArgumentList '-NoProfile','-EncodedCommand',$enc
}
# 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