Is it possible to package a Fyne app and cross-compile said app in one step?

Viewed 384
3 Answers

According to the Fyne team:

You set GOOS and CC. suggested values at developer.fyne.io/started/cross-…

With the correct environment variables set it should compile the desired architecture (GOARCH would be needed as well in that instance). However you could also compile a binary and package it by passing “fyne package … -executable ” to use a pre-built file.

Alternative way to package a Fyne app (manually):

  1. Compile the executable for the choosen target, e.g.:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build
  1. package the app manually using, for instance the following template:

github.com/codazoda/mac-app-shell

Related