Hi, I am new here,
I would like to know how to do do a console app using openfl. I read that I need to override the create method in my application class.
So could anyone show an “Hello World” example of how to do this?
This is possible – we use it for the OpenFL and Lime command-line tools.
The easiest example I know of are the OpenFL SWF processing tools.
First you need an HXML file, such as this one:
-cp .. you will want
-lib openfl probably
The next thing is a Haxe class for your tools. There are two main components to this, the standard
static function main entry point, but also the
__init__ function if you need any of the Lime native binaries (which you will need if you do
Lime has the
lime.tools.helpers package, which has a lot of helpers we use in the command-line tools for Lime and OpenFL for running processes, creating directories, copying files and other useful utility functions.
I am interested in making this easier in the future, perhaps an official Lime command-line build target?
Wow, Thank you, It works!
An official Lime command-line build target would be nice!