the project pre_build process is run even the project is empty

This commit is contained in:
Basile Burg 2014-08-09 04:46:23 +02:00
parent cf4e37457f
commit 36160253c8
1 changed files with 11 additions and 7 deletions

View File

@ -1183,12 +1183,6 @@ begin
for i := 0 to fWidgList.Count-1 do for i := 0 to fWidgList.Count-1 do
fWidgList.widget[i].projCompile(aProject); fWidgList.widget[i].projCompile(aProject);
if aProject.Sources.Count = 0 then
begin
fMesgWidg.addCeWarn('the project has no source files', mcProject);
exit;
end;
with fProject.currentConfiguration do with fProject.currentConfiguration do
begin begin
if preBuildProcess.executable <> '' then if preBuildProcess.executable <> '' then
@ -1207,6 +1201,12 @@ begin
else fMesgWidg.addCeWarn('the pre-compilation executable does not exist', mcProject); else fMesgWidg.addCeWarn('the pre-compilation executable does not exist', mcProject);
end; end;
if aProject.Sources.Count = 0 then
begin
fMesgWidg.addCeWarn('the project has no source files', mcProject);
exit;
end;
olddir := ''; olddir := '';
dmdproc := TProcess.Create(nil); dmdproc := TProcess.Create(nil);
getDir(0, olddir); getDir(0, olddir);
@ -1216,7 +1216,11 @@ begin
application.ProcessMessages; application.ProcessMessages;
prjpath := extractFilePath(aProject.fileName); prjpath := extractFilePath(aProject.fileName);
if directoryExists(prjpath) then chDir(prjpath); if directoryExists(prjpath) then
begin
chDir(prjpath);
dmdProc.CurrentDirectory := prjpath;
end;
{$IFDEF RELEASE} {$IFDEF RELEASE}
dmdProc.ShowWindow := swoHIDE; dmdProc.ShowWindow := swoHIDE;