Skip to content

Commit

Permalink
replace library used to interact with tray bar (#721)
Browse files Browse the repository at this point in the history
* try to use https://github.com/fyne-io/systray

because of getlantern/systray#191 (comment)

* remove useless dep install, no dependency is required with this fork

see https://github.com/fyne-io/systray#linuxbsd

* update licenses

* manually set license

* the `_cli` binary is no more required since it correctly starts even on systems without a tray bar with this error:
```
systray error: failed to register our icon with the notifier watcher (maybe no tray is running?): The name org.kde.StatusNotifierWatcher was not provided by any .service files

```

* enable static build (macos still requires it)

there are no more dependencies required we can do this
fyne-io/systray#24 (comment)
  • Loading branch information
umbynos authored Feb 9, 2024
1 parent 9f1405e commit 16f322f
Show file tree
Hide file tree
Showing 20 changed files with 165 additions and 1,011 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/publish-go-tester-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

# dependencies used for compiling the GUI
- name: Install Dependencies (Linux)
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
if: runner.os == 'Linux'

- name: Install Task
uses: arduino/setup-task@v2
with:
Expand All @@ -107,11 +102,6 @@ jobs:
run: task go:build
if: runner.os == 'Linux'

# build the agent without GUI support (no tray icon)
- name: Build the Agent-cli
run: task go:build-cli
if: runner.os == 'Linux'

# the manifest is required by windows GUI apps, otherwise the binary will crash with: "Unable to create main window: TTM_ADDTOOL failed" (for reference https://github.com/lxn/walk/issues/28)
# rsrc will produce a *.syso file that should get automatically recognized by go build command and linked into an executable.
- name: Download tool to embed manifest in win binary
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
run:
shell: bash

# by default disable CGO, it's not needed (except on macos)
env:
CGO_ENABLED: 0

runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -70,11 +74,6 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

# dependencies used for compiling the GUI
- name: Install Dependencies (Linux)
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
if: matrix.os == 'ubuntu-20.04'

- name: Install Go deps
run: go install github.com/sanbornm/go-selfupdate/...@latest

Expand All @@ -88,11 +87,6 @@ jobs:
run: task go:build
if: matrix.os == 'ubuntu-20.04'

# build the agent without GUI support (no tray icon)
- name: Build the Agent-cli
run: task go:build-cli
if: matrix.os == 'ubuntu-20.04'

# the manifest is required by windows GUI apps, otherwise the binary will crash with: "Unable to create main window: TTM_ADDTOOL failed" (for reference https://github.com/lxn/walk/issues/28)
# rsrc will produce a *.syso file that should get automatically recognized by go build command and linked into an executable.
- name: Download tool to embed manifest in win binary
Expand All @@ -112,6 +106,7 @@ jobs:

- name: Build the Agent for macos
env:
CGO_ENABLED: 1
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
Expand Down Expand Up @@ -406,10 +401,6 @@ jobs:
- name: Rename executable to Arduino_Create_Agent
run: mv -v artifacts/${{ matrix.platform-name }}/${{ env.PROJECT_NAME }}${{ matrix.extension }} artifacts/${{ matrix.platform-name }}/Arduino_Create_Agent${{ matrix.extension }}

- name: Rename executable to Arduino_Create_Agent_cli
run: mv -v artifacts/${{ matrix.platform-name }}/${{ env.PROJECT_NAME }}_cli${{ matrix.extension }} artifacts/${{ matrix.platform-name }}/Arduino_Create_Agent_cli${{ matrix.extension }}
if: matrix.os == 'ubuntu-20.04'

- name: Save InstallBuilder license to file
run: echo "${{ secrets.INSTALLER_LICENSE }}" > /tmp/license.xml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-go-integration-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

# build the agent without GUI support (no tray icon) for integration testing
# build the agent for integration testing
- name: Build the Agent-cli
run: task go:build-cli
run: task go:build
if: matrix.operating-system != 'windows-latest'

- name: Build the Agent-cli for win
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/test-go-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x

# https://github.com/getlantern/systray#linux
- name: Install Dependencies (Linux)
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
if: matrix.operating-system == 'ubuntu-latest'

- name: Run tests
env:
GO_MODULE_PATH: ${{ matrix.module.path }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: github.com/getlantern/systray
version: v1.1.0
name: fyne.io/systray
version: v1.10.0
type: go
summary: Package systray is a cross-platform Go library to place an icon and menu
in the notification area.
homepage: https://pkg.go.dev/github.com/getlantern/systray
homepage: https://pkg.go.dev/fyne.io/systray
license: apache-2.0
licenses:
- sources: LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
name: github.com/getlantern/golog
version: v0.0.0-20190830074920-4ef2e798c2d7
name: fyne.io/systray/internal/generated/menu
version: v1.10.0
type: go
summary: Package golog implements logging functions that log errors to stderr and
debug messages to stdout.
homepage: https://pkg.go.dev/github.com/getlantern/golog
summary: Code generated by dbus-codegen-go DO NOT EDIT.
homepage: https://pkg.go.dev/fyne.io/systray/internal/generated/menu
license: apache-2.0
licenses:
- sources: LICENSE
- sources: [email protected]/LICENSE
text: |2
Apache License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: github.com/getlantern/errors
version: v0.0.0-20190325191628-abdb3e3e36f7
name: fyne.io/systray/internal/generated/notifier
version: v1.10.0
type: go
summary: Package errors defines error types used across Lantern project.
homepage: https://pkg.go.dev/github.com/getlantern/errors
summary: Code generated by dbus-codegen-go DO NOT EDIT.
homepage: https://pkg.go.dev/fyne.io/systray/internal/generated/notifier
license: apache-2.0
licenses:
- sources: LICENSE
- sources: [email protected]/LICENSE
text: |2
Apache License
Expand Down Expand Up @@ -197,7 +197,7 @@ licenses:
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Brave New Software Project, Inc.
Copyright 2014 Brave New Software Project, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

This file was deleted.

Loading

0 comments on commit 16f322f

Please sign in to comment.