diff -ur allinoneruby-none.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.1.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-none.tar.gz/allinoneruby/ev/dependencies.rb 2007-04-15 21:43:54.000000000 +0200
+++ allinoneruby-0.1.tar.gz/allinoneruby/ev/dependencies.rb 2004-07-30 18:00:17.000000000 +0200
@@ -0,0 +1,32 @@
+def dlls(file, notthedefaults=true)
+
+ # Only the dependencies in the same directory as the executable.
+
+ todo = []
+ res = []
+
+ todo << File.expand_path(file)
+
+ while todo.length > 0
+ todo2 = todo
+ todo = []
+
+ todo2.each do |file|
+ File.open(file, "rb") do |f|
+ strings = f.read.scan(/[\w\-\.]+/) # Hack ???
+ strings.delete_if{|s| s !~ /\.dll$/i}
+
+ strings.each do |lib|
+ lib = File.expand_path(lib, File.dirname(file))
+
+ if not lib.nil? and File.file?(lib) and not res.include?(lib)
+ todo << lib
+ res << lib
+ end
+ end
+ end
+ end
+ end
+
+ res
+end
diff -ur allinoneruby-none.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.1.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-none.tar.gz/allinoneruby/ev/ftools.rb 2007-04-15 21:43:54.000000000 +0200
+++ allinoneruby-0.1.tar.gz/allinoneruby/ev/ftools.rb 2004-07-30 18:00:17.000000000 +0200
@@ -0,0 +1,115 @@
+require "ftools"
+
+class Dir
+ def self.mkdirrec(dir)
+ pdir = File.dirname(dir)
+
+ if not pdir.empty? and not FileTest.directory?(pdir)
+ mkdirrec (pdir)
+ end
+
+ Dir.mkdir(dir) rescue nil
+ end
+
+ def self.copy(from, to)
+ if FileTest.file?(from)
+ todir = File.dirname(File.expand_path(to))
+
+ mkdirrec(todir)
+
+ File.copy(from, to)
+ end
+
+ if FileTest.directory?(from)
+ pdir = Dir.pwd
+ todir = File.expand_path(to)
+
+ mkdirrec(todir)
+
+ Dir.chdir(from)
+ Dir.new(".").each do |e|
+ copy(e, todir+"/"+e) if not [".", ".."].include?(e)
+ end
+ Dir.chdir(pdir)
+ end
+ end
+
+ def self.move(from, to)
+ copy(from, to)
+ rm_rf(from)
+ end
+
+ def self.rm_rf(entry)
+ if FileTest.file?(entry)
+ File.delete(entry)
+ end
+
+ if FileTest.directory?(entry)
+ pdir = Dir.pwd
+
+ Dir.chdir(entry)
+ Dir.new(".").each do |e|
+ rm_rf(e) if not [".", ".."].include?(e)
+ end
+ Dir.chdir(pdir)
+
+ Dir.rmdir(entry)
+ end
+ end
+end
+
+class File
+ def self.rollbackup(file, mode=nil)
+ backupfile = file + ".RB.BACKUP"
+ controlfile = file + ".RB.CONTROL"
+
+ File.touch(file) unless File.file?(file)
+
+ # Rollback
+
+ if File.file?(backupfile) and File.file?(controlfile)
+ $stdout.puts "Restoring #{file}..."
+
+ File.copy(backupfile, file) # Rollback from phase 3
+ end
+
+ # Reset
+
+ File.delete(backupfile) if File.file?(backupfile) # Reset from phase 2 or 3
+ File.delete(controlfile) if File.file?(controlfile) # Reset from phase 3 or 4
+
+ # Backup
+
+ File.copy(file, backupfile) # Enter phase 2
+ File.touch(controlfile) # Enter phase 3
+
+ # The real thing
+
+ if block_given?
+ if mode.nil?
+ yield
+ else
+ File.open(file, mode) do |f|
+ yield(f)
+ end
+ end
+ end
+
+ # Cleanup
+
+ File.delete(backupfile) # Enter phase 4
+ File.delete(controlfile) # Enter phase 5
+
+ # Return, like File.open
+
+ if block_given?
+ return nil
+ else
+ return File.open(file, (mode or "r"))
+ end
+ end
+
+ def self.touch(file)
+ File.open(file, "a"){|f|}
+ end
+end
diff -ur allinoneruby-none.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-none.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2007-04-15 21:43:54.000000000 +0200
+++ allinoneruby-0.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2004-07-30 18:00:17.000000000 +0200
@@ -0,0 +1,44 @@
+ENV["OLDDIR"] = Dir.pwd if not ENV.include?("OLDDIR")
+ENV["NEWDIR"] = Dir.pwd if not ENV.include?("NEWDIR")
+
+begin
+ oldlocation
+rescue NameError
+ def oldlocation(file="")
+ dir = ENV["OLDDIR"]
+ res = nil
+
+ if block_given?
+ pdir = Dir.pwd
+
+ Dir.chdir(dir)
+ res = yield
+ Dir.chdir(pdir)
+ else
+ res = File.expand_path(file, dir) if not file.nil?
+ end
+
+ res
+ end
+end
+
+begin
+ newlocation
+rescue NameError
+ def newlocation(file="")
+ dir = ENV["NEWDIR"]
+ res = nil
+
+ if block_given?
+ pdir = Dir.pwd
+
+ Dir.chdir(dir)
+ res = yield
+ Dir.chdir(pdir)
+ else
+ res = File.expand_path(file, dir) if not file.nil?
+ end
+
+ res
+ end
+end
diff -ur allinoneruby-none.tar.gz/allinoneruby/init.rb allinoneruby-0.1.tar.gz/allinoneruby/init.rb
--- allinoneruby-none.tar.gz/allinoneruby/init.rb 2007-04-15 21:43:54.000000000 +0200
+++ allinoneruby-0.1.tar.gz/allinoneruby/init.rb 2004-07-30 17:05:27.000000000 +0200
@@ -0,0 +1,77 @@
+require "ev/oldandnewlocation"
+require "ev/dependencies"
+require "ev/ftools"
+require "rbconfig"
+
+exit if ARGV.include?("--exit")
+
+def backslashes(s)
+ s = s.gsub(/^\.\//, "").gsub(/\//, "\\\\") if windows?
+ s
+end
+
+def windows?
+ not (target_os.downcase =~ /32/).nil? # Hack ???
+end
+
+def target_os
+ Config::CONFIG["target_os"] or ""
+end
+
+rubyw = false
+rubyw = false if (ARGV.include?("-d") or ARGV.include?("--ruby"))
+rubyw = true if (ARGV.include?("-w") or ARGV.include?("--rubyw"))
+
+ARGV.delete_if{|s| s =~ /^-/}
+
+bindir1 = Config::CONFIG["bindir"]
+libdir1 = Config::CONFIG["libdir"]
+bindir2 = "bin/"
+libdir2 = "lib/"
+exefile = (ARGV.shift or "allinoneruby.exe")
+rubylibdir1 = Config::CONFIG["rubylibdir"]
+
+raise "#{bindir2} already exists." if File.directory?(bindir2)
+raise "#{libdir2} already exists." if File.directory?(libdir2)
+
+Dir.mkdir(bindir2)
+Dir.mkdir(libdir2)
+
+rubyexe = "#{bindir1}/ruby.exe"
+rubywexe = "#{bindir1}/rubyw.exe"
+
+([rubyexe, rubywexe] + dlls(rubyexe)).each do |s1|
+ file = File.basename(s1)
+ s2 = File.expand_path(file, bindir2)
+
+ puts "Copying #{s1} ..."
+ File.copy(s1, s2)
+end
+
+file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
+s1 = rubylibdir1
+s2 = File.expand_path(file, libdir2)
+
+puts "Copying #{s1}/ ..."
+Dir.copy(s1, s2)
+
+puts "Creating #{exefile} ..."
+
+File.open("allinoneruby.eee", "w") do |f|
+ f.puts "r bin"
+ f.puts "r lib"
+
+ rubyexe = "ruby.exe"
+ rubyexe = "rubyw.exe" if rubyw
+
+ f.puts "c %tempdir%/#{bindir2}/#{rubyexe} %quotedparms%"
+end
+
+eeeexe = "eee.exe"
+eeeexe = "eeew.exe" if rubyw
+
+system(backslashes("./eee allinoneruby.eee #{exefile} #{eeeexe}"))
+
+oldlocation do
+ File.copy(newlocation(exefile), exefile)
+end
diff -ur allinoneruby-none.tar.gz/allinoneruby/LICENSE allinoneruby-0.1.tar.gz/allinoneruby/LICENSE
--- allinoneruby-none.tar.gz/allinoneruby/LICENSE 2007-04-15 21:43:54.000000000 +0200
+++ allinoneruby-0.1.tar.gz/allinoneruby/LICENSE 2004-07-27 16:32:13.000000000 +0200
@@ -0,0 +1,15 @@
+# Copyright Erik Veenstra <allinoneruby@erikveen.dds.nl>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330,
+# Boston, MA 02111-1307 USA.
diff -ur allinoneruby-none.tar.gz/allinoneruby/README allinoneruby-0.1.tar.gz/allinoneruby/README
--- allinoneruby-none.tar.gz/allinoneruby/README 2007-04-15 21:43:54.000000000 +0200
+++ allinoneruby-0.1.tar.gz/allinoneruby/README 2004-07-26 23:13:29.000000000 +0200
@@ -0,0 +1,8 @@
+The best way to use AllInOneRuby is the RB, not this TAR.GZ.
+The latter is just for playing with the internals. Both are
+available on the site.
+
+ Usage: ruby init.rb [-d|-w|--ruby|--rubyw]
+
+For more information, see
+http://www.erikveen.dds.nl/allinoneruby/ .
Binary files allinoneruby-none.tar.gz/allinoneruby/eee.exe and allinoneruby-0.1.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-none.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.1.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.1.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.1.1.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-0.1.tar.gz/allinoneruby/ev/dependencies.rb 2004-07-30 18:00:17.000000000 +0200
+++ allinoneruby-0.1.1.tar.gz/allinoneruby/ev/dependencies.rb 2004-08-04 23:58:20.000000000 +0200
@@ -1,4 +1,4 @@
-def dlls(file, notthedefaults=true)
+def dlls(file, path=File.dirname(file))
# Only the dependencies in the same directory as the executable.
@@ -17,7 +17,7 @@
strings.delete_if{|s| s !~ /\.dll$/i}
strings.each do |lib|
- lib = File.expand_path(lib, File.dirname(file))
+ lib = File.expand_path(lib, path)
if not lib.nil? and File.file?(lib) and not res.include?(lib)
todo << lib
diff -ur allinoneruby-0.1.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.1.1.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.1.tar.gz/allinoneruby/ev/ftools.rb 2004-07-30 18:00:17.000000000 +0200
+++ allinoneruby-0.1.1.tar.gz/allinoneruby/ev/ftools.rb 2004-08-04 23:58:20.000000000 +0200
@@ -4,23 +4,15 @@
def self.mkdirrec(dir)
pdir = File.dirname(dir)
- if not pdir.empty? and not FileTest.directory?(pdir)
- mkdirrec (pdir)
+ if not pdir.empty? and not File.directory?(pdir)
+ Dir.mkdirrec(pdir)
end
Dir.mkdir(dir) rescue nil
end
def self.copy(from, to)
- if FileTest.file?(from)
- todir = File.dirname(File.expand_path(to))
-
- mkdirrec(todir)
-
- File.copy(from, to)
- end
-
- if FileTest.directory?(from)
+ if File.directory?(from)
pdir = Dir.pwd
todir = File.expand_path(to)
@@ -28,33 +20,61 @@
Dir.chdir(from)
Dir.new(".").each do |e|
- copy(e, todir+"/"+e) if not [".", ".."].include?(e)
+ Dir.copy(e, todir+"/"+e) if not [".", ".."].include?(e)
end
Dir.chdir(pdir)
+ else
+ todir = File.dirname(File.expand_path(to))
+
+ mkdirrec(todir)
+
+ File.copy(from, to)
end
end
def self.move(from, to)
- copy(from, to)
- rm_rf(from)
+ Dir.copy(from, to)
+ Dir.rm_rf(from)
end
def self.rm_rf(entry)
- if FileTest.file?(entry)
+ if File.ftype(entry) == "directory"
+ pdir = Dir.pwd
+
+ Dir.chdir(entry)
+ Dir.new(".").each do |e|
+ Dir.rm_rf(e) if not [".", ".."].include?(e)
+ end
+ Dir.chdir(pdir)
+
+ Dir.delete(entry)
+ else
File.delete(entry)
end
+ end
+
+ def self.find(entry=nil, mask=nil)
+ entry = @dir if entry.nil?
+
+ entry.gsub!(/[\/\\]*$/, "") unless entry.nil?
+
+ res = []
- if FileTest.directory?(entry)
+ if File.directory?(entry)
pdir = Dir.pwd
+ res += ["%s/" % entry] if mask.nil? or entry =~ mask
+
Dir.chdir(entry)
Dir.new(".").each do |e|
- rm_rf(e) if not [".", ".."].include?(e)
+ res += Dir.find(e, mask).collect{|e| entry+"/"+e} unless [".", ".."].include?(e)
end
Dir.chdir(pdir)
-
- Dir.rmdir(entry)
+ else
+ res += [entry] if mask.nil? or entry =~ mask
end
+
+ res
end
end
@@ -112,4 +132,30 @@
def self.touch(file)
File.open(file, "a"){|f|}
end
+
+ def self.which(file)
+ res = nil
+
+ if windows?
+ file = file.gsub(/\.exe$/i, "") + ".exe"
+ sep = ";"
+ else
+ sep = ":"
+ end
+
+ catch :stop do
+ ENV["PATH"].split(/#{sep}/).reverse.each do |d|
+ if File.directory?(d)
+ Dir.new(d).each do |e|
+ if e.downcase == file.downcase
+ res = File.expand_path(e, d)
+ throw :stop
+ end
+ end
+ end
+ end
+ end
+
+ res
+ end
end
diff -ur allinoneruby-0.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.1.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2004-07-30 18:00:17.000000000 +0200
+++ allinoneruby-0.1.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2004-08-04 23:58:20.000000000 +0200
@@ -1,5 +1,5 @@
-ENV["OLDDIR"] = Dir.pwd if not ENV.include?("OLDDIR")
-ENV["NEWDIR"] = Dir.pwd if not ENV.include?("NEWDIR")
+ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
+ENV["NEWDIR"] = File.dirname($0) unless ENV.include?("NEWDIR")
begin
oldlocation
@@ -15,7 +15,7 @@
res = yield
Dir.chdir(pdir)
else
- res = File.expand_path(file, dir) if not file.nil?
+ res = File.expand_path(file, dir) unless file.nil?
end
res
@@ -36,7 +36,7 @@
res = yield
Dir.chdir(pdir)
else
- res = File.expand_path(file, dir) if not file.nil?
+ res = File.expand_path(file, dir) unless file.nil?
end
res
diff -ur allinoneruby-0.1.tar.gz/allinoneruby/init.rb allinoneruby-0.1.1.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.1.tar.gz/allinoneruby/init.rb 2004-07-30 17:05:27.000000000 +0200
+++ allinoneruby-0.1.1.tar.gz/allinoneruby/init.rb 2004-07-31 02:10:58.000000000 +0200
@@ -55,6 +55,14 @@
puts "Copying #{s1}/ ..."
Dir.copy(s1, s2)
+Dir.find(libdir2, /\.so$/).collect{|file| dlls(file, bindir1)}.flatten.sort.uniq.each do |s1|
+ file = File.basename(s1)
+ s2 = File.expand_path(file, bindir2)
+
+ puts "Copying #{s1} ..."
+ File.copy(s1, s2)
+end
+
puts "Creating #{exefile} ..."
File.open("allinoneruby.eee", "w") do |f|
@@ -73,5 +81,8 @@
system(backslashes("./eee allinoneruby.eee #{exefile} #{eeeexe}"))
oldlocation do
- File.copy(newlocation(exefile), exefile)
+ from = newlocation(exefile)
+ to = oldlocation(exefile)
+
+ File.copy(from, to) unless from == to
end
Binary files allinoneruby-0.1.tar.gz/allinoneruby/eee.exe and allinoneruby-0.1.1.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.1.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.1.1.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.1.1.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.2.0.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-0.1.1.tar.gz/allinoneruby/ev/dependencies.rb 2004-08-04 23:58:20.000000000 +0200
+++ allinoneruby-0.2.0.tar.gz/allinoneruby/ev/dependencies.rb 2004-12-27 13:34:11.000000000 +0100
@@ -1,6 +1,6 @@
def dlls(file, path=File.dirname(file))
- # Only the dependencies in the same directory as the executable.
+ # Only the dependencies in the same directory as the executable or the given directory.
todo = []
res = []
@@ -30,3 +30,44 @@
res
end
+
+def ldds(file, notthedefaults=true)
+
+ # All dependencies.
+
+ todo = []
+ res = []
+ tempfile = "/tmp/ev.dependencies.%d.tmp" % Process.pid
+
+ todo << File.expand_path(file)
+
+ while todo.length > 0
+ todo2 = todo
+ todo = []
+
+ todo2.each do |file|
+ File.copy(file, tempfile) # Libraries on Debian are no executables.
+ File.chmod(0755, tempfile)
+
+ `ldd #{tempfile}`.split(/\r*\n/).collect{|line| line.split(/\s+/)[3]}.each do |lib|
+ if not lib.nil? and File.file?(lib) and not res.include?(lib)
+ todo << lib
+ res << lib
+ end
+ end
+
+ File.delete(tempfile)
+ end
+ end
+
+ # http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/rlibraries.html
+ # http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/IA32/spec/rlibraries.html
+
+ lsb_common = ["libX11.so.6", "libXt.so.6", "libGL.so.1", "libXext.so.6", "libICE.so.6", "libSM.so.6", "libdl.so.2", "libcrypt.so.1", "libz.so.1", "libncurses.so.5", "libutil.so.1", "libpthread.so.0", "libpam.so.0", "libgcc_s.so.1"]
+ lsb_ia32 = ["libm.so.6", "libdl.so.2", "libcrypt.so.1", "libc.so.6", "libpthread.so.0", "ld-lsb.so.1"]
+ lsb = lsb_common + lsb_ia32
+
+ res.delete_if{|s| lsb.include?(File.basename(s))} if notthedefaults
+
+ res
+end
diff -ur allinoneruby-0.1.1.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.2.0.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.1.1.tar.gz/allinoneruby/ev/ftools.rb 2004-08-04 23:58:20.000000000 +0200
+++ allinoneruby-0.2.0.tar.gz/allinoneruby/ev/ftools.rb 2004-12-27 13:34:11.000000000 +0100
@@ -54,9 +54,11 @@
end
def self.find(entry=nil, mask=nil)
- entry = @dir if entry.nil?
+ entry = "." if entry.nil?
- entry.gsub!(/[\/\\]*$/, "") unless entry.nil?
+ entry = entry.gsub!(/[\/\\]*$/, "") unless entry.nil?
+
+ mask = /^#{mask}$/i if mask.kind_of?(String)
res = []
@@ -65,11 +67,19 @@
res += ["%s/" % entry] if mask.nil? or entry =~ mask
- Dir.chdir(entry)
- Dir.new(".").each do |e|
- res += Dir.find(e, mask).collect{|e| entry+"/"+e} unless [".", ".."].include?(e)
+ begin
+ Dir.chdir(entry)
+
+ begin
+ Dir.new(".").each do |e|
+ res += Dir.find(e, mask).collect{|e| entry+"/"+e} unless [".", ".."].include?(e)
+ end
+ ensure
+ Dir.chdir(pdir)
end
- Dir.chdir(pdir)
+ rescue Errno::EACCES => error
+ puts error
+ end
else
res += [entry] if mask.nil? or entry =~ mask
end
@@ -82,6 +92,7 @@
def self.rollbackup(file, mode=nil)
backupfile = file + ".RB.BACKUP"
controlfile = file + ".RB.CONTROL"
+ res = nil
File.touch(file) unless File.file?(file)
@@ -107,10 +118,10 @@
if block_given?
if mode.nil?
- yield
+ res = yield
else
File.open(file, mode) do |f|
- yield(f)
+ res = yield(f)
end
end
end
@@ -122,15 +133,17 @@
# Return, like File.open
- if block_given?
- return nil
- else
- return File.open(file, (mode or "r"))
- end
+ res = File.open(file, (mode or "r")) unless block_given?
+
+ res
end
def self.touch(file)
- File.open(file, "a"){|f|}
+ if File.exists?(file)
+ File.utime(Time.now, File.mtime(file), file)
+ else
+ File.open(file, "a"){|f|}
+ end
end
def self.which(file)
diff -ur allinoneruby-0.1.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.2.0.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.1.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2004-08-04 23:58:20.000000000 +0200
+++ allinoneruby-0.2.0.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2004-12-27 13:34:11.000000000 +0100
@@ -1,5 +1,27 @@
+temp = (ENV["TMPDIR"] or ENV["TMP"] or ENV["TEMP"] or "/tmp").gsub(/\\/, "/")
+dir = "#{temp}/oldandnewlocation.#{Process.pid}"
+
ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
ENV["NEWDIR"] = File.dirname($0) unless ENV.include?("NEWDIR")
+ENV["TEMPDIR"] = dir unless ENV.include?("TEMPDIR")
+
+class Dir
+ def self.rm_rf(entry)
+ if File.ftype(entry) == "directory"
+ pdir = Dir.pwd
+
+ Dir.chdir(entry)
+ Dir.new(".").each do |e|
+ Dir.rm_rf(e) if not [".", ".."].include?(e)
+ end
+ Dir.chdir(pdir)
+
+ Dir.delete(entry)
+ else
+ File.delete(entry)
+ end
+ end
+end
begin
oldlocation
@@ -42,3 +64,37 @@
res
end
end
+
+begin
+ tmplocation
+rescue NameError
+ dir = ENV["TEMPDIR"]
+
+ Dir.rm_rf(dir) if File.directory?(dir)
+ Dir.mkdir(dir)
+
+ at_exit do
+ if File.directory?(dir)
+ Dir.chdir(dir)
+ Dir.chdir("..")
+ Dir.rm_rf(dir)
+ end
+ end
+
+ def tmplocation(file="")
+ dir = ENV["TEMPDIR"]
+ res = nil
+
+ if block_given?
+ pdir = Dir.pwd
+
+ Dir.chdir(dir)
+ res = yield
+ Dir.chdir(pdir)
+ else
+ res = File.expand_path(file, dir) unless file.nil?
+ end
+
+ res
+ end
+end
diff -ur allinoneruby-0.1.1.tar.gz/allinoneruby/init.rb allinoneruby-0.2.0.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.1.1.tar.gz/allinoneruby/init.rb 2004-07-31 02:10:58.000000000 +0200
+++ allinoneruby-0.2.0.tar.gz/allinoneruby/init.rb 2004-12-26 20:09:53.000000000 +0100
@@ -10,8 +10,16 @@
s
end
+def linux?
+ not windows? and not cygwin? # Hack ???
+end
+
def windows?
- not (target_os.downcase =~ /32/).nil? # Hack ???
+ not (target_os.downcase =~ /32/).nil? # Hack ???
+end
+
+def cygwin?
+ not (target_os.downcase =~ /cyg/).nil? # Hack ???
end
def target_os
@@ -21,68 +29,141 @@
rubyw = false
rubyw = false if (ARGV.include?("-d") or ARGV.include?("--ruby"))
rubyw = true if (ARGV.include?("-w") or ARGV.include?("--rubyw"))
+site = false
+site = true if (ARGV.include?("-s") or ARGV.include?("--site"))
ARGV.delete_if{|s| s =~ /^-/}
+exefile = (ARGV.shift or (windows? ? "allinoneruby.exe" : "allinoneruby.bin"))
+
bindir1 = Config::CONFIG["bindir"]
libdir1 = Config::CONFIG["libdir"]
-bindir2 = "bin/"
-libdir2 = "lib/"
-exefile = (ARGV.shift or "allinoneruby.exe")
+bindir2 = tmplocation("bin/")
+libdir2 = tmplocation("lib/")
rubylibdir1 = Config::CONFIG["rubylibdir"]
+sitelibdir1 = Config::CONFIG["sitelibdir"]
-raise "#{bindir2} already exists." if File.directory?(bindir2)
-raise "#{libdir2} already exists." if File.directory?(libdir2)
+Dir.mkdir(bindir2) unless File.directory?(bindir2)
+Dir.mkdir(libdir2) unless File.directory?(libdir2)
-Dir.mkdir(bindir2)
-Dir.mkdir(libdir2)
+if linux?
+ rubyexe = "#{bindir1}/ruby"
+else
+ rubyexe = "#{bindir1}/ruby.exe"
+ rubywexe = "#{bindir1}/rubyw.exe"
+end
-rubyexe = "#{bindir1}/ruby.exe"
-rubywexe = "#{bindir1}/rubyw.exe"
+if linux?
+ tocopy = ldds(rubyexe)
+ tocopy << rubyexe if File.file?(rubyexe)
+else
+ tocopy = dlls(rubyexe)
+ tocopy << rubyexe if File.file?(rubyexe)
+ tocopy << rubywexe if File.file?(rubywexe)
+end
-([rubyexe, rubywexe] + dlls(rubyexe)).each do |s1|
+tocopy.each do |s1|
file = File.basename(s1)
s2 = File.expand_path(file, bindir2)
- puts "Copying #{s1} ..."
- File.copy(s1, s2)
+ $stderr.puts "Copying #{s1} ..."
+ File.copy(s1, s2) unless File.file?(s2)
end
-file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
-s1 = rubylibdir1
-s2 = File.expand_path(file, libdir2)
+begin
+ file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
+ s1 = rubylibdir1
+ s2 = File.expand_path(file, libdir2)
-puts "Copying #{s1}/ ..."
-Dir.copy(s1, s2)
+ $stderr.puts "Copying #{s1}/ ..."
+ Dir.copy(s1, s2) unless File.directory?(s2)
+end
+
+if site
+ file = sitelibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
+ s1 = sitelibdir1
+ s2 = File.expand_path(file, libdir2)
+
+ $stderr.puts "Copying #{s1}/ ..."
+ Dir.copy(s1, s2) unless File.directory?(s2)
+end
+
+if linux?
+ tocopy = Dir.find(libdir2, /\.so$/).collect{|file| ldds(file)}.flatten.sort.uniq
+else
+ tocopy = Dir.find(libdir2, /\.so$/).collect{|file| dlls(file, bindir1)}.flatten.sort.uniq
+end
-Dir.find(libdir2, /\.so$/).collect{|file| dlls(file, bindir1)}.flatten.sort.uniq.each do |s1|
+tocopy.each do |s1|
file = File.basename(s1)
s2 = File.expand_path(file, bindir2)
- puts "Copying #{s1} ..."
- File.copy(s1, s2)
+ $stderr.puts "Copying #{s1} ..."
+ File.copy(s1, s2) unless File.file?(s2)
end
-puts "Creating #{exefile} ..."
+eeeexe = "eee.exe"
+eeeexe = "eeew.exe" if rubyw
+eeeexe = "eee.bin" if linux?
+appexe = exefile
-File.open("allinoneruby.eee", "w") do |f|
- f.puts "r bin"
- f.puts "r lib"
+$stderr.puts "Creating #{appexe} ..."
+
+if linux?
+ File.open(tmplocation("eee.sh"), "w") do |f|
+ f.puts "PDIR=$1;shift"
+ f.puts "DIR=$(pwd)"
+ f.puts "cd $PDIR"
+ f.puts " chmod +x bin/ruby"
+ f.puts " export PATH=$(pwd)/bin:$PATH"
+ f.puts " export LD_LIBRARY_PATH=$(pwd)/bin:LD_LIBRARY_PATH"
+ f.puts "cd $DIR"
+ f.puts "$*"
+ end
+end
+
+File.open(tmplocation("eee.rb"), "w") do |f|
+ f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
+ f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
+ f.puts "$:.clear"
+ $:.each do |s|
+ f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}')
+ end
+end
+File.open(tmplocation("app.eee"), "w") do |f|
rubyexe = "ruby.exe"
rubyexe = "rubyw.exe" if rubyw
+ rubyexe = "ruby" if linux?
- f.puts "c %tempdir%/#{bindir2}/#{rubyexe} %quotedparms%"
+ f.puts "r bin"
+ f.puts "r lib"
+ f.puts "f eee.sh" if linux?
+ f.puts "f eee.rb"
+ if linux?
+ f.puts "c source %tempdir%/eee.sh %tempdir% %tempdir%/bin/#{rubyexe} -r %tempdir%/eee.rb %quotedparms%"
+ elsif cygwin?
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb %quotedparms%"
+ else
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb %quotedparms%"
+ end
end
-eeeexe = "eee.exe"
-eeeexe = "eeew.exe" if rubyw
+from = newlocation(eeeexe)
+to = tmplocation(eeeexe)
-system(backslashes("./eee allinoneruby.eee #{exefile} #{eeeexe}"))
+File.copy(from, to) unless from == to
+File.chmod(0755, to) if linux?
-oldlocation do
- from = newlocation(exefile)
- to = oldlocation(exefile)
+tmplocation do
+ ENV["EEEEXE"] = eeeexe
+ ENV["EEEDIR"] = Dir.pwd
- File.copy(from, to) unless from == to
+ system(backslashes("#{newlocation(linux? ? "eee.bin" : "eee")} app.eee #{appexe}"))
end
+
+from = tmplocation(appexe)
+to = oldlocation(appexe)
+
+File.copy(from, to) unless from == to
+File.chmod(0755, to) if linux?
diff -ur allinoneruby-0.1.1.tar.gz/allinoneruby/README allinoneruby-0.2.0.tar.gz/allinoneruby/README
--- allinoneruby-0.1.1.tar.gz/allinoneruby/README 2004-07-26 23:13:29.000000000 +0200
+++ allinoneruby-0.2.0.tar.gz/allinoneruby/README 2004-12-08 10:21:38.000000000 +0100
@@ -2,7 +2,9 @@
The latter is just for playing with the internals. Both are
available on the site.
- Usage: ruby init.rb [-d|-w|--ruby|--rubyw]
+ Usage: ruby init.rb [-d|-w|--ruby|--rubyw] [-s|--site]
+
+On Linux, there's no difference between ruby and rubyw.
For more information, see
-http://www.erikveen.dds.nl/allinoneruby/ .
+http://www.erikveen.dds.nl/allinoneruby/index.html .
Binary files allinoneruby-0.1.1.tar.gz/allinoneruby/eee.bin and allinoneruby-0.2.0.tar.gz/allinoneruby/eee.bin differ
Binary files allinoneruby-0.1.1.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.0.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.1.1.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.0.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/_/init.rb allinoneruby-0.2.1.tar.gz/allinoneruby/_/init.rb
--- allinoneruby-0.2.0.tar.gz/allinoneruby/_/init.rb 2007-04-15 21:43:59.000000000 +0200
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/_/init.rb 2005-01-29 15:30:10.000000000 +0100
@@ -0,0 +1,198 @@
+$: << File.dirname(File.expand_path(__FILE__))
+
+require "ev/oldandnewlocation"
+require "ev/dependencies"
+require "ev/ftools"
+require "rbconfig"
+
+exit if ARGV.include?("--exit")
+
+def backslashes(s)
+ s = s.gsub(/^\.\//, "").gsub(/\//, "\\\\") if windows?
+ s
+end
+
+def linux?
+ not darwin? and not windows? and not cygwin? # Hack ???
+end
+
+def darwin?
+ not (target_os.downcase =~ /darwin/).nil? # Hack ???
+end
+
+def windows?
+ not (target_os.downcase =~ /32/).nil? # Hack ???
+end
+
+def cygwin?
+ not (target_os.downcase =~ /cyg/).nil? # Hack ???
+end
+
+def target_os
+ Config::CONFIG["target_os"] or ""
+end
+
+rubyw = false
+rubyw = false if (ARGV.include?("-d") or ARGV.include?("--ruby"))
+rubyw = true if (ARGV.include?("-w") or ARGV.include?("--rubyw"))
+site = false
+site = true if (ARGV.include?("-s") or ARGV.include?("--site"))
+
+ARGV.delete_if{|s| s =~ /^-/}
+
+exefile = (ARGV.shift or (windows? ? "allinoneruby.exe" : "allinoneruby.bin"))
+
+bindir1 = Config::CONFIG["bindir"]
+libdir1 = Config::CONFIG["libdir"]
+bindir2 = tmplocation("bin/")
+libdir2 = tmplocation("lib/")
+rubylibdir1 = Config::CONFIG["rubylibdir"]
+sitelibdir1 = Config::CONFIG["sitelibdir"]
+
+Dir.mkdir(bindir2) unless File.directory?(bindir2)
+Dir.mkdir(libdir2) unless File.directory?(libdir2)
+
+if linux?
+ rubyexe = "#{bindir1}/ruby"
+else
+ rubyexe = "#{bindir1}/ruby.exe"
+ rubywexe = "#{bindir1}/rubyw.exe"
+end
+
+if linux?
+ tocopy = ldds(rubyexe)
+ tocopy << rubyexe if File.file?(rubyexe)
+else
+ tocopy = dlls(rubyexe)
+ tocopy << rubyexe if File.file?(rubyexe)
+ tocopy << rubywexe if File.file?(rubywexe)
+end
+
+tocopy.each do |s1|
+ file = File.basename(s1)
+ s2 = File.expand_path(file, bindir2)
+
+ #$stderr.puts "Copying #{s1} ..."
+ File.copy(s1, s2) unless File.file?(s2)
+end
+
+begin
+ file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
+ s1 = rubylibdir1
+ s2 = File.expand_path(file, libdir2)
+
+ #$stderr.puts "Copying #{s1}/ ..."
+ Dir.copy(s1, s2) unless File.directory?(s2)
+end
+
+if site
+ file = sitelibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
+ s1 = sitelibdir1
+ s2 = File.expand_path(file, libdir2)
+
+ #$stderr.puts "Copying #{s1}/ ..."
+ Dir.copy(s1, s2) unless File.directory?(s2)
+end
+
+if linux?
+ tocopy = Dir.find(libdir2, /\.(so|o|dll)$/i).collect{|file| ldds(file)}.flatten.sort.uniq
+else
+ tocopy = Dir.find(libdir2, /\.(so|o|dll)$/i).collect{|file| dlls(file, bindir1)}.flatten.sort.uniq
+end
+
+tocopy.each do |s1|
+ file = File.basename(s1)
+ s2 = File.expand_path(file, bindir2)
+
+ #$stderr.puts "Copying #{s1} ..."
+ File.copy(s1, s2) unless File.file?(s2)
+end
+
+eeeexe = "eee.exe"
+eeeexe = "eeew.exe" if rubyw
+eeeexe = "eee.bin" if linux?
+appexe = exefile
+
+$stderr.puts "Creating #{appexe} ..."
+
+if linux?
+ File.open(tmplocation("eee.sh"), "w") do |f|
+ f.puts "PDIR=$1;shift"
+ f.puts "DIR=$(pwd)"
+ f.puts "cd $PDIR"
+ f.puts " chmod +x bin/ruby"
+ f.puts " export PATH=$(pwd)/bin:$PATH"
+ f.puts " export LD_LIBRARY_PATH=$(pwd)/bin:LD_LIBRARY_PATH"
+ f.puts "cd $DIR"
+ f.puts "$*"
+ end
+end
+
+File.open(tmplocation("eee.rb"), "w") do |f|
+ f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
+ f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
+ f.puts "$:.clear"
+ $:.each do |s|
+ f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}')
+ end
+end
+
+File.open(tmplocation("bootstrap.rb"), "w") do |f|
+ f.puts "load($0 = ARGV.shift)"
+end
+
+File.open(tmplocation("empty.rb"), "w") do |f|
+end
+
+File.open(tmplocation("app.eee"), "w") do |f|
+ rubyexe = "ruby.exe"
+ rubyexe = "rubyw.exe" if rubyw
+ rubyexe = "ruby" if linux?
+
+ f.puts "r bin"
+ f.puts "r lib"
+ f.puts "f eee.sh" if linux?
+ f.puts "f eee.rb"
+ f.puts "f bootstrap.rb"
+ f.puts "f empty.rb"
+ if linux?
+ f.puts "c source %tempdir%/eee.sh %tempdir% %tempdir%/bin/#{rubyexe} -r %tempdir%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
+ elsif cygwin?
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
+ else
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %quotedparms%"
+ end
+end
+
+from = newlocation(eeeexe)
+to = tmplocation(eeeexe)
+
+File.copy(from, to) unless from == to
+File.chmod(0755, to) if linux?
+
+tmplocation do
+ ENV["EEE_EXE"] = eeeexe
+ ENV["EEE_DIR"] = Dir.pwd
+
+ eeebin1 = newlocation("eee.exe")
+ eeebin1 = newlocation("eee.bin") if linux?
+ eeebin1 = newlocation("eee.bin2") if darwin?
+
+ eeebin2 = tmplocation("eee.exe")
+ eeebin2 = tmplocation("eee.bin") if linux?
+ eeebin2 = tmplocation("eee.bin") if darwin?
+
+ from = eeebin1
+ to = eeebin2
+
+ File.copy(from, to) unless from == to
+ File.chmod(0755, to) if linux? or darwin?
+
+ system(backslashes("#{eeebin2} app.eee #{appexe}"))
+end
+
+from = tmplocation(appexe)
+to = oldlocation(appexe)
+
+File.copy(from, to) unless from == to
+File.chmod(0755, to) if linux?
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.2.1.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-0.2.0.tar.gz/allinoneruby/ev/dependencies.rb 2004-12-27 13:34:11.000000000 +0100
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/ev/dependencies.rb 2005-03-26 18:12:23.000000000 +0100
@@ -14,7 +14,7 @@
todo2.each do |file|
File.open(file, "rb") do |f|
strings = f.read.scan(/[\w\-\.]+/) # Hack ???
- strings.delete_if{|s| s !~ /\.dll$/i}
+ strings.delete_if{|s| s !~ /\.(so|o|dll)$/i}
strings.each do |lib|
lib = File.expand_path(lib, path)
@@ -49,7 +49,10 @@
File.copy(file, tempfile) # Libraries on Debian are no executables.
File.chmod(0755, tempfile)
- `ldd #{tempfile}`.split(/\r*\n/).collect{|line| line.split(/\s+/)[3]}.each do |lib|
+ libs = `ldd #{tempfile}`.split(/\r*\n/).collect{|line| line.split(/\s+/)[3]} if linux?
+ libs = `otool -L #{tempfile}`.split(/\r*\n/)[1..-1].collect{|line| line.split(/\s+/)[1]} if darwin?
+
+ libs.each do |lib|
if not lib.nil? and File.file?(lib) and not res.include?(lib)
todo << lib
res << lib
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.2.1.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.2.0.tar.gz/allinoneruby/ev/ftools.rb 2004-12-27 13:34:11.000000000 +0100
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/ev/ftools.rb 2005-03-26 18:12:23.000000000 +0100
@@ -1,22 +1,12 @@
require "ftools"
class Dir
- def self.mkdirrec(dir)
- pdir = File.dirname(dir)
-
- if not pdir.empty? and not File.directory?(pdir)
- Dir.mkdirrec(pdir)
- end
-
- Dir.mkdir(dir) rescue nil
- end
-
def self.copy(from, to)
if File.directory?(from)
pdir = Dir.pwd
todir = File.expand_path(to)
- mkdirrec(todir)
+ File.mkpath(todir)
Dir.chdir(from)
Dir.new(".").each do |e|
@@ -26,7 +16,7 @@
else
todir = File.dirname(File.expand_path(to))
- mkdirrec(todir)
+ File.mkpath(todir)
File.copy(from, to)
end
@@ -38,6 +28,8 @@
end
def self.rm_rf(entry)
+ File.chmod(0755, entry)
+
if File.ftype(entry) == "directory"
pdir = Dir.pwd
@@ -47,16 +39,24 @@
end
Dir.chdir(pdir)
- Dir.delete(entry)
+ begin
+ Dir.delete(entry)
+ rescue => e
+ $stderr.puts e.message
+ end
else
- File.delete(entry)
+ begin
+ File.delete(entry)
+ rescue => e
+ $stderr.puts e.message
+ end
end
end
def self.find(entry=nil, mask=nil)
entry = "." if entry.nil?
- entry = entry.gsub!(/[\/\\]*$/, "") unless entry.nil?
+ entry = entry.gsub(/[\/\\]*$/, "") unless entry.nil?
mask = /^#{mask}$/i if mask.kind_of?(String)
@@ -77,8 +77,8 @@
ensure
Dir.chdir(pdir)
end
- rescue Errno::EACCES => error
- puts error
+ rescue Errno::EACCES => e
+ $stderr.puts e.message
end
else
res += [entry] if mask.nil? or entry =~ mask
@@ -99,7 +99,7 @@
# Rollback
if File.file?(backupfile) and File.file?(controlfile)
- $stdout.puts "Restoring #{file}..."
+ $stderr.puts "Restoring #{file}..."
File.copy(backupfile, file) # Rollback from phase 3
end
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.2.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.2.0.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2004-12-27 13:34:11.000000000 +0100
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2005-03-26 18:12:23.000000000 +0100
@@ -1,12 +1,14 @@
-temp = (ENV["TMPDIR"] or ENV["TMP"] or ENV["TEMP"] or "/tmp").gsub(/\\/, "/")
+temp = File.expand_path((ENV["TMPDIR"] or ENV["TMP"] or ENV["TEMP"] or "/tmp").gsub(/\\/, "/"))
dir = "#{temp}/oldandnewlocation.#{Process.pid}"
-ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
-ENV["NEWDIR"] = File.dirname($0) unless ENV.include?("NEWDIR")
-ENV["TEMPDIR"] = dir unless ENV.include?("TEMPDIR")
+ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
+ENV["NEWDIR"] = File.expand_path(File.dirname($0)) unless ENV.include?("NEWDIR")
+ENV["TEMPDIR"] = dir unless ENV.include?("TEMPDIR")
class Dir
def self.rm_rf(entry)
+ File.chmod(0755, entry)
+
if File.ftype(entry) == "directory"
pdir = Dir.pwd
@@ -16,9 +18,17 @@
end
Dir.chdir(pdir)
- Dir.delete(entry)
+ begin
+ Dir.delete(entry)
+ rescue => e
+ $stderr.puts e.message
+ end
else
- File.delete(entry)
+ begin
+ File.delete(entry)
+ rescue => e
+ $stderr.puts e.message
+ end
end
end
end
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/init.rb allinoneruby-0.2.1.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.0.tar.gz/allinoneruby/init.rb 2004-12-26 20:09:53.000000000 +0100
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/init.rb 2005-03-23 22:49:16.000000000 +0100
@@ -1,9 +1,11 @@
+$: << File.dirname(File.expand_path(__FILE__))
+
require "ev/oldandnewlocation"
require "ev/dependencies"
require "ev/ftools"
require "rbconfig"
-exit if ARGV.include?("--exit")
+exit if defined?(REQUIRE2LIB)
def backslashes(s)
s = s.gsub(/^\.\//, "").gsub(/\//, "\\\\") if windows?
@@ -11,30 +13,50 @@
end
def linux?
- not windows? and not cygwin? # Hack ???
+ not darwin? and not windows? and not cygwin?
+end
+
+def darwin?
+ not (target_os.downcase =~ /darwin/).nil?
end
def windows?
- not (target_os.downcase =~ /32/).nil? # Hack ???
+ not (target_os.downcase =~ /32/).nil?
end
def cygwin?
- not (target_os.downcase =~ /cyg/).nil? # Hack ???
+ not (target_os.downcase =~ /cyg/).nil?
end
def target_os
Config::CONFIG["target_os"] or ""
end
+def copyto(files, dest)
+ [files].flatten.sort.uniq.each do |fromfile|
+ tofile = File.expand_path(File.basename(fromfile), dest)
+
+ $stderr.puts "Copying #{fromfile} ..." if VERBOSE
+ File.copy(fromfile, tofile) unless File.file?(tofile)
+ end
+end
+
rubyw = false
rubyw = false if (ARGV.include?("-d") or ARGV.include?("--ruby"))
rubyw = true if (ARGV.include?("-w") or ARGV.include?("--rubyw"))
site = false
site = true if (ARGV.include?("-s") or ARGV.include?("--site"))
+STRIP = (not (ARGV.include?("-ns") or ARGV.include?("--nostrip")))
+VERBOSE = (ARGV.include?("-v") or ARGV.include?("--verbose"))
+QUIET = ((ARGV.include?("-q") or ARGV.include?("--quiet")) and not VERBOSE)
+
ARGV.delete_if{|s| s =~ /^-/}
-exefile = (ARGV.shift or (windows? ? "allinoneruby.exe" : "allinoneruby.bin"))
+exefile = ARGV.shift
+exefile = (exefile or "allinoneruby.exe") if windows? or cygwin?
+exefile = (exefile or "allinoneruby_linux") if linux?
+exefile = (exefile or "allinoneruby_darwin") if darwin?
bindir1 = Config::CONFIG["bindir"]
libdir1 = Config::CONFIG["libdir"]
@@ -46,36 +68,19 @@
Dir.mkdir(bindir2) unless File.directory?(bindir2)
Dir.mkdir(libdir2) unless File.directory?(libdir2)
-if linux?
+if linux? or darwin?
rubyexe = "#{bindir1}/ruby"
else
rubyexe = "#{bindir1}/ruby.exe"
rubywexe = "#{bindir1}/rubyw.exe"
end
-if linux?
- tocopy = ldds(rubyexe)
- tocopy << rubyexe if File.file?(rubyexe)
-else
- tocopy = dlls(rubyexe)
- tocopy << rubyexe if File.file?(rubyexe)
- tocopy << rubywexe if File.file?(rubywexe)
-end
-
-tocopy.each do |s1|
- file = File.basename(s1)
- s2 = File.expand_path(file, bindir2)
-
- $stderr.puts "Copying #{s1} ..."
- File.copy(s1, s2) unless File.file?(s2)
-end
-
begin
file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
s1 = rubylibdir1
s2 = File.expand_path(file, libdir2)
- $stderr.puts "Copying #{s1}/ ..."
+ $stderr.puts "Copying #{s1}/ ..." if VERBOSE
Dir.copy(s1, s2) unless File.directory?(s2)
end
@@ -84,68 +89,83 @@
s1 = sitelibdir1
s2 = File.expand_path(file, libdir2)
- $stderr.puts "Copying #{s1}/ ..."
+ $stderr.puts "Copying #{s1}/ ..." if VERBOSE
Dir.copy(s1, s2) unless File.directory?(s2)
end
-if linux?
- tocopy = Dir.find(libdir2, /\.so$/).collect{|file| ldds(file)}.flatten.sort.uniq
-else
- tocopy = Dir.find(libdir2, /\.so$/).collect{|file| dlls(file, bindir1)}.flatten.sort.uniq
-end
+copyto(rubyexe, bindir2) if linux? or darwin? if File.file?(rubyexe)
+copyto(ldds(rubyexe), bindir2) if linux? or darwin?
+
+copyto(rubyexe, bindir2) if windows? or cygwin? if File.file?(rubyexe)
+copyto(rubywexe, bindir2) if windows? or cygwin? if File.file?(rubyexe)
+copyto(dlls(rubyexe), bindir2) if windows? or cygwin?
+
+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, bindir1)}, bindir2) if windows? or cygwin?
-tocopy.each do |s1|
- file = File.basename(s1)
- s2 = File.expand_path(file, bindir2)
+if STRIP and (linux? or darwin?)
+ $stderr.puts "Stripping..." unless QUIET
- $stderr.puts "Copying #{s1} ..."
- File.copy(s1, s2) unless File.file?(s2)
+ system("cd #{bindir2} ; strip --strip-all * 2> /dev/null")
+ system("cd #{libdir2} ; strip --strip-all * 2> /dev/null")
end
+rubyexe = "ruby.exe"
+rubyexe = "rubyw.exe" if rubyw
+rubyexe = "ruby" if linux?
+rubyexe = "ruby" if darwin?
eeeexe = "eee.exe"
-eeeexe = "eeew.exe" if rubyw
-eeeexe = "eee.bin" if linux?
+eeeexe = "eeew.exe" if rubyw
+eeeexe = "eee_linux" if linux?
+eeeexe = "eee_darwin" if darwin?
appexe = exefile
-$stderr.puts "Creating #{appexe} ..."
+$stderr.puts "Creating #{appexe} ..." unless QUIET
-if linux?
+if linux? or darwin?
File.open(tmplocation("eee.sh"), "w") do |f|
f.puts "PDIR=$1;shift"
f.puts "DIR=$(pwd)"
f.puts "cd $PDIR"
f.puts " chmod +x bin/ruby"
f.puts " export PATH=$(pwd)/bin:$PATH"
- f.puts " export LD_LIBRARY_PATH=$(pwd)/bin:LD_LIBRARY_PATH"
+ f.puts " export LD_LIBRARY_PATH=$(pwd)/bin:LD_LIBRARY_PATH" if linux?
+ f.puts " export DYLD_LIBRARY_PATH=$(pwd)/bin:DYLD_LIBRARY_PATH" if darwin?
f.puts "cd $DIR"
f.puts "$*"
end
end
File.open(tmplocation("eee.rb"), "w") do |f|
- f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
- f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
+ f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
+ f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
f.puts "$:.clear"
$:.each do |s|
f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}')
end
end
-File.open(tmplocation("app.eee"), "w") do |f|
- rubyexe = "ruby.exe"
- rubyexe = "rubyw.exe" if rubyw
- rubyexe = "ruby" if linux?
+File.open(tmplocation("bootstrap.rb"), "w") do |f|
+ f.puts "ALLINONERUBY = '#{rubyexe}'"
+ f.puts "load($0 = ARGV.shift)"
+end
+File.open(tmplocation("empty.rb"), "w") do |f|
+end
+
+File.open(tmplocation("app.eee"), "w") do |f|
f.puts "r bin"
f.puts "r lib"
- f.puts "f eee.sh" if linux?
+ f.puts "f eee.sh" if linux? or darwin?
f.puts "f eee.rb"
- if linux?
- f.puts "c source %tempdir%/eee.sh %tempdir% %tempdir%/bin/#{rubyexe} -r %tempdir%/eee.rb %quotedparms%"
+ f.puts "f bootstrap.rb"
+ f.puts "f empty.rb"
+ if linux? or darwin?
+ f.puts "c echo source %tempdir%/eee.sh %tempdir% %tempdir%/bin/#{rubyexe} -r %tempdir%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms% | sh -s"
elsif cygwin?
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
else
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %quotedparms%"
end
end
@@ -153,17 +173,31 @@
to = tmplocation(eeeexe)
File.copy(from, to) unless from == to
-File.chmod(0755, to) if linux?
+File.chmod(0755, to) if linux? or darwin?
tmplocation do
- ENV["EEEEXE"] = eeeexe
- ENV["EEEDIR"] = Dir.pwd
+ ENV["EEE_EXE"] = eeeexe
+ ENV["EEE_DIR"] = Dir.pwd
+
+ eeebin1 = newlocation("eee.exe")
+ eeebin1 = newlocation("eee_linux") if linux?
+ eeebin1 = newlocation("eee_darwin") if darwin?
+
+ eeebin2 = tmplocation("eee.exe")
+ eeebin2 = tmplocation("eee_linux") if linux?
+ eeebin2 = tmplocation("eee_darwin") if darwin?
+
+ from = eeebin1
+ to = eeebin2
+
+ File.copy(from, to) unless from == to
+ File.chmod(0755, to) if linux? or darwin?
- system(backslashes("#{newlocation(linux? ? "eee.bin" : "eee")} app.eee #{appexe}"))
+ system(backslashes("#{eeebin2} app.eee #{appexe}"))
end
from = tmplocation(appexe)
to = oldlocation(appexe)
File.copy(from, to) unless from == to
-File.chmod(0755, to) if linux?
+#File.chmod(0755, to) if linux? or darwin?
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/README allinoneruby-0.2.1.tar.gz/allinoneruby/README
--- allinoneruby-0.2.0.tar.gz/allinoneruby/README 2004-12-08 10:21:38.000000000 +0100
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/README 2005-03-24 10:13:09.000000000 +0100
@@ -2,9 +2,10 @@
The latter is just for playing with the internals. Both are
available on the site.
- Usage: ruby init.rb [-d|-w|--ruby|--rubyw] [-s|--site]
+ Usage: ruby init.rb [allinoneruby.exe] [-d|-w|--ruby|--rubyw] [-s|--site] [-ns|--nostrip] [-v|-q|--verbose|--quite]
-On Linux, there's no difference between ruby and rubyw.
+On Linux and Darwin, there's no difference between ruby and
+rubyw.
For more information, see
http://www.erikveen.dds.nl/allinoneruby/index.html .
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/SUMMARY allinoneruby-0.2.1.tar.gz/allinoneruby/SUMMARY
--- allinoneruby-0.2.0.tar.gz/allinoneruby/SUMMARY 2007-04-15 21:43:59.000000000 +0200
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/SUMMARY 2005-03-26 18:12:22.000000000 +0100
@@ -0,0 +1 @@
+A "Just-in-Time and Temporary Installation of Ruby"
diff -ur allinoneruby-0.2.0.tar.gz/allinoneruby/VERSION allinoneruby-0.2.1.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.0.tar.gz/allinoneruby/VERSION 2007-04-15 21:43:59.000000000 +0200
+++ allinoneruby-0.2.1.tar.gz/allinoneruby/VERSION 2005-03-26 18:12:22.000000000 +0100
@@ -0,0 +1 @@
+0.2.1
Binary files allinoneruby-0.2.0.tar.gz/allinoneruby/eee.bin and allinoneruby-0.2.1.tar.gz/allinoneruby/eee.bin differ
Binary files allinoneruby-0.2.0.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.1.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.0.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.1.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.0.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.1.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.1.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.2.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.1.tar.gz/allinoneruby/CHANGELOG 2007-04-15 21:44:01.000000000 +0200
+++ allinoneruby-0.2.2.tar.gz/allinoneruby/CHANGELOG 2005-05-22 18:50:55.000000000 +0200
@@ -0,0 +1,63 @@
+----------------------------------------------------------------
+
+0.2.2 - 22.05.2005
+
+* Fixed a bug concerning program arguments with spaces on
+ Linux/Darwin (was OK on Windows).
+
+* Added $stdin handling on Linux/Darwin (was OK on Windows).
+
+* Added handling of the -e argument, the one of Ruby itself.
+
+* Added a search for EEE.
+
+----------------------------------------------------------------
+
+0.2.1 - 23.03.2005
+
+* newlocation is an absolute path.
+
+* ENV["TEMP"] is an absolute path.
+
+* Added --verbose.
+
+* Added --quiet.
+
+* Added --nostrip.
+
+* Added ALLINONERUBY.
+
+* Fixed the non-SH-compatible shell (e.g. TCSH) bug.
+
+* Changed the name of the generated executable on Linux from
+ allinoneruby.bin to allinoneruby_linux.
+
+* Added (experimental) support for Mac OS X (Darwin).
+
+* Added support for .dll extensions and .o extensions.
+
+----------------------------------------------------------------
+
+0.2.0 - 27.12.2004
+
+* Added support for Linux.
+
+* Added compression.
+
+* Added sitelib support.
+
+* Added --eee-list.
+
+----------------------------------------------------------------
+
+0.1.1 - 04.08.2004
+
+* Added the handling of dll's, needed by the so's.
+
+----------------------------------------------------------------
+
+0.1 - 30.07.2004
+
+* First release.
+
+----------------------------------------------------------------
diff -ur allinoneruby-0.2.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.2.2.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.2.1.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2005-03-26 18:12:23.000000000 +0100
+++ allinoneruby-0.2.2.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2005-05-22 18:53:42.000000000 +0200
@@ -1,9 +1,10 @@
temp = File.expand_path((ENV["TMPDIR"] or ENV["TMP"] or ENV["TEMP"] or "/tmp").gsub(/\\/, "/"))
dir = "#{temp}/oldandnewlocation.#{Process.pid}"
-ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
-ENV["NEWDIR"] = File.expand_path(File.dirname($0)) unless ENV.include?("NEWDIR")
-ENV["TEMPDIR"] = dir unless ENV.include?("TEMPDIR")
+ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
+ENV["NEWDIR"] = File.expand_path(File.dirname($0)) unless ENV.include?("NEWDIR")
+ENV["OWNDIR"] = File.expand_path(File.dirname((caller[-1] or $0).gsub(/:\d+$/, ""))) unless ENV.include?("OWNDIR")
+ENV["TEMPDIR"] = dir unless ENV.include?("TEMPDIR")
class Dir
def self.rm_rf(entry)
@@ -76,6 +77,27 @@
end
begin
+ ownlocation
+rescue NameError
+ def ownlocation(file="")
+ dir = ENV["OWNDIR"]
+ res = nil
+
+ if block_given?
+ pdir = Dir.pwd
+
+ Dir.chdir(dir)
+ res = yield
+ Dir.chdir(pdir)
+ else
+ res = File.expand_path(file, dir) unless file.nil?
+ end
+
+ res
+ end
+end
+
+begin
tmplocation
rescue NameError
dir = ENV["TEMPDIR"]
diff -ur allinoneruby-0.2.1.tar.gz/allinoneruby/init.rb allinoneruby-0.2.2.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.1.tar.gz/allinoneruby/init.rb 2005-03-23 22:49:16.000000000 +0100
+++ allinoneruby-0.2.2.tar.gz/allinoneruby/init.rb 2005-05-22 18:18:37.000000000 +0200
@@ -51,7 +51,7 @@
VERBOSE = (ARGV.include?("-v") or ARGV.include?("--verbose"))
QUIET = ((ARGV.include?("-q") or ARGV.include?("--quiet")) and not VERBOSE)
-ARGV.delete_if{|s| s =~ /^-/}
+ARGV.delete_if{|s| s =~ /^-/}
exefile = ARGV.shift
exefile = (exefile or "allinoneruby.exe") if windows? or cygwin?
@@ -75,6 +75,8 @@
rubywexe = "#{bindir1}/rubyw.exe"
end
+$stderr.puts "Copying files..." unless QUIET
+
begin
file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
s1 = rubylibdir1
@@ -122,32 +124,30 @@
$stderr.puts "Creating #{appexe} ..." unless QUIET
-if linux? or darwin?
- File.open(tmplocation("eee.sh"), "w") do |f|
- f.puts "PDIR=$1;shift"
- f.puts "DIR=$(pwd)"
- f.puts "cd $PDIR"
- f.puts " chmod +x bin/ruby"
- f.puts " export PATH=$(pwd)/bin:$PATH"
- f.puts " export LD_LIBRARY_PATH=$(pwd)/bin:LD_LIBRARY_PATH" if linux?
- f.puts " export DYLD_LIBRARY_PATH=$(pwd)/bin:DYLD_LIBRARY_PATH" if darwin?
- f.puts "cd $DIR"
- f.puts "$*"
- end
-end
-
File.open(tmplocation("eee.rb"), "w") do |f|
f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
f.puts "$:.clear"
$:.each do |s|
- f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}')
+ f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}') unless s.include?(newlocation)
end
end
File.open(tmplocation("bootstrap.rb"), "w") do |f|
f.puts "ALLINONERUBY = '#{rubyexe}'"
- f.puts "load($0 = ARGV.shift)"
+ f.puts "script = ARGV.shift"
+ f.puts "if script == '-e'"
+ f.puts " command = ARGV.shift"
+ f.puts " eval(command)"
+ f.puts "else"
+ f.puts " if script.nil? or script == '-'"
+ f.puts " command = $stdin.read"
+ f.puts " eval(command)"
+ f.puts " else"
+ f.puts " $0 = script"
+ f.puts " load(script)"
+ f.puts " end"
+ f.puts "end"
end
File.open(tmplocation("empty.rb"), "w") do |f|
@@ -156,12 +156,14 @@
File.open(tmplocation("app.eee"), "w") do |f|
f.puts "r bin"
f.puts "r lib"
- f.puts "f eee.sh" if linux? or darwin?
f.puts "f eee.rb"
f.puts "f bootstrap.rb"
f.puts "f empty.rb"
- if linux? or darwin?
- f.puts "c echo source %tempdir%/eee.sh %tempdir% %tempdir%/bin/#{rubyexe} -r %tempdir%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms% | sh -s"
+
+ 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%/eee.rb -r %tempdir%/bootstrap.rb -T %tempdir%/empty.rb %quotedparms%"
+ 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%/eee.rb -r %tempdir%/bootstrap.rb -T %tempdir%/empty.rb %quotedparms%"
elsif cygwin?
f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
else
@@ -170,6 +172,8 @@
end
from = newlocation(eeeexe)
+from = ownlocation(eeeexe) unless File.file?(from)
+from = oldlocation(eeeexe) unless File.file?(from)
to = tmplocation(eeeexe)
File.copy(from, to) unless from == to
@@ -183,6 +187,18 @@
eeebin1 = newlocation("eee_linux") if linux?
eeebin1 = newlocation("eee_darwin") if darwin?
+ unless File.file?(eeebin1)
+ eeebin1 = ownlocation("eee.exe")
+ eeebin1 = ownlocation("eee_linux") if linux?
+ eeebin1 = ownlocation("eee_darwin") if darwin?
+ end
+
+ unless File.file?(eeebin1)
+ eeebin1 = oldlocation("eee.exe")
+ eeebin1 = oldlocation("eee_linux") if linux?
+ eeebin1 = oldlocation("eee_darwin") if darwin?
+ end
+
eeebin2 = tmplocation("eee.exe")
eeebin2 = tmplocation("eee_linux") if linux?
eeebin2 = tmplocation("eee_darwin") if darwin?
@@ -200,4 +216,3 @@
to = oldlocation(appexe)
File.copy(from, to) unless from == to
-#File.chmod(0755, to) if linux? or darwin?
diff -ur allinoneruby-0.2.1.tar.gz/allinoneruby/README allinoneruby-0.2.2.tar.gz/allinoneruby/README
--- allinoneruby-0.2.1.tar.gz/allinoneruby/README 2005-03-24 10:13:09.000000000 +0100
+++ allinoneruby-0.2.2.tar.gz/allinoneruby/README 2005-05-22 18:09:04.000000000 +0200
@@ -2,7 +2,11 @@
The latter is just for playing with the internals. Both are
available on the site.
- Usage: ruby init.rb [allinoneruby.exe] [-d|-w|--ruby|--rubyw] [-s|--site] [-ns|--nostrip] [-v|-q|--verbose|--quite]
+ Usage: ruby init.rb [allinoneruby.exe]
+ [-d|-w|--ruby|--rubyw]
+ [-s|--site]
+ [-ns|--nostrip]
+ [-v|-q|--verbose|--quite]
On Linux and Darwin, there's no difference between ruby and
rubyw.
diff -ur allinoneruby-0.2.1.tar.gz/allinoneruby/VERSION allinoneruby-0.2.2.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.1.tar.gz/allinoneruby/VERSION 2005-03-26 18:12:22.000000000 +0100
+++ allinoneruby-0.2.2.tar.gz/allinoneruby/VERSION 2005-05-22 18:53:42.000000000 +0200
@@ -1 +1 @@
-0.2.1
+0.2.2
Binary files allinoneruby-0.2.1.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.2.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.1.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.2.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.1.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.2.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.2.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.3.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.2.tar.gz/allinoneruby/CHANGELOG 2005-05-22 18:50:55.000000000 +0200
+++ allinoneruby-0.2.3.tar.gz/allinoneruby/CHANGELOG 2005-06-03 13:18:59.000000000 +0200
@@ -1,5 +1,18 @@
----------------------------------------------------------------
+0.2.3 - 03.06.2005
+
+* Updated to FreePascal 1.9.8 on Windows, 2.0.0 on Linux and
+ 1.9.5 on Darwin.
+
+* The exit code of your script is returned to the calling
+ application/shell.
+
+* Made some information about the environment EEE sets up
+ available to the application, e.g. executable name.
+
+----------------------------------------------------------------
+
0.2.2 - 22.05.2005
* Fixed a bug concerning program arguments with spaces on
diff -ur allinoneruby-0.2.2.tar.gz/allinoneruby/init.rb allinoneruby-0.2.3.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.2.tar.gz/allinoneruby/init.rb 2005-05-22 18:18:37.000000000 +0200
+++ allinoneruby-0.2.3.tar.gz/allinoneruby/init.rb 2005-06-03 13:17:15.000000000 +0200
@@ -124,16 +124,32 @@
$stderr.puts "Creating #{appexe} ..." unless QUIET
-File.open(tmplocation("eee.rb"), "w") do |f|
+File.open(tmplocation("bootstrap.rb"), "w") do |f|
+ f.puts "# Set up the environment"
+
f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
f.puts "$:.clear"
$:.each do |s|
f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}') unless s.include?(newlocation)
end
-end
-File.open(tmplocation("bootstrap.rb"), "w") do |f|
+ f.puts "# Load eee.info"
+
+ f.puts "eeedir = File.dirname(__FILE__)"
+ f.puts "eeeinfo = File.expand_path('eee.info', eeedir)"
+ f.puts "if File.file?(eeeinfo)"
+ f.puts " File.open(eeeinfo) do |f|"
+ f.puts " while line = f.gets"
+ f.puts " k, v = line.strip.split(/\s*=\s*/, 2)"
+ f.puts " k.gsub!(/^EEE_/, 'ALLINONERUBY_')"
+ f.puts " eval('%s=%s' % [k, v.inspect])"
+ f.puts " end"
+ f.puts " end"
+ f.puts "end"
+
+ f.puts "# Start the application"
+
f.puts "ALLINONERUBY = '#{rubyexe}'"
f.puts "script = ARGV.shift"
f.puts "if script == '-e'"
@@ -156,18 +172,18 @@
File.open(tmplocation("app.eee"), "w") do |f|
f.puts "r bin"
f.puts "r lib"
- f.puts "f eee.rb"
f.puts "f bootstrap.rb"
f.puts "f empty.rb"
+ f.puts "i eee.info"
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%/eee.rb -r %tempdir%/bootstrap.rb -T %tempdir%/empty.rb %quotedparms%"
+ 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 -T %tempdir%/empty.rb %quotedparms%"
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%/eee.rb -r %tempdir%/bootstrap.rb -T %tempdir%/empty.rb %quotedparms%"
+ 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 -T %tempdir%/empty.rb %quotedparms%"
elsif cygwin?
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
else
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %quotedparms%"
end
end
diff -ur allinoneruby-0.2.2.tar.gz/allinoneruby/VERSION allinoneruby-0.2.3.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.2.tar.gz/allinoneruby/VERSION 2005-05-22 18:53:42.000000000 +0200
+++ allinoneruby-0.2.3.tar.gz/allinoneruby/VERSION 2005-06-03 13:31:02.000000000 +0200
@@ -1 +1 @@
-0.2.2
+0.2.3
Binary files allinoneruby-0.2.2.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.3.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.2.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.3.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.2.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.3.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.3.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.4.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.3.tar.gz/allinoneruby/CHANGELOG 2005-06-03 13:18:59.000000000 +0200
+++ allinoneruby-0.2.4.tar.gz/allinoneruby/CHANGELOG 2005-06-14 21:41:39.000000000 +0200
@@ -1,5 +1,11 @@
----------------------------------------------------------------
+0.2.4 - 14.06.2005
+
+* Fixed a bug concerning spaces in %TEMP%.
+
+----------------------------------------------------------------
+
0.2.3 - 03.06.2005
* Updated to FreePascal 1.9.8 on Windows, 2.0.0 on Linux and
diff -ur allinoneruby-0.2.3.tar.gz/allinoneruby/VERSION allinoneruby-0.2.4.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.3.tar.gz/allinoneruby/VERSION 2005-06-03 13:31:02.000000000 +0200
+++ allinoneruby-0.2.4.tar.gz/allinoneruby/VERSION 2005-06-14 21:42:38.000000000 +0200
@@ -1 +1 @@
-0.2.3
+0.2.4
Binary files allinoneruby-0.2.3.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.4.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.3.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.4.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.3.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.4.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.4.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.5.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.4.tar.gz/allinoneruby/CHANGELOG 2005-06-14 21:41:39.000000000 +0200
+++ allinoneruby-0.2.5.tar.gz/allinoneruby/CHANGELOG 2005-06-21 00:02:16.000000000 +0200
@@ -1,5 +1,11 @@
----------------------------------------------------------------
+0.2.5 - 21.06.2005
+
+* Fixed a bug concerning --site handling.
+
+----------------------------------------------------------------
+
0.2.4 - 14.06.2005
* Fixed a bug concerning spaces in %TEMP%.
diff -ur allinoneruby-0.2.4.tar.gz/allinoneruby/init.rb allinoneruby-0.2.5.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.4.tar.gz/allinoneruby/init.rb 2005-06-03 13:17:15.000000000 +0200
+++ allinoneruby-0.2.5.tar.gz/allinoneruby/init.rb 2005-06-18 12:17:20.000000000 +0200
@@ -37,6 +37,7 @@
tofile = File.expand_path(File.basename(fromfile), dest)
$stderr.puts "Copying #{fromfile} ..." if VERBOSE
+
File.copy(fromfile, tofile) unless File.file?(tofile)
end
end
@@ -60,10 +61,11 @@
bindir1 = Config::CONFIG["bindir"]
libdir1 = Config::CONFIG["libdir"]
+sitedir1 = Config::CONFIG["sitedir"]
bindir2 = tmplocation("bin/")
libdir2 = tmplocation("lib/")
-rubylibdir1 = Config::CONFIG["rubylibdir"]
-sitelibdir1 = Config::CONFIG["sitelibdir"]
+
+numberoflibs = 0
Dir.mkdir(bindir2) unless File.directory?(bindir2)
Dir.mkdir(libdir2) unless File.directory?(libdir2)
@@ -78,21 +80,17 @@
$stderr.puts "Copying files..." unless QUIET
begin
- file = rubylibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
- s1 = rubylibdir1
- s2 = File.expand_path(file, libdir2)
-
- $stderr.puts "Copying #{s1}/ ..." if VERBOSE
- Dir.copy(s1, s2) unless File.directory?(s2)
-end
+ $:.each do |dir|
+ if (dir.include?(libdir1) and not dir.include?(sitedir1)) or (site and dir.include?(sitedir1))
+ numberoflibs += 1
+ s1 = dir
+ s2 = File.expand_path("lib#{numberoflibs}", libdir2)
-if site
- file = sitelibdir1[libdir1.length..-1].gsub(/^[\/\\]*/, "")
- s1 = sitelibdir1
- s2 = File.expand_path(file, libdir2)
+ $stderr.puts "Copying #{s1}/ ..." if VERBOSE
- $stderr.puts "Copying #{s1}/ ..." if VERBOSE
- Dir.copy(s1, s2) unless File.directory?(s2)
+ Dir.copy(s1, s2) unless File.directory?(s2)
+ end
+ end
end
copyto(rubyexe, bindir2) if linux? or darwin? if File.file?(rubyexe)
@@ -130,9 +128,11 @@
f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
f.puts "$:.clear"
- $:.each do |s|
- f.puts "$: << \"%s\"" % s.sub(libdir1, '#{lib}') unless s.include?(newlocation)
+
+ numberoflibs.times do |n|
+ f.puts "$: << lib + '/lib%s'" % [n+1]
end
+ f.puts "$: << '.'"
f.puts "# Load eee.info"
diff -ur allinoneruby-0.2.4.tar.gz/allinoneruby/VERSION allinoneruby-0.2.5.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.4.tar.gz/allinoneruby/VERSION 2005-06-14 21:42:38.000000000 +0200
+++ allinoneruby-0.2.5.tar.gz/allinoneruby/VERSION 2005-06-21 00:02:54.000000000 +0200
@@ -1 +1 @@
-0.2.4
+0.2.5
diff -ur allinoneruby-0.2.5.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.6.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.5.tar.gz/allinoneruby/CHANGELOG 2005-06-21 00:02:16.000000000 +0200
+++ allinoneruby-0.2.6.tar.gz/allinoneruby/CHANGELOG 2005-08-06 13:00:21.000000000 +0200
@@ -1,5 +1,11 @@
----------------------------------------------------------------
+0.2.6 - 06.08.2005
+
+* Updated with to the last EEE (from RubyScript2Exe).
+
+----------------------------------------------------------------
+
0.2.5 - 21.06.2005
* Fixed a bug concerning --site handling.
diff -ur allinoneruby-0.2.5.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.2.6.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.2.5.tar.gz/allinoneruby/ev/ftools.rb 2005-06-21 00:02:54.000000000 +0200
+++ allinoneruby-0.2.6.tar.gz/allinoneruby/ev/ftools.rb 2005-08-06 13:02:00.000000000 +0200
@@ -84,7 +84,7 @@
res += [entry] if mask.nil? or entry =~ mask
end
- res
+ res.sort
end
end
diff -ur allinoneruby-0.2.5.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.2.6.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.2.5.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2005-06-21 00:02:54.000000000 +0200
+++ allinoneruby-0.2.6.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2005-08-06 13:02:00.000000000 +0200
@@ -3,7 +3,7 @@
ENV["OLDDIR"] = Dir.pwd unless ENV.include?("OLDDIR")
ENV["NEWDIR"] = File.expand_path(File.dirname($0)) unless ENV.include?("NEWDIR")
-ENV["OWNDIR"] = File.expand_path(File.dirname((caller[-1] or $0).gsub(/:\d+$/, ""))) unless ENV.include?("OWNDIR")
+ENV["APPDIR"] = File.expand_path(File.dirname((caller[-1] or $0).gsub(/:\d+$/, ""))) unless ENV.include?("APPDIR")
ENV["TEMPDIR"] = dir unless ENV.include?("TEMPDIR")
class Dir
@@ -77,10 +77,10 @@
end
begin
- ownlocation
+ applocation
rescue NameError
- def ownlocation(file="")
- dir = ENV["OWNDIR"]
+ def applocation(file="")
+ dir = ENV["APPDIR"]
res = nil
if block_given?
diff -ur allinoneruby-0.2.5.tar.gz/allinoneruby/init.rb allinoneruby-0.2.6.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.5.tar.gz/allinoneruby/init.rb 2005-06-18 12:17:20.000000000 +0200
+++ allinoneruby-0.2.6.tar.gz/allinoneruby/init.rb 2005-06-21 21:38:34.000000000 +0200
@@ -188,7 +188,7 @@
end
from = newlocation(eeeexe)
-from = ownlocation(eeeexe) unless File.file?(from)
+from = applocation(eeeexe) unless File.file?(from)
from = oldlocation(eeeexe) unless File.file?(from)
to = tmplocation(eeeexe)
@@ -204,9 +204,9 @@
eeebin1 = newlocation("eee_darwin") if darwin?
unless File.file?(eeebin1)
- eeebin1 = ownlocation("eee.exe")
- eeebin1 = ownlocation("eee_linux") if linux?
- eeebin1 = ownlocation("eee_darwin") if darwin?
+ eeebin1 = applocation("eee.exe")
+ eeebin1 = applocation("eee_linux") if linux?
+ eeebin1 = applocation("eee_darwin") if darwin?
end
unless File.file?(eeebin1)
diff -ur allinoneruby-0.2.5.tar.gz/allinoneruby/README allinoneruby-0.2.6.tar.gz/allinoneruby/README
--- allinoneruby-0.2.5.tar.gz/allinoneruby/README 2005-05-22 18:09:04.000000000 +0200
+++ allinoneruby-0.2.6.tar.gz/allinoneruby/README 2005-08-06 09:07:21.000000000 +0200
@@ -1,15 +1,25 @@
-The best way to use AllInOneRuby is the RB, not this TAR.GZ.
-The latter is just for playing with the internals. Both are
-available on the site.
+----------------------------------------------------------------
- Usage: ruby init.rb [allinoneruby.exe]
- [-d|-w|--ruby|--rubyw]
- [-s|--site]
- [-ns|--nostrip]
- [-v|-q|--verbose|--quite]
+As you know, Ruby has to be installed, either by unzipping a
+ZIP-file, or by running an installer. Only then, you can run a
+script. Well, not anymore!
-On Linux and Darwin, there's no difference between ruby and
-rubyw.
+AllInOneRuby creates a compressed executable for Windows, Linux
+or Mac OS X (Darwin) that includes both the Ruby interpreter
+and the runtime libraries. Why? Because it's sometimes not
+easy, or possible, or desirable, or allowed to do a complete
+Ruby installation. That's where AllInOneRuby comes in. I always
+have a USB-memory stick with AllInOneRuby in my pocket.
+
+A "just-in-time and temporary installation of Ruby"...
For more information, see
http://www.erikveen.dds.nl/allinoneruby/index.html .
+
+----------------------------------------------------------------
+
+The best way to use Tar2RubyScript is the RB, not this TAR.GZ.
+The latter is just for playing with the internals. Both are
+available on the site.
+
+----------------------------------------------------------------
diff -ur allinoneruby-0.2.5.tar.gz/allinoneruby/VERSION allinoneruby-0.2.6.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.5.tar.gz/allinoneruby/VERSION 2005-06-21 00:02:54.000000000 +0200
+++ allinoneruby-0.2.6.tar.gz/allinoneruby/VERSION 2005-08-06 13:02:00.000000000 +0200
@@ -1 +1 @@
-0.2.5
+0.2.6
Binary files allinoneruby-0.2.5.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.6.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.5.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.6.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.5.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.6.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.6.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.7.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.6.tar.gz/allinoneruby/CHANGELOG 2005-08-06 13:00:21.000000000 +0200
+++ allinoneruby-0.2.7.tar.gz/allinoneruby/CHANGELOG 2005-09-30 00:19:59.000000000 +0200
@@ -1,8 +1,14 @@
----------------------------------------------------------------
+0.2.7 - 29.09.2005
+
+* Made the common test if __file__ == $0 work.
+
+----------------------------------------------------------------
+
0.2.6 - 06.08.2005
-* Updated with to the last EEE (from RubyScript2Exe).
+* Updated to the last EEE (from RubyScript2Exe).
----------------------------------------------------------------
diff -ur allinoneruby-0.2.6.tar.gz/allinoneruby/init.rb allinoneruby-0.2.7.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.6.tar.gz/allinoneruby/init.rb 2005-06-21 21:38:34.000000000 +0200
+++ allinoneruby-0.2.7.tar.gz/allinoneruby/init.rb 2005-09-28 00:31:37.000000000 +0200
@@ -160,7 +160,8 @@
f.puts " command = $stdin.read"
f.puts " eval(command)"
f.puts " else"
- f.puts " $0 = script"
+ f.puts " script = File.expand_path(script)"
+ f.puts " $0.replace(script)"
f.puts " load(script)"
f.puts " end"
f.puts "end"
diff -ur allinoneruby-0.2.6.tar.gz/allinoneruby/VERSION allinoneruby-0.2.7.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.6.tar.gz/allinoneruby/VERSION 2005-08-06 13:02:00.000000000 +0200
+++ allinoneruby-0.2.7.tar.gz/allinoneruby/VERSION 2005-09-30 00:20:47.000000000 +0200
@@ -1 +1 @@
-0.2.6
+0.2.7
diff -ur allinoneruby-0.2.7.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.8.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.7.tar.gz/allinoneruby/CHANGELOG 2005-09-30 00:19:59.000000000 +0200
+++ allinoneruby-0.2.8.tar.gz/allinoneruby/CHANGELOG 2005-12-03 15:17:13.000000000 +0100
@@ -1,5 +1,11 @@
----------------------------------------------------------------
+0.2.8 - 03.12.2005
+
+* Fixed a bug concerning multiline parameters.
+
+----------------------------------------------------------------
+
0.2.7 - 29.09.2005
* Made the common test if __file__ == $0 work.
diff -ur allinoneruby-0.2.7.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.2.8.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-0.2.7.tar.gz/allinoneruby/ev/dependencies.rb 2005-09-30 00:20:47.000000000 +0200
+++ allinoneruby-0.2.8.tar.gz/allinoneruby/ev/dependencies.rb 2005-12-03 15:17:55.000000000 +0100
@@ -52,8 +52,8 @@
libs = `ldd #{tempfile}`.split(/\r*\n/).collect{|line| line.split(/\s+/)[3]} if linux?
libs = `otool -L #{tempfile}`.split(/\r*\n/)[1..-1].collect{|line| line.split(/\s+/)[1]} if darwin?
- libs.each do |lib|
- if not lib.nil? and File.file?(lib) and not res.include?(lib)
+ libs.compact.each do |lib|
+ if File.file?(lib) and not res.include?(lib)
todo << lib
res << lib
end
diff -ur allinoneruby-0.2.7.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.2.8.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.2.7.tar.gz/allinoneruby/ev/ftools.rb 2005-09-30 00:20:47.000000000 +0200
+++ allinoneruby-0.2.8.tar.gz/allinoneruby/ev/ftools.rb 2005-12-03 15:17:55.000000000 +0100
@@ -160,7 +160,7 @@
ENV["PATH"].split(/#{sep}/).reverse.each do |d|
if File.directory?(d)
Dir.new(d).each do |e|
- if e.downcase == file.downcase
+ if (linux? and e == file) or (windows? and e.downcase == file.downcase)
res = File.expand_path(e, d)
throw :stop
end
diff -ur allinoneruby-0.2.7.tar.gz/allinoneruby/init.rb allinoneruby-0.2.8.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.7.tar.gz/allinoneruby/init.rb 2005-09-28 00:31:37.000000000 +0200
+++ allinoneruby-0.2.8.tar.gz/allinoneruby/init.rb 2005-12-03 15:15:22.000000000 +0100
@@ -136,15 +136,21 @@
f.puts "# Load eee.info"
- f.puts "eeedir = File.dirname(__FILE__)"
- f.puts "eeeinfo = File.expand_path('eee.info', eeedir)"
+ f.puts "eeedir = File.dirname(__FILE__)"
+ f.puts "eeeinfo = File.expand_path('eee.info', eeedir)"
f.puts "if File.file?(eeeinfo)"
- f.puts " File.open(eeeinfo) do |f|"
- f.puts " while line = f.gets"
- f.puts " k, v = line.strip.split(/\s*=\s*/, 2)"
- f.puts " k.gsub!(/^EEE_/, 'ALLINONERUBY_')"
- f.puts " eval('%s=%s' % [k, v.inspect])"
- f.puts " end"
+ f.puts " lines = File.open(eeeinfo){|f| f.readlines}"
+ f.puts " badline = lines.find{|line| line !~ /^EEE_/}"
+ f.puts " while badline"
+ f.puts " pos = lines.index(badline)"
+ f.puts " raise 'Found badline at position 0.' if pos == 0"
+ f.puts " lines[pos-1..pos] = lines[pos-1] + lines[pos]"
+ f.puts " badline = lines.find{|line| line !~ /^EEE_/}"
+ f.puts " end"
+ f.puts " lines.each do |line|"
+ f.puts " k, v = line.strip.split(/\s*=\s*/, 2)"
+ f.puts " k.gsub!(/^EEE_/, 'ALLINONERUBY_')"
+ f.puts " eval('%s=%s' % [k, v.inspect])"
f.puts " end"
f.puts "end"
diff -ur allinoneruby-0.2.7.tar.gz/allinoneruby/VERSION allinoneruby-0.2.8.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.7.tar.gz/allinoneruby/VERSION 2005-09-30 00:20:47.000000000 +0200
+++ allinoneruby-0.2.8.tar.gz/allinoneruby/VERSION 2005-12-03 15:17:55.000000000 +0100
@@ -1 +1 @@
-0.2.7
+0.2.8
diff -ur allinoneruby-0.2.8.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.9.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.8.tar.gz/allinoneruby/CHANGELOG 2005-12-03 15:17:13.000000000 +0100
+++ allinoneruby-0.2.9.tar.gz/allinoneruby/CHANGELOG 2006-03-08 17:56:09.000000000 +0100
@@ -1,5 +1,16 @@
----------------------------------------------------------------
+0.2.9 - 08.03.2006
+
+* Fixed a bug concerning parameters with quotes and other
+ escapable characters.
+
+* Fixed a bug concerning spaced parameters on Linux and Darwin.
+
+* AllInOneRuby and RubyScript2Exe now work together.
+
+----------------------------------------------------------------
+
0.2.8 - 03.12.2005
* Fixed a bug concerning multiline parameters.
diff -ur allinoneruby-0.2.8.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.2.9.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-0.2.8.tar.gz/allinoneruby/ev/dependencies.rb 2005-12-03 15:17:55.000000000 +0100
+++ allinoneruby-0.2.9.tar.gz/allinoneruby/ev/dependencies.rb 2006-03-08 18:28:57.000000000 +0100
@@ -1,27 +1,47 @@
-def dlls(file, path=File.dirname(file))
+def dlls(file)
- # Only the dependencies in the same directory as the executable or the given directory.
+ # Only the dependencies in the same directory as the executable or any non-Windows directory in %PATH%.
todo = []
res = []
todo << File.expand_path(file)
+ paden = ENV["PATH"].split(/;/)
+ paden = ENV["PATH"].split(/:/) if paden.length == 1
+
+ paden << File.dirname(file)
+
+ windir1 = (ENV["WINDIR"] || "").gsub(/\\/, "/").downcase
+ drive = windir1.scan(/^(.):/).shift.shift
+ windir2 = windir1.sub(/^#{drive}:/, "/cygdrive/#{drive.downcase}")
+
+ paden = paden.collect{|pad| pad.gsub(/\\/, "/").downcase}
+ paden = paden.select{|pad| pad.downcase}
+ paden = paden.reject{|pad| pad =~ /^#{windir1}/}
+ paden = paden.reject{|pad| pad =~ /^#{windir2}/}
+
while todo.length > 0
todo2 = todo
todo = []
todo2.each do |file|
File.open(file, "rb") do |f|
- strings = f.read.scan(/[\w\-\.]+/) # Hack ???
- strings.delete_if{|s| s !~ /\.(so|o|dll)$/i}
-
- strings.each do |lib|
- lib = File.expand_path(lib, path)
-
- if not lib.nil? and File.file?(lib) and not res.include?(lib)
- todo << lib
- res << lib
+ while (line = f.gets)
+ strings = line.scan(/[\w\-\.]+/) # Hack ???
+ strings = strings.reject{|s| s !~ /\.(so|o|dll)$/i}
+
+ strings.each do |lib|
+ pad = paden.find{|pad| File.file?(File.expand_path(lib, pad))}
+
+ unless pad.nil?
+ lib = File.expand_path(lib, pad)
+
+ if File.file?(lib) and not res.include?(lib)
+ todo << lib
+ res << lib
+ end
+ end
end
end
end
@@ -70,7 +90,7 @@
lsb_ia32 = ["libm.so.6", "libdl.so.2", "libcrypt.so.1", "libc.so.6", "libpthread.so.0", "ld-lsb.so.1"]
lsb = lsb_common + lsb_ia32
- res.delete_if{|s| lsb.include?(File.basename(s))} if notthedefaults
+ res.reject!{|s| lsb.include?(File.basename(s))} if notthedefaults
res
end
diff -ur allinoneruby-0.2.8.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.2.9.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.2.8.tar.gz/allinoneruby/ev/ftools.rb 2005-12-03 15:17:55.000000000 +0100
+++ allinoneruby-0.2.9.tar.gz/allinoneruby/ev/ftools.rb 2006-03-08 18:28:57.000000000 +0100
@@ -9,8 +9,10 @@
File.mkpath(todir)
Dir.chdir(from)
- Dir.new(".").each do |e|
- Dir.copy(e, todir+"/"+e) if not [".", ".."].include?(e)
+ Dir.open(".") do |dir|
+ dir.each do |e|
+ Dir.copy(e, todir+"/"+e) if not [".", ".."].include?(e)
+ end
end
Dir.chdir(pdir)
else
@@ -28,14 +30,19 @@
end
def self.rm_rf(entry)
- File.chmod(0755, entry)
+ begin
+ File.chmod(0755, entry)
+ rescue
+ end
if File.ftype(entry) == "directory"
pdir = Dir.pwd
Dir.chdir(entry)
- Dir.new(".").each do |e|
- Dir.rm_rf(e) if not [".", ".."].include?(e)
+ Dir.open(".") do |dir|
+ dir.each do |e|
+ Dir.rm_rf(e) if not [".", ".."].include?(e)
+ end
end
Dir.chdir(pdir)
@@ -71,8 +78,10 @@
Dir.chdir(entry)
begin
- Dir.new(".").each do |e|
- res += Dir.find(e, mask).collect{|e| entry+"/"+e} unless [".", ".."].include?(e)
+ Dir.open(".") do |dir|
+ dir.each do |e|
+ res += Dir.find(e, mask).collect{|e| entry+"/"+e} unless [".", ".."].include?(e)
+ end
end
ensure
Dir.chdir(pdir)
@@ -159,10 +168,12 @@
catch :stop do
ENV["PATH"].split(/#{sep}/).reverse.each do |d|
if File.directory?(d)
- Dir.new(d).each do |e|
- if (linux? and e == file) or (windows? and e.downcase == file.downcase)
- res = File.expand_path(e, d)
- throw :stop
+ Dir.open(d) do |dir|
+ dir.each do |e|
+ if (linux? and e == file) or (windows? and e.downcase == file.downcase)
+ res = File.expand_path(e, d)
+ throw :stop
+ end
end
end
end
@@ -171,4 +182,35 @@
res
end
+
+ def self.same_content?(file1, file2, blocksize=4096)
+ res = false
+
+ if File.file?(file1) and File.file?(file2)
+ res = true
+
+ data1 = nil
+ data2 = nil
+
+ File.open(file1, "rb") do |f1|
+ File.open(file2, "rb") do |f2|
+ catch :not_the_same do
+ while (data1 = f1.read(blocksize))
+ data2 = f2.read(blocksize)
+
+ unless data1 == data2
+ res = false
+
+ throw :not_the_same
+ end
+ end
+
+ res = false if f2.read(blocksize)
+ end
+ end
+ end
+ end
+
+ res
+ end
end
diff -ur allinoneruby-0.2.8.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.2.9.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.2.8.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2005-12-03 15:17:55.000000000 +0100
+++ allinoneruby-0.2.9.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2006-03-08 18:28:57.000000000 +0100
@@ -14,8 +14,10 @@
pdir = Dir.pwd
Dir.chdir(entry)
- Dir.new(".").each do |e|
- Dir.rm_rf(e) if not [".", ".."].include?(e)
+ Dir.open(".") do |dir|
+ dir.each do |e|
+ Dir.rm_rf(e) if not [".", ".."].include?(e)
+ end
end
Dir.chdir(pdir)
diff -ur allinoneruby-0.2.8.tar.gz/allinoneruby/init.rb allinoneruby-0.2.9.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.8.tar.gz/allinoneruby/init.rb 2005-12-03 15:15:22.000000000 +0100
+++ allinoneruby-0.2.9.tar.gz/allinoneruby/init.rb 2006-02-04 01:22:51.000000000 +0100
@@ -100,8 +100,8 @@
copyto(rubywexe, bindir2) if windows? or cygwin? if File.file?(rubyexe)
copyto(dlls(rubyexe), bindir2) if windows? or cygwin?
-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, bindir1)}, bindir2) if windows? or cygwin?
+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?
if STRIP and (linux? or darwin?)
$stderr.puts "Stripping..." unless QUIET
@@ -152,8 +152,19 @@
f.puts " k.gsub!(/^EEE_/, 'ALLINONERUBY_')"
f.puts " eval('%s=%s' % [k, v.inspect])"
f.puts " end"
+ f.puts " ARGV.concat(ALLINONERUBY_PARMSLIST.split(/\000/))"
f.puts "end"
+ f.puts "# Fake Config"
+
+ #f.puts "module Config"
+ #f.puts " DESTDIR = ALLINONERUBY_TEMPDIR"
+ #f.puts "end"
+
+ f.puts "require 'rbconfig'"
+ f.puts "Config::CONFIG['bindir'] = File.join(ALLINONERUBY_TEMPDIR, 'bin')"
+ f.puts "Config::CONFIG['libdir'] = File.join(ALLINONERUBY_TEMPDIR, 'lib')"
+
f.puts "# Start the application"
f.puts "ALLINONERUBY = '#{rubyexe}'"
@@ -184,13 +195,13 @@
f.puts "i eee.info"
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 -T %tempdir%/empty.rb %quotedparms%"
+ 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"
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 -T %tempdir%/empty.rb %quotedparms%"
+ 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"
elsif cygwin?
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb"
else
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb"
end
end
diff -ur allinoneruby-0.2.8.tar.gz/allinoneruby/VERSION allinoneruby-0.2.9.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.8.tar.gz/allinoneruby/VERSION 2005-12-03 15:17:55.000000000 +0100
+++ allinoneruby-0.2.9.tar.gz/allinoneruby/VERSION 2006-03-08 18:28:57.000000000 +0100
@@ -1 +1 @@
-0.2.8
+0.2.9
Binary files allinoneruby-0.2.8.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.9.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.8.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.9.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.8.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.9.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.9.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.10.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.9.tar.gz/allinoneruby/CHANGELOG 2006-03-08 17:56:09.000000000 +0100
+++ allinoneruby-0.2.10.tar.gz/allinoneruby/CHANGELOG 2006-07-29 20:29:06.000000000 +0200
@@ -1,5 +1,12 @@
----------------------------------------------------------------
+0.2.10 - 29.07.2006
+
+* This change is just technical, to stay compatible with
+ RubyScript2Exe.
+
+----------------------------------------------------------------
+
0.2.9 - 08.03.2006
* Fixed a bug concerning parameters with quotes and other
diff -ur allinoneruby-0.2.9.tar.gz/allinoneruby/init.rb allinoneruby-0.2.10.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.9.tar.gz/allinoneruby/init.rb 2006-02-04 01:22:51.000000000 +0100
+++ allinoneruby-0.2.10.tar.gz/allinoneruby/init.rb 2006-07-29 13:58:44.000000000 +0200
@@ -125,6 +125,9 @@
File.open(tmplocation("bootstrap.rb"), "w") do |f|
f.puts "# Set up the environment"
+ f.puts "module ALLINONERUBY"
+ f.puts "end"
+
f.puts "lib = File.expand_path(File.dirname(__FILE__)) + '/lib'"
f.puts "lib.sub!(/^.:/, '/cygdrive/%s' % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
f.puts "$:.clear"
@@ -149,25 +152,28 @@
f.puts " end"
f.puts " lines.each do |line|"
f.puts " k, v = line.strip.split(/\s*=\s*/, 2)"
- f.puts " k.gsub!(/^EEE_/, 'ALLINONERUBY_')"
- f.puts " eval('%s=%s' % [k, v.inspect])"
+ f.puts " k.gsub!(/^EEE_/, '')"
+ f.puts " ALLINONERUBY.module_eval{const_set(k, v)}"
f.puts " end"
- f.puts " ARGV.concat(ALLINONERUBY_PARMSLIST.split(/\000/))"
+ f.puts " ARGV.concat(ALLINONERUBY::PARMSLIST.split(/\000/))"
f.puts "end"
f.puts "# Fake Config"
#f.puts "module Config"
- #f.puts " DESTDIR = ALLINONERUBY_TEMPDIR"
+ #f.puts " DESTDIR = ALLINONERUBY::TEMPDIR"
#f.puts "end"
f.puts "require 'rbconfig'"
- f.puts "Config::CONFIG['bindir'] = File.join(ALLINONERUBY_TEMPDIR, 'bin')"
- f.puts "Config::CONFIG['libdir'] = File.join(ALLINONERUBY_TEMPDIR, 'lib')"
+ f.puts "Config::CONFIG['bindir'] = File.join(ALLINONERUBY::TEMPDIR, 'bin')"
+ f.puts "Config::CONFIG['libdir'] = File.join(ALLINONERUBY::TEMPDIR, 'lib')"
+
+ f.puts "module ALLINONERUBY"
+ f.puts " RUBYEXE = '#{rubyexe}'"
+ f.puts "end"
f.puts "# Start the application"
- f.puts "ALLINONERUBY = '#{rubyexe}'"
f.puts "script = ARGV.shift"
f.puts "if script == '-e'"
f.puts " command = ARGV.shift"
diff -ur allinoneruby-0.2.9.tar.gz/allinoneruby/VERSION allinoneruby-0.2.10.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.9.tar.gz/allinoneruby/VERSION 2006-03-08 18:28:57.000000000 +0100
+++ allinoneruby-0.2.10.tar.gz/allinoneruby/VERSION 2006-07-29 20:29:28.000000000 +0200
@@ -1 +1 @@
-0.2.9
+0.2.10
Binary files allinoneruby-0.2.9.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.10.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.9.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.10.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.9.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.10.tar.gz/allinoneruby/eeew.exe differ
diff -ur allinoneruby-0.2.10.tar.gz/allinoneruby/CHANGELOG allinoneruby-0.2.11.tar.gz/allinoneruby/CHANGELOG
--- allinoneruby-0.2.10.tar.gz/allinoneruby/CHANGELOG 2006-07-29 20:29:06.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/CHANGELOG 2007-04-15 21:40:15.000000000 +0200
@@ -1,5 +1,14 @@
----------------------------------------------------------------
+0.2.11 - 15.04.2007
+
+* Replaced %TEMP% by %HOME%/eee, or %USERPROFILE%/eee, or
+ %TEMP%/eee, or c:/eee (on Windows). Replaced /tmp by
+ $HOME/.eee, or /tmp/.eee (on Linux/Darwin). This is to avoid
+ "Insecure world writable dir".
+
+----------------------------------------------------------------
+
0.2.10 - 29.07.2006
* This change is just technical, to stay compatible with
diff -ur allinoneruby-0.2.10.tar.gz/allinoneruby/ev/dependencies.rb allinoneruby-0.2.11.tar.gz/allinoneruby/ev/dependencies.rb
--- allinoneruby-0.2.10.tar.gz/allinoneruby/ev/dependencies.rb 2006-07-29 20:29:29.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/ev/dependencies.rb 2007-04-15 21:43:49.000000000 +0200
@@ -12,7 +12,7 @@
paden << File.dirname(file)
- windir1 = (ENV["WINDIR"] || "").gsub(/\\/, "/").downcase
+ windir1 = (ENV["SYSTEMROOT"] || ENV["WINDIR"] || "").gsub(/\\/, "/").downcase
drive = windir1.scan(/^(.):/).shift.shift
windir2 = windir1.sub(/^#{drive}:/, "/cygdrive/#{drive.downcase}")
@@ -72,6 +72,8 @@
libs = `ldd #{tempfile}`.split(/\r*\n/).collect{|line| line.split(/\s+/)[3]} if linux?
libs = `otool -L #{tempfile}`.split(/\r*\n/)[1..-1].collect{|line| line.split(/\s+/)[1]} if darwin?
+ libs ||= []
+
libs.compact.each do |lib|
if File.file?(lib) and not res.include?(lib)
todo << lib
diff -ur allinoneruby-0.2.10.tar.gz/allinoneruby/ev/ftools.rb allinoneruby-0.2.11.tar.gz/allinoneruby/ev/ftools.rb
--- allinoneruby-0.2.10.tar.gz/allinoneruby/ev/ftools.rb 2006-07-29 20:29:29.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/ev/ftools.rb 2007-04-15 21:43:49.000000000 +0200
@@ -62,6 +62,7 @@
def self.find(entry=nil, mask=nil)
entry = "." if entry.nil?
+ entry = entry.to_s
entry = entry.gsub(/[\/\\]*$/, "") unless entry.nil?
@@ -95,58 +96,57 @@
res.sort
end
-end
-class File
- def self.rollbackup(file, mode=nil)
- backupfile = file + ".RB.BACKUP"
- controlfile = file + ".RB.CONTROL"
- res = nil
+ def self.home(*args, &block)
+ dir = nil
- File.touch(file) unless File.file?(file)
+ dir ||= ENV["HOME"]
+ dir ||= ENV["USERPROFILE"]
+ dir ||= "c:/"
- # Rollback
+ handle_home_and_temp(dir, *args, &block)
+ end
- if File.file?(backupfile) and File.file?(controlfile)
- $stderr.puts "Restoring #{file}..."
+ def self.temp(*args, &block)
+ dir = nil
- File.copy(backupfile, file) # Rollback from phase 3
- end
+ dir ||= ENV["TMPDIR"]
+ dir ||= ENV["TMP"]
+ dir ||= ENV["TEMP"]
+ dir ||= "/tmp"
- # Reset
+ handle_home_and_temp(dir, *args, &block)
+ end
- File.delete(backupfile) if File.file?(backupfile) # Reset from phase 2 or 3
- File.delete(controlfile) if File.file?(controlfile) # Reset from phase 3 or 4
+ private
- # Backup
+ def self.handle_home_and_temp(dir, *args, &block)
+ file = File.join(*args)
+ file = file.gsub(/\\/, "/")
+ file = file.gsub(/\/+/, "/")
+ file = file.gsub(/^\/+/, "")
+ file = file.gsub(/\/+$/, "")
+
+ dir = dir.gsub(/\\/, "/")
+ dir = dir.gsub(/\/+/, "/")
+ dir = dir.gsub(/\/+$/, "")
+ dir = File.expand_path(file, dir)
- File.copy(file, backupfile) # Enter phase 2
- File.touch(controlfile) # Enter phase 3
+ res = dir
- # The real thing
+ if block
+ pdir = Dir.pwd
- if block_given?
- if mode.nil?
- res = yield
- else
- File.open(file, mode) do |f|
- res = yield(f)
- end
- end
+ Dir.chdir(dir) # Ruby 1.6 doesn't handle Dir.chdir(&block).
+ res = block.call(res)
+ Dir.chdir(pdir)
end
- # Cleanup
-
- File.delete(backupfile) # Enter phase 4
- File.delete(controlfile) # Enter phase 5
-
- # Return, like File.open
-
- res = File.open(file, (mode or "r")) unless block_given?
-
res
end
+end
+class File
def self.touch(file)
if File.exists?(file)
File.utime(Time.now, File.mtime(file), file)
diff -ur allinoneruby-0.2.10.tar.gz/allinoneruby/ev/oldandnewlocation.rb allinoneruby-0.2.11.tar.gz/allinoneruby/ev/oldandnewlocation.rb
--- allinoneruby-0.2.10.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2006-07-29 20:29:29.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/ev/oldandnewlocation.rb 2007-04-15 21:43:49.000000000 +0200
@@ -1,3 +1,5 @@
+require "rubyscript2exe"
+
temp = File.expand_path((ENV["TMPDIR"] or ENV["TMP"] or ENV["TEMP"] or "/tmp").gsub(/\\/, "/"))
dir = "#{temp}/oldandnewlocation.#{Process.pid}"
@@ -40,7 +42,7 @@
oldlocation
rescue NameError
def oldlocation(file="")
- dir = ENV["OLDDIR"]
+ dir = (ENV["OLDDIR"] || RUBYSCRIPT2EXE.userdir) rescue "."
res = nil
if block_given?
@@ -61,7 +63,7 @@
newlocation
rescue NameError
def newlocation(file="")
- dir = ENV["NEWDIR"]
+ dir = (ENV["NEWDIR"] || RUBYSCRIPT2EXE.appdir) rescue "."
res = nil
if block_given?
@@ -82,7 +84,7 @@
applocation
rescue NameError
def applocation(file="")
- dir = ENV["APPDIR"]
+ dir = (ENV["APPDIR"] || RUBYSCRIPT2EXE.appdir) rescue "."
res = nil
if block_given?
diff -ur allinoneruby-0.2.10.tar.gz/allinoneruby/init.rb allinoneruby-0.2.11.tar.gz/allinoneruby/init.rb
--- allinoneruby-0.2.10.tar.gz/allinoneruby/init.rb 2006-07-29 13:58:44.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/init.rb 2006-07-31 18:49:55.000000000 +0200
@@ -4,8 +4,9 @@
require "ev/dependencies"
require "ev/ftools"
require "rbconfig"
+require "rubyscript2exe"
-exit if defined?(REQUIRE2LIB)
+exit if RUBYSCRIPT2EXE.is_compiling?
def backslashes(s)
s = s.gsub(/^\.\//, "").gsub(/\//, "\\\\") if windows?
diff -ur allinoneruby-0.2.10.tar.gz/allinoneruby/rubyscript2exe.rb allinoneruby-0.2.11.tar.gz/allinoneruby/rubyscript2exe.rb
--- allinoneruby-0.2.10.tar.gz/allinoneruby/rubyscript2exe.rb 2007-04-15 21:44:19.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/rubyscript2exe.rb 2007-04-15 21:43:49.000000000 +0200
@@ -0,0 +1,103 @@
+module RUBYSCRIPT2EXE
+ @@dlls = []
+ @@bin = []
+ @@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
+
+ def self.bin ; @@bin ; end
+ def self.bin=(a) ; @@bin = a ; end
+
+ def self.lib ; @@lib ; end
+ def self.lib=(a) ; @@lib = a ; end
+
+ def self.tempdir ; @@tempdir ; end
+ def self.tempdir=(s) ; @@tempdir = s ; end
+
+ 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)
+ if is_compiled? and defined?(TEMPDIR)
+ use_given_dir(File.expand_path(File.join(TEMPDIR, "app")), file, &block)
+ else
+ use_given_dir(File.dirname(File.expand_path($0, USERDIR)), file, &block)
+ end
+ end
+
+ def self.userdir(file=nil, &block)
+ use_given_dir(USERDIR, file, &block)
+ end
+
+ def self.exedir(file=nil, &block)
+ if is_compiled? and defined?(APPEXE)
+ use_given_dir(File.dirname(APPEXE), file, &block)
+ else
+ use_given_dir(File.dirname(File.expand_path($0)), file, &block)
+ end
+ end
+
+ def self.use_given_dir(dir, *file, &block)
+ if block
+ pdir = Dir.pwd
+
+ Dir.chdir(dir)
+ res = block[]
+ Dir.chdir(pdir)
+ else
+ file = file.compact
+ res = File.expand_path(File.join(*file), dir)
+ end
+
+ res
+ end
+
+ class << self
+ private :use_given_dir
+ end
+
+ def self.is_compiling?
+ defined?(REQUIRE2LIB)
+ end
+
+ def self.is_compiled?
+ defined?(COMPILED)
+ end
+
+ def self.executable
+ if is_compiled? and defined?(APPEXE)
+ APPEXE
+ else
+ File.expand_path($0)
+ end
+ 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 allinoneruby-0.2.10.tar.gz/allinoneruby/VERSION allinoneruby-0.2.11.tar.gz/allinoneruby/VERSION
--- allinoneruby-0.2.10.tar.gz/allinoneruby/VERSION 2006-07-29 20:29:28.000000000 +0200
+++ allinoneruby-0.2.11.tar.gz/allinoneruby/VERSION 2007-04-15 21:43:49.000000000 +0200
@@ -1 +1 @@
-0.2.10
+0.2.11
Binary files allinoneruby-0.2.10.tar.gz/allinoneruby/eee.exe and allinoneruby-0.2.11.tar.gz/allinoneruby/eee.exe differ
Binary files allinoneruby-0.2.10.tar.gz/allinoneruby/eee_linux and allinoneruby-0.2.11.tar.gz/allinoneruby/eee_linux differ
Binary files allinoneruby-0.2.10.tar.gz/allinoneruby/eeew.exe and allinoneruby-0.2.11.tar.gz/allinoneruby/eeew.exe differ