Skip to main content
Inspiring
January 16, 2019
Question

How to emit an OSX console application from AIR export release build?

  • January 16, 2019
  • 1 reply
  • 362 views

If i run the EXPORT RELEASE BUILD in flash builder, i end up getting a file with an .app suffix.

I can go to the command line and run that by doing open myapp.app which launches it.

My question is this, what if i want to make a headless app, that doesn't open a window (by changing the xml parameters to not open a window at the start), but how do it get that app to run. If i go to the OSX command line and say the file name ./myapp.app it won't run it.

So i take it there is a difference between a file of .app and a command line program. How does one create using AIR a command line type of app? is it even possible to mark an .app to be "console style". I notice that in XCODE you can select a command line project, surely someone must have wrestled with this before.

thanks in advance

This topic has been closed for replies.

1 reply

Inspiring
January 16, 2019

Adobe AIR produce GUI apps, not CLI apps.

Now, depending on what you want to do and how you want to do it you can

  • launch an AIR app but hide the GUI, eg. start NativeWindow visible=false
  • launch an AIR app that call other command-line apps with NativeProcess
  • do not use Adobe AIR but use something else that produce a real command-line executable

in any case Adobe AIR, even if you hide the window etc. will never be a truly headless app,

if you don't have a GUI driver it will simply not work, also it will not behave like a command-line app

where you would be able to access standard streams like stdin, stdout, stderr etc.

so I would ask first, what are you trying to do?

and then if you need to build a CLI app based our of ActionScript 3
and that use the same engine than Adobe AIR or Flash but without GUI rendering
I would advise to look into Redtamarin and as3shebang

GitHub - Corsaair/redtamarin: AS3 running on the command line / server side

GitHub - Corsaair/as3shebang: as3shebang – The ActionScript 3.0 Interpreter