fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.35k stars 1.4k forks source link

Please add a way to embed the `FyneApp.toml` metadata into the `go build`. #4688

Closed mondy closed 8 months ago

mondy commented 9 months ago

Checklist

Is your feature request related to a problem?

Simply put, I want to disable -H=windowsgui and embed the FyneApp.toml metadata. See #3781 and #3604.

The option to disable -H=windowsgui in fyne build was not accepted. However, if there is a way to add metadata when go build, the problem is solved.

Is it possible to construct a solution with the existing API?

No response

Describe the solution you'd like to see.

Add a new subcommand to the fyne command to generate metadata source code. The source code to set the metadata is generated at fyne build time. The source code for the following section will be helpful.

https://github.com/fyne-io/fyne/blob/e332a5e47813bff1af9631cbbfe84654c0143189/cmd/fyne/internal/commands/build.go#L377C6-L377C28

Or maybe there is a better way. Is there anything?

andydotxyz commented 9 months ago

As you can see in the PR #4715 I realised that it should be possible to do this completely transparently so that when you run using standard Go tools we pick up metadata if present.

andydotxyz commented 8 months ago

From v2.5.0 this will just work by default :)