From: Yvon T. <yvo...@gm...> - 2008-06-24 11:58:51
|
i've added manually the AddressBook framework in /path/to/My.app/Contents/Frameworks AFTER standalonification giving this rb_main.rb : ################################################################################ # standaloneify.rb patch ################################################################################ # Remove all entries that aren't in the application bundle COCOA_APP_RESOURCES_DIR = File.dirname(__FILE__) $LOAD_PATH.reject! { |d| d.index(File.dirname(COCOA_APP_RESOURCES_DIR))!=0 } $LOAD_PATH << File.join(COCOA_APP_RESOURCES_DIR,"ThirdParty") $LOAD_PATH << File.join(File.dirname(COCOA_APP_RESOURCES_DIR),"lib") $LOADED_FEATURES << "rubycocoa.bundle" ENV['GEM_HOME'] = ENV['GEM_PATH'] = File.join(COCOA_APP_RESOURCES_DIR,"RubyGems") ################################################################################ # # rb_main.rb # AB2Html # # Created by Yvon Thoraval on 29/01/08. # Copyright (c) 2008 yTho. All rights reserved. # require 'osx/cocoa' OSX.require_framework 'AddressBook' def rb_main_init path = OSX::NSBundle.mainBundle.resourcePath.fileSystemRepresentation rbfiles = Dir.entries(path).select {|x| /\.rb\z/ =~ x} rbfiles -= [ File.basename(__FILE__) ] rbfiles.each do |path| require( File.basename(path) ) end end if $0 == __FILE__ then rb_main_init OSX.NSApplicationMain(0, nil) end and i've an error reported by a user showing the AB framework isn't loaded. (he is running MacOS X 10.4.11 as me) the standalonify.rb version i have is : # $Id: /local/dcs/trunk/prog/gps/gpsrb/standaloneify.rb 1759 2006-03-03T12:37:58.626843Z jon $ is it outdated ? -- yvon |