mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-23 02:36:42 +00:00
- Add build/windows/Taskfile.yml to cross-compile from Linux with
mingw-w64 (CC=x86_64-w64-mingw32-gcc, CGO_ENABLED=1, -H=windowsgui).
- Rename xembed_tray.{c,h} to xembed_tray_linux.{c,h} so the Go
toolchain only compiles these X11/GTK sources on Linux.
- Add sendShowWindowSignal on Windows: opens the named Global event
and calls SetEvent so the already-running instance shows its window.
- Register a notification category with Open/Dismiss action buttons
and wire a response handler. Do this inside the ApplicationStarted
hook so it runs after the notifications service's Startup has
initialized appName/appGUID on Windows; otherwise the category is
saved under an empty registry path and SendNotificationWithActions
silently falls back to a plain toast with no buttons.
- Bump github.com/wailsapp/wails/v3 to v3.0.0-alpha.78.
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
version: '3'
|
|
|
|
includes:
|
|
common: ../Taskfile.yml
|
|
|
|
tasks:
|
|
build:
|
|
summary: Cross-compiles the application for Windows from Linux using mingw-w64
|
|
cmds:
|
|
- task: build:cross
|
|
vars:
|
|
DEV: '{{.DEV}}'
|
|
OUTPUT: '{{.OUTPUT}}'
|
|
|
|
build:cross:
|
|
summary: Cross-compiles for Windows with mingw-w64
|
|
internal: true
|
|
deps:
|
|
- task: common:build:frontend
|
|
vars:
|
|
DEV:
|
|
ref: .DEV
|
|
preconditions:
|
|
- sh: command -v {{.CC}}
|
|
msg: "{{.CC}} not found. Install with: sudo apt-get install gcc-mingw-w64-x86-64"
|
|
cmds:
|
|
- go build {{.BUILD_FLAGS}} -o {{.OUTPUT}}
|
|
vars:
|
|
BUILD_FLAGS: '{{if eq .DEV "true"}}-buildvcs=false -gcflags=all="-l" -ldflags="-H=windowsgui"{{else}}-tags production -trimpath -buildvcs=false -ldflags="-w -s -H=windowsgui"{{end}}'
|
|
DEFAULT_OUTPUT: '{{.BIN_DIR}}/{{.APP_NAME}}.exe'
|
|
OUTPUT: '{{ .OUTPUT | default .DEFAULT_OUTPUT }}'
|
|
CC: '{{.CC | default "x86_64-w64-mingw32-gcc"}}'
|
|
env:
|
|
GOOS: windows
|
|
GOARCH: amd64
|
|
CGO_ENABLED: 1
|
|
CC: '{{.CC}}'
|
|
|
|
run:
|
|
cmds:
|
|
- '{{.BIN_DIR}}/{{.APP_NAME}}.exe'
|