Using the Fyne toolkit to build cross platform applications is very simple but does require some tools to be installed before you can begin. If your computer is set up for development with Go then the following steps may not be required, but we advise reading the tips for your operating system just in case. If later steps in this tutorial fail then you should re-visit the prerequisites below.
Fyne requires 3 basic elements to be present, the Go tools (at least version 1.12), a C compiler (to connect with system graphics drivers) and an system graphics driver. The instructions vary depending on your operating system, choose the appropriate tab below for installation instructions.
Note that these steps are just required for development - your Fyne applications will not require any setup or dependency installation for end users!
sudo apt-get install golang gcc libgl1-mesa-dev xorg-dev
sudo dnf install golang gcc libXcursor-devel libXrandr-devel mesa-libGL-devel libXi-devel libXinerama-devel
sudo pacman -S go xorg-server-devel
sudo apt-get install golang gcc libegl1-mesa-dev xorg-dev
After installing any prerequisites the following command will do everything to get Fyne installed:
$ go get fyne.io/fyne
Once that command completes you will have the full Fyne development package installed in your GOPATH.
If you want to see the Fyne toolkit in action before you start to code your own application then you can see our demo app running on your computer by executing:
$ go get fyne.io/fyne/cmd/fyne_demo $ fyne_demo
And that’s all there is to it! Now you can write your own Fyne application in your IDE of choice. If you want to see some Fyne code in action then you can read your first application. Alternatively you could check out our tour of the Fyne toolkit using the button below.
We're excited to hear from anyone interested in the project. Whether it's to find out more, provide suggestions or to get involved - drop us a line!
If you would like to join us on slack but are not yet signed up to the golang slack server you can request an invite.