Hi Geoffrey,

On Jun 28, 2010, at 11:43 AM, Geoffrey Grosenbach wrote:

> Can I get a clarification on what the Compilation build step does?
> 
> GOAL: Compile a MacRuby app and remove unnecessary Ruby files in order
> to achieve the smallest app size possible.
> 
> I have a MacRuby 0.6 application built with Xcode. I'm building it
> with the Compile option so I get .rbo files in my app bundle. I also
> deleted all the /usr/lib/ruby Ruby files in the built app in order to
> reduce the final size of the app (25 MB saved):
> 
>    https://gist.github.com/6af67e1927969b9a47c1

This looks good, although you can also pass --no_stdlib to macruby_deploy to 
achieve the same effect (no need to add another target) :)

> My app uses Ruby's File and Dir classes, but everything else is Cocoa.
> 
> Surprisingly, it works on several different machines, even without
> MacRuby 0.6 installed.
> 
> Do I understand correctly that the code of those files is compiled
> into the .rbo files in my app? Or is it getting File and Dir from my
> MRI Ruby installation?

It's because File and Dir are core / builtin classes (like Array and String), 
they are part of libmacruby.dylib which is still in your .app bundle. You 
deleted the standard library.

HTH,
Laurent
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to