Remix.run Logo
rwmj 8 hours ago

This is quite timely as we need to write a simple UI for Windows (a few buttons, status, maybe a file menu). The main constraint is it must compile to a single binary (.exe) with no dependencies such as runtimes, DLLs, languages etc. It also needs to run on some older unsupported Windows systems, probably Windows >= 7, 32 bit.

My first thought was MFC. Basic, fast, well understood.

But then maybe WxWindows so we can cross-compile it (from Linux) and use the same UI on other platforms? It could probably be compiled statically although I've not tested it.

Or Mono, but that needs a runtime?

Edit: Some comments mention Qt which could also work although how large is the runtime? Can it be compiled statically?

hermitcrab an hour ago | parent | next [-]

Qt is compiled to a native .exe. It doesn't have a runtime. To give you a rough idea of size, I have 3 GUI application written using Qt/C++. The installers are 72 MB, 69 MB and 32 MB. The first 2 include a significant amount of documentation. I could probably get them a bit smaller if I really needed to.

Atotalnoob 5 hours ago | parent | prev | next [-]

.net will work. Use a weaver (fody) or the modern features to roll everything into 1 .exe.

Use self-contained to have everything together.

https://learn.microsoft.com/en-us/dotnet/core/deploying/sing...

Conan_Kudo 6 hours ago | parent | prev | next [-]

> Edit: Some comments mention Qt which could also work although how large is the runtime? Can it be compiled statically?

You need a commercial license for that, but yes you could. But since applications are typically distributed with install bundles that put into application-local program files directories, it's not super-important as long as you only cherry-pick the Qt libraries you need.

rubymamis 2 hours ago | parent [-]

This is wrong. There's a misconception that you can't statically link your app when using the open-source LGPL version of Qt. From my reading of the LGPL license this doesn't appear to be the case[1]. The LGPL allows you to statically link your app as long as you provide the object files and allow users to relink your app with a different version of Qt.

I've observed many people spreading this misinformation about only being able to dynamically link with the LGPL version of Qt. Please stop this.

[1] https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...

Conan_Kudo an hour ago | parent [-]

Yes, that is true, but in practice nobody has ever done that. And the material complexity of offering that mode is higher than just dynamically linking the library.

Also, modern compilers make this method much harder to use. It is much harder to stably relink object files like that than to just use the normal dynamic link method.

kwanbix 7 hours ago | parent | prev | next [-]

Delphi or Lazarus (https://www.lazarus-ide.org) should solve it.

rwmj 7 hours ago | parent [-]

Nice, I didn't know there was a free software version of Delphi nowadays.

dardeaup 6 hours ago | parent [-]

With restrictions of course.

5 hours ago | parent [-]
[deleted]
lstodd 2 hours ago | parent | prev [-]

For such a trivial thing I'd just take imgui.

MFC, wx, Qt .. it's all overcomplex pointless bloat for this task imo.