diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/README rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/README
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/README 2004-12-04 00:13:27.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/README 2005-03-23 22:33:17.000000000 +0100
@@ -2,9 +2,9 @@
The latter is just for playing with the internals. Both are
available on the site.
- Usage: ruby init.rb application[.rb[w]] [--rubyscript2exe-rubyw|--rubyscript2exe-ruby]
+ Usage: ruby init.rb application[.rb[w]] [--rubyscript2exe-rubyw|--rubyscript2exe-ruby] [--rubyscript2exe-nostrip]
-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/rubyscript2exe/index.html .
diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/SUMMARY rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/SUMMARY
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/SUMMARY 2005-03-26 18:10:50.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/SUMMARY 2005-03-26 18:10:43.000000000 +0100
@@ -0,0 +1 @@
+A Ruby Compiler
diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/VERSION rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/VERSION
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/VERSION 2005-03-26 18:10:50.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/VERSION 2005-03-26 18:10:43.000000000 +0100
@@ -0,0 +1 @@
+0.3.3
diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/eee.pas rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/eee.pas
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/eee.pas 2005-01-19 00:10:18.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/eee.pas 2005-03-26 18:10:43.000000000 +0100
@@ -71,7 +71,7 @@
getdir(drivenr, dir);
{$ELSE} // Foutje indien bovenliggende dirs niet benaderbaar zijn.
if (currentdir = ´´) then begin
- currentdir := getenv(´EEEDIR´);
+ currentdir := getenv(´EEE_DIR´);
if (currentdir = ´´) then begin
currentdir := getenv(´PWD´);
end;
@@ -407,12 +407,19 @@
procedure pakin;
+{$IFDEF WIN32}
+{$ELSE}
+ var
+ c : string;
+ p : string;
+{$ENDIF}
+
begin
assign(eeefile, paramstr(1));
reset(eeefile);
- exename := getenv(´EEEEXE´);
+ exename := getenv(´EEE_EXE´);
if (exename = ´´) then begin
exename := paramstr(0);
end;
@@ -469,6 +476,13 @@
close(outfile);
+ {$IFDEF WIN32}
+ {$ELSE}
+ c := ´/bin/sh´;
+ p := ´-c "chmod +x ´ + paramstr(2);
+ executeprocess(c, p);
+ {$ENDIF}
+
end;
@@ -643,6 +657,13 @@
procedure pakhieruit;
+{$IFDEF WIN32}
+{$ELSE}
+ var
+ c : string;
+ p : string;
+{$ENDIF}
+
begin
assign(infile, paramstr(0));
@@ -653,6 +674,12 @@
blockcopy(infile, outfile, filesize(infile)-t.gzlength-sizeof(t));
close(outfile);
+ {$IFDEF WIN32}
+ {$ELSE}
+ c := ´/bin/sh´;
+ p := ´-c "chmod +x ´ + t.exename;
+ executeprocess(c, p);
+ {$ENDIF}
assign(outfile, workfile);
rewrite(outfile, 1);
diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/ev/dependencies.rb rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/ev/dependencies.rb
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/ev/dependencies.rb 2005-01-19 00:10:18.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/ev/dependencies.rb 2005-03-26 18:10:43.000000000 +0100
@@ -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 rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb 2005-01-19 00:10:18.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/ev/oldandnewlocation.rb 2005-03-26 18:10:43.000000000 +0100
@@ -1,9 +1,9 @@
-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)
diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/init.rb
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/init.rb 2005-01-18 23:38:21.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/init.rb 2005-03-23 22:51:19.000000000 +0100
@@ -7,7 +7,7 @@
require "ev/ftools"
require "rbconfig"
-exit if ARGV.include?("--rubyscript2exe-exit")
+exit if defined?(REQUIRE2LIB)
def backslashes(s)
s = s.gsub(/^\.\//, "").gsub(/\//, "\\\\") if windows?
@@ -15,23 +15,37 @@
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
+
RUBY = ARGV.include?("--rubyscript2exe-ruby")
RUBYW = ARGV.include?("--rubyscript2exe-rubyw")
+STRIP = (not ARGV.include?("--rubyscript2exe-nostrip"))
VERBOSE = ARGV.include?("--rubyscript2exe-verbose")
QUIET = (ARGV.include?("--rubyscript2exe-quiet") and not VERBOSE)
@@ -42,9 +56,9 @@
if script.nil?
$stderr.puts <<-EOF
- Usage: ruby init.rb application[.rb[w]] [--rubyscript2exe-rubyw|--rubyscript2exe-ruby]
+ Usage: ruby init.rb application[.rb[w]] [--rubyscript2exe-rubyw|--rubyscript2exe-ruby] [--rubyscript2exe-nostrip]
- 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/rubyscript2exe/index.html .
@@ -67,7 +81,7 @@
script = "#{script}.rb" unless script =~ /\.rbw?$/
app = File.basename(script.gsub(/\.rbw?$/, ""))
-$stderr.puts "Tracing #{app}..." unless QUIET
+$stderr.puts "Tracing #{app} ..." unless QUIET
libs = $:.collect{|a| "-I ´#{a}´"}
loadscript = tmplocation("require2lib2rubyscript2exe.rb")
@@ -84,103 +98,93 @@
load(loadscript)
-$stderr.puts "Copying files..." unless QUIET
-
Dir.mkdir(bindir2) unless File.directory?(bindir2)
Dir.mkdir(libdir2) unless File.directory?(libdir2)
Dir.mkdir(appdir2) unless File.directory?(appdir2)
-if linux?
+if linux? or darwin?
rubyexe = "#{bindir1}/ruby"
else
rubyexe = "#{bindir1}/ruby.exe"
rubywexe = "#{bindir1}/rubyw.exe"
end
-if defined?(RUBYSCRIPT2EXE_DLLS)
- tocopy = [RUBYSCRIPT2EXE_DLLS].flatten
-else
- tocopy = []
-end
-
-tocopy.each do |s1|
- s1 = oldlocation(s1)
- file = File.basename(s1)
- s2 = File.expand_path(file, bindir2)
-
- $stderr.puts "Copying #{s1} ..." if VERBOSE
- File.copy(s1, s2) unless File.file?(s2)
-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} ..." if VERBOSE
- File.copy(s1, s2) unless File.file?(s2)
-end
-
-begin
- s1 = oldlocation(script)
- s2 = File.expand_path("app.rb", appdir2)
-
- $stderr.puts "Copying #{s1} ..." if VERBOSE
- File.copy(s1, s2) unless File.file?(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} ..." if VERBOSE
- File.copy(s1, s2) unless File.file?(s2)
-end
+$stderr.puts "Copying files..." unless QUIET
+copyto([RUBYSCRIPT2EXE_DLLS].flatten.collect{|s| oldlocation(s)}, bindir2) if defined?(RUBYSCRIPT2EXE_DLLS)
+copyto([RUBYSCRIPT2EXE_BIN].flatten.collect{|s| oldlocation(s)}, bindir2) if defined?(RUBYSCRIPT2EXE_BIN)
+copyto([RUBYSCRIPT2EXE_LIB].flatten.collect{|s| oldlocation(s)}, libdir2) if defined?(RUBYSCRIPT2EXE_LIB)
+
+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([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?
+
+#if File.file?("#{libdir2}/tk.rb")
+# $stderr.puts "Copying TCL/TK..." unless QUIET
+#
+# require "tk"
+#
+# tcllib = Tk::TCL_LIBRARY
+# tklib = Tk::TK_LIBRARY
+#
+# Dir.copy(tcllib, File.expand_path(File.basename(tcllib), libdir2))
+# Dir.copy(tklib, File.expand_path(File.basename(tklib), libdir2))
+#end
+
+if STRIP and (linux? or darwin?)
+ $stderr.puts "Stripping..." unless QUIET
+
+ 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 = "#{app}.exe"
-appexe = "#{app}.bin" if linux?
+appexe = "#{app}_linux" if linux?
+appexe = "#{app}_darwin" if darwin?
appico = "#{app}.ico"
$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 = File.expand_path(File.dirname(__FILE__)) + ´/lib´"
f.puts "lib.sub!(/^.:/, ´/cygdrive/%s´ % $&[0..0].downcase) if lib =~ /^.:/" if cygwin?
f.puts "$:.clear"
f.puts "$: << lib"
end
File.open(tmplocation("bootstrap.rb"), "w") do |f|
+ f.puts "require ´rubygems´" if RUBYSCRIPT2EXE_RUBYGEMS
+ f.puts "RUBYSCRIPT2EXE = ´#{rubyexe}´"
f.puts "load($0 = ARGV.shift)"
end
@@ -188,23 +192,22 @@
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.sh" if linux? or darwin?
f.puts "f eee.rb"
f.puts "f bootstrap.rb"
f.puts "f empty.rb"
f.puts "r app"
- 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 %tempdir%/app/app.rb %quotedparms%"
+
+ apprb = File.basename(script)
+
+ 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 %tempdir%/app/#{apprb} %quotedparms% | sh -s"
elsif cygwin?
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %tempdir1%/app/app.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir1%/eee.rb -r %tempdir1%/bootstrap.rb -T1 %tempdir1%/empty.rb %tempdir1%/app/#{apprb} %quotedparms%"
else
- f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %tempdir%\\app\\app.rb %quotedparms%"
+ f.puts "c %tempdir%\\bin\\#{rubyexe} -r %tempdir%\\eee.rb -r %tempdir%\\bootstrap.rb -T1 %tempdir%\\empty.rb %tempdir%\\app\\#{apprb} %quotedparms%"
end
end
@@ -212,20 +215,34 @@
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?
oldlocation do
system(backslashes("reshacker -modify #{tmplocation(appexe)}, #{appexe}, #{appico}, icon,appicon,")) if File.file?(appico) and (windows? or cygwin?)
diff -ur rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/require2lib.rb rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/require2lib.rb
--- rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/require2lib.rb 2005-01-19 00:10:18.000000000 +0100
+++ rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/require2lib.rb 2005-03-26 18:10:43.000000000 +0100
@@ -5,6 +5,8 @@
$require2lib_loaded = []
+REQUIRE2LIB = true unless defined?(REQUIRE2LIB)
+
module Kernel
alias :old_load :load
def load(filename, wrap=false)
@@ -167,11 +169,14 @@
end
end
- $stderr.puts "Not all required files are pure Ruby." unless pureruby or QUIET
+ $stderr.puts "Not all required files are pure Ruby." unless pureruby if VERBOSE
unless LOADSCRIPT == ORGDIR
File.open(LOADSCRIPT, "w") do |f|
f.puts "RUBYSCRIPT2EXE_DLLS = #{RUBYSCRIPT2EXE_DLLS.inspect}" if defined?(RUBYSCRIPT2EXE_DLLS)
+ f.puts "RUBYSCRIPT2EXE_BIN = #{RUBYSCRIPT2EXE_BIN.inspect}" if defined?(RUBYSCRIPT2EXE_BIN)
+ f.puts "RUBYSCRIPT2EXE_LIB = #{RUBYSCRIPT2EXE_LIB.inspect}" if defined?(RUBYSCRIPT2EXE_LIB)
+ f.puts "RUBYSCRIPT2EXE_RUBYGEMS = #{rubygems.inspect}"
end
end
end
Binary files rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/eee.bin and rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/eee.bin differ
Binary files rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/eee.exe and rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/eee.exe differ
Binary files rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/eee_linux and rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/eee_linux differ
Binary files rubyscript2exe-0.3.2.tar.gz/rubyscript2exe/eeew.exe and rubyscript2exe-0.3.3.tar.gz/rubyscript2exe/eeew.exe differ