diff -ur rubyscript2exe-0.1.15.tar.gz rubyscript2exe-0.1.16.tar.gz

diff -ur rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/eee.pas rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/eee.pas
--- rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/eee.pas	2004年05月14日 22:48:30.000000000 +0200
+++ rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/eee.pas	2004年06月10日 13:57:22.000000000 +0200
@@ -16,6 +16,7 @@
 		 length	: longint;
 		 number	: longint;
 		 who		: string[255];
+		 exename	: string[32];
 		end;
 
 var
@@ -38,6 +39,7 @@
 i		: longint;
 dir		: string[255];
 parms		: string;
+ quotedparms	: string;
 justextract	: boolean;
 
 
@@ -168,14 +170,29 @@
 assign(eeefile, paramstr(1));
 reset(eeefile);
 
- if (paramcount > 2)	then assign(infile, paramstr(3))
-			else assign(infile, paramstr(0));
+ if (paramcount > 2)	then begin
+ assign(infile, paramstr(3));
+ t.exename	:= paramstr(3);
+ end
+ else begin
+ assign(infile, paramstr(0));
+ t.exename	:= paramstr(0);
+ end;
+
 reset(infile, 1);
 t.length	:= filesize(infile);
 blockcopy(infile, outfile, t.length, false);
 close(infile);
 
 t.number	:= 0;
+ t.who	:= me;
+
+ s		:= ´\´;
+ i		:= pos(s, t.exename);
+ while (i > 0) do begin
+ t.exename	:= copy(t.exename, i+length(s), length(t.exename)-(i+length(s))+1);
+ i		:= pos(s, t.exename);
+ end;
 
 repeat
 readln(eeefile, s);
@@ -218,8 +235,6 @@
 end;
 until eof(eeefile);
 
- t.who	:= me;
-
 blockwrite(outfile, t, sizeof(t));
 
 close(eeefile);
@@ -273,6 +288,13 @@
 i		:= pos(s, tekst2);
 end;
 
+ s		:= ´%quotedparms%´;
+ i		:= pos(s, tekst2);
+ while (i > 0) do begin
+ tekst2	:= copy(tekst2, 1, i-1) + quotedparms + copy(tekst2, i+length(s), length(tekst2)-(i+length(s))+1);
+ i		:= pos(s, tekst2);
+ end;
+
 // writeln(h.klasse, ´ ´, tekst2);
 
 if (h.klasse = ´f´) then begin
@@ -320,7 +342,7 @@
 assign(infile, paramstr(0));
 reset(infile, 1);
 
- assign(outfile, ´eee.exe´);
+ assign(outfile, t.exename);
 rewrite(outfile);
 blockcopy(infile, outfile, t.length, false);
 close(outfile);
@@ -365,16 +387,19 @@
 justextract	:= false;
 
 parms		:= ´´;
+ quotedparms	:= ´´;
 for teller := 1 to paramcount do begin
 if (paramstr(teller) = ´--eee-justextract´) then begin
 justextract	:= true;
 end;
 
- if (parms = ´´) then begin
- parms	:= ´´´´ + paramstr(teller) + ´´´´;
+ if ((parms = ´´) and (quotedparms = ´´)) then begin
+ parms		:= paramstr(teller);
+ quotedparms	:= ´´´´ + paramstr(teller) + ´´´´;
 end
 else begin
- parms	:= parms + ´ ´´´ + paramstr(teller) + ´´´´;
+ parms		:= parms + ´ ´ + paramstr(teller);
+ quotedparms	:= quotedparms + ´ ´´´ + paramstr(teller) + ´´´´;
 end;
 end;
 
diff -ur rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/ev/ftools.rb rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/ev/ftools.rb
--- rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/ev/ftools.rb	2004年05月15日 11:59:12.000000000 +0200
+++ rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/ev/ftools.rb	2004年06月11日 13:17:48.000000000 +0200
@@ -19,7 +19,7 @@
 end
 end
 
- def self.rollbackup(file)
+ def self.rollbackup(file, mode=nil)
 backupfile	= file + ".RB.BACKUP"
 controlfile	= file + ".RB.CONTROL"
 
@@ -30,27 +30,43 @@
 if File.file?(backupfile) and File.file?(controlfile)
 $stdout.puts "Restoring #{file}..."
 
- File.copy(backupfile, file)				# Rollback from fase 3
+ File.copy(backupfile, file)				# Rollback from phase 3
 end
 
 	# Reset
 
- File.delete(backupfile)	if File.file?(backupfile)	# Reset from fase 2 or 3
- File.delete(controlfile)	if File.file?(controlfile)	# Reset from fase 3 or 4
+ 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 fase 2
- File.touch(controlfile)					# Enter fase 3
+ File.copy(file, backupfile)					# Enter phase 2
+ File.touch(controlfile)					# Enter phase 3
 
 	# The real thing
 
- yield	if block_given?
+ if block_given?
+ if mode.nil?
+ yield
+ else
+ File.open(file, mode) do |f|
+ yield(f)
+ end
+ end
+ end
 
 	# Cleanup
 
- File.delete(backupfile)					# Enter fase 4
- File.delete(controlfile)					# Enter fase 5
+ 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)
diff -ur rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/init.rb
--- rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/init.rb	2004年04月28日 22:14:55.000000000 +0200
+++ rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/init.rb	2004年06月09日 11:17:38.000000000 +0200
@@ -60,7 +60,8 @@
 
 puts "Gathering files..."
 
- copy("#{bindir}/#{rubyexe}", rubyexe)
+ copy("#{bindir}/ruby.exe", "ruby.exe")
+ copy("#{bindir}/rubyw.exe", "rubyw.exe")
 copy("#{bindir}/#{libruby}", libruby)
 copy("#{bindir}/#{msvcr71}", msvcr71)	if msvcr71
 move("#{oldlocation("rubyrequired.tar")}", "rubyrequired.tar")
@@ -73,7 +74,8 @@
 puts "Creating #{app}.exe ..."
 
 File.open("app.eee", "w") do |f|
- f.puts "f #{rubyexe}"
+ f.puts "f ruby.exe"
+ f.puts "f rubyw.exe"
 f.puts "f #{libruby}"
 f.puts "f #{msvcr71}"	if msvcr71
 f.puts "f rubyrequired.rb"
@@ -81,16 +83,16 @@
 
 f.puts "t #{rubyexe} rubyrequired.rb --tar2rubyscript-justextract"
 
- f.puts "c %tempdir%/#{rubyexe} -I %tempdir%/rubyrequired %tempdir%/app.rb %parms%"
+ f.puts "c %tempdir%/#{rubyexe} -I %tempdir%/rubyrequired %tempdir%/app.rb %quotedparms%"
 end
 
 if rubyw
- exe	= "eeew.exe"
+ eeeexe	= "eeew.exe"
 else
- exe	= "eee.exe"
+ eeeexe	= "eee.exe"
 end
 
- execute("./eee app.eee #{app}.exe #{exe}")
+ execute("./eee app.eee #{app}.exe #{eeeexe}")
 
 copy("#{app}.exe", oldlocation)
 end
Binary files rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/eee.exe and rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/eee.exe differ
Binary files rubyscript2exe-0.1.15.tar.gz/rubyscript2exe/eeew.exe and rubyscript2exe-0.1.16.tar.gz/rubyscript2exe/eeew.exe differ

AltStyle によって変換されたページ (->オリジナル) /