This commit is contained in:
Linrador 2026-06-23 10:35:56 +02:00
parent 57b7e9ff91
commit f6fac480fb
6 changed files with 23 additions and 4 deletions

View File

@ -63,7 +63,7 @@ echo wsl --install -d Debian
echo.
echo In Debian danach die Build-Abhaengigkeiten installieren:
echo sudo apt update
echo sudo apt install -y build-essential pkg-config libgtk-3-dev libayatana-appindicator3-dev
echo sudo apt install -y build-essential pkg-config
echo.
call :cleanup_cache
exit /b 1
@ -89,7 +89,7 @@ echo In WSL fehlen Build-Abhaengigkeiten fuer den Linux-Build.
echo.
echo In Debian installieren:
echo sudo apt update
echo sudo apt install -y build-essential pkg-config libgtk-3-dev libayatana-appindicator3-dev
echo sudo apt install -y build-essential pkg-config
echo.
call :cleanup_cache
exit /b 1

Binary file not shown.

Binary file not shown.

View File

@ -1108,6 +1108,6 @@ func main() {
}
}()
runTray(shutdown, buildTrayStats)
runTray(appCtx, shutdown, buildTrayStats)
shutdown()
}

View File

@ -1,8 +1,11 @@
//go:build windows
// backend\tray.go
package main
import (
"context"
_ "embed"
"os/exec"
"path/filepath"
@ -16,7 +19,7 @@ import (
//go:embed assets/img/tray.ico
var trayIcon []byte
func runTray(onQuit func(), statsFn func() TrayStats) {
func runTray(ctx context.Context, onQuit func(), statsFn func() TrayStats) {
systray.Run(func() {
if len(trayIcon) > 0 {
systray.SetIcon(trayIcon)
@ -98,6 +101,11 @@ func runTray(onQuit func(), statsFn func() TrayStats) {
updateStatus()
go func() {
<-ctx.Done()
systray.Quit()
}()
go func() {
ticker := time.NewTicker(2 * time.Second)
defer ticker.Stop()

11
backend/tray_other.go Normal file
View File

@ -0,0 +1,11 @@
//go:build !windows
package main
import "context"
func runTray(ctx context.Context, onQuit func(), statsFn func() TrayStats) {
_ = onQuit
_ = statsFn
<-ctx.Done()
}