3
votes

Using Flash Builder 4.6, I exported an Adobe Air file from my mobile project.

I'm trying to get it packaged into an EXE (that would include the Adobe Air Runtime)

The project was compiled with Air 3.1. I looked online and there are some ADT commands that people recommend using but the problem is that the command throws errors in Air 3.1

If i use air 3.0 ADT:

AIR file at [app path]/app.air could not be converted.
The error was ""

If I use air 3.1 or air 3.2 sdk

SDK is missing file [my path to air]\lib\nai\bin\naip.exe

I'm running

java -jar [path to air]\lib\adt.jar" -package -target native app.dmg app.air

I've also tried

java -jar [path to air]\lib\adt.jar" -package -target native app.exe app.air

I've also looked into projects like this one: http://bishoponvsto.wordpress.com/2010/02/23/adobe-air-2beta-2-to-exe-packaging-air-app-in-windows-executable/ , but it is for Air 2.0.

Any ideas? Apparently there is an integrated Flash Builder 4.6 tool, but for some reason the option under export release doesn't exist for mobile projects - strange...

2

2 Answers

1
votes

Why do you want to do this? Air files -- when exported for a specific platform -- are executables.

If you are looking for an "installer" that will create directories, run the Air installation, and move auxiliary files to specific locations (docs, icons, etc.), then try Inno Setup.

EDIT:

The code you provided works for me to create a Windows EXE. But it seems a bit unecessary . . . why not just export the EXE file from Flash Builder ("Export Release Build" button in the top toolbar)? If you can't or won't, then here are some suggestions:

  • I am using Java version 1.6.0_29. Make sure your Java is not only up to date, but that you are actually calling the correct version (java -version).
  • Check the JAR directory text carefully .
  • Check that you are actually calling to the right Air version.
  • Make sure that the quotation marks are on both sides of the JAR path.
  • You should be able to do a "Export Release Build" (though I am using FB 4.5). Instead of selecting "Export as: Signed packages for each target platform", select "Export as: Signed AIR packages for installation on the desktop". (You may have to create a certificate, but you can create one through this export feature, too.)
  • (If you happen to be able to use the Flash IDE, the exported Air file has to support both "Desktop" and "Extended Desktop".)

Hopefully, this will allow you to both produce an Air program that can be converted to EXE, and actually convert it using the command line.

1
votes

I know this question is a little old, but a co-worker just ran into the same error message using the command line tools and FlashDevelop. It turns out that he was accidentally packaging some source files into the .air package, an extra copy of the app descriptor and one of the swc's was getting packaged in the .air file. I removed those and repackaged the .air file, then used this command:

adt.bat -package -target bundle kiosk kiosk.air

This successfully created a captive runtime exe. Of course there's no need to create a .air file first, you can package right to native or captive runtime, but since my co-worker was creating .air files I did it that way too just to be sure it would work.