I need a hero
I'm working on a Air app calling a native application in C++, so it is not a .app or .cmd it's an executable file. For now it's a "dummy" application like below:
using namespace std;
int main(int argc, char ** argv)
cout << "Hello "<< argv<< " its a new world!"<<endl;
myfile << "Writing this to a file.\n";
I launch this native application thanks to the NativeProcess API :
file = file.resolvePath("./application/Marlin/mac/hello");
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
var processArgs:Vector.<String> = new Vector.<String>();
nativeProcessStartupInfo.arguments = processArgs;
process = new NativeProcess();
I can see intthe standart output that my native application is running. I have in the trace : hello rela its a new world!
First question, the native application doesn't pop up, I mean that the console doesn't show up and execute the C++ code. Is it normal or is there a configuration to change that?
Seconde question, my native application creates a file but when I launch with the Air app, the file is not created. Is it possible to launch a native application creating a file? Is there any security or confifuration to set up?
Thanks a lot.
Nevermind, I've found out.
Needed to add the working directory.
nativeProcessStartupInfo.workingDirectory = File.createTempDirectory();