Skip to content
This repository was archived by the owner on Mar 2, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

0.5.3 - 29.05.2007

* Added a bit of Config::CONFIG magic to make RubyScript2Exe
* Added a bit of RbConfig::CONFIG magic to make RubyScript2Exe
work with RubyGems >= 0.9.3.

* Moved the embedded bin directory to the front of $PATH.
Expand Down Expand Up @@ -151,7 +151,7 @@
* Added --rubyscript2exe-tk (experimental).

* Added a check for the existence of
Config::CONFIG["bindir"]/ruby (RubyScript2Exe doesn't work
RbConfig::CONFIG["bindir"]/ruby (RubyScript2Exe doesn't work
without it...).

* Fixed a bug concerning program arguments with spaces on
Expand Down
2 changes: 1 addition & 1 deletion ev/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def ldds(file, notthedefaults=true)
todo = []

todo2.each do |file|
File.copy(file, tempfile) # Libraries on Debian are no executables.
FileUtils.copy(file, tempfile) # Libraries on Debian are no executables.
File.chmod(0755, tempfile)

libs = `ldd #{tempfile}`.split(/\r*\n/).collect{|line| line.split(/\s+/)[3]} if linux?
Expand Down
8 changes: 4 additions & 4 deletions ev/ftools.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require "ftools"
require "fileutils"

class Dir
def self.copy(from, to)
if File.directory?(from)
pdir = Dir.pwd
todir = File.expand_path(to)

File.mkpath(todir)
FileUtils.mkpath(todir)

Dir.chdir(from)
Dir.open(".") do |dir|
Expand All @@ -18,9 +18,9 @@ def self.copy(from, to)
else
todir = File.dirname(File.expand_path(to))

File.mkpath(todir)
FileUtils.mkpath(todir)

File.copy(from, to)
FileUtils.copy(from, to)
end
end

Expand Down
66 changes: 33 additions & 33 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def cygwin?
end

def target_os
Config::CONFIG["target_os"] or ""
RbConfig::CONFIG["target_os"] or ""
end

def copyto(files, dest)
Expand All @@ -48,7 +48,7 @@ def copyto(files, dest)

$stderr.puts "Copying #{fromfile} ..." if VERBOSE

File.copy(fromfile, tofile) unless File.file?(tofile)
FileUtils.copy(fromfile, tofile) unless File.file?(tofile)
end
end

Expand Down Expand Up @@ -100,8 +100,8 @@ def copyto(files, dest)
exit 1
end

bindir1 = Config::CONFIG["bindir"]
libdir1 = Config::CONFIG["libdir"]
bindir1 = RbConfig::CONFIG["bindir"]
libdir1 = RbConfig::CONFIG["libdir"]
bindir2 = tmplocation("bin/")
libdir2 = tmplocation("lib/")
appdir2 = tmplocation("app/")
Expand Down Expand Up @@ -261,32 +261,32 @@ def copyto(files, dest)

f.puts "require 'rbconfig'"

f.puts "Config::CONFIG['archdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8/i686-linux
f.puts "Config::CONFIG['bindir'] = dir + '/bin'" # /usr/local/bin
f.puts "Config::CONFIG['datadir'] = dir + '/share'" # /usr/local/share
f.puts "Config::CONFIG['datarootdir'] = dir + '/share'" # /usr/local/share
f.puts "Config::CONFIG['docdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "Config::CONFIG['dvidir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "Config::CONFIG['exec_prefix'] = dir + ''" # /usr/local
f.puts "Config::CONFIG['htmldir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "Config::CONFIG['includedir'] = dir + '/include'" # /usr/local/include
f.puts "Config::CONFIG['infodir'] = dir + '/share/info'" # /usr/local/share/info
f.puts "Config::CONFIG['libdir'] = dir + '/lib'" # /usr/local/lib
f.puts "Config::CONFIG['libexecdir'] = dir + '/libexec'" # /usr/local/libexec
f.puts "Config::CONFIG['localedir'] = dir + '/share/locale'" # /usr/local/share/locale
f.puts "Config::CONFIG['localstatedir'] = dir + '/var'" # /usr/local/var
f.puts "Config::CONFIG['mandir'] = dir + '/share/man'" # /usr/local/share/man
f.puts "Config::CONFIG['pdfdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "Config::CONFIG['prefix'] = dir + ''" # /usr/local
f.puts "Config::CONFIG['psdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "Config::CONFIG['rubylibdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8
f.puts "Config::CONFIG['sbindir'] = dir + '/sbin'" # /usr/local/sbin
f.puts "Config::CONFIG['sharedstatedir'] = dir + '/com'" # /usr/local/com
f.puts "Config::CONFIG['sitearchdir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby/1.8/i686-linux
f.puts "Config::CONFIG['sitedir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby
f.puts "Config::CONFIG['sitelibdir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby/1.8
f.puts "Config::CONFIG['sysconfdir'] = dir + '/etc'" # /usr/local/etc
f.puts "Config::CONFIG['topdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8/i686-linux
f.puts "RbConfig::CONFIG['archdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8/i686-linux
f.puts "RbConfig::CONFIG['bindir'] = dir + '/bin'" # /usr/local/bin
f.puts "RbConfig::CONFIG['datadir'] = dir + '/share'" # /usr/local/share
f.puts "RbConfig::CONFIG['datarootdir'] = dir + '/share'" # /usr/local/share
f.puts "RbConfig::CONFIG['docdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "RbConfig::CONFIG['dvidir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "RbConfig::CONFIG['exec_prefix'] = dir + ''" # /usr/local
f.puts "RbConfig::CONFIG['htmldir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "RbConfig::CONFIG['includedir'] = dir + '/include'" # /usr/local/include
f.puts "RbConfig::CONFIG['infodir'] = dir + '/share/info'" # /usr/local/share/info
f.puts "RbConfig::CONFIG['libdir'] = dir + '/lib'" # /usr/local/lib
f.puts "RbConfig::CONFIG['libexecdir'] = dir + '/libexec'" # /usr/local/libexec
f.puts "RbConfig::CONFIG['localedir'] = dir + '/share/locale'" # /usr/local/share/locale
f.puts "RbConfig::CONFIG['localstatedir'] = dir + '/var'" # /usr/local/var
f.puts "RbConfig::CONFIG['mandir'] = dir + '/share/man'" # /usr/local/share/man
f.puts "RbConfig::CONFIG['pdfdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "RbConfig::CONFIG['prefix'] = dir + ''" # /usr/local
f.puts "RbConfig::CONFIG['psdir'] = dir + '/share/doc/$(PACKAGE)'" # /usr/local/share/doc/$(PACKAGE)
f.puts "RbConfig::CONFIG['rubylibdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8
f.puts "RbConfig::CONFIG['sbindir'] = dir + '/sbin'" # /usr/local/sbin
f.puts "RbConfig::CONFIG['sharedstatedir'] = dir + '/com'" # /usr/local/com
f.puts "RbConfig::CONFIG['sitearchdir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby/1.8/i686-linux
f.puts "RbConfig::CONFIG['sitedir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby
f.puts "RbConfig::CONFIG['sitelibdir'] = dir + '/lib'" # /usr/local/lib/ruby/site_ruby/1.8
f.puts "RbConfig::CONFIG['sysconfdir'] = dir + '/etc'" # /usr/local/etc
f.puts "RbConfig::CONFIG['topdir'] = dir + '/lib'" # /usr/local/lib/ruby/1.8/i686-linux

f.puts "# Load eee.info"

Expand Down Expand Up @@ -370,7 +370,7 @@ def copyto(files, dest)
from = oldlocation(eeeexe) unless File.file?(from)
to = tmplocation(eeeexe)

File.copy(from, to) unless from == to
FileUtils.copy(from, to) unless from == to
File.chmod(0755, to) if linux? or darwin?

tmplocation do
Expand Down Expand Up @@ -401,7 +401,7 @@ def copyto(files, dest)
from = eeebin1
to = eeebin2

File.copy(from, to) unless from == to
FileUtils.copy(from, to) unless from == to
File.chmod(0755, to) if linux? or darwin?

system(backslashes("#{eeebin2} #{appeee} #{appexe}"))
Expand All @@ -410,7 +410,7 @@ def copyto(files, dest)
from = tmplocation(appexe)
to = oldlocation(appexe)

File.copy(from, to) unless from == to
FileUtils.copy(from, to) unless from == to

oldlocation do
system(backslashes("reshacker -modify #{tmplocation(appexe)}, #{appexe}, #{appico}, icon,appicon,")) if File.file?(appico) and (windows? or cygwin?)
Expand Down
14 changes: 7 additions & 7 deletions require2lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module REQUIRE2LIB
THISFILE = File.expand_path(__FILE__)
LIBDIR = File.expand_path((ENV["REQUIRE2LIB_LIBDIR"] or "."))
LOADSCRIPT = File.expand_path((ENV["REQUIRE2LIB_LOADSCRIPT"] or "."))
RUBYLIBDIR = Config::CONFIG["rubylibdir"]
SITELIBDIR = Config::CONFIG["sitelibdir"]
RUBYLIBDIR = RbConfig::CONFIG["rubylibdir"]
SITELIBDIR = RbConfig::CONFIG["sitelibdir"]

at_exit do
Dir.chdir(ORGDIR)
Expand All @@ -33,7 +33,7 @@ module REQUIRE2LIB
def self.gatherlibs
$stderr.puts "Gathering files..." unless QUIET

File.makedirs(LIBDIR)
FileUtils.makedirs(LIBDIR)

if RUBYGEMS
begin
Expand Down Expand Up @@ -66,7 +66,7 @@ def self.gatherlibs
fromfile = File.join(fromdir, "#{gem.full_name}.gemspec")
tofile = File.join(todir, "#{gem.full_name}.gemspec")

File.copy(fromfile, tofile)
FileUtils.copy(fromfile, tofile)

fromdir = gem.full_gem_path
todir = File.expand_path(File.join("rubyscript2exe.gems/gems", gem.full_name), LIBDIR)
Expand All @@ -79,7 +79,7 @@ def self.gatherlibs
unless lib.empty?
lib = File.expand_path(lib, todir)
lib = lib + "/"

requireablefiles << file[lib.length..-1] if file =~ /^#{lib.gsub('+', '\+')}/
end
end
Expand All @@ -102,8 +102,8 @@ def self.gatherlibs
(JUSTSITELIB and fromfile.include?(SITELIBDIR))
$stderr.puts "Found #{fromfile} ." if VERBOSE

File.makedirs(File.dirname(tofile)) unless File.directory?(File.dirname(tofile))
File.copy(fromfile, tofile)
FileUtils.makedirs(File.dirname(tofile)) unless File.directory?(File.dirname(tofile))
FileUtils.copy(fromfile, tofile)

pureruby = false unless req =~ /\.(rbw?|ruby)$/i
else
Expand Down