fyne-io / tools

Toolchain and helpful commands for building and managing Fyne apps
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Add fyne run command to cli #12

Open rad756 opened 3 months ago

rad756 commented 3 months ago

Checklist

Is your feature request related to a problem?

The command go run . will not see FyneApp.toml and error out that appID is missing.

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

It should be able to modify fyne build, to create a new feature, fyne run that will work similar to go run . but it will recognize FyneApp.toml, without building a copy of the app in the project directory

Describe the solution you'd like to see.

Create a fyne run cli command which would act like go run . but will be able to see FyneApp.toml and not error out about missing appID if in main.go you have app.New instead of app.NewWithID()

andydotxyz commented 3 months ago

This relates to new functionality, and for the CLI tool we are moving development to fyne-io/tools - so I will move this issue over.

andydotxyz commented 3 months ago

I wonder if this relates to fyne-io/fyne#4688

rad756 commented 3 months ago

Issue https://github.com/fyne-io/fyne/issues/4688 relates to go build . and this one relates to go run . Although it could be a "merged" issue since it feels like splitting hairs at this stage. Since I assume that if the functionality gets added to go build, it will probably also get added to go run.

dweymouth commented 3 months ago

I wonder if this relates to fyne-io/fyne#4688

Related, but it doesn't seem like a duplicate. The request in 4688 is a way to embed the FyneApp.toml metadata without also doing -H=windowsgui (presumably so that debug logs can be seen during development, but still have the FyneApp metadata in the build)

andydotxyz commented 3 months ago

If https://github.com/fyne-io/fyne/pull/4715 lands I think this is request no longer adds anything - from the OP:

would act like go run . but will be able to see FyneApp.toml and not error out about missing appID if in main.go you have app.New instead of app.NewWithID()

With the proposed change "go run" behaves like that without needing any new fyne command.

andydotxyz commented 2 months ago

From v2.5.0 the metadata will be included with go tools. Do we still need a "fyne run" command?

rad756 commented 2 months ago

If from v2.5.0 while using go run . it will notice FyneApp.toml. It might make fyne run command redundant, unless I do not know how else go run . would differ from running the built binary from fyne build