[macruby-changes] [4043] MacRuby/trunk/bin/ruby_deploy

source_changes at macosforge.org source_changes at macosforge.org
Fri May 7 14:53:58 PDT 2010


Revision: 4043
          http://trac.macosforge.org/projects/ruby/changeset/4043
Author:   martinlagardette at apple.com
Date:     2010-05-07 14:53:56 -0700 (Fri, 07 May 2010)
Log Message:
-----------
Don't forget deploy :-)

Modified Paths:
--------------
    MacRuby/trunk/bin/ruby_deploy

Modified: MacRuby/trunk/bin/ruby_deploy
===================================================================
--- MacRuby/trunk/bin/ruby_deploy	2010-05-07 21:22:18 UTC (rev 4042)
+++ MacRuby/trunk/bin/ruby_deploy	2010-05-07 21:53:56 UTC (rev 4043)
@@ -43,6 +43,7 @@
     # Locate the MacRuby framework.
     @macruby_framework_path = Config::CONFIG['libdir'].scan(/^.+MacRuby\.framework/)[0]
     ensure_path @macruby_framework_path, "Cannot locate MacRuby.framework from rbconfig.rb"
+    @macruby_install_version = RbConfig::CONFIG["INSTALL_VERSION"]
   end
 
   def run
@@ -75,11 +76,11 @@
   end
 
   def app_macruby_usr
-    File.join(app_macruby, 'Versions', MACRUBY_VERSION, 'usr')
+    File.join(app_macruby, 'Versions', @macruby_install_version, 'usr')
   end
 
   def macruby_usr
-    @macruby_usr ||= ensure_path(File.join(@macruby_framework_path, 'Versions', MACRUBY_VERSION, 'usr'))
+    @macruby_usr ||= ensure_path(File.join(@macruby_framework_path, 'Versions', @macruby_install_version, 'usr'))
   end
 
   def compile_files
@@ -130,7 +131,7 @@
     # Only keep the Current version of the MacRuby.framework copy.
     Dir.glob(File.join(app_macruby, 'Versions/*')).select { |x|
       base = File.basename(x)
-      base != MACRUBY_VERSION and base != 'Current'
+      base != @macruby_install_version and base != 'Current'
     }.each { |x|
       rm_rf(x)
     }
@@ -146,7 +147,7 @@
                 File.join(@app_bundle, 'Contents/Resources/*.rbo')]
     patterns.each do |pat|
       Dir.glob(pat).each do |bin|
-        execute("#{@install_name_tool} -change #{macruby_usr}/lib/libmacruby.dylib @executable_path/../Frameworks/MacRuby.framework/Versions/#{MACRUBY_VERSION}/usr/lib/libmacruby.dylib '#{bin}'")
+        execute("#{@install_name_tool} -change #{macruby_usr}/lib/libmacruby.dylib @executable_path/../Frameworks/MacRuby.framework/Versions/#{@macruby_install_version}/usr/lib/libmacruby.dylib '#{bin}'")
       end
     end
   end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100507/14382d02/attachment.html>


More information about the macruby-changes mailing list