diff -ur rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/CHANGELOG rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/CHANGELOG
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/CHANGELOG 2005-12-03 14:25:38.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/CHANGELOG 2006-03-08 17:57:17.000000000 +0100
@@ -1,5 +1,22 @@
----------------------------------------------------------------
+0.4.2 - 08.03.2006
+
+* Got rid of warning "Insecure world writable dir".
+
+* Fixed a bug concerning parameters with quotes and other
+ escapable characters.
+
+* Fixed a bug concerning "Too many open files".
+
+* Fixed a bug concerning spaced parameters on Linux and Darwin.
+
+* More DLL's are found and embedded.
+
+* AllInOneRuby and RubyScript2Exe now work together.
+
+----------------------------------------------------------------
+
0.4.1 - 03.12.2005
* Fixed a bug concerning multiline parameters.
diff -ur rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/eee.pas rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/eee.pas
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/eee.pas 2005-12-03 14:29:03.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/eee.pas 2006-03-08 18:29:17.000000000 +0100
@@ -54,6 +54,7 @@
teller : longint;
parms : string;
quotedparms : string;
+ parmslist : string;
justextract : boolean;
list : boolean;
info : boolean;
@@ -796,6 +797,7 @@
writeln(infofile, 'EEE_TEMPDIR=' + tempdir);
writeln(infofile, 'EEE_PARMS=' + parms);
writeln(infofile, 'EEE_QUOTEDPARMS=' + quotedparms);
+ writeln(infofile, 'EEE_PARMSLIST=' + parmslist);
close(infofile);
@@ -843,6 +845,7 @@
tekst2 := AnsiReplaceStr(tekst2, '%parms%', parms);
tekst2 := AnsiReplaceStr(tekst2, '%quotedparms%', quotedparms);
+ tekst2 := AnsiReplaceStr(tekst2, '%parmslist%', parmslist);
tekst2 := AnsiReplaceStr(tekst2, '%orgdir%', orgdir);
tekst2 := AnsiReplaceStr(tekst2, '%tempdir%', tempdir);
tekst2 := AnsiReplaceStr(tekst2, '%tempdir1%', workdir1);
@@ -1035,6 +1038,7 @@
parms := '';
quotedparms := '';
+ parmslist := '';
for teller := 1 to paramcount do begin
if (paramstr(teller) = '--eee-justextract') then begin
justextract := true;
@@ -1048,13 +1052,15 @@
info := true;
end;
- if ((parms = '') and (quotedparms = '')) then begin
+ if ((parms = '') and (quotedparms = '') and (parmslist = '')) then begin
parms := paramstr(teller);
quotedparms := '''' + paramstr(teller) + '''';
+ parmslist := paramstr(teller) + #0;
end
else begin
parms := parms + ' ' + paramstr(teller);
quotedparms := quotedparms + ' ''' + paramstr(teller) + '''';
+ parmslist := parmslist + paramstr(teller) + #0;
end;
end;
diff -ur rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/ev/dependencies.rb rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/ev/dependencies.rb
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/ev/dependencies.rb 2005-12-03 14:29:03.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/ev/dependencies.rb 2006-03-08 18:29:17.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 rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/ev/ftools.rb rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/ev/ftools.rb
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/ev/ftools.rb 2005-12-03 14:29:03.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/ev/ftools.rb 2006-03-08 18:29:18.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 rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb 2005-12-03 14:29:03.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb 2006-03-08 18:29:17.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 rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/init.rb
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/init.rb 2005-12-03 14:09:32.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/init.rb 2006-02-04 00:55:33.000000000 +0100
@@ -1,6 +1,8 @@
$: << File.dirname(File.expand_path(__FILE__))
-required = $".collect{|a| "-r '#{a}'"}
+required = $"
+required = required.reject{|a| File.dirname(a) == ALLINONERUBY_TEMPDIR} if defined?(ALLINONERUBY_TEMPDIR)
+required = required.collect{|a| "-r '#{a}'"}
require "ev/oldandnewlocation"
require "ev/dependencies"
@@ -102,6 +104,7 @@
unless File.file?(loadscript)
$stderr.puts "Couldn't execute this command (rc=#{$?}):\n#{command}"
+
exit 16
end
end
@@ -134,8 +137,8 @@
copyto([oldlocation(script)], appdir2)
-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 TK or defined?(RUBYSCRIPT2EXE_TK)
if File.file?("#{libdir2}/tk.rb")
@@ -182,7 +185,10 @@
f.puts "bin = dir + '/bin'"
f.puts "lib = dir + '/lib'"
- f.puts "s = ENV['PATH'].dup"
+ f.puts "verbose = $VERBOSE"
+ f.puts "$VERBOSE = nil"
+ f.puts "s = ENV['PATH'].dup"
+ f.puts "$VERBOSE = verbose"
f.puts "if Dir.pwd[1..2] == ':/'"
f.puts " s << (';'+bin.gsub(/\\//, '\\\\'))"
f.puts "else"
@@ -212,6 +218,7 @@
f.puts " v = File.expand_path(v) if k == 'RUBYSCRIPT2EXE_APPEXE'"
f.puts " eval('%s=%s' % [k, v.inspect])"
f.puts " end"
+ f.puts " ARGV.concat(RUBYSCRIPT2EXE_PARMSLIST.split(/\000/))"
f.puts "end"
f.puts "# Requirements"
@@ -238,13 +245,13 @@
apprb = File.basename(script)
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 %tempdir%/app/#{apprb} %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 %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 -T %tempdir%/empty.rb %tempdir%/app/#{apprb} %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 %tempdir%/app/#{apprb}"
elsif cygwin?
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %tempdir1%/app/#{apprb} %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %tempdir1%/app/#{apprb}"
else
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %tempdir%\\app\\#{apprb} %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %tempdir%\\app\\#{apprb}"
end
end
diff -ur rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/VERSION rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/VERSION
--- rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/VERSION 2005-12-03 14:29:03.000000000 +0100
+++ rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/VERSION 2006-03-08 18:29:17.000000000 +0100
@@ -1 +1 @@
-0.4.1
+0.4.2
Binary files rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/eee.exe and rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/eee.exe differ
Binary files rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/eee_linux and rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/eee_linux differ
Binary files rubyscript2exe-0.4.1.tar.gz/rubyscript2exe/eeew.exe and rubyscript2exe-0.4.2.tar.gz/rubyscript2exe/eeew.exe differ