>On Sat, Mar 26, 2005 at 08:43:42PM +0900, kimura wataru wrote:
>> 
>> == Changes from 0.4.0
>> 
>>   * enable bundling RubyCocoa.framework within an application bundle                
>> 
>>     Change a build configration of RubyCocoa.framework project, to 
>>     execute a RubyCocoa application on the environment which is not 
>>     installed RubyCocoa. It allows that RubyCocoa application itself 
>>     bundles with RubyCocoa.framework.
>
>this is terrific news!  what build config has to be changed in order to
>support this?  i've been looking through the distribution and can't find
>it.  i'm assuming it adds a self-contained libruby to the RubyCocoa
>framework bundle (i've been working on hacking this together on my own
>but it was really ugly so far), does it let us also add third-party
>modules that our app depends on?
>
>doug

The changed build config is INSTALL_PATH.

from ChangeLog:
  for bundling within an application bundle, set INSTALL_PATH to
  "@executable_path/../Frameworks".  suggested by Rod Schmidt.


You can package third-party mouldes in your application,
for example:

1. copy libraries into your application

YourApp.app/Contents/Resouces/
                             /rb_main.rb
                             /(your scripts)
                             /redist/(third-party libraries)

2. add LOAD_PATH

in rb_main.rb:

require 'osx/cocoa'

def rb_main_init
  path = OSX::NSBundle.mainBundle.resourcePath.fileSystemRepresentation
  # add LOAD_PATH for libraries packaged into this application
  path_redist = path + '/redist'
  $LOAD_PATH.push path_redist
   :
  snip
   :