Add Windows platform integration scaffolding

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-10 12:36:47 -04:00
committed by Brandon McGinty
parent fab4fd50d2
commit 9c487c2586
9 changed files with 138 additions and 66 deletions
+22
View File
@@ -0,0 +1,22 @@
# Windows support
Barnard can be built for Windows with a native CGO toolchain. Audio support uses native OpenAL Soft, libopus, libopusfile/libogg, and RNNoise; `ffmpeg.exe` must also be on `PATH` for recording and file playback.
The easiest supported setup is MSYS2 MinGW-w64. Install the matching architecture's Go toolchain and development packages for OpenAL Soft, opus, opusfile, libogg, RNNoise, FFmpeg, and pkg-config. Build from its MinGW shell:
```
go build -o barnard.exe .
```
For cross-compilation from Linux, use the matching MinGW compiler and its pkg-config environment, for example:
```
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 \
CC=x86_64-w64-mingw32-gcc \
PKG_CONFIG=x86_64-w64-mingw32-pkg-config \
go build -o barnard.exe .
```
The dependency include and library paths must point to Windows builds, not host Linux libraries.
The legacy `--fifo` command control is unavailable on Windows because it uses POSIX filesystem FIFOs. Windows defaults to no notification command; an explicitly configured notification command is run by `cmd.exe /C`.