[CM] Building Grace on OSX

Vincent Akkermans vincent.akkermans@gmail.com
Sun, 2 Sep 2007 14:43:20 +0200


Hi all,

I just got back from this year's ICMC where I saw Rick's demo of  
Grace and SAL. I checked out the source this morning and tried to  
build Grace but I ran into a couple of problems.

*** In Buffer.h and Buffer.cpp (TextBuffer class) the keyPressed  
method had the wrong return type. Apparently there were some changes  
made in the latest release of the Juce library. The quoted text is  
from the juce 1.44 changelist.

"- change to the keyPressed() and keyStateChanged() callbacks in  
Component and KeyListener. These used to be void, but they now return  
a bool to indicate whether the key event was needed or not. Any  
existing code you've got will break in the compiler, so just change  
it to return true if the key was used, or false to allow the event to  
be passed up to the next component in the chain. (This change is a  
better architecture than before, and was also needed so that plugins  
can allow unused key events to be passed on to the host application)"

I changed the return types to bool to match those from the Juce library.

*** In Grace.h (GraceApp class) ShinyLookAndFeel is of an unknown type.

"- swapped the look and feel classes around, so that the basic  
LookAndFeel class is now what used to be the "shiny" one. The  
ShinyLookAndFeel class has been removed, and for that old fashioned  
look, I've added an OldSchoolLookAndFeel that you can use if you need  
the original L+F. This means that any custom looks that you were  
using may need to change their base class."

I just changed ShinyLookAndFeel to LookAndFeel. :)

*** In Editor.cpp the function areAnyErrors() was unknown (line 130)

I Couldn't find a reference to this function anywhere so I changed  
this to:
	if (!out)
instead of
	if (out->areAnyErrors())

This is probably not a nice solution but after these changed scons  
was able to build grace.

*** Starting lisp

 >>> System file grace.asd cannot be found under the Lisp systems  
directory /Users/Vincent/Desktop/grace/build/Grace.app/Contents/ 
Resources/grace/grace.asd.
Use Console>Lisp>Configure Lisp... to configure the Lisp session.

So I told grace to look for the file here:
/Users/Vincent/Desktop/grace/src
But then it looks for grace.asd here:
/Users/Vincent/Desktop/grace/src/grace/grace.asd
So I made a directory called grace with grace.asd in it but pointing  
to only the grace.asd wasn't enough off course. It took me some time  
to figure out all the lisp files had to be in the same directory.

*** Help file

 >>> Help file /Users/Vincent/Desktop/grace/build/Grace.app/Contents/ 
Resources/doc/sal/tutorials/hello.sal does not exist.

Copying the doc directory to Grace.app fixed this.

Grace is up and running!

Maybe this is of use to someone.

Regards,

Vincent Akkermans

P.S. Rick, thanks again for taking some time last week. :)