* Check for ppudump in the same folder as pas2jni only if there is a path to pas2jni executable is available in ParamStr(0).

git-svn-id: trunk@24326 -
This commit is contained in:
yury 2013-04-26 08:16:54 +00:00
parent 3d7033d81e
commit 226fb92d61

View File

@ -176,11 +176,16 @@ begin
p:=TProcess.Create(nil);
try
if ppudumpprog = '' then begin
ppudumpprog:='ppudump';
// Check for ppudump in the same folder as pas2jni
ppudumpprog:=ExtractFilePath(ParamStr(0)) + 'ppudump' + ExtractFileExt(ParamStr(0));
if not FileExists(ppudumpprog) then
ppudumpprog:='ppudump';
s:=ExtractFilePath(ParamStr(0));
if s <> '' then begin
s:=s + ppudumpprog + ExtractFileExt(ParamStr(0));
if FileExists(s) then
ppudumpprog:=s;
end;
end;
writeln(ppudumpprog);
p.Executable:=ppudumpprog;
p.Parameters.Add(un);
p.Options:=[poUsePipes, poNoConsole, poStderrToOutPut];