diff --git a/build-sdrplay.ps1 b/build-sdrplay.ps1 new file mode 100644 index 0000000..35b59e0 --- /dev/null +++ b/build-sdrplay.ps1 @@ -0,0 +1,15 @@ +$ErrorActionPreference = 'Stop' +$gcc = 'C:\msys64\mingw64\bin' +if (-not (Test-Path (Join-Path $gcc 'gcc.exe'))) { + throw "gcc not found at $gcc" +} +$env:PATH = "$gcc;" + $env:PATH +$env:CGO_ENABLED = '1' +$env:CGO_CFLAGS = '-IC:\PROGRA~1\SDRplay\API\inc' +$env:CGO_LDFLAGS = '-LC:\PROGRA~1\SDRplay\API\x64 -lsdrplay_api' + +Write-Host "Building with SDRplay support..." -ForegroundColor Cyan + +go build -tags sdrplay ./cmd/sdrd + +Write-Host "Done." -ForegroundColor Green