back

by allanrbo·4y ago·view on hn ↗
Went through similar feelings a few years ago. Ended up going old school with C++ and wxWidgets as UI library. Felt to me like the best balance between

- wanting a single code base that I could compile for Mac/Win/Linux

- startup times measured in milliseconds

- snappy and native looking UI

- a executable size of 10MB (Mac) / 17MB (Win) / 12MB (Linux).

The bulk of that exe size is the wxWidgets UI library I statically compiled in. If you wanted to get that crispy couple of hundred kilobyte sized binary you'd probably have to directly use the native UI API of each platform, and therefore be in for not being able to reuse very much between each platform. (github.com/allanrbo/filesremote if anyone wants to see the result)

Real desktop app development feels like a dying art. (And arguably my use of wxWidgets made it not even "real real"). And I feel like it's not even harder than trying to shoehorn the web dev tools into desktop apps with things like Electron. It's just different and sort of forgotten it seems :-)

2 comments
>And arguably my use of wxWidgets made it not even "real real"

Doesn't wxWidgets wrap and abstract over the native APIs for each respective platform?

Seems real enough to me.

I once decided I'd write a GUI in pure win32 (when Windows 7 was new) and the experience really, really sucked. In my book there's no shame in using a GUI library any more than a socket library.

> If you wanted to get that crispy couple of hundred kilobyte sized binary you'd probably have to directly use the native UI API of each platform, and therefore be in for not being able to reuse very much between each platform. (github.com/allanrbo/filesremote if anyone wants to see the result)

No need for three different native code bases, you should simply use FLTK. It's actively maintained, works on win/lin/osx and is just 300kB when statically linked. However it doesn't look native, if this is a serious issue for you.

Nice! Will try FLTK for my next GUI project.