How to create a Windows EXE or OSX App with OpenFL?

i have a simple utility program that presents a small menu. It reads a few files on the user’s hard drive, then writes a few files. I would like to make this program as easy for the end user as possible to run on Mac or Windows computers (Linux would be great too!), what are my options? i am porting over from AS3 in FlashBuilder, so my code can easily run using OpenFL, as i only use the most basic functions of the Adobe AIR system.

Is there a way to generate a native executable? If this is not possible, what is the next best alternative? I can’t use a web app because i am doing to much local file I/O which is hindered greatly by browser sandboxing. I looked at Deno, but it can’t draw. i need to draw some simple menus and respond to clicks.

You can compile to native desktop (c++) or you can still use AIR from OpenFL.

If your target is desktop (Windows and macOS), Haxe Starling is a best choice rather than OpenFL. The downside of Haxe Starling is, it’s not mature enough and there is no UI SDK for it!

i know the guy who wrote starling for flash. it is a great system, that gives you a GPU based graphics. I don’t care about having UI widgets, i can write my own. However, the one widget you can’t live without and is a million lines of code is the text entry field. Especially when you consider non-Roman Alphabets.

Anyway can you run Starling with AS3 code? i have a lot of AS3 code to migrate, and Haxe as a language has diverged from AS3. Does the Haxe compiler compile everything to the same intermediate form? I am a little unclear as to how Haxe the system works vs. haxe the language.

Starling has been ported to Haxe/OpenFL, it runs with haxe code. Choosing Starling is still choosing OpenFL, also I’ve been a Starling advocate when it makes sense but here I don’t see any reason to use it :slight_smile:

Go with OpenFL for the use case you describe, if you need UI components have a look at HaxeUI or StableXUI (or Feathers, but it’s still alpha).

When on windows you can compile for the “windows” target, wich will be native (running on c++). You need a Mac to do the same thing for the “mac” target, and same with Linux.

Converting AS3 code to Haxe is not very complicated, you can find a guide here : https://books.openfl.org/as3-conversion-guide/
You can use as3hx to automatically convert as3 code to haxe but it’s not perfect.

I don’t know how it works exactly, many parts of Haxe are still voodoo to me but haxe code gets transpiled to as3 when you target flash/air.
I think you can still use libs in the target language (for example as3 code, which will only work if target is flash/air) but I never tried that so can’t comment.