[Openmcl-devel] Building Cocoa apps from command line

mikel evins mevins at mac.com
Mon Apr 14 16:36:29 PDT 2008


On Apr 14, 2008, at 3:29 PM, Joe Jones wrote:
> Why is it necessary to build from the IDE and not from the command  
> line? Is there a way to build a cocoa app from the command line?

You can do it from the command-line (i.e. from the terminal) as easily  
as from the IDE's listener window, and in exactly the same way:

(require :COCOA)
(require :BUILD-APPLICATION)
(BUILD-APPLICATION ... <build-application args go here>)

However, you'll notice that the first line results in the IDE's UI  
getting built.

In order for a process to be a Cocoa application, it must have an  
associated application bundle; the application bundle used by default  
with CCL's Cocoa support is the IDE's bundle. You can substitute your  
own bundle by defining the pathname for it and the nibfiles that go  
into it as arguments to BUILD-APPLICATION (whether from an IDE  
Listener window or from a terminal session). You can also remove the  
IDE nibfiles that get automatically copied in addition to your  
specified nibfiles, if you really want to.


You can build the IDE itself by doing

(require :COCOA-APPLICATION)

from a terminal session. If you really want to build a Cocoa  
application that leaves out some part of the IDE's infrastructure, you  
can start by looking at ccl/cocoa-ide/defsystem.lisp, which gets  
loaded when you evaluate (require :COCOA-APPLICATION). The variable  
*ide-files* is a list of the filenames of source files loaded in  
building the IDE.

If people are very much interested in being able to build up a Cocoa  
application from some sort of minimal core, rather than using the IDE  
as a base, you can make a case for that, and you might in return get a  
HOWTO that shows how to do it. Note that "minimal" might mean  
different things to different people, and a "minimal" Lisp that  
supports Cocoa will still need to load quite a bit of stuff, enough  
that the extra stuff needed to support the IDE is liable to seem  
pretty marginal.

--me




More information about the Openmcl-devel mailing list