Compile synth patches with bundled Faust
This commit is contained in:
parent
727bfd0042
commit
73c5c1676f
10 changed files with 650 additions and 122 deletions
|
|
@ -54,11 +54,15 @@ if ($LASTEXITCODE -ne 0) {
|
|||
throw "client runtime publish failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
|
||||
& (Join-Path $PSScriptRoot "sync-faust-toolchain.ps1") -DestinationRoot (Join-Path $publishPath "Tools\Faust")
|
||||
|
||||
$requiredFiles = @(
|
||||
"Aquarium.Engine.exe",
|
||||
"Aquarium.Epiphany.dll",
|
||||
"Aquarium.Engine.Contracts.dll",
|
||||
"AquariumSynth.Dsl.dll",
|
||||
"Tools\Faust\lib\faust.dll",
|
||||
"Tools\Faust\share\faust\stdfaust.lib",
|
||||
"Assets\Aquarium-Engine-Icon.ico",
|
||||
"Assets\Fonts\Montserrat[wght].ttf",
|
||||
"Assets\Fonts\UbuntuSans[wdth,wght].ttf",
|
||||
|
|
|
|||
57
scripts/sync-faust-toolchain.ps1
Normal file
57
scripts/sync-faust-toolchain.ps1
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
param(
|
||||
[string]$SourceRoot,
|
||||
[string]$DestinationRoot
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($SourceRoot)) {
|
||||
$SourceRoot = if ($env:AQUARIUM_FAUST_HOME) { $env:AQUARIUM_FAUST_HOME } else { "C:\Program Files\Faust" }
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($DestinationRoot)) {
|
||||
$repoRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||
$DestinationRoot = Join-Path $repoRoot "artifacts\faust\win-x64"
|
||||
}
|
||||
|
||||
$source = Resolve-Path $SourceRoot
|
||||
$destination = $DestinationRoot
|
||||
$sourceLib = Join-Path $source "lib\faust.dll"
|
||||
$sourceShare = Join-Path $source "share\faust"
|
||||
$sourceBin = Join-Path $source "bin"
|
||||
|
||||
if (-not (Test-Path -LiteralPath $sourceLib)) {
|
||||
throw "Faust DLL not found at $sourceLib"
|
||||
}
|
||||
|
||||
if (-not (Test-Path -LiteralPath $sourceShare)) {
|
||||
throw "Faust libraries not found at $sourceShare"
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath $destination) {
|
||||
Remove-Item -LiteralPath $destination -Recurse -Force
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path (Join-Path $destination "lib") | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path (Join-Path $destination "bin") | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path (Join-Path $destination "share\faust") | Out-Null
|
||||
|
||||
Copy-Item -LiteralPath $sourceLib -Destination (Join-Path $destination "lib\faust.dll") -Force
|
||||
|
||||
if (Test-Path -LiteralPath $sourceBin) {
|
||||
Get-ChildItem -LiteralPath $sourceBin -File -Filter *.dll |
|
||||
Copy-Item -Destination (Join-Path $destination "bin") -Force
|
||||
}
|
||||
|
||||
Get-ChildItem -LiteralPath $sourceShare -File -Filter *.lib |
|
||||
Copy-Item -Destination (Join-Path $destination "share\faust") -Force
|
||||
|
||||
$version = & (Join-Path $sourceBin "faust.exe") --version 2>$null | Select-Object -First 1
|
||||
if ($LASTEXITCODE -eq 0 -and -not [string]::IsNullOrWhiteSpace($version)) {
|
||||
Set-Content -Path (Join-Path $destination "VERSION.txt") -Value $version -Encoding UTF8
|
||||
}
|
||||
|
||||
Write-Host "Faust toolchain synchronized:"
|
||||
Write-Host " Source: $source"
|
||||
Write-Host " Destination: $destination"
|
||||
Loading…
Reference in a new issue