From f4785ba61c398d17bc0d3bd754ebe78f85076dec Mon Sep 17 00:00:00 2001 From: wenjie Date: Tue, 17 Mar 2026 20:06:20 +0800 Subject: [PATCH] fix(release): stub tray for freebsd builds without cgo --- web/backend/systray.go | 2 +- .../{tray_stub_darwin_nocgo.go => tray_stub_nocgo.go} | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename web/backend/{tray_stub_darwin_nocgo.go => tray_stub_nocgo.go} (74%) diff --git a/web/backend/systray.go b/web/backend/systray.go index 902cc65e0..2ae4434bb 100644 --- a/web/backend/systray.go +++ b/web/backend/systray.go @@ -1,4 +1,4 @@ -//go:build !darwin || cgo +//go:build (!darwin && !freebsd) || cgo package main diff --git a/web/backend/tray_stub_darwin_nocgo.go b/web/backend/tray_stub_nocgo.go similarity index 74% rename from web/backend/tray_stub_darwin_nocgo.go rename to web/backend/tray_stub_nocgo.go index c54aaac1b..13ecfd2cb 100644 --- a/web/backend/tray_stub_darwin_nocgo.go +++ b/web/backend/tray_stub_nocgo.go @@ -1,4 +1,4 @@ -//go:build darwin && !cgo +//go:build (darwin || freebsd) && !cgo package main @@ -6,6 +6,7 @@ import ( "context" "os" "os/signal" + "runtime" "syscall" "time" @@ -13,7 +14,7 @@ import ( ) func runTray() { - logger.Infof("System tray is unavailable in darwin builds without cgo; running without tray") + logger.Infof("System tray is unavailable in %s builds without cgo; running without tray", runtime.GOOS) if !*noBrowser { go func() {