diff -ur rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/CHANGELOG rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/CHANGELOG --- rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/CHANGELOG 2007-04-15 21:04:06.000000000 +0200 +++ rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/CHANGELOG 2007-05-29 22:12:10.000000000 +0200 @@ -1,5 +1,14 @@ ---------------------------------------------------------------- +0.5.3 - 29.05.2007 + +* Added a bit of Config::CONFIG magic to make RubyScript2Exe + work with RubyGems >= 0.9.3. + +* Moved the embedded bin directory to the front of $PATH. + +---------------------------------------------------------------- + 0.5.2 - 15.04.2007 * Fixed a bug when using the gem as library. diff -ur rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/ev/ftools.rb rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/ev/ftools.rb --- rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/ev/ftools.rb 2007-04-15 21:31:50.000000000 +0200 +++ rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/ev/ftools.rb 2007-05-30 10:17:12.000000000 +0200 @@ -60,17 +60,22 @@ end end - def self.find(entry=nil, mask=nil) + def self.find(entry=nil, args={}) + mask = args[:mask] || nil + follow_link = args[:follow_link] || true + entry = "." if entry.nil? entry = entry.to_s entry = entry.gsub(/[\/\\]*$/, "") unless entry.nil? mask = /^#{mask}$/i if mask.kind_of?(String) + stat = File.lstat(entry) + stat = File.stat(entry) if follow_link res = [] - if File.directory?(entry) + if stat.directory? pdir = Dir.pwd res += ["%s/" % entry] if mask.nil? or entry =~ mask @@ -81,7 +86,7 @@ begin Dir.open(".") do |dir| dir.each do |e| - res += Dir.find(e, mask).collect{|e| entry+"/"+e} unless [".", ".."].include?(e) + res += Dir.find(e, :mask=>mask, :follow_link=>follow_link).collect{|e| entry+"/"+e} unless [".", ".."].include?(e) end end ensure diff -ur rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/init.rb --- rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/init.rb 2007-04-10 20:06:14.000000000 +0200 +++ rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/init.rb 2007-05-30 10:15:21.000000000 +0200 @@ -13,7 +13,7 @@ require "ev/oldandnewlocation" require "ev/dependencies" require "ev/ftools" -require "rbconfig" +require "rbconfig" # Do not remove! It's required in bootstrap.rb. exit if RUBYSCRIPT2EXE.is_compiling? @@ -182,8 +182,8 @@ copyto(oldlocation(script), appdir2) if File.file?(oldlocation(script)) Dir.copy(oldlocation(script), appdir2) if File.directory?(oldlocation(script)) -copyto(Dir.find(libdir2, /\.(so|o|dll)$/i).collect{|file| ldds(file)}, bindir2) if linux? or darwin? -copyto(Dir.find(libdir2, /\.(so|o|dll)$/i).collect{|file| dlls(file)}, bindir2) if windows? or cygwin? +copyto(Dir.find(libdir2, :mask=>/\.(so|o|dll)$/i).collect{|file| ldds(file)}, bindir2) if linux? or darwin? +copyto(Dir.find(libdir2, :mask=>/\.(so|o|dll)$/i).collect{|file| dlls(file)}, bindir2) if windows? or cygwin? if TK or RUBYSCRIPT2EXE::REQUIRE2LIB_FROM_APP[:tk] if File.file?("#{libdir2}/tk.rb") @@ -245,15 +245,49 @@ f.puts "s = ENV['PATH'].dup" f.puts "$VERBOSE = verbose" f.puts "if Dir.pwd[1..2] == ':/'" - f.puts " s << (';'+bin.gsub(/\\//, '\\\\'))" + f.puts " s.replace(bin.gsub(/\\//, '\\\\')+';'+s)" f.puts "else" - f.puts " s << (':'+bin)" + f.puts " s.replace(bin+':'+s)" f.puts "end" f.puts "ENV['PATH'] = s" f.puts "$:.clear" f.puts "$: << lib" + # I'm not happy with the following code. + # It's just a stupid hack to get rid of /usr/local/**/* + # Should and will be changed in the future. + # For now it's necessary to make it work again with RubyGems >= 0.9.3. + + f.puts "require 'rbconfig'" + + f.puts "Config::CONFIG['archdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8/i686-linux + f.puts "Config::CONFIG['bindir'] = dir + '/bin'" # /usr/local/bin + f.puts "Config::CONFIG['datadir'] = dir + '/share'" # /usr/local/share + f.puts "Config::CONFIG['datarootdir'] = dir + '/share'" # /usr/local/share + f.puts "Config::CONFIG['docdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE) + f.puts "Config::CONFIG['dvidir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE) + f.puts "Config::CONFIG['exec_prefix'] = dir + ''" # /usr/local + f.puts "Config::CONFIG['htmldir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE) + f.puts "Config::CONFIG['includedir'] = dir + '/include'" # /usr/local/include + f.puts "Config::CONFIG['infodir'] = dir + '/share/info'" # /usr/local/share/info + f.puts "Config::CONFIG['libdir'] = dir + '/lib'" # /usr/local/lib + f.puts "Config::CONFIG['libexecdir'] = dir + '/libexec'" # /usr/local/libexec + f.puts "Config::CONFIG['localedir'] = dir + '/share/locale'" # /usr/local/share/locale + f.puts "Config::CONFIG['localstatedir'] = dir + '/var'" # /usr/local/var + f.puts "Config::CONFIG['mandir'] = dir + '/share/man'" # /usr/local/share/man + f.puts "Config::CONFIG['pdfdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE) + f.puts "Config::CONFIG['prefix'] = dir + ''" # /usr/local + f.puts "Config::CONFIG['psdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE) + f.puts "Config::CONFIG['rubylibdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8 + f.puts "Config::CONFIG['sbindir'] = dir + '/sbin'" # /usr/local/sbin + f.puts "Config::CONFIG['sharedstatedir'] = dir + '/com'" # /usr/local/com + f.puts "Config::CONFIG['sitearchdir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby/1.8/i686-linux + f.puts "Config::CONFIG['sitedir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby + f.puts "Config::CONFIG['sitelibdir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby/1.8 + f.puts "Config::CONFIG['sysconfdir'] = dir + '/etc'" # /usr/local/etc + f.puts "Config::CONFIG['topdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8/i686-linux + f.puts "# Load eee.info" f.puts "eeedir = File.dirname(__FILE__)" diff -ur rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/rubyscript2exe.rb rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/rubyscript2exe.rb --- rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/rubyscript2exe.rb 2007-04-15 21:31:50.000000000 +0200 +++ rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/rubyscript2exe.rb 2007-05-30 10:17:12.000000000 +0200 @@ -90,11 +90,11 @@ s = ENV["PATH"].dup $VERBOSE = verbose if Dir.pwd[1..2] == ":/" - s << (";"+appdir.gsub(/\//, "\\")) - s << (";"+appdir("bin").gsub(/\//, "\\")) + s.replace(appdir.gsub(/\//, "\\")+";"+s) + s.replace(appdir("bin").gsub(/\//, "\\")+";"+s) else - s << (":"+appdir) - s << (":"+appdir("bin")) + s.replace(appdir+":"+s) + s.replace(appdir("bin")+":"+s) end ENV["PATH"] = s diff -ur rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/VERSION rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/VERSION --- rubyscript2exe-0.5.2.tar.gz/rubyscript2exe/VERSION 2007-04-15 21:31:49.000000000 +0200 +++ rubyscript2exe-0.5.3.tar.gz/rubyscript2exe/VERSION 2007-05-30 10:17:11.000000000 +0200 @@ -1 +1 @@ -0.5.2 +0.5.3