在Mac OS X上将命令行应用程序转换为Cocoa GUI应用程序? [英] Turning a command line app into a Cocoa GUI app on Mac OS X?

查看:285
本文介绍了在Mac OS X上将命令行应用程序转换为Cocoa GUI应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何教程或引用,如果这样的事情是可能的,使命令行应用程序的GUI应用程序?

我的意思是,有一个命令行应用程序,将其包装到应用程序包并创建一个Cocoa GUI应用程序,它将有一个简单的界面来执行命令行应用程序及其标志和参数。

Is there any tutorials or references, if such thing is possible, to make GUI applications out of command line apps?
What I mean is, having a command line app, wrap it into an app bundle and create a Cocoa GUI app that would have a simple interface to execute the command line app with its flags and parameters.

推荐答案

事实上有。以下是Google搜索的首次匹配:

As a matter of fact there are. Here is the first hit for a Google search:

  • Cocoa Dev Central: Wrapping UNIX Commands

您正在寻找的是 NSTask 类。请查看文档 a>您需要的所有信息。

What you're looking for is the NSTask class. Check out the documentation for all the information you need.

这篇关于在Mac OS X上将命令行应用程序转换为Cocoa GUI应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆