0
votes

How can I convert a Haxe SWF to a compiled native app using AIR?

Is there a way to override the Flash default .SWF export when you use a Haxe Command Line to export a SWF that can be packaged up into an Adobe Air file?

I'm having trouble finding information on how to compile a Haxe .SWF export via command line into Adobe Air. Ive tried deleting the default swf and renaming the Haxe .swf export, but Adobe still rewrites it when it packages everything up.

E.G: "haxe -swf main-flash.swf -main Main -swf-version 15 -swf-header 960:640:60:f68712"

I'm using Mac OS X with Flash CC and Atom to write my game with Starling-HAXE. I want to target desktop (PC/MAC/Linux).

Thanks!

2
How about adding some additional information: 1) you're using Haxe to compile a SWF? 2) You want to use this SWF in an Adobe AIR project? 3) What platform are you targeting with Adobe AIR? 4) What IDE, build tools, or command lines are you using with Adobe Air?Jeff Ward

2 Answers

2
votes

The OpenFL tools used to support Adobe AIR on the desktop, if you look at this older helper class, you may find hints on how you might go from a Haxe-generated SWF file to a final AIR application:

https://github.com/openfl/lime-tools/blob/master/helpers/AIRHelper.hx

Looking at it again, I believe you call ADT with the proper signing parameters. You probably need an application.xml file as well, here is one:

https://github.com/openfl/openfl/blob/master/templates/flash/templates/air/application.xml

You would need to replace variables such as "::APP_PACKAGE::" with com.yourcompany.yourproject, and other sensible values.

If someone would like to look at integrating AIR support into the Lime tools again, I'm open to the idea. The problem I was concerned about was long-term maintenance

1
votes

I have some batch files that will do this (although will most likely need to be reworked on your behalf). I'm not at my computer right now, but will post them over the weekend. On a side note it would be great to have this type of functionality baked into flashdevelop.