Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,24 @@ func main() {

The main examples have been moved - you can find them in their [own repository](https://github.com/fyne-io/examples/).

## Non-standard library dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

We could just rephrase this as "dependencies". This would be more succinct.


Fyne requires the following imports which are not included in the go standard library:

* github.com/go-gl/gl/v3.2-core/gl
* github.com/go-gl/glfw/v3.2/glfw
* github.com/golang/freetype
* github.com/srwiley/oksvg
* github.com/srwiley/rasterx
* golang.org/x/image/font

These can be included in your gopath by the following 'get' commands:

* "go get github.com/go-gl/gl/v3.2-core/gl"
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not necessary. A go get github.com/fyne-io/fyne/... would pull in all of these

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my experience it has never pulled in these dependencies

Copy link
Member

Choose a reason for hiding this comment

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

Was that back when you needed to pass -tags gl? Since we moved this to the default driver it should indeed be downloading the dependencies at the same time.

I will try on a fresh installation and see what happens.

Copy link
Member

Choose a reason for hiding this comment

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

You're right it does not work.
However, instead of listing the dependencies how about we do this instead? (as it will always work, even when the deps change)

go get -u github.com/fyne-io/fyne
cd $GOPATH/src/github.com/fyne-io/fyne
go get -u ./...

* "go get github.com/go-gl/glfw/v3.2/glfw"
* "go get github.com/golang/freetype"
* "go get github.com/srwiley/oksvg"
* "go get github.com/srwiley/rasterx"
* "go get golang.org/x/image/font"

You will also require a GCC compiler if you do not have one, this can be included by installing TDM-GCC.
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes a Windows user, which is not necessarily the case. This could very well be a Darwin/Linux/*BSD/other user.

Also, TDM-GCC is not necessarily the best way to handle Windows CGO support (I had not even heard of it before now). If we even think that we need to explain this, we should link to the Go wiki: https://github.com/golang/go/wiki/WindowsBuild

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this could be phrased more along the lines of "Fyne uses CGo, which requires a C compiler to be installed. If you don't already have one installed you can ...".
After all it's not like we require a C compiler directly so it would be good if this sounds like less of a special case.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, we may be able to remove CGo dependency on windows in the near future 😄

go-gl/glow#102