-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdebug.ps1
33 lines (29 loc) · 985 Bytes
/
debug.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$ErrorActionPreference = "Stop"
# Build
cargo xtask bundle elysiera
$plugin_name = "Elysiera"
$vst3_name = "ElysieraDebug.vst3"
# Rename file
$build = Join-Path $pwd "target/bundled/$plugin_name.vst3/Contents/x86_64-win/$plugin_name.vst3"
$build_to = Join-Path $pwd "target/bundled/$plugin_name.vst3/Contents/x86_64-win/$vst3_name"
Write-Host "Renaming $build to $build_to"
Move-Item $build $build_to -Force
$build = $build_to
# Move the VST3 file to the target directory
$pwd = Get-Location
$to = $env:VST3_DIR
Write-Host "Moving $build to $to"
if ($to -eq $null) {
Write-Host "VST3_DIR is not set. Skipping moving the VST3 file."
exit 0
}
gsudo Copy-Item $build $to -Force
# Set "NIH_LOG" environment variable to a file path
$env:NIH_LOG = "$pwd/elysiera.log"
# Open plugin host
Write-Host "Opening $env:VST3_TESTER"
if ($env:VST3_TESTER -eq $null) {
Write-Host "VST3_TESTER is not set. Skipping opening Ableton."
exit 0
}
Start-Process -FilePath $env:VST3_TESTER