Add RVC Realtime VST2/VST3 source project

This commit is contained in:
RVC-Boss
2026-08-03 22:16:30 +08:00
parent 4338f12c3c
commit d77bfce2c3
28 changed files with 3314 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
param(
[Parameter(Mandatory = $true)]
[string]$RvcRoot,
[string]$Python = "",
[Parameter(Mandatory = $true)]
[string]$Model,
[string]$Index = ""
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
$Build = Join-Path $Root "build"
& (Join-Path $PSScriptRoot "prepare-dependencies.ps1")
if ([string]::IsNullOrWhiteSpace($Python)) {
$Python = Join-Path $RvcRoot "runtime\python.exe"
}
foreach ($RequiredPath in @($RvcRoot, $Python, $Model)) {
if (-not (Test-Path -LiteralPath $RequiredPath)) {
throw "Required worker test path does not exist: $RequiredPath"
}
}
if (-not [string]::IsNullOrWhiteSpace($Index) -and -not (Test-Path -LiteralPath $Index -PathType Leaf)) {
throw "Index path does not exist: $Index"
}
cmake -S $Root -B $Build -G "Visual Studio 17 2022" -A x64 -DRVC_BUILD_SMOKE_TEST=ON
if ($LASTEXITCODE -ne 0) {
throw "CMake configuration failed with exit code $LASTEXITCODE"
}
cmake --build $Build --config Release --target rvc-worker-smoke --parallel
if ($LASTEXITCODE -ne 0) {
throw "Worker smoke-test build failed with exit code $LASTEXITCODE"
}
$WorkerArgs = @($RvcRoot, $Python, $Model)
if (-not [string]::IsNullOrWhiteSpace($Index)) {
$WorkerArgs += $Index
}
& (Join-Path $Build "Release\rvc-worker-smoke.exe") @WorkerArgs
if ($LASTEXITCODE -ne 0) {
throw "Worker smoke test failed with exit code $LASTEXITCODE"
}