richkilmer / hotcocoa

MacRuby HotCocoa UI library
166 stars 16 forks source link

Embedding MacRuby without the standard library #7

Open isaac opened 14 years ago

isaac commented 14 years ago

Hey Guys,

In my latest app this is how I packaged HotCocoa without the standard library: http://isaac.kearse.co.nz/2010/02/01/packaging-hotcocoa/

I'm more than happy to patch HotCocoa to support this but not quite sure how to go about it, or even if its a good idea.

In particular I don't think "macrake embed" is a very intuitive way to support this option, but its the best I could come up. "macrake deploy" & "macrake deploy:nostdlib" would be one option, or we could just stick with "macrake deploy" and specify whether to include the stdlib in config/build.yml. Actually now that I think about it I like the idea of adding this to the config, what does everyone else think?

Cheers, Isaac

isaac commented 14 years ago

http://github.com/isaac/hotcocoa/commit/3c3db96fa8b9228c2ef7b65a65122ff0a53142dc

This commit adds a new config variable called "stdlib" which is true by default and decides whether the ruby standard library is bundled or not. I have also switched to using macruby_deploy to embed MacRuby into the app and copied HotCocoa into the resources_root so that it is in the load path.

Here is an example app that uses this new variable: http://github.com/isaac/SafariRSS

Cheers, Isaac