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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
As a matter of fact there are. Here is the first hit for a Google search:
- Cocoa Dev Central: Wrapping UNIX Commands
What you're looking for is the NSTask
class. Check out the documentation for all the information you need.
回答2:
For very simple scripts, I recommend Platypus. For more complicated scenarios, you could try something like Pashua.