开发者

AIR NativeProcess API

开发者 https://www.devze.com 2023-02-14 01:11 出处:网络
开发者_StackOverflow中文版I use nativeprocess api in AIR to launch a c++ console app. The console app runs correctly but does not appear, but I want it to be visible and user be able to interact with

开发者_StackOverflow中文版I use nativeprocess api in AIR to launch a c++ console app. The console app runs correctly but does not appear, but I want it to be visible and user be able to interact with it. How can I achieve that?


Instead of launching your executable directly, you'll need to launch your platform's terminal application (on Windows, that's CMD.exe, on OS-X it's Terminal.app, and on unix/linux it's xterm).

By default, the terminal application will run an interactive shell prompt, but you can use command-line arguments to tell it to execute any other program instead. In this case, you'll want to tell it to execute your C++ console application.

On Windows, this might look something like this:

CMD.exe /K C:\path\to\your\app.exe

on OS-X, it's a little more complicated. Here's a related S.O. post ( Running a command in a new Mac OS X Terminal window)

0

精彩评论

暂无评论...
验证码 换一张
取 消