#fyne build app
15 messages · Page 1 of 1 (latest)
you mean need write code for linux for mac and windows?
you don't but fyne do
different oses have different apis to handle drawing graphics and rendering windows
what's the issue with:
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -o gml-windows.exe
?
package example/test
imports fyne.io/fyne/v2/app
imports fyne.io/fyne/v2/internal/driver/glfw
imports fyne.io/fyne/v2/internal/driver/common
imports fyne.io/fyne/v2/internal/painter/gl
imports github.com/go-gl/gl/v2.1/gl: build constraints exclude all Go files in /home/misha/go/pkg/mod/github.com/go-gl/[email protected]/v2.1/gl```
that output
For cross-compile you will need CC set as well, or use fyne-cross to manage it for you. https://docs.fyne.io/started/cross-compiling
Plus I’d recommend “fyne package” over “go build” so you get a GUI app bundle as the result instead of just binary (icon, metadata etc)