Переглянути джерело

* fixed windows compilation (currently uses Dos again instead of sysutils)

git-svn-id: trunk@12362 -
Jonas Maebe 16 роки тому
батько
коміт
3a56f2403c
1 змінених файлів з 10 додано та 3 видалено
  1. 10 3
      tests/utils/redir.pp

+ 10 - 3
tests/utils/redir.pp

@@ -90,7 +90,7 @@ const
 
 Implementation
 
-{$ifdef macos}
+{$if defined(macos) or defined(windows)}
 {$define usedos}
 {$endif}
 
@@ -342,7 +342,10 @@ end;
 
 function LocateExeFile(var FileName:string): boolean;
 var
-  dir,s,d,n,e : string;
+  dir,s: string;
+  d: dirstr;
+  n: namestr;
+  e: extstr;
   i : longint;
 begin
   LocateExeFile:=False;
@@ -1037,11 +1040,15 @@ end;
   {$endif windows}
     DosError:=0;
     If UseComSpec then
+      {$ifndef usedos}
       Sysutils.ExecuteProcess (Getenv('COMSPEC'),'/C '+FixPath(progname)+' '+Comline)
+      {$else}
+      Exec (Getenv('COMSPEC'),'/C '+FixPath(progname)+' '+Comline)
+      {$endif}
     else
       begin
         if LocateExeFile(progname) then
-          {$ifndef macos}
+          {$ifndef usedos}
           Sysutils.ExecuteProcess(ProgName,Comline)
           {$else}
           Dos.Exec(''''+ProgName+'''',Comline) {Quotes needed !}