From 4b736b897b49b98ce2048fed234e8efd3b3c0c31 Mon Sep 17 00:00:00 2001 From: Jan Svabenik Date: Wed, 18 Mar 2026 11:06:26 +0100 Subject: [PATCH] Add build script for SDRplay --- build-sdrplay.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 build-sdrplay.ps1 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