Search code examples
gogtk3

How do I make a portable executable application on Golang with the GTK3 GUI?


I wrote a small Windows application on Golang with a GUI on gotk3 (bindings for GTK 3). How do I make an executable file portable? That is, how do I compile the code so that it can be run on a computer without installing dlls like libcairo, libfontconfig, libgdk, etc.


Solution

  • I have the same application, and what I do is to copy these dll files and share into a bundle. You can have a look at https://github.com/sunshine69/gnote specially this https://github.com/sunshine69/gnote/blob/4821be5e9c930994a8699b27c20ccbbe00917586/forms/utils.go#L353 as a start.

    Best luck