4 ms·
It looks like this binding has a compile option where Qt itself is statically linked into the resulting executable. That gives this stack (Go+Qt) a very unique
by derefr 7y ago
It looks like this binding has a compile option where Qt itself is statically linked into the resulting executable. That gives this stack (Go+Qt) a very unique deployment story.
There are a lot of people (I'm looking at you, console home-brew community) who build all their little tools to go along with their projects as native GUIs, usually with C# + WinForms—not particularly because they have Windows-specific functionality, but more because they have at least some native functionality (so Electron is out) and C#+WinForms allows them to just make releases as a standalone .exe you can "just" download and run (at least on modern Windows), without needing to first install some external runtime.
This could be a good multiplatform alternative to the C#+WinForms stack, with all the same advantages. (The only con being that statically-linked Qt is pretty dang large.)
- htfy96 7y agoOne thing to notice is that the open-sourced version of Qt is under GPL/LGPL, which means if you statically linked it into the executable, your application is then infected by (L)GPL.
- kej 7y agoYour application is "infected" if you use Qt without a commercial license, regardless of how you link it. It's a little harder (but still possible) to comply with the LGPL requirements when you statically link, but you are bound to those requirements either way.
- therockhead 7y agoI believe the parent post is correct and mechanism used to link effects the licence.
- groovebits 7y agoPretty sure having it dynamically linked is ok with the open source licence
- kej 7y agoRight, my point is that static linking is also okay with the LGPL, albeit slightly more difficult in terms of what you have to make available to end users.
- nickserv 7y agoIf you want to ship closed source code based on other people's hard work, then you should pay. In this case by getting a Qt commercial license.
- MayeulC 7y agoWell, you can do this with C++ and Qt as well, but as a sibling commented, you are subjected to LGPL, so your app has to be under a compatible license, or provide a way to replace the Qt part (not sure if you were to provide one such mechanism while statically linking, like SDL2 does with its dynapi[1]). [1]: https://hg.libsdl.org/SDL/file/default/docs/README-dynapi.md https://hg.libsdl.org/SDL/file/default/docs/README-dynapi.md
- longstation 7y agoWould you elaborate on the size of QT? I searched and found this link ([1]) that suggests when done right, the QT part is about 20MB. I am asking this because sometimes people have different idea on what is accounted for being big. [1]: https://stackoverflow.com/questions/25426895/qt-static-build-impossible-size/46202873 https://stackoverflow.com/questions/25426895/qt-static-build... Edit: grammar, link style
- derefr 7y ago20MB is still large in this case; we're talking about people who frequently use as their download host a phpBB forum with a 5MB download limit, and who usually manage to achieve sizes far less than that (usually ~150KB) because it's literally just CRUD + parsing + filesystem access + some layout XML for the dynamically-linked GUI toolkit to chew on. Think: "would software pirates write their little keygen GUIs in this?"
- deleted 7y ago[deleted]
- jksmith 7y agoMaybe, but keep in mind FreePascal/Lazarus has generally been supporting at least three of the platforms natively for several years. Complier, visual design, everything as expected from a delphi-like product. One of my FPC projects includes a desktop client with one window using multiple size controls and everything re-sizes near perfectly (know how to use panel controls). Recompiled on Linux and behavior was almost identical and no compile errors, according to expected behavior of a multi-platform toolchain. Funny enough, the client calls into a Golang rest backend I wrote. Nice, efficient solution that is easy to add additional devs to when needed.