[Openmcl-devel] newbie getting started with Cocoa bridge

Gary Byers gb at clozure.com
Tue Jan 24 14:14:58 PST 2006



On Tue, 24 Jan 2006, Brent Fulgham wrote:

> --- Phil Sobolik <epsobolik at rcn.com> wrote:
>> Trying to get my feet wet with the Cocoa bridge...
>>
>> ? (require "cocoa")
>>
>> gives me the Cocoa Listener
>
> A bit off-topic, but is there a way to get OpenMCL to
> build the
> Cocoa bridge software before the first attempt to
> require it?
>
> What I observe is that if I:
> 1.  Build OpenMCL (e.g., 1.0) from source.
> 2.  Start OpenMCL from a console.
> 3.  Do:  ? (require 'Cocoa)
>
> OpenMCL spends a few minutes compiling Lisp files.
> This is
> fine for me, but if I wish to generate an installer it
> would
> be nice to pre-build the Cocoa stuff.
>
> Thanks,
>
> -Brent

The stuff that gets compiled is mostly the Hemlock-based editor backend.
You can compile that separately via:

? (require "COMPILE-HEMLOCK")

? (ccl::compile-hemlock t)


or (equivalently)

? (require "HEMLOCK")

That'll compile a few dozen source files, then concatenate the resulting
fasl files together into a large "ccl:library;hemlock.dfsl").

Once that happens, a subsequent

? (require "HEMLOCK")

will load the fasl.

Way back when, the sources to the bridge and the IDE couldn't be
compiled via COMPILE-FILE for some reason(s) that I don't fully
remember.  It might still be a little tricky to do that; certainly
there's -some- compilation overhead involved in loading the .lisp
files, but I don't know how that compares with the overhead of
opening the libraries, doing the ObjC/CLOS stuff, and starting
the GUI.

Compiling all of the Hemlock stuff the first time certainly takes a
while, so distributing the big hemlock.dfsl (so that it doesn't
get compiled on the first (REQUIRE "COCOA")) might be reasonable.
(Another option would be to make it clearer that that compilation
only happens once.)

Another approach (if you want to distribute something installable)
is to use Bosco or the "cocoa-application" example's idea to
distribute a bundled .app.




More information about the Openmcl-devel mailing list