YellowAfterlife/openfl-bitfive — pull request #4 by jgranick (2013-10-11 17:46:19+00:00)
Title: OpenFL 1.1 fix

In OpenFL 1.1 (which we plan to release soon), we have been trying to improve support for swappable backends. Currently, you can use (target name)-backend to define what is loaded, instead of the default. For example:

<set name="html5-backend" value="openfl-bitfive" />
<haxelib name="openfl" />

When you define "html5-backend", the library is loaded in place of "openfl-html5", so I needed to fix the ApplicationMain so it would not require an "openfl_html5" define, and did a little cleanup, since the ApplicationMain will always be used with your library.

This can be done on the command-line as well, for any project:

openfl test html5 -Dhtml5-backend=openfl-bitfive

This should be a step forward, but we're to input to make it even more comfortable.

As an alternative approach, I added the "html5-backend" define to the include.xml file, so a user can include it like this as well:

<haxelib name="openfl-bitfive" if="html5" />
<haxelib name="openfl" />

(the order is important)

Have a great day!