2025-01-23 20:05:50 +00:00
|
|
|
param (
|
2023-09-23 22:55:58 +01:00
|
|
|
[switch]$build
|
|
|
|
)
|
|
|
|
|
2025-01-23 20:05:50 +00:00
|
|
|
function Copy-FilesToScratchpad {
|
2023-09-23 22:55:58 +01:00
|
|
|
$source = Join-Path $PSScriptRoot "addon" "globalPlugins" "voicemeeter"
|
2023-09-27 14:46:37 +01:00
|
|
|
$target = Join-Path $env:appdata "nvda" "scratchpad" "globalPlugins" "voicemeeter"
|
2023-09-27 18:38:13 +01:00
|
|
|
Robocopy $source $target | Out-Null
|
2023-09-23 22:55:58 +01:00
|
|
|
}
|
|
|
|
|
2025-01-23 20:05:50 +00:00
|
|
|
function Build-Addon {
|
|
|
|
"Building add-on" | Write-Host
|
|
|
|
scons
|
|
|
|
}
|
2023-09-23 22:55:58 +01:00
|
|
|
|
2025-01-23 20:05:50 +00:00
|
|
|
function Main {
|
|
|
|
"Copying updated files to Scratchpad" | Write-Host
|
|
|
|
Copy-FilesToScratchpad
|
2023-09-23 22:55:58 +01:00
|
|
|
|
2025-01-23 20:05:50 +00:00
|
|
|
if ($build) {
|
|
|
|
Build-Addon
|
2023-09-23 22:55:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-01-23 20:05:50 +00:00
|
|
|
if ($MyInvocation.InvocationName -ne '.') { Main }
|