Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FyneApp.toml #87

Merged
merged 2 commits into from
Feb 13, 2022
Merged

Add support for FyneApp.toml #87

merged 2 commits into from
Feb 13, 2022

Conversation

lucor
Copy link
Member

@lucor lucor commented Jan 10, 2022

Description:

This PR adds support for the the FyneApp.toml file

Fixes #78

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@lucor lucor changed the base branch from master to develop January 10, 2022 19:35
@Jacalz Jacalz self-requested a review January 10, 2022 20:14
@Jacalz
Copy link
Member

Jacalz commented Jan 10, 2022

I’ll try to have a look at this later in the week once I am done with my exams for this semester.

@andydotxyz
Copy link
Member

Would it be helpful if we exposed the FyneApp structure from cmd/fyne/ in the main repo?
I think we could probably do that, and possibly even the loader, pretty easily.

@Jacalz
Copy link
Member

Jacalz commented Jan 22, 2022

That sounds like it might be a good idea.

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that this took some time. First I had a lot to do, then I forgot about it.

I get this error when trying to build wormhole-gui:

[✓] Binary: /home/jacob/Git/wormhole-gui/fyne-cross/bin/darwin-amd64/wormhole-gui
invalid -appVersion parameter, integer and '.' characters only up to x.y.z
[✗] could not package the Fyne app: could not package the Fyne app: exit status 1
make: *** [Makefile:36: darwin] Error 1

My FyneApp.toml file looks like this:

Website = "https://github.com/Jacalz/wormhole-gui"

[Details]
Name = "wormhole-gui"
ID = "io.github.jacalz.wormhole_gui"
Icon = "internal/assets/icon/icon-512.png"
Version = "v3.0.0"
Build = 14

@lucor
Copy link
Member Author

lucor commented Jan 23, 2022

The fyne CLI tool supports only semantic version. Changing the version to 3.0.0 should work.
With regard to expose the FyneApp would helpful but wondering if it could be a good time to move part of the fyne-cross tool as sub command of the fyne CLI (I'll create a proposal about this) For the moment I'd go for the code duplication instead of expose a new public package that we have to maintain.

@Jacalz

This comment has been minimized.

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I get a lot further this time but it fails on building for FreeBSD, it seems.

~/go/bin/fyne-cross freebsd -arch amd64,arm64
[i] Target: freebsd/amd64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/jacob/Git/wormhole-gui/fyne-cross/bin/freebsd-amd64
[✓] "dist" dir cleaned: /home/jacob/Git/wormhole-gui/fyne-cross/dist/freebsd-amd64
[✓] "temp" dir cleaned: /home/jacob/Git/wormhole-gui/fyne-cross/tmp/freebsd-amd64
[i] Checking for go.mod: /home/jacob/Git/wormhole-gui/go.mod
[✓] go.mod found
[i] Building binary...
# github.com/go-gl/glfw/v3.3/glfw
In file included from /go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20211024062804-40e447a793be/native_linbsd.go:10:
In file included from /go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20211024062804-40e447a793be/glfw/include/GLFW/glfw3native.h:114:
In file included from /freebsd/usr/local/include/GL/glx.h:32:
/freebsd/usr/local/include/GL/gl.h:56:11: warning: 'GLAPIENTRY' macro redefined [-Wmacro-redefined]
/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20211024062804-40e447a793be/glfw/include/GLFW/glfw3.h:5894:10: note: previous definition is here
[✓] Binary: /home/jacob/Git/wormhole-gui/fyne-cross/bin/freebsd-amd64/wormhole-gui
[i] Packaging app...
[✗] rename /home/jacob/Git/wormhole-gui/fyne-cross/tmp/freebsd-amd64/wormhole-gui.tar.xz /home/jacob/Git/wormhole-gui/fyne-cross/dist/freebsd-amd64/wormhole-gui.tar.xz: no such file or directory
make: *** [Makefile:33: freebsd] Error 1

@andydotxyz
Copy link
Member

Is it another OS missing xz support by default?

@Jacalz
Copy link
Member

Jacalz commented Jan 23, 2022

I guess it technically could be. Another thing that I noticed was that it seems to want to indent all the detail fields (no longer to the left most edge).

Website = "https://github.com/Jacalz/wormhole-gui"

[Details]
  Icon = "internal/assets/icon/icon-512.png"
  Name = "wormhole-gui"
  ID = "io.github.jacalz.wormhole_gui"
  Version = "3.0.0"
  Build = 15

@lucor
Copy link
Member Author

lucor commented Jan 23, 2022

Oh this is weird... tried on my linux box against your latest version on main branch and it worked.

Are you by any chance on a macOS box ? If so could be related to #85

@Jacalz
Copy link
Member

Jacalz commented Jan 23, 2022

Are you by any chance on a macOS box ? If so could be related to #85

Unfortunately not. I do all of my development on Fedora Linux. This is strange indeed. I am pretty sure it worked when I didn't use this PR, but I don't know what combination of the command and docker image I was using.

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long wait. It seems that my computer is kind of borked (in more than one way) and didn't want to pull new images. I had been stuck on Go 1.16 images and using an older version of the cli tool. New images were built for #89 and this is now working splendid :)

@lucor lucor merged commit 84c7962 into fyne-io:develop Feb 13, 2022
@lucor lucor mentioned this pull request Apr 7, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for FyneApp.toml
3 participants