mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 19:20:38 +02:00
IDE: hid compile info dialog
git-svn-id: trunk@45357 -
This commit is contained in:
parent
c6344b436c
commit
f21017edfd
@ -43,9 +43,9 @@ uses
|
|||||||
{$IFDEF EnableNewExtTools}
|
{$IFDEF EnableNewExtTools}
|
||||||
IDEExternToolIntf,
|
IDEExternToolIntf,
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
UTF8Process, OutputFilter,
|
UTF8Process, OutputFilter, InfoBuild,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
InfoBuild, IDEMsgIntf, CompOptsIntf, LazIDEIntf,
|
IDEMsgIntf, CompOptsIntf, LazIDEIntf,
|
||||||
DefineTemplates, TransferMacros, EnvironmentOpts, LazFileUtils;
|
DefineTemplates, TransferMacros, EnvironmentOpts, LazFileUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -286,7 +286,9 @@ begin
|
|||||||
DebugLn('TCompiler.Compile WorkingDir="',WorkingDir,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
|
DebugLn('TCompiler.Compile WorkingDir="',WorkingDir,'" CompilerFilename="',CompilerFilename,'" CompilerParams="',CompilerParams,'"');
|
||||||
|
|
||||||
// if we want to show the compile progress, it's now time to show the dialog
|
// if we want to show the compile progress, it's now time to show the dialog
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Show;
|
CompileProgress.Show;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
try
|
try
|
||||||
CheckIfFileIsExecutable(CompilerFilename);
|
CheckIfFileIsExecutable(CompilerFilename);
|
||||||
|
@ -221,8 +221,13 @@ begin
|
|||||||
MaxRecentOpenFilesLabel.Caption:=dlgMaxRecentFiles;
|
MaxRecentOpenFilesLabel.Caption:=dlgMaxRecentFiles;
|
||||||
MaxRecentProjectFilesLabel.Caption:=dlgMaxRecentProjs;
|
MaxRecentProjectFilesLabel.Caption:=dlgMaxRecentProjs;
|
||||||
OpenLastProjectAtStartCheckBox.Caption:=dlgQOpenLastPrj;
|
OpenLastProjectAtStartCheckBox.Caption:=dlgQOpenLastPrj;
|
||||||
|
{$IFDEF EnableNewExtTools}
|
||||||
|
ShowCompileDialogCheckBox.Visible:=false;
|
||||||
|
AutoCloseCompileDialogCheckBox.Visible:=false;
|
||||||
|
{$ELSE}
|
||||||
ShowCompileDialogCheckBox.Caption:=dlgQShowCompileDialog;
|
ShowCompileDialogCheckBox.Caption:=dlgQShowCompileDialog;
|
||||||
AutoCloseCompileDialogCheckBox.Caption:=dlgQAutoCloseCompileDialog;
|
AutoCloseCompileDialogCheckBox.Caption:=dlgQAutoCloseCompileDialog;
|
||||||
|
{$ENDIF}
|
||||||
LazarusDirLabel.Caption:=dlgLazarusDir;
|
LazarusDirLabel.Caption:=dlgLazarusDir;
|
||||||
with LazarusDirComboBox.Items do
|
with LazarusDirComboBox.Items do
|
||||||
begin
|
begin
|
||||||
|
@ -27,6 +27,8 @@ unit InfoBuild;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
{$IFDEF EnableNewExtTools}{$ERROR Obsolete}{$ENDIF}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
43
ide/main.pp
43
ide/main.pp
@ -85,9 +85,11 @@ uses
|
|||||||
IDEProtocol,
|
IDEProtocol,
|
||||||
// compile
|
// compile
|
||||||
CompilerOptions, CheckCompilerOpts, BuildProjectDlg,
|
CompilerOptions, CheckCompilerOpts, BuildProjectDlg,
|
||||||
ApplicationBundle, ImExportCompilerOpts, InfoBuild,
|
ApplicationBundle, ImExportCompilerOpts,
|
||||||
{$IFDEF EnableNewExtTools}
|
{$IFDEF EnableNewExtTools}
|
||||||
ExtTools,
|
ExtTools,
|
||||||
|
{$ELSE}
|
||||||
|
InfoBuild,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// projects
|
// projects
|
||||||
ProjectResources, Project, ProjectDefs, NewProjectDlg,
|
ProjectResources, Project, ProjectDefs, NewProjectDlg,
|
||||||
@ -1380,7 +1382,9 @@ begin
|
|||||||
DebuggerOptions := TDebuggerOptions.Create;
|
DebuggerOptions := TDebuggerOptions.Create;
|
||||||
|
|
||||||
MainBuildBoss.SetupInputHistories;
|
MainBuildBoss.SetupInputHistories;
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.SetEnabled(EnvironmentOptions.ShowCompileDialog);
|
CompileProgress.SetEnabled(EnvironmentOptions.ShowCompileDialog);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
CreateDirUTF8(GetProjectSessionsConfigPath);
|
CreateDirUTF8(GetProjectSessionsConfigPath);
|
||||||
|
|
||||||
@ -4882,7 +4886,9 @@ begin
|
|||||||
if Restore then exit;
|
if Restore then exit;
|
||||||
// invalidate cached substituted macros
|
// invalidate cached substituted macros
|
||||||
IncreaseCompilerParseStamp;
|
IncreaseCompilerParseStamp;
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.SetEnabled(EnvironmentOptions.ShowCompileDialog);
|
CompileProgress.SetEnabled(EnvironmentOptions.ShowCompileDialog);
|
||||||
|
{$ENDIF}
|
||||||
UpdateDefaultPasFileExt;
|
UpdateDefaultPasFileExt;
|
||||||
if OldLanguage <> EnvironmentOptions.LanguageID then
|
if OldLanguage <> EnvironmentOptions.LanguageID then
|
||||||
begin
|
begin
|
||||||
@ -6844,7 +6850,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.CreateDialog(OwningComponent, Project1.MainFilename, lisInfoBuildCompile);
|
CompileProgress.CreateDialog(OwningComponent, Project1.MainFilename, lisInfoBuildCompile);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
// clear old error lines
|
// clear old error lines
|
||||||
SourceEditorManager.ClearErrorLines;
|
SourceEditorManager.ClearErrorLines;
|
||||||
@ -6880,7 +6888,9 @@ begin
|
|||||||
if Result <> mrOk then
|
if Result <> mrOk then
|
||||||
begin
|
begin
|
||||||
debugln(['TMainIDE.DoBuildProject PkgBoss.DoCompileProjectDependencies failed']);
|
debugln(['TMainIDE.DoBuildProject PkgBoss.DoCompileProjectDependencies failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Result:=DoCallModalFunctionHandler(lihtProjectDependenciesCompiled);
|
Result:=DoCallModalFunctionHandler(lihtProjectDependenciesCompiled);
|
||||||
@ -6895,7 +6905,9 @@ begin
|
|||||||
if Result<>mrOk then
|
if Result<>mrOk then
|
||||||
begin
|
begin
|
||||||
debugln(['TMainIDE.DoBuildProject DoWarnAmbiguousFiles negative']);
|
debugln(['TMainIDE.DoBuildProject DoWarnAmbiguousFiles negative']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6910,14 +6922,18 @@ begin
|
|||||||
and (not (pfAlwaysBuild in Project1.Flags)) then begin
|
and (not (pfAlwaysBuild in Project1.Flags)) then begin
|
||||||
if Result=mrNo then begin
|
if Result=mrNo then begin
|
||||||
debugln(['TMainIDE.DoBuildProject MainBuildBoss.DoCheckIfProjectNeedsCompilation nothing to be done']);
|
debugln(['TMainIDE.DoBuildProject MainBuildBoss.DoCheckIfProjectNeedsCompilation nothing to be done']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if Result<>mrYes then
|
if Result<>mrYes then
|
||||||
begin
|
begin
|
||||||
debugln(['TMainIDE.DoBuildProject MainBuildBoss.DoCheckIfProjectNeedsCompilation failed']);
|
debugln(['TMainIDE.DoBuildProject MainBuildBoss.DoCheckIfProjectNeedsCompilation failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -6999,7 +7015,9 @@ begin
|
|||||||
if Result<>mrOk then
|
if Result<>mrOk then
|
||||||
begin
|
begin
|
||||||
debugln(['TMainIDE.DoBuildProject CompilerOptions.ExecuteBefore.Execute failed']);
|
debugln(['TMainIDE.DoBuildProject CompilerOptions.ExecuteBefore.Execute failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -7032,7 +7050,9 @@ begin
|
|||||||
Result:=Project1.SaveStateFile(CompilerFilename,CompilerParams,false);
|
Result:=Project1.SaveStateFile(CompilerFilename,CompilerParams,false);
|
||||||
if Result<>mrOk then begin
|
if Result<>mrOk then begin
|
||||||
debugln(['TMainIDE.DoBuildProject SaveStateFile before compile failed']);
|
debugln(['TMainIDE.DoBuildProject SaveStateFile before compile failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7048,8 +7068,8 @@ begin
|
|||||||
Project1.LastCompilerFileDate:=FileAgeCached(CompilerFilename);
|
Project1.LastCompilerFileDate:=FileAgeCached(CompilerFilename);
|
||||||
{$IFNDEF EnableNewExtTools}
|
{$IFNDEF EnableNewExtTools}
|
||||||
DoJumpToCompilerMessage(not EnvironmentOptions.ShowCompileDialog);
|
DoJumpToCompilerMessage(not EnvironmentOptions.ShowCompileDialog);
|
||||||
{$ENDIF}
|
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
debugln(['TMainIDE.DoBuildProject Compile failed']);
|
debugln(['TMainIDE.DoBuildProject Compile failed']);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
@ -7057,7 +7077,9 @@ begin
|
|||||||
Result:=Project1.SaveStateFile(CompilerFilename,CompilerParams,true);
|
Result:=Project1.SaveStateFile(CompilerFilename,CompilerParams,true);
|
||||||
if Result<>mrOk then begin
|
if Result<>mrOk then begin
|
||||||
debugln(['TMainIDE.DoBuildProject SaveStateFile after compile failed']);
|
debugln(['TMainIDE.DoBuildProject SaveStateFile after compile failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7065,7 +7087,9 @@ begin
|
|||||||
Result:=UpdateProjectPOFile(Project1);
|
Result:=UpdateProjectPOFile(Project1);
|
||||||
if Result<>mrOk then begin
|
if Result<>mrOk then begin
|
||||||
debugln(['TMainIDE.DoBuildProject UpdateProjectPOFile failed']);
|
debugln(['TMainIDE.DoBuildProject UpdateProjectPOFile failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7092,7 +7116,9 @@ begin
|
|||||||
if Result<>mrOk then
|
if Result<>mrOk then
|
||||||
begin
|
begin
|
||||||
debugln(['TMainIDE.DoBuildProject CompilerOptions.ExecuteAfter.Execute failed']);
|
debugln(['TMainIDE.DoBuildProject CompilerOptions.ExecuteAfter.Execute failed']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -7103,8 +7129,8 @@ begin
|
|||||||
// add success message
|
// add success message
|
||||||
MessagesView.AddMsg(Format(lisProjectSuccessfullyBuilt, ['"',
|
MessagesView.AddMsg(Format(lisProjectSuccessfullyBuilt, ['"',
|
||||||
Project1.GetTitleOrName, '"']),'',-1);
|
Project1.GetTitleOrName, '"']),'',-1);
|
||||||
{$ENDIF}
|
|
||||||
CompileProgress.Ready(lisInfoBuildSuccess);
|
CompileProgress.Ready(lisInfoBuildSuccess);
|
||||||
|
{$ENDIF}
|
||||||
finally
|
finally
|
||||||
// check sources
|
// check sources
|
||||||
DoCheckFilesOnDisk;
|
DoCheckFilesOnDisk;
|
||||||
@ -7199,8 +7225,10 @@ begin
|
|||||||
Result := mrCancel;
|
Result := mrCancel;
|
||||||
|
|
||||||
Result := DebugBoss.StartDebugging;
|
Result := DebugBoss.StartDebugging;
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
if Result = mrOk then
|
if Result = mrOk then
|
||||||
CompileProgress.Hide();
|
CompileProgress.Hide();
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
DebugLn('[TMainIDE.DoRunProject] END');
|
DebugLn('[TMainIDE.DoRunProject] END');
|
||||||
end;
|
end;
|
||||||
@ -7264,7 +7292,9 @@ const
|
|||||||
var CanClose: boolean;
|
var CanClose: boolean;
|
||||||
begin
|
begin
|
||||||
DebugLn(['TMainIDE.DoRestart ']);
|
DebugLn(['TMainIDE.DoRestart ']);
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Close;
|
CompileProgress.Close;
|
||||||
|
{$ENDIF}
|
||||||
CanClose:=true;
|
CanClose:=true;
|
||||||
MainIDEBar.OnCloseQuery(Self, CanClose);
|
MainIDEBar.OnCloseQuery(Self, CanClose);
|
||||||
if not CanClose then exit;
|
if not CanClose then exit;
|
||||||
@ -7542,12 +7572,11 @@ begin
|
|||||||
DoCheckFilesOnDisk;
|
DoCheckFilesOnDisk;
|
||||||
{$IFNDEF EnableNewExtTools}
|
{$IFNDEF EnableNewExtTools}
|
||||||
MessagesView.EndBlock;
|
MessagesView.EndBlock;
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
if Result in [mrOK, mrIgnore] then
|
if Result in [mrOK, mrIgnore] then
|
||||||
CompileProgress.Ready(lisinfoBuildSuccess)
|
CompileProgress.Ready(lisinfoBuildSuccess)
|
||||||
else
|
else
|
||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7621,7 +7650,9 @@ begin
|
|||||||
BuildLazProfiles.CurrentIndex:=RealCurInd;
|
BuildLazProfiles.CurrentIndex:=RealCurInd;
|
||||||
end;
|
end;
|
||||||
if MayNeedRestart and BuildLazProfiles.RestartAfterBuild then begin
|
if MayNeedRestart and BuildLazProfiles.RestartAfterBuild then begin
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Close;
|
CompileProgress.Close;
|
||||||
|
{$ENDIF}
|
||||||
mnuRestartClicked(nil);
|
mnuRestartClicked(nil);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -7717,7 +7748,9 @@ begin
|
|||||||
DirectiveList.Free;
|
DirectiveList.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFNDEF EnableNewExtTools}
|
||||||
CompileProgress.Close;
|
CompileProgress.Close;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoRunFile: TModalResult;
|
function TMainIDE.DoRunFile: TModalResult;
|
||||||
|
Loading…
Reference in New Issue
Block a user