removed invalid warning messages when pre/post build process name is empty

This commit is contained in:
Basile Burg 2014-08-09 23:54:38 +02:00
parent 98253a3d30
commit 8ff9aedc3d
1 changed files with 32 additions and 30 deletions

View File

@ -1212,21 +1212,22 @@ begin
with fProject.currentConfiguration do with fProject.currentConfiguration do
begin begin
if preBuildProcess.executable <> '' then if preBuildProcess.executable <> '' then
begin if ExeSearch(preBuildProcess.executable, '') <> '' then
ppproc := TProcess.Create(nil); begin
try ppproc := TProcess.Create(nil);
preBuildProcess.setProcess(ppproc); try
if ppproc.CurrentDirectory = '' then preBuildProcess.setProcess(ppproc);
ppproc.CurrentDirectory := extractFilePath(ppproc.Executable); if ppproc.CurrentDirectory = '' then
ppproc.Execute; ppproc.CurrentDirectory := extractFilePath(ppproc.Executable);
if not (poWaitOnExit in ppproc.Options) then ppproc.Execute;
if poUsePipes in ppproc.Options then if not (poWaitOnExit in ppproc.Options) then
repeat ProcessOutputToMsg(ppproc, mcProject) until not ppproc.Running; if poUsePipes in ppproc.Options then
finally repeat ProcessOutputToMsg(ppproc, mcProject) until not ppproc.Running;
ppproc.Free; finally
end; ppproc.Free;
end end;
else fMesgWidg.addCeWarn('the pre-compilation executable does not exist', mcProject); end
else fMesgWidg.addCeWarn('the pre-compilation executable does not exist', mcProject);
end; end;
if aProject.Sources.Count = 0 then if aProject.Sources.Count = 0 then
@ -1266,21 +1267,22 @@ begin
with fProject.currentConfiguration do with fProject.currentConfiguration do
begin begin
if postBuildProcess.executable <> '' then if postBuildProcess.executable <> '' then
begin if ExeSearch(postBuildProcess.executable, '') <> '' then
ppproc := TProcess.Create(nil); begin
try ppproc := TProcess.Create(nil);
postBuildProcess.setProcess(ppproc); try
if ppproc.CurrentDirectory = '' then postBuildProcess.setProcess(ppproc);
ppproc.CurrentDirectory := extractFilePath(ppproc.Executable); if ppproc.CurrentDirectory = '' then
ppproc.Execute; ppproc.CurrentDirectory := extractFilePath(ppproc.Executable);
if not (poWaitOnExit in ppproc.Options) then ppproc.Execute;
if poUsePipes in ppproc.Options then if not (poWaitOnExit in ppproc.Options) then
repeat ProcessOutputToMsg(ppproc, mcProject) until not ppproc.Running; if poUsePipes in ppproc.Options then
finally repeat ProcessOutputToMsg(ppproc, mcProject) until not ppproc.Running;
ppproc.Free; finally
end; ppproc.Free;
end end;
else fMesgWidg.addCeWarn('the post-compilation executable does not exist', mcProject); end
else fMesgWidg.addCeWarn('the post-compilation executable does not exist', mcProject);
end; end;
finally finally