This changes the default behavior to use the libayatana-appindicator library instead of the older libappindicator. If you need to link to libappindicator, you can use the build tag "legacy_appindicator":
go build -tags=legacy_appindicator
In order to support both libraries, I basically just moved the C setup and includes into two separate files (systray_linux_appindicator.go and systray_linux_ayatana.go) guarded by the relevant build tags. While here I also cleaned up some stale/unused build tags that referenced Darwin (I'm guessing this was a copy/paste error from a long time ago).
This was inspired by #224, but is a bit simpler in its approach, I think.
This changes the default behavior to use the
libayatana-appindicator
library instead of the olderlibappindicator
. If you need to link tolibappindicator
, you can use the build tag "legacy_appindicator":In order to support both libraries, I basically just moved the C setup and includes into two separate files (
systray_linux_appindicator.go
andsystray_linux_ayatana.go
) guarded by the relevant build tags. While here I also cleaned up some stale/unused build tags that referenced Darwin (I'm guessing this was a copy/paste error from a long time ago).This was inspired by #224, but is a bit simpler in its approach, I think.