diff -ur rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/eee.pas rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/eee.pas
--- rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/eee.pas 2003-10-17 22:58:20.000000000 +0200
+++ rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/eee.pas 2003-10-19 01:32:37.000000000 +0200
@@ -35,34 +35,44 @@
dir : string;
parms : string;
-begin
- tempdir := ´c:\tmp´;
- tempdir := getenv(´TEMP´);
+procedure recursivedelete(var path: string);
- me := ´Dit is mij herkennigsstring´;
+var
+ f : file;
+ sr : searchrec;
+ dir : string;
- parms := ´´;
- for teller := 1 to paramcount do begin
- if (parms = ´´) then begin
- parms := paramstr(teller);
+begin
+
+ getdir(0, dir);
+ chdir(path);
+
+ findfirst(´*.*´, directory, sr);
+ while(doserror = 0) do begin
+ if (sr.attr and directory > 0) then begin
+ if ((not (sr.name = ´.´)) and (not (sr.name = ´..´))) then begin
+ recursivedelete(sr.name);
+ end;
end
else begin
- parms := parms + ´ ´ + paramstr(teller);
+ assign(f, sr.name);
+ erase(f);
end;
+
+ findnext(sr);
end;
- filemode := 0;
+ chdir(dir);
- assign(infile, paramstr(0));
- reset(infile, 1);
- blockread(infile, b, filesize(infile)-sizeof(t));
- blockread(infile, t, sizeof(t));
- close(infile);
+ rmdir(path);
+
+end;
- if (t.who <> me) then begin
- // Pak in.
+procedure pakin;
+
+begin
assign(outfile, paramstr(2));
rewrite(outfile, 1);
@@ -136,11 +146,12 @@
close(outfile);
- end
+end;
- else begin
- // Pak uit.
+procedure pakuit;
+
+begin
randomize;
@@ -207,10 +218,43 @@
close(infile);
- exec(getenv(´COMSPEC´), ´/c deltree /y ´ + workdir + ´ > nul:´);
+ recursivedelete(workdir);
end;
+end;
+
+
+begin
+
+ tempdir := ´c:\tmp´;
+ tempdir := getenv(´TEMP´);
+
+ me := ´Dit is mijn herkennigsstring voor het herkennen van pakin of pakuit mode.´;
+
+ parms := ´´;
+ for teller := 1 to paramcount do begin
+ if (parms = ´´) then begin
+ parms := paramstr(teller);
+ end
+ else begin
+ parms := parms + ´ ´ + paramstr(teller);
+ end;
+ end;
+
+ filemode := 0;
+
+ assign(infile, paramstr(0));
+ reset(infile, 1);
+ blockread(infile, b, filesize(infile)-sizeof(t));
+ blockread(infile, t, sizeof(t));
+ close(infile);
+
+ if (t.who <> me) then begin
+ pakin;
+ end
+ else begin
+ pakuit
end;
end.
diff -ur rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/init.rb rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/init.rb
--- rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/init.rb 2003-10-17 22:58:20.000000000 +0200
+++ rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/init.rb 2003-10-19 01:32:37.000000000 +0200
@@ -12,15 +12,7 @@
if not app.nil?
app = app.dup.gsub(/\.rb$/, "")
- puts "Gathering files..."
-
- system("copy #{Config::CONFIG["bindir"]}\\ruby.exe . > nul:")
- system("copy #{Config::CONFIG["bindir"]}\\rubyw.exe . > nul:")
- system("copy #{Config::CONFIG["bindir"]}\\#{Config::CONFIG["LIBRUBY_SO"]} . > nul:")
-
- system("copy #{olddir}\\#{app}.rb app.rb > nul:")
-
- puts "Tracing #{app} ..."
+ puts "Tracing #{app}..."
oldlocation do
tar = FileTest.file?("tar.exe")
@@ -31,7 +23,13 @@
system("del tar.exe > nul:") if not tar
end
+ puts "Gathering files..."
+
+ system("copy #{Config::CONFIG["bindir"]}\\ruby.exe . > nul:")
+ system("copy #{Config::CONFIG["bindir"]}\\rubyw.exe . > nul:")
+ system("copy #{Config::CONFIG["bindir"]}\\#{Config::CONFIG["LIBRUBY_SO"]} . > nul:")
system("move #{olddir}\\rubyrequired.tar . > nul:")
+ system("copy #{olddir}\\#{app}.rb app.rb > nul:")
puts "Packing..."
@@ -58,13 +56,13 @@
end
if FileTest.file?("c:\\gnu\\root\\bin\\win32\\fpc.exe")
- puts "Creating eee.exe ..."
+ puts "Creating eee.exe..."
system("c:\\gnu\\root\\bin\\win32\\fpc.exe -gl -S2 eee")
system("copy eee.exe s:\\ > nul:")
end
- puts "Creating #{app}.exe ..."
+ puts "Creating #{app}.exe..."
system("eee.exe app.eee #{olddir}\\#{app}.exe")
diff -ur rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/require2tar.rb rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/require2tar.rb
--- rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/require2tar.rb 2003-10-17 22:58:20.000000000 +0200
+++ rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/require2tar.rb 2003-10-19 01:32:37.000000000 +0200
@@ -55,7 +55,7 @@
pdir = Dir.pwd
s = "tar chf #{File.expand_path(tarfile)} #{tardir}"
Dir.chdir(tmpdir)
- puts "Creating #{tarfile} ..."
+ puts "Creating #{tarfile}..."
system(s)
Dir.chdir(pdir)
Binary files rubyscript2exe-0.1.1.tar.gz/rubyscript2exe/eee.exe and rubyscript2exe-0.1.2.tar.gz/rubyscript2exe/eee.exe differ