Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turning a command line app into a Cocoa GUI app on Mac OS X?

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.

like image 344
Petruza Avatar asked Jun 28 '10 16:06

Petruza


People also ask

Is macOS GUI or command line?

Today, most vendors offer the graphical user interface (GUI) as the default for operating systems (OSes) such as Windows, Linux and macOS. Most current Unix-based systems offer both a command-line interface and a graphical user interface.

How do you access the command line interface CLI on a macOS?

To open it, either open your Applications folder, then open Utilities and double-click on Terminal, or press Command-space to launch Spotlight and type "Terminal," then double-click the search result.

What is command line interface in Mac?

The command line interface is a program on your computer that allows you to create and delete files, run programs, and navigate through folders and files. On a Mac, it's called Terminal, and on Windows, it's Command Prompt.


1 Answers

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.

like image 197
Carl Norum Avatar answered Nov 15 '22 07:11

Carl Norum