6 ms·
There's just no way to develop a GUI application (especially a cross-platform one) without shipping something large. You can use Electron (and basically bundle
by StevePerkins 10y ago
There's just no way to develop a GUI application (especially a cross-platform one) without shipping something large.
You can use Electron (and basically bundle Chrome), or JavaFX (and bundle a Java runtime), and they're about the same size. But even if you ship all of the Qt dynamic libs, or all of the GTK dependencies, or even wxWidgets... it's still a far cry from "light".
It just takes tens of megs to make a window appear.
- yoodenvranx 10y ago> There's just no way to develop a GUI application (especially a cross-platform one) without shipping something large If you compiled a Delphi program without using the UI stuff the resulting .exe files were usually only a few dozen kb in size. People used this fact in combination with using raw Win32 API in order to create very small sized UI apps with no external dependencies. There were tons of tutorials on how to use Win32 API in combination with Delphi.
- mberger 10y agoYou're right, but the key point (at least for me) is the cross platform. We recently had a client send us their environment setup. Everything ran on AIX except for our stuff. That means they had to specially buy windows server licences just for our product. feelsbadman.
- wila 10y agoWith delphi targeting macOS a GUI app starts at about 18MB. Not tiny, but certainly not too bad.
- boznz 10y agoOuch, thats pretty inefficient IMHO. I have a Windows database client written in Delphi XE2 that covers the whole MRP for a winery including built in reports and report writer that clocks in at 14MB http://rodyne.com/?page_id=375 http://rodyne.com/?page_id=375
- wila 10y agoThat's because your Windows app is most likely VCL based and does not have a huge overhead on trying to built all of the GUI parts itself. On macOS the GUI parts are in Firemonkey (FMX) and that is an abstraction layer that does all of the drawing of the controls by itself instead of using the native controls as supplied by the OS. This creates some extra overhead. There's pro's and cons here. Personally I'd rather had they used native controls instead of FMX as that would look a lot better. But it is what it is. From there the app doesn't grow as fast, so it is not all bad. edit: Just looked at the GUI on my app [0] and without any resources it comes in at 16.2MB (so my estimate was a bit on the high end of things) [0] http://www.vimalin.com http://www.vimalin.com
- SyneRyder 10y agoIt shouldn't ever take that much. This is an example of what a 64kB executable could accomplish in 2016: Darkness Lay Your Eyes Upon Me - Conspiracy - Revision 2016 64k https://www.youtube.com/watch?v=_SEGm2lUSY0 https://www.youtube.com/watch?v=_SEGm2lUSY0 http://www.pouet.net/prod.php?which=67106 http://www.pouet.net/prod.php?which=67106 After watching a few 64k demoscene demos, a 380MB Electron-based minimalist text editor just seems horribly bloated. (I'm currently writing a cross-platform Windows/Linux/Mac GUI app in Xojo, and the macOS version is 11.6MB at the moment.)
- 16bytes 10y agoThe demoscene relies heavily on procedural generation to cram a lot into a little tiny executable. GUI toolkits aren't comparable in this regard.
- beagle3 10y agoYes, they are. There are small, concise GUI toolkits that go a long way in a small volume. I am very fond of FLTK, which IIRC produced standalone (depending only on system libraries) fast, tens-of-widget-types featured executables at ~200k on each of Win, Linux and Mac. Adding Unicode support (independent of the Platform) probably bloats every executable an additional 100k. The horror.
- tomcam 10y agoRed-Lang.org should convince you otherwise
- sigzero 10y agoHow do you like Xojo? I've toyed with the idea of giving it a whirl.
- SyneRyder 10y agoI like it a lot, I find it really fast to prototype ideas & get something working. I mostly use it for in-house utility tools (business dashboards, small database stuff) where I wanted the business to be platform agnostic but still native. There's an ecosystem of plugins to extend the built-in Xojo controls (like Delphi has), mostly from MonkeyBread Software and Einhugur Software. It reminds me of the early pre-corporate Delphi days. I love that Xojo's IDE is cross-platform too, and that I can make my Windows & Linux builds from the Mac IDE. It's been easier for me than Qt anyway, and without any of the licensing or renewal issues.
- libx 10y agoYou haven't heard about Red (http://www.red-lang.org http://www.red-lang.org), have you? With some Kb you can ship GUI executables for Windows, Android, OSX and Linux. (OSX and Linux soon). Try it and report back the amount of Kb (not Mb) used.
- yumaikas 10y agoIt doesn't make GUI's for OSX just yet, and I'll be interested to see if it stays that small once OSX and Linux support are added. EDIT: The version on their download page doesn't make GUI's for OSX yet, but there seem to be other versions that do.
- libx 10y agoCheck the progress in https://trello.com/c/UgsrhiHf/143-macosx-gui-backend https://trello.com/c/UgsrhiHf/143-macosx-gui-backend 107 out of 120 tasks for OSX GUI backend are already completed.
- draegtun 10y agoHere is a under 700k alpha preview GUI binary for the Mac (circa July 2016) - http://static.red-lang.org/dl/mac/red-console http://static.red-lang.org/dl/mac/red-console
- mike_hearn 10y agoThere's just no way to develop a GUI application (especially a cross-platform one) without shipping something large That's not quite true. Check out these Avian examples: https://readytalk.github.io/avian/ https://readytalk.github.io/avian/ Fully statically linked Java cross-platform GUI app (using SWT) in a 1mb download.
- Cthulhu_ 10y agoJava implies it needs the JRE, so add that to it as well. Of course, Electron probably relies on OS-specific UI libraries as well (although only a little), which should also be considered I guess.
- beagle3 10y agoAvian is a JRE.
- mike_hearn 10y agoNo. Avian is a standalone JVM and that 1mb includes everything. No dependencies at all.
- dchest 10y agoFun fact: the icon for my macOS application is about twice as large as the binary.
- criddell 10y agoCross platform applications are going to be large, but if you aren't cross platform, you can create pretty small applications. Steve Gibson at grc.com has GUI utilities that are pretty small. For example, his DNS benchmarking tool is 165 kB.
- Joeri 10y agoI think that Steve writes those gui apps using nothing but assembly. https://www.grc.com/smgassembly.htm https://www.grc.com/smgassembly.htm
- Figs 10y agoIt doesn't have to be so big. Modern GUI toolkits are just really bad about keeping their sizes down for some reason. I wrote my own personal GUI toolkit on top of OpenGL/GLFW for developing special purpose editors (for gamedev), and the resulting executables plus required shared libraries and resources (minus system libraries like libGL that shouldn't be distributed directly with the application) are only about a megabyte or two total. That includes a full blown custom scripting language interpreter, resizable rich text widget with bold/italics/color support + optional text wrapping and scrollbars, JSON parser and serializer, vector math library, a basic image loader and saver for several formats (using stb plus a little custom code for a few less common formats), various routines for software manipulation of surfaces (e.g. drawing lines, triangles, alpha blending images, and so on)... written in C++, with debugging info turned on, and using templates where appropriate. (It'd be even smaller if I stripped debug info and packed the whole thing into one executable.) I'm developing it on Linux, but I could rebuild it for Windows (and probably Mac) without too much effort. I don't know what the hell the GUI libraries are doing to get so big.
- overgard 10y agoQt is borderline its own operating system. (I like Qt, but it does probably more than it should).
- AstralStorm 10y agoQt is split into chunks, you can skip parts of non-core you do not use.
- draegtun 10y ago>> There's just no way to develop a GUI application (especially a cross-platform one) without shipping something large. It can be done, for eg. Rebol/View, a cross-platform GUI circa 1mb in size. NB. Rebol/View used the AGG library to achieve this - http://antigrain.com/ http://antigrain.com/ | https://en.wikipedia.org/wiki/Anti-Grain_Geometry https://en.wikipedia.org/wiki/Anti-Grain_Geometry