On Tue, Sep 14, 2010 at 11:51 AM, Matt Sergeant <matt@...> wrote:
> On Tue, 14 Sep 2010, Sherm Pendley wrote:
>> The framework isn't bundled with the app, so it only works if you have
>> a "shared" framework in /Library/Frameworks. Otool -L shows your app
>> is linked to the @executable_path/.. framework though, which leads me
>> to think this may have been an oversight. I've done that *many* times
>> myself when switching frameworks, forgetting to add the new one to my
>> Xcode project's "copy files" build phase.
> OK... so I need to "Add Existing Files" and add in
> /Developer/Camelbones/Frameworks/Camelbones.framework in?
It should already be there - I looked with "otool -L" on your app's
binary, and that's the one your app is linking to. If you expand the
disclosure triangle on the target in Xcode, you'll see a number of
build phases - "compile sources," "copy resources," "link with
libraries," etc. If you started with the project in your Subversion,
there's already a "copy files" build phase there too, at the very end.
All you need to do is drag the CamelBones.framework from the
Frameworks group in Xcode, to that build phase.
It would be handy if Xcode would automagically copy any frameworks
that have an install name that begins with "@executable_path/.." or
similar, but alas, it doesn't. :-(
>> Also, PAR.pm and its prerequisites are included in the framework once
>> again. My apologies for the bogus advice about that - the fact that
>> they were missing was my bug, not yours. :-(
> Oh ok... so just remove that? But it still failed to work before I added
> that in... - thoughts?
The OS, when it fails to find CamelBones.framework in the .app bundle,
falls back to using the "shared" framework in /Library/Frameworks, and
that one doesn't bundle the PAR.pm module as a resource. I didn't want
to install it in /Library/Perl, to avoid conflicts with any
user-installed modules, and didn't want to bundle it into
/Library/Frameworks/CamelBones.framework, since PAR and the .par
bundles are all just ordinary CPAN modules that are usable from any
So, if you're using the shared
/Library/Frameworks/CamelBones.framework (which the OS will "fall
back" to if it can't find the embedded copy), or if you're writing a
standalone (Cocoa or not) Perl script, you can use the PAR module (and
use lib '/Developer/CamelBones/Perl/PAR';
use PAR qw(/Developer/CamelBones/Perl/*.par);
That's the general gist of it anyway - I'm headed out of the house for
right now, but I'm writing up a more extensive description of what
modules are included in the .par bundles, and how to use them from
both .apps and .pl scripts.
Cocoa programming in Perl: