I’ve started playing around with Go to list files and do some file actions. It worked great; the code was done quickly, but it only had a console output. That’s when I started looking at GUI toolkits to create a file manager-like UI.
I checked what’s available and was surprised how many libraries are out there. But the sad truth is: most of them are outdated and not in active development. Sure, I can understand that: why would anybody keep working on something as complex as a GUI toolkit in their free time? It’s not an easy task, especially when there are users with issues.
I tried Gio UI, Fyne, and some others. Most of the active ones are clearly not designed with classic desktop apps in mind. The last one I tried was Fyne, and it worked after some preparations. The issues were that it was slow to compile, needed a C compiler, and looked terrible. I was interested in something like a table and, although there is a table element, it looked more like aligned divs in a browser.
I came to the conclusion that Go is not the right choice for something like this. But what else could be a better solution?
I usually like Java, since it brings almost everything one can wish for and has a clear syntax—I am looking at you, Rust, with your ugly and unclear syntax. But a file manager should be fast, both in startup and in usage. Java is neither of them.
I used to develop stuff with Qt, but since Qt6 and their licensing disaster, it became unusable. I tried to install it and develop an example app a few months ago, but it was just not working right.
So I was wondering if I should just use WinAPI since I mainly use Windows. That would be possible, but WinAPI usually does not look as good as other frameworks. So I decided to give GTK a try.
Setting it up on Windows was a bit annoying since I had to install MSYS2 with some additional dependencies using its ugly terminal. I don’t like having something like a second system just for that, but using MSYS2 is the recommended way to compile GTK and such.
After a few hours of head banging, it worked. At least, mostly. GTK4 does not really work; it ignores themes and settings and has a thick and ugly black border around the windows for no obvious reason. I have not found the issue yet. But after switching to GTK3, it all worked.
I was able to write relatively simple C/C++ code, set up Meson in MSYS2, find out how to create a GitHub Actions pipeline with MSYS2, create a nice-looking table, query the filesystem with C++17’s filesystem API, and set up Cppcheck.
So far, it’s an interesting journey, although using C# would probably have been much easier. But I’ll keep working with C++ and trying out new features.
I see you did not mention Tcl/Tk which is candidate. Just looking for Tcl/Tk Go on search engines you will find Tcl/Tk interface for Go. + there are nice looking and modern layout : https://github.com/rdbende/Azure-ttk-theme