Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-29 Thread Laurent Sansonetti
Dr Nic, FYI, if you use trunk, there is an Xcode target that calls install_name_tool for you. You still have to hack your rb_main.rb file to change $LOAD_PATH, though. In the case of a HotCocoa application, everything is done for you once you do "macrake deploy". Laurent On Jan 25, 2009,

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-25 Thread Dr Nic Williams
Yeah that does seem a lot simpler... :) On Fri, Jan 23, 2009 at 10:55 PM, Eloy Duran wrote: > Hey Nic, > > Wouldn't something like this be sufficient: > > $LOAD_PATH.unshift File.join(OSX::NSBundle.mainBundle.privateFrameworksPath, > 'MacRuby.framework/Versions/Current/usr/lib/ruby/1.9.0') > > El

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-24 Thread Dömötör Gulyás
Well, the install_name_tool only fixes the dynamic linking, so I presume the macruby search paths in the framework need to be changed as well. I am not using hotcocoa, so I haven't run into that particular issue. 2009/1/23 Dr Nic Williams : > Thanks for the new idea; though I'm getting an error if

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Eloy Duran
Hey Nic, Wouldn't something like this be sufficient: $LOAD_PATH.unshift File.join(OSX::NSBundle.mainBundle.privateFrameworksPath, 'MacRuby.framework/Versions/Current/usr/lib/ruby/1.9.0') Eloy On Jan 23, 2009, at 12:04 PM, Dr Nic Williams wrote: To fix up the $LOAD_PATH, I added the foll

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Matt Mower
On Fri, Jan 23, 2009 at 10:39 AM, Dr Nic Williams wrote: > Matt, can you create a fork of the macruby github repo with these > patches applied? Or do you have one already? > I am no longer using MacRuby so I don't have such a fork. But I imagine it would be easy for you to do and just pull in my

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Dr Nic Williams
To fix up the $LOAD_PATH, I added the following to my rb_main.rb before "require 'hotcocoa'": local_path = $LOAD_PATH.find {|path| path =~ /CommitChat.app/} base_local_path = local_path.match(%r{.*CommitChat.app/Contents/})[0] library_paths = $LOAD_PATH.select {|path| path =~ %r{/Library/Framewor

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Dr Nic Williams
Matt, can you create a fork of the macruby github repo with these patches applied? Or do you have one already? Cheers Nic On Fri, Jan 23, 2009 at 8:30 PM, Matt Mower wrote: > On Fri, Jan 23, 2009 at 10:21 AM, Eloy Duran wrote: >> Even though a page about RubyCocoa, the steps descried there are

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Matt Mower
On Fri, Jan 23, 2009 at 10:21 AM, Eloy Duran wrote: > Even though a page about RubyCocoa, the steps descried there are pretty > general: > http://rubycocoa.sourceforge.net/EmbedRubyCocoa > > The standaloneify script that's mentioned there might give you insight in > what you > would need to do to

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Eloy Duran
Hey Nic, Even though a page about RubyCocoa, the steps descried there are pretty general: http://rubycocoa.sourceforge.net/EmbedRubyCocoa The standaloneify script that's mentioned there might give you insight in what you would need to do to bundle everything. Cheers, Eloy On 23 jan 2009,

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Dr Nic Williams
Hmm, even though I'm now using the copied dylib, the $LOAD_PATH is still assuming that all the ruby goodies are in /Library/Frameworks/MacRuby.framework : ["/Users/drnic/Documents/ruby/macruby_apps/CommitChat/build/Release/CommitChat.app/Contents/Resources", "test", "/Library/Frameworks/MacRuby.f

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Dr Nic Williams
Thanks for the new idea; though I'm getting an error if I rename/remove /Library/Frameworks/MacRuby.framework on my dev machine: `require': no such file to load -- hotcocoa (LoadError) Here's a screenshot of my Target including the Copy Files + Run Script: http://skitch.com/drnic/bndc5/copy-

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread Dömötör Gulyás
The way I do it is to have a copy frameworks build phase, and a "Run Script" build phase that runs last with the following script (rather, that should all be one line): install_name_tool -change /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/libmacruby.dylib @executable_path/../Framewo

Re: [MacRuby-devel] Distributing apps with MacRuby.framework

2009-01-23 Thread John Shea
Did someone answer this one - and I missed it? I too am interested in what the current way to do this is. Cheers, J On Jan 22, 2009, at 7:31 , Dr Nic Williams wrote: I recently shared a MacRuby app with a friend, with MacRuby.framework included in the .app via a Copy Files target; but the ap