diff -ur rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/init.rb --- rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/init.rb 2004-01-30 14:49:35.000000000 +0100 +++ rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/init.rb 2004-03-15 22:37:28.000000000 +0100 @@ -5,7 +5,23 @@ module RubyScript2Exe def self.execute(command) - system(command.gsub(/^\.\//, "").gsub(/\//, "\\\\")) + command = command.gsub(/^\.\//, "").gsub(/\//, "\\\\") + + system(command) +end + +def self.copy(from, to) + from = from.gsub(/^\.\//, "").gsub(/\//, "\\\\") + to = to.gsub(/^\.\//, "").gsub(/\//, "\\\\") + + File.copy(from, to) +end + +def self.move(from, to) + from = from.gsub(/^\.\//, "").gsub(/\//, "\\\\") + to = to.gsub(/^\.\//, "").gsub(/\//, "\\\\") + + File.move(from, to) end script = ARGV.shift @@ -23,32 +39,29 @@ end bindir = Config::CONFIG["bindir"] -libruby_so = Config::CONFIG["LIBRUBY_SO"] - -olddir = oldlocation -newdir = newlocation +libruby = Config::CONFIG["LIBRUBY_SO"] if not script.nil? script = "#{script}.rb" if not script =~ /\.rbw?$/ - app = script.gsub(/\.rbw?$/, "") + app = File.basename(script.gsub(/\.rbw?$/, "")) puts "Tracing #{app}..." oldlocation do tar = FileTest.file?("tar.exe") - File.copy("#{newdir}/tar.exe", "tar.exe") if not tar + copy(newlocation("tar.exe"), "tar.exe") if not tar - execute("#{bindir}/ruby -r #{newdir}/require2tar.rb #{script} #{ARGV.collect{|a| "´" + a + "´"}.join(" ")}") + execute("#{bindir}/ruby -r ´#{newlocation("require2tar.rb")}´ ´#{script}´ #{ARGV.collect{|a| "´" + a + "´"}.join(" ")}") - File.delete("tar.exe") if not tar + File.delete("tar.exe") if not tar end puts "Gathering files..." - File.copy("#{bindir}/#{rubyexe}", rubyexe) - File.copy("#{bindir}/#{libruby_so}", libruby_so) - File.move("#{olddir}/rubyrequired.tar", "rubyrequired.tar") - File.copy("#{olddir}/#{script}", "app.rb") + copy("#{bindir}/#{rubyexe}", rubyexe) + copy("#{bindir}/#{libruby}", libruby) + move("#{oldlocation("rubyrequired.tar")}", "rubyrequired.tar") + copy("#{oldlocation(script)}", "app.rb") puts "Packing..." @@ -58,7 +71,7 @@ File.open("app.eee", "w") do |f| f.puts "f #{rubyexe}" - f.puts "f #{libruby_so}" + f.puts "f #{libruby}" f.puts "f rubyrequired.rb" f.puts "f app.rb" @@ -68,10 +81,14 @@ end if rubyw - execute("./eee app.eee #{olddir}/#{app}.exe eeew.exe"); + exe = "eeew.exe" else - execute("./eee app.eee #{olddir}/#{app}.exe eee.exe"); + exe = "eee.exe" end + + execute("./eee app.eee #{app}.exe #{exe}") + + copy("#{app}.exe", oldlocation) end end diff -ur rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/require2tar.rb rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/require2tar.rb --- rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/require2tar.rb 2004-02-16 21:38:33.000000000 +0100 +++ rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/require2tar.rb 2004-03-16 10:51:08.000000000 +0100 @@ -55,11 +55,15 @@ File.copy("tar.exe", File.expand_path("tar.exe", tmpdir)) if FileTest.file?("tar.exe") pdir = Dir.pwd - s = "tar chf #{File.expand_path(tarfile)} #{tardir}" Dir.chdir(tmpdir) puts "Creating #{tarfile}..." - system(s) + system("tar chf #{tarfile} #{tardir}") + + s = File.expand_path(tarfile, pdir) + s = s.gsub(/^\.\//, "").gsub(/\//, "\\\\") + + File.move(tarfile, s) Dir.chdir(pdir) end diff -ur rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/tarrubyscript.rb rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/tarrubyscript.rb --- rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/tarrubyscript.rb 2004-02-16 21:38:34.000000000 +0100 +++ rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/tarrubyscript.rb 2004-03-16 10:51:08.000000000 +0100 @@ -43,9 +43,9 @@ GNAMELEN = 32 DEVLEN = 8 -TMAGIC = ´ustar´ -GNU_TMAGIC = ´ustar ´ -SOLARIS_TMAGIC = ´ustar00´ +TMAGIC = "ustar" +GNU_TMAGIC = "ustar " +SOLARIS_TMAGIC = "ustar\00000" MAGICS = [TMAGIC, GNU_TMAGIC, SOLARIS_TMAGIC] @@ -162,7 +162,7 @@ raise "Couldn´t determine a real value for a field (#{field})" end - raise "Magic header value ´#{@magic}´ is invalid." if not MAGICS.include?(@magic) + raise "Magic header value #{@magic.inspect} is invalid." if not MAGICS.include?(@magic) @linkflag = LF_FILE if @linkflag == LF_OLDFILE or @linkflag == LF_CONTIG @linkflag = LF_DIR if @name[-1] == ´/´ and @linkflag == LF_FILE Binary files rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/eee.exe and rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/eee.exe differ Binary files rubyscript2exe-0.1.9.tar.gz/rubyscript2exe/eeew.exe and rubyscript2exe-0.1.10.tar.gz/rubyscript2exe/eeew.exe differ