Skip to content

Commit 16f322f

Browse files
authored
replace library used to interact with tray bar (#721)
* 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)
1 parent 9f1405e commit 16f322f

File tree

20 files changed

+165
-1011
lines changed

20 files changed

+165
-1011
lines changed

Diff for: .github/workflows/publish-go-tester-task.yml

-10
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@ jobs:
9292
with:
9393
go-version: ${{ env.GO_VERSION }}
9494

95-
# dependencies used for compiling the GUI
96-
- name: Install Dependencies (Linux)
97-
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
98-
if: runner.os == 'Linux'
99-
10095
- name: Install Task
10196
uses: arduino/setup-task@v2
10297
with:
@@ -107,11 +102,6 @@ jobs:
107102
run: task go:build
108103
if: runner.os == 'Linux'
109104

110-
# build the agent without GUI support (no tray icon)
111-
- name: Build the Agent-cli
112-
run: task go:build-cli
113-
if: runner.os == 'Linux'
114-
115105
# 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)
116106
# rsrc will produce a *.syso file that should get automatically recognized by go build command and linked into an executable.
117107
- name: Download tool to embed manifest in win binary

Diff for: .github/workflows/release.yml

+5-14
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
run:
4444
shell: bash
4545

46+
# by default disable CGO, it's not needed (except on macos)
47+
env:
48+
CGO_ENABLED: 0
49+
4650
runs-on: ${{ matrix.os }}
4751

4852
steps:
@@ -70,11 +74,6 @@ jobs:
7074
with:
7175
go-version: ${{ env.GO_VERSION }}
7276

73-
# dependencies used for compiling the GUI
74-
- name: Install Dependencies (Linux)
75-
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
76-
if: matrix.os == 'ubuntu-20.04'
77-
7877
- name: Install Go deps
7978
run: go install github.com/sanbornm/go-selfupdate/...@latest
8079

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

91-
# build the agent without GUI support (no tray icon)
92-
- name: Build the Agent-cli
93-
run: task go:build-cli
94-
if: matrix.os == 'ubuntu-20.04'
95-
9690
# 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)
9791
# rsrc will produce a *.syso file that should get automatically recognized by go build command and linked into an executable.
9892
- name: Download tool to embed manifest in win binary
@@ -112,6 +106,7 @@ jobs:
112106

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

409-
- name: Rename executable to Arduino_Create_Agent_cli
410-
run: mv -v artifacts/${{ matrix.platform-name }}/${{ env.PROJECT_NAME }}_cli${{ matrix.extension }} artifacts/${{ matrix.platform-name }}/Arduino_Create_Agent_cli${{ matrix.extension }}
411-
if: matrix.os == 'ubuntu-20.04'
412-
413404
- name: Save InstallBuilder license to file
414405
run: echo "${{ secrets.INSTALLER_LICENSE }}" > /tmp/license.xml
415406

Diff for: .github/workflows/test-go-integration-task.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ jobs:
9393
repo-token: ${{ secrets.GITHUB_TOKEN }}
9494
version: 3.x
9595

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

101101
- name: Build the Agent-cli for win

Diff for: .github/workflows/test-go-task.yml

-5
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ jobs:
9191
repo-token: ${{ secrets.GITHUB_TOKEN }}
9292
version: 3.x
9393

94-
# https://github.com/getlantern/systray#linux
95-
- name: Install Dependencies (Linux)
96-
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
97-
if: matrix.operating-system == 'ubuntu-latest'
98-
9994
- name: Run tests
10095
env:
10196
GO_MODULE_PATH: ${{ matrix.module.path }}

Diff for: .licenses/arduino-create-agent/go/github.com/getlantern/systray.dep.yml renamed to .licenses/arduino-create-agent/go/fyne.io/systray.dep.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
name: github.com/getlantern/systray
3-
version: v1.1.0
2+
name: fyne.io/systray
3+
version: v1.10.0
44
type: go
55
summary: Package systray is a cross-platform Go library to place an icon and menu
66
in the notification area.
7-
homepage: https://pkg.go.dev/github.com/getlantern/systray
7+
homepage: https://pkg.go.dev/fyne.io/systray
88
license: apache-2.0
99
licenses:
1010
- sources: LICENSE

Diff for: .licenses/arduino-create-agent/go/github.com/getlantern/golog.dep.yml renamed to .licenses/arduino-create-agent/go/fyne.io/systray/internal/generated/menu.dep.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
name: github.com/getlantern/golog
3-
version: v0.0.0-20190830074920-4ef2e798c2d7
2+
name: fyne.io/systray/internal/generated/menu
3+
version: v1.10.0
44
type: go
5-
summary: Package golog implements logging functions that log errors to stderr and
6-
debug messages to stdout.
7-
homepage: https://pkg.go.dev/github.com/getlantern/golog
5+
summary: Code generated by dbus-codegen-go DO NOT EDIT.
6+
homepage: https://pkg.go.dev/fyne.io/systray/internal/generated/menu
87
license: apache-2.0
98
licenses:
10-
- sources: LICENSE
9+
- sources: [email protected]/LICENSE
1110
text: |2
1211
1312
Apache License

Diff for: .licenses/arduino-create-agent/go/github.com/getlantern/errors.dep.yml renamed to .licenses/arduino-create-agent/go/fyne.io/systray/internal/generated/notifier.dep.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
name: github.com/getlantern/errors
3-
version: v0.0.0-20190325191628-abdb3e3e36f7
2+
name: fyne.io/systray/internal/generated/notifier
3+
version: v1.10.0
44
type: go
5-
summary: Package errors defines error types used across Lantern project.
6-
homepage: https://pkg.go.dev/github.com/getlantern/errors
5+
summary: Code generated by dbus-codegen-go DO NOT EDIT.
6+
homepage: https://pkg.go.dev/fyne.io/systray/internal/generated/notifier
77
license: apache-2.0
88
licenses:
9-
- sources: LICENSE
9+
- sources: [email protected]/LICENSE
1010
text: |2
1111
1212
Apache License
@@ -197,7 +197,7 @@ licenses:
197197
same "printed page" as the copyright notice for easier
198198
identification within third-party archives.
199199
200-
Copyright 2018 Brave New Software Project, Inc.
200+
Copyright 2014 Brave New Software Project, Inc.
201201
202202
Licensed under the Apache License, Version 2.0 (the "License");
203203
you may not use this file except in compliance with the License.

Diff for: .licenses/arduino-create-agent/go/github.com/getlantern/context.dep.yml

-214
This file was deleted.

0 commit comments

Comments
 (0)