Link and execute the .app / .exe file using the Adobe Air application

I am creating an Air application that uses a .app / .exe file as a bridge for hardware devices.

Ideally, I would like to include an executable file with the Air application installer and run an external program with the Air application.

1) Is it possible?
2) How to decide which file of a particular OS to run?

EDIT: OK, the above was not very difficult:

var file:File = File.applicationDirectory; file = file.resolvePath("src/assets/NativeApps"); if (Capabilities.os.toLowerCase().indexOf("win") > -1) { file = file.resolvePath("Windows/echoTestWin.exe"); } else if (Capabilities.os.toLowerCase().indexOf("mac") > -1) { file = file.resolvePath("Mac/echoTestMac.app"); } var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.executable = file; var process = new NativeProcess(); process.start(nativeProcessStartupInfo) 

But why am I getting this error message?

ArgumentError: Error # 3214: NativeProcessStartupInfo.executable does not indicate a valid executable.

Is the .app extension true?

+4
source share
2 answers

.app is actually a folder. To access the executable inside, you need to go to YourApp.app/Contents/MacOS/YourApp

+7
source

There is a thread about running an external program: Adobe AIR to run the program

And you can, of course, find the OS: http://www.uibuzz.com/?p=1330

It is also possible to create OS-specific installers.

+1
source

All Articles