logoalt Hacker News

rwmjtoday at 1:48 PM3 repliesview on HN

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?


Replies

Atotalnoobtoday at 4:41 PM

.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_Kudotoday at 3:26 PM

> 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.

kwanbixtoday at 2:00 PM

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

show 1 reply