[MacRuby-devel] [MacRuby] #174: Allow embedding of arbitrary versions of MacRuby

Laurent Sansonetti lsansonetti at apple.com
Tue Dec 9 11:32:19 PST 2008


On Dec 9, 2008, at 7:18 AM, Matt Mower wrote:

> On Mon, Dec 8, 2008 at 10:51 AM, MacRuby <ruby- 
> noreply at macosforge.org> wrote:
>> Replying to [comment:7 lsansonetti@…]:
>>> Did you verify with {{{otool(1)}}} that your binary links against  
>>> the
>> version of MacRuby inside the bundle?
>>>
>>
>
> As far as I understand it there are two issues:
>
> 1) broken BS metadata
> 2) where does MacRuby get looked for
>
> As of a couple of (MacRuby) builds ago I had no problem with either. I
> had a run script phase in my existing target (using Laurents script)
> to embed the right metadata.
>
> I note that Laurent created an Xcode target for MacRuby but it doesn't
> fit into my build workflow and, therefore, I don't want to use it.

Okay.

> I would like the BUILD_AS_EMBEDDABLE option back and to be able to
> manage MacRuby.framework myself as I would any other framework.

If you want to manage this by yourself check out the following snippet  
that I pasted in the trac report 6 days ago.

Build the version of MacRuby of your choice (can be any version):

$ rake
$ DESTDIR=/tmp/foo rake install

Then embed it in your app:

$ mkdir -p /path/to/MyApp.app/Contents/Frameworks
$ cp -r /tmp/foo/Library/Frameworks/MacRuby.framework /path/to/ 
MyApp.app/Contents/Frameworks
$ macruby -r hotcocoa/application_builder -e  
"HotCocoa::ApplicationBuilder.deploy(ARGV[0])" /path/to/MyApp.app

This will basically do 3 things:

1) copy the version of MacRuby.framework that you built inside your app
2) change the install name of your app so that it links against the  
version of MacRuby inside it
3) copy the missing bridgesupport dylib files

BUILD_AS_EMBEDDABLE did nothing more than building the framework as  
relocatable, which is _exactly_ what the hotcocoa/application_builder  
does. So there is really no need for it. Please look at the source  
code if you don't believe me. If you find a bug please tell me.

If really you cannot live with BUILD_AS_EMBEDDABLE (for a reason I  
ignore) you're still free to add it in your personal repository copy.

Laurent


More information about the MacRuby-devel mailing list