diff -ur rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/CHANGELOG rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/CHANGELOG --- rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/CHANGELOG 2006-07-29 20:27:05.000000000 +0200 +++ rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/CHANGELOG 2006-08-06 19:32:36.000000000 +0200 @@ -1,5 +1,25 @@ ---------------------------------------------------------------- +0.5.1 - 06.08.2006 + +* Fixed a bug when using the big rubyscript2exe.rb (the RBA) as + library. + +* Fixed a bug in RUBYSCRIPT2EXE.appdir. Added + RUBYSCRIPT2EXE.userdir. + +* Added RUBYSCRIPT2EXE.rubyw=. + +* Added RUBYSCRIPT2EXE.strip=. + +* Added RUBYSCRIPT2EXE.appdir and RUBYSCRIPT2EXE.appdir("bin") + to ENV["PATH"]. + +* Added RUBYSCRIPT2EXE.appdir and RUBYSCRIPT2EXE.appdir("lib") + to $:. + +---------------------------------------------------------------- + 0.5.0 - 29.07.2006 * Added support for directories. diff -ur rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/init.rb --- rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/init.rb 2006-07-29 18:39:59.000000000 +0200 +++ rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/init.rb 2006-08-06 18:40:35.000000000 +0200 @@ -1,9 +1,16 @@ +$: << File.dirname(File.expand_path(__FILE__)) + $".delete "rubyscript2exe.rb" -require "rubyscript2exe" -if __FILE__ == $0 +if defined?(oldlocation) + oldlocation do + require "rubyscript2exe" + end +else + require "rubyscript2exe" +end -$: << File.dirname(File.expand_path(__FILE__)) +if __FILE__ == $0 required = $" required = required.reject{|a| File.dirname(a) == ALLINONERUBY::TEMPDIR} if defined?(ALLINONERUBY::TEMPDIR) @@ -53,7 +60,8 @@ RUBY = ARGV.include?("--rubyscript2exe-ruby") RUBYW = ARGV.include?("--rubyscript2exe-rubyw") -STRIP = (not ARGV.include?("--rubyscript2exe-nostrip")) +NOSTRIP = ARGV.include?("--rubyscript2exe-nostrip") +STRACE = ARGV.include?("--rubyscript2exe-strace") TK = ARGV.include?("--rubyscript2exe-tk") VERBOSE = ARGV.include?("--rubyscript2exe-verbose") QUIET = (ARGV.include?("--rubyscript2exe-quiet") and not VERBOSE) @@ -80,11 +88,6 @@ exit 1 end -rubyw = false -rubyw = true if script =~ /\.rbw$/ -rubyw = false if RUBY -rubyw = true if RUBYW - bindir1 = Config::CONFIG["bindir"] libdir1 = Config::CONFIG["libdir"] bindir2 = tmplocation("bin/") @@ -138,6 +141,12 @@ Dir.mkdir(libdir2) unless File.directory?(libdir2) Dir.mkdir(appdir2) unless File.directory?(appdir2) +rubyw = false +rubyw = true if script =~ /\.rbw$/ +rubyw = true if RUBYSCRIPT2EXE::RUBYW +rubyw = false if RUBY +rubyw = true if RUBYW + if linux? or darwin? rubyexe = "#{bindir1}/ruby" else @@ -178,7 +187,7 @@ end end -if STRIP and (linux? or darwin?) +if not NOSTRIP and RUBYSCRIPT2EXE::STRIP and (linux? or darwin?) $stderr.puts "Stripping..." unless QUIET system("cd #{bindir2} ; strip --strip-all * 2> /dev/null") @@ -198,21 +207,26 @@ appexe = "#{app}_linux" if linux? appexe = "#{app}_darwin" if darwin? appico = "#{app}.ico" +strace = "" +strace = "strace" if STRACE $stderr.puts "Creating #{appexe} ..." unless QUIET File.open(tmplocation("bootstrap.rb"), "w") do |f| f.puts "# Set up the environment" + f.puts "# Define some RUBYSCRIPT2EXE constants" + f.puts "module RUBYSCRIPT2EXE" + f.puts " RUBYEXE = '#{rubyexe}'" + f.puts " COMPILED = true" + f.puts " USERDIR = Dir.pwd" f.puts "end" f.puts "dir = File.expand_path(File.dirname(__FILE__))" f.puts "dir.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if dir =~ /^.:/" if cygwin? f.puts "bin = dir + '/bin'" f.puts "lib = dir + '/lib'" - f.puts "appbin = dir + '/app/bin'" - f.puts "applib = dir + '/app/lib'" f.puts "verbose = $VERBOSE" f.puts "$VERBOSE = nil" @@ -227,7 +241,6 @@ f.puts "$:.clear" f.puts "$: << lib" - f.puts "$: << applib" f.puts "# Load eee.info" @@ -251,7 +264,7 @@ f.puts " ARGV.concat(RUBYSCRIPT2EXE::PARMSLIST.split(/\000/))" f.puts "end" - f.puts "# Set the RubyGems environment." + f.puts "# Set the RubyGems environment" if RUBYSCRIPT2EXE::RUBYGEMS f.puts "ENV.keys.each do |key|" @@ -261,11 +274,6 @@ f.puts "require 'rubygems'" end - f.puts "module RUBYSCRIPT2EXE" - f.puts " RUBYEXE = '#{rubyexe}'" - f.puts " COMPILED = true" - f.puts "end" - f.puts "# Start the application" f.puts "load($0 = ARGV.shift)" @@ -287,7 +295,7 @@ # ??? nog iets met app/bin? if linux? - f.puts "c PATH=%tempdir%/bin:$PATH ; export LD_LIBRARY_PATH=%tempdir%/bin:$LD_LIBRARY_PATH ; chmod +x %tempdir%/bin/* ; %tempdir%/bin/#{rubyexe} -r %tempdir%/bootstrap.rb -T1 %tempdir%/empty.rb %tempdir%/app/#{apprb}" + f.puts "c PATH=%tempdir%/bin:$PATH ; export LD_LIBRARY_PATH=%tempdir%/bin:$LD_LIBRARY_PATH ; chmod +x %tempdir%/bin/* ; #{strace} %tempdir%/bin/#{rubyexe} -r %tempdir%/bootstrap.rb -T1 %tempdir%/empty.rb %tempdir%/app/#{apprb}" elsif darwin? f.puts "c PATH=%tempdir%/bin:$PATH ; export DYLD_LIBRARY_PATH=%tempdir%/bin:$DYLD_LIBRARY_PATH ; chmod +x %tempdir%/bin/* ; %tempdir%/bin/#{rubyexe} -r %tempdir%/bootstrap.rb -T1 %tempdir%/empty.rb %tempdir%/app/#{apprb}" elsif cygwin? diff -ur rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/rubyscript2exe.rb rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/rubyscript2exe.rb --- rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/rubyscript2exe.rb 2006-07-29 20:28:11.000000000 +0200 +++ rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/rubyscript2exe.rb 2006-08-06 19:33:04.000000000 +0200 @@ -4,6 +4,10 @@ @@lib = [] @@tempdir = nil @@tk = false + @@rubyw = false + @@strip = true + + USERDIR = (defined?(oldlocation) ? oldlocation : Dir.pwd) unless defined?(self.const_defined?(USERDIR)) def self.dlls ; @@dlls ; end def self.dlls=(a) ; @@dlls = a ; end @@ -20,10 +24,26 @@ def self.tk ; @@tk ; end def self.tk=(b) ; @@tk = b ; end + def self.rubyw ; @@rubyw ; end + def self.rubyw=(b) ; @@rubyw = b ; end + + def self.strip ; @@strip ; end + def self.strip=(b) ; @@strip = b ; end + def self.appdir(file=nil, &block) - dir = File.dirname(File.expand_path($0)) - dir = File.expand_path(File.join(TEMPDIR, "app")) if not defined?(TAR2RUBYSCRIPT) and is_compiled? and defined?(TEMPDIR) + dir = File.dirname(File.expand_path($0, USERDIR)) + dir = File.expand_path(File.join(TEMPDIR, "app")) if is_compiled? and defined?(TEMPDIR) + + _use_given_dir(dir, file, &block) + end + + def self.userdir(file=nil, &block) + dir = USERDIR + _use_given_dir(USERDIR, file, &block) + end + + def self._use_given_dir(dir, file, &block) if block pdir = Dir.pwd @@ -36,6 +56,9 @@ res end + class << self + private :_use_given_dir + end def self.is_compiling? defined?(REQUIRE2LIB) @@ -44,4 +67,20 @@ def self.is_compiled? defined?(COMPILED) end + + verbose = $VERBOSE + $VERBOSE = nil + s = ENV["PATH"].dup + $VERBOSE = verbose + if Dir.pwd[1..2] == ":/" + s << (";"+appdir.gsub(/\//, "\\")) + s << (";"+appdir("bin").gsub(/\//, "\\")) + else + s << (":"+appdir) + s << (":"+appdir("bin")) + end + ENV["PATH"] = s + + $: << appdir + $: << appdir("lib") end diff -ur rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/VERSION rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/VERSION --- rubyscript2exe-0.5.0.tar.gz/rubyscript2exe/VERSION 2006-07-29 20:28:11.000000000 +0200 +++ rubyscript2exe-0.5.1.tar.gz/rubyscript2exe/VERSION 2006-08-06 19:33:04.000000000 +0200 @@ -1 +1 @@ -0.5.0 +0.5.1