added ToolStatus check for package compilation

git-svn-id: trunk@4579 -
This commit is contained in:
mattias 2003-09-06 22:00:25 +00:00
parent 066215c115
commit d17a272442
3 changed files with 27 additions and 12 deletions

View File

@ -524,6 +524,7 @@ type
procedure UpdateCustomToolsInMenu;
// external tools
function PrepareForCompile: TModalResult; override;
function DoRunExternalTool(Index: integer): TModalResult;
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; override;
function DoExecuteCompilationTool(Tool: TCompilationTool;
@ -5602,17 +5603,9 @@ function TMainIDE.DoBuildProject(BuildAll: boolean): TModalResult;
var
DefaultFilename: string;
begin
if ToolStatus=itDebugger then begin
Result:=MessageDlg('Stop debugging?',
'Stop current debugging and rebuild project?',
mtConfirmation,[mbYes,mbNo,mbAbort],0);
if Result=mrNo then Result:=mrCancel;
if Result<>mrYes then exit;
Result:=DebugBoss.DoStopProject;
if Result<>mrOk then exit;
end;
Result:=PrepareForCompile;
if Result<>mrOk then exit;
Result:=DoSaveForBuild;
if Result<>mrOk then exit;
@ -6265,6 +6258,21 @@ begin
SetToolMenuItems;
end;
function TMainIDE.PrepareForCompile: TModalResult;
begin
Result:=mrOk;
if ToolStatus=itDebugger then begin
Result:=MessageDlg('Stop debugging?',
'Stop current debugging and rebuild project?',
mtConfirmation,[mbYes,mbNo,mbAbort],0);
if Result=mrNo then Result:=mrCancel;
if Result<>mrYes then exit;
Result:=DebugBoss.DoStopProject;
if Result<>mrOk then exit;
end;
end;
function TMainIDE.DoCheckSyntax: TModalResult;
var
ActiveUnitInfo:TUnitInfo;
@ -9755,6 +9763,9 @@ end.
{ =============================================================================
$Log$
Revision 1.645 2003/09/06 22:00:24 mattias
added ToolStatus check for package compilation
Revision 1.644 2003/08/30 18:53:07 mattias
using default colors, when theme does not define them

View File

@ -410,6 +410,7 @@ type
function DoShowProjectInspector: TModalResult; virtual; abstract;
function PrepareForCompile: TModalResult; virtual; abstract;
function DoBuildLazarus(Flags: TBuildLazarusFlags): TModalResult; virtual; abstract;
function DoExecuteCompilationTool(Tool: TCompilationTool;
const WorkingDir, ToolTitle: string

View File

@ -1917,6 +1917,9 @@ begin
if APackage.AutoCreated then exit;
Result:=MainIDE.PrepareForCompile;
if Result<>mrOk then exit;
// check graph for circles and broken dependencies
if not (pcfDoNotCompileDependencies in Flags) then begin
Result:=CheckPackageGraphForCompilation(APackage,nil);
@ -1928,7 +1931,7 @@ begin
Result:=MainIDE.DoSaveForBuild;
if Result<>mrOk then exit;
end;
PackageGraph.BeginUpdate(false);
try
// automatically compile required packages