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.
echo In Debian danach die Build-Abhaengigkeiten installieren: echo In Debian danach die Build-Abhaengigkeiten installieren:
echo sudo apt update 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. echo.
call :cleanup_cache call :cleanup_cache
exit /b 1 exit /b 1
@ -89,7 +89,7 @@ echo In WSL fehlen Build-Abhaengigkeiten fuer den Linux-Build.
echo. echo.
echo In Debian installieren: echo In Debian installieren:
echo sudo apt update 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. echo.
call :cleanup_cache call :cleanup_cache
exit /b 1 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() shutdown()
} }

View File

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