mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 11:39:09 +02:00
IDE: refactoring for functions that build Lazarus. Make them a class, but don't move parameters to private vars yet.
git-svn-id: trunk@43994 -
This commit is contained in:
parent
1e92012ce1
commit
9cff7878ec
@ -15,7 +15,7 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
|||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.1'
|
LCLVersion = '1.3'
|
||||||
object CBLDBtnPanel: TPanel
|
object CBLDBtnPanel: TPanel
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -359,12 +359,11 @@ object ConfigureBuildLazarusDlg: TConfigureBuildLazarusDlg
|
|||||||
Height = 15
|
Height = 15
|
||||||
Top = 345
|
Top = 345
|
||||||
Width = 684
|
Width = 684
|
||||||
AutoSize = True
|
Caption = 'CommonsDividerBevel'
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Right = 6
|
BorderSpacing.Right = 6
|
||||||
BorderSpacing.Bottom = 6
|
BorderSpacing.Bottom = 6
|
||||||
Caption = 'CommonsDividerBevel'
|
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
|
@ -146,23 +146,28 @@ type
|
|||||||
procedure UpdateProfileNamesUI;
|
procedure UpdateProfileNamesUI;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
{ TLazarusBuilder }
|
||||||
|
|
||||||
function MakeLazarus(Profile: TBuildLazarusProfile;
|
TLazarusBuilder = class
|
||||||
{$IFNDEF EnableNewExtTools}ExternalTools: TBaseExternalToolList;{$ENDIF}
|
private
|
||||||
Macros: TTransferMacroList;
|
function CreateIDEMakeOptions(Profile: TBuildLazarusProfile;
|
||||||
const PackageOptions, CompilerPath, MakePath: string;
|
Macros: TTransferMacroList; const PackageOptions: string;
|
||||||
Flags: TBuildLazarusFlags; var ProfileChanged: boolean): TModalResult;
|
Flags: TBuildLazarusFlags; var ExtraOptions: string;
|
||||||
|
out UpdateRevisionInc: boolean; out OutputDirRedirected: boolean;
|
||||||
|
out TargetFilename: string): TModalResult;
|
||||||
|
public
|
||||||
|
function ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
||||||
|
|
||||||
function CreateIDEMakeOptions(Profile: TBuildLazarusProfile;
|
function MakeLazarus(Profile: TBuildLazarusProfile;
|
||||||
Macros: TTransferMacroList; const PackageOptions: string;
|
{$IFNDEF EnableNewExtTools}ExternalTools: TBaseExternalToolList;{$ENDIF}
|
||||||
Flags: TBuildLazarusFlags; var ExtraOptions: string;
|
Macros: TTransferMacroList;
|
||||||
out UpdateRevisionInc: boolean; out OutputDirRedirected: boolean;
|
const PackageOptions, CompilerPath, MakePath: string;
|
||||||
out TargetFilename: string): TModalResult;
|
Flags: TBuildLazarusFlags; var ProfileChanged: boolean): TModalResult;
|
||||||
|
|
||||||
function SaveIDEMakeOptions(Profile: TBuildLazarusProfile;
|
function SaveIDEMakeOptions(Profile: TBuildLazarusProfile;
|
||||||
Macros: TTransferMacroList;
|
Macros: TTransferMacroList;
|
||||||
const PackageOptions: string; Flags: TBuildLazarusFlags): TModalResult;
|
const PackageOptions: string; Flags: TBuildLazarusFlags): TModalResult;
|
||||||
|
end;
|
||||||
|
|
||||||
function GetMakeIDEConfigFilename: string;
|
function GetMakeIDEConfigFilename: string;
|
||||||
function GetBackupExeFilename(Filename: string): string;
|
function GetBackupExeFilename(Filename: string): string;
|
||||||
@ -174,7 +179,22 @@ implementation
|
|||||||
const
|
const
|
||||||
DefaultIDEMakeOptionFilename = 'idemake.cfg';
|
DefaultIDEMakeOptionFilename = 'idemake.cfg';
|
||||||
|
|
||||||
function ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
function GetMakeIDEConfigFilename: string;
|
||||||
|
begin
|
||||||
|
Result:=AppendPathDelim(GetPrimaryConfigPath)+DefaultIDEMakeOptionFilename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetBackupExeFilename(Filename: string): string;
|
||||||
|
var
|
||||||
|
Ext: String;
|
||||||
|
begin
|
||||||
|
Ext:=ExtractFileExt(Filename);
|
||||||
|
Result:=LeftStr(Filename,length(Filename)-length(Ext))+'.old'+Ext;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TLazarusBuilder }
|
||||||
|
|
||||||
|
function TLazarusBuilder.ShowConfigureBuildLazarusDlg(AProfiles: TBuildLazarusProfiles): TModalResult;
|
||||||
// mrOk=save
|
// mrOk=save
|
||||||
// mrYes=save and compile
|
// mrYes=save and compile
|
||||||
// mrAll=save and compile all selected profiles
|
// mrAll=save and compile all selected profiles
|
||||||
@ -193,7 +213,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function MakeLazarus(Profile: TBuildLazarusProfile;
|
function TLazarusBuilder.MakeLazarus(Profile: TBuildLazarusProfile;
|
||||||
{$IFNDEF EnableNewExtTools}ExternalTools: TBaseExternalToolList;{$ENDIF}
|
{$IFNDEF EnableNewExtTools}ExternalTools: TBaseExternalToolList;{$ENDIF}
|
||||||
Macros: TTransferMacroList;
|
Macros: TTransferMacroList;
|
||||||
const PackageOptions, CompilerPath, MakePath: string;
|
const PackageOptions, CompilerPath, MakePath: string;
|
||||||
@ -475,7 +495,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function CreateIDEMakeOptions(Profile: TBuildLazarusProfile;
|
function TLazarusBuilder.CreateIDEMakeOptions(Profile: TBuildLazarusProfile;
|
||||||
Macros: TTransferMacroList; const PackageOptions: string;
|
Macros: TTransferMacroList; const PackageOptions: string;
|
||||||
Flags: TBuildLazarusFlags; var ExtraOptions: string;
|
Flags: TBuildLazarusFlags; var ExtraOptions: string;
|
||||||
out UpdateRevisionInc: boolean; out OutputDirRedirected: boolean;
|
out UpdateRevisionInc: boolean; out OutputDirRedirected: boolean;
|
||||||
@ -778,7 +798,7 @@ begin
|
|||||||
//DebugLn(['CreateBuildLazarusOptions ',MMDef.Name,' ',ExtraOptions]);
|
//DebugLn(['CreateBuildLazarusOptions ',MMDef.Name,' ',ExtraOptions]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function SaveIDEMakeOptions(Profile: TBuildLazarusProfile;
|
function TLazarusBuilder.SaveIDEMakeOptions(Profile: TBuildLazarusProfile;
|
||||||
Macros: TTransferMacroList;
|
Macros: TTransferMacroList;
|
||||||
const PackageOptions: string; Flags: TBuildLazarusFlags): TModalResult;
|
const PackageOptions: string; Flags: TBuildLazarusFlags): TModalResult;
|
||||||
|
|
||||||
@ -867,19 +887,6 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetMakeIDEConfigFilename: string;
|
|
||||||
begin
|
|
||||||
Result:=AppendPathDelim(GetPrimaryConfigPath)+DefaultIDEMakeOptionFilename;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function GetBackupExeFilename(Filename: string): string;
|
|
||||||
var
|
|
||||||
Ext: String;
|
|
||||||
begin
|
|
||||||
Ext:=ExtractFileExt(Filename);
|
|
||||||
Result:=LeftStr(Filename,length(Filename)-length(Ext))+'.old'+Ext;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TConfigureBuildLazarusDlg }
|
{ TConfigureBuildLazarusDlg }
|
||||||
|
|
||||||
constructor TConfigureBuildLazarusDlg.Create(TheOwner: TComponent);
|
constructor TConfigureBuildLazarusDlg.Create(TheOwner: TComponent);
|
||||||
|
109
ide/lazbuild.lpr
109
ide/lazbuild.lpr
@ -519,6 +519,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
s: String;
|
s: String;
|
||||||
ProfileChanged: boolean;
|
ProfileChanged: boolean;
|
||||||
|
Builder: TLazarusBuilder;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
if not Init then exit;
|
if not Init then exit;
|
||||||
@ -588,63 +589,67 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// clean
|
// clean
|
||||||
ProfileChanged:=false;
|
Builder:=TLazarusBuilder.Create;
|
||||||
if BuildLazProfiles.Current.IdeBuildMode=bmCleanAllBuild then begin
|
try
|
||||||
CurResult:=MakeLazarus(BuildLazProfiles.Current,
|
ProfileChanged:=false;
|
||||||
EnvironmentOptions.ExternalTools,GlobalMacroList,
|
if BuildLazProfiles.Current.IdeBuildMode=bmCleanAllBuild then begin
|
||||||
'',EnvironmentOptions.GetParsedCompilerFilename,
|
CurResult:=Builder.MakeLazarus(BuildLazProfiles.Current,
|
||||||
EnvironmentOptions.GetParsedMakeFilename,
|
EnvironmentOptions.ExternalTools,GlobalMacroList,
|
||||||
Flags+[blfDontBuild],
|
'',EnvironmentOptions.GetParsedCompilerFilename,
|
||||||
ProfileChanged);
|
EnvironmentOptions.GetParsedMakeFilename,
|
||||||
|
Flags+[blfDontBuild],ProfileChanged);
|
||||||
|
if CurResult<>mrOk then begin
|
||||||
|
if ConsoleVerbosity>=-1 then
|
||||||
|
DebugLn('TLazBuildApplication.BuildLazarusIDE: Clean all failed.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// save configs for 'make'
|
||||||
|
CurResult:=PackageGraph.SaveAutoInstallConfig;
|
||||||
if CurResult<>mrOk then begin
|
if CurResult<>mrOk then begin
|
||||||
if ConsoleVerbosity>=-1 then
|
if ConsoleVerbosity>=-1 then
|
||||||
DebugLn('TLazBuildApplication.BuildLazarusIDE: Clean all failed.');
|
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving IDE make config files.');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// compile auto install static packages
|
||||||
|
if not CompileAutoInstallPackages(BuildLazProfiles.Current.IdeBuildMode<>bmBuild)
|
||||||
|
then begin
|
||||||
|
if ConsoleVerbosity>=-1 then
|
||||||
|
DebugLn('TLazBuildApplication.BuildLazarusIDE: Compile AutoInstall Packages failed.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// create inherited compiler options
|
||||||
|
PkgOptions:=PackageGraph.GetIDEInstallPackageOptions(InheritedOptionStrings{%H-});
|
||||||
|
|
||||||
|
// save
|
||||||
|
CurResult:=Builder.SaveIDEMakeOptions(BuildLazProfiles.Current,GlobalMacroList,
|
||||||
|
PkgOptions,Flags+[blfBackupOldExe]);
|
||||||
|
if CurResult<>mrOk then begin
|
||||||
|
if ConsoleVerbosity>=-1 then
|
||||||
|
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving idemake.cfg');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// compile IDE
|
||||||
|
CurResult:=Builder.MakeLazarus(BuildLazProfiles.Current,
|
||||||
|
EnvironmentOptions.ExternalTools,GlobalMacroList,
|
||||||
|
PkgOptions,EnvironmentOptions.GetParsedCompilerFilename,
|
||||||
|
EnvironmentOptions.GetParsedMakeFilename,
|
||||||
|
Flags+[blfUseMakeIDECfg,blfOnlyIDE],
|
||||||
|
ProfileChanged);
|
||||||
|
if CurResult<>mrOk then begin
|
||||||
|
if ConsoleVerbosity>=-1 then
|
||||||
|
DebugLn('TLazBuildApplication.BuildLazarusIDE: Building IDE failed.');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Result:=true;
|
||||||
|
finally
|
||||||
|
Builder.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// save configs for 'make'
|
|
||||||
CurResult:=PackageGraph.SaveAutoInstallConfig;
|
|
||||||
if CurResult<>mrOk then begin
|
|
||||||
if ConsoleVerbosity>=-1 then
|
|
||||||
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving IDE make config files.');
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// compile auto install static packages
|
|
||||||
if not CompileAutoInstallPackages(BuildLazProfiles.Current.IdeBuildMode<>bmBuild)
|
|
||||||
then begin
|
|
||||||
if ConsoleVerbosity>=-1 then
|
|
||||||
DebugLn('TLazBuildApplication.BuildLazarusIDE: Compile AutoInstall Packages failed.');
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// create inherited compiler options
|
|
||||||
PkgOptions:=PackageGraph.GetIDEInstallPackageOptions(InheritedOptionStrings{%H-});
|
|
||||||
|
|
||||||
// save
|
|
||||||
CurResult:=SaveIDEMakeOptions(BuildLazProfiles.Current,GlobalMacroList,
|
|
||||||
PkgOptions,Flags+[blfBackupOldExe]);
|
|
||||||
if CurResult<>mrOk then begin
|
|
||||||
if ConsoleVerbosity>=-1 then
|
|
||||||
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving idemake.cfg');
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// compile IDE
|
|
||||||
CurResult:=MakeLazarus(BuildLazProfiles.Current,
|
|
||||||
EnvironmentOptions.ExternalTools,GlobalMacroList,
|
|
||||||
PkgOptions,EnvironmentOptions.GetParsedCompilerFilename,
|
|
||||||
EnvironmentOptions.GetParsedMakeFilename,
|
|
||||||
Flags+[blfUseMakeIDECfg,blfOnlyIDE],
|
|
||||||
ProfileChanged);
|
|
||||||
if CurResult<>mrOk then begin
|
|
||||||
if ConsoleVerbosity>=-1 then
|
|
||||||
DebugLn('TLazBuildApplication.BuildLazarusIDE: Building IDE failed.');
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLazBuildApplication.CompileAutoInstallPackages(Clean: boolean): boolean;
|
function TLazBuildApplication.CompileAutoInstallPackages(Clean: boolean): boolean;
|
||||||
|
32
ide/main.pp
32
ide/main.pp
@ -391,6 +391,7 @@ type
|
|||||||
procedure mnuChgBuildModeClicked(Sender: TObject);
|
procedure mnuChgBuildModeClicked(Sender: TObject);
|
||||||
procedure mnuSetBuildModeClick(Sender: TObject); // event for drop down items
|
procedure mnuSetBuildModeClick(Sender: TObject); // event for drop down items
|
||||||
private
|
private
|
||||||
|
fBuilder: TLazarusBuilder;
|
||||||
function DoBuildLazarusSub(Flags: TBuildLazarusFlags): TModalResult;
|
function DoBuildLazarusSub(Flags: TBuildLazarusFlags): TModalResult;
|
||||||
{$IFNDEF EnableNewExtTools}
|
{$IFNDEF EnableNewExtTools}
|
||||||
function ExternalTools: TExternalToolList;
|
function ExternalTools: TExternalToolList;
|
||||||
@ -4656,8 +4657,10 @@ var
|
|||||||
DlgResult: TModalResult;
|
DlgResult: TModalResult;
|
||||||
begin
|
begin
|
||||||
MainBuildBoss.SetBuildTargetIDE;
|
MainBuildBoss.SetBuildTargetIDE;
|
||||||
|
fBuilder := TLazarusBuilder.Create; // Build profile is not known yet.
|
||||||
try
|
try
|
||||||
DlgResult:=ShowConfigureBuildLazarusDlg(MiscellaneousOptions.BuildLazProfiles);
|
try
|
||||||
|
DlgResult:=fBuilder.ShowConfigureBuildLazarusDlg(MiscellaneousOptions.BuildLazProfiles);
|
||||||
finally
|
finally
|
||||||
MainBuildBoss.SetBuildTargetProject1(true);
|
MainBuildBoss.SetBuildTargetProject1(true);
|
||||||
end;
|
end;
|
||||||
@ -4684,6 +4687,9 @@ begin
|
|||||||
DoBuildLazarus([]);
|
DoBuildLazarus([]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
finally
|
||||||
|
FreeAndNil(fBuilder);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainIDE.mnuCustomExtToolClick(Sender: TObject);
|
procedure TMainIDE.mnuCustomExtToolClick(Sender: TObject);
|
||||||
@ -7564,6 +7570,7 @@ var
|
|||||||
PkgOptions: string;
|
PkgOptions: string;
|
||||||
InheritedOptionStrings: TInheritedCompOptsStrings;
|
InheritedOptionStrings: TInheritedCompOptsStrings;
|
||||||
FPCVersion, FPCRelease, FPCPatch: integer;
|
FPCVersion, FPCRelease, FPCPatch: integer;
|
||||||
|
Builder: TLazarusBuilder;
|
||||||
begin
|
begin
|
||||||
// create uses section addition for lazarus.pp
|
// create uses section addition for lazarus.pp
|
||||||
Result:=PkgBoss.DoSaveAutoInstallConfig;
|
Result:=PkgBoss.DoSaveAutoInstallConfig;
|
||||||
@ -7581,9 +7588,13 @@ begin
|
|||||||
if (FPCVersion=0) or (FPCRelease=0) or (FPCPatch=0) then ;
|
if (FPCVersion=0) or (FPCRelease=0) or (FPCPatch=0) then ;
|
||||||
|
|
||||||
// save extra options
|
// save extra options
|
||||||
Result:=SaveIDEMakeOptions(MiscellaneousOptions.BuildLazProfiles.Current,
|
Builder:=TLazarusBuilder.Create;
|
||||||
GlobalMacroList,PkgOptions,Flags+[blfOnlyIDE]);
|
try
|
||||||
if Result<>mrOk then exit;
|
Result:=Builder.SaveIDEMakeOptions(MiscellaneousOptions.BuildLazProfiles.Current,
|
||||||
|
GlobalMacroList,PkgOptions,Flags+[blfOnlyIDE]);
|
||||||
|
finally
|
||||||
|
Builder.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMainIDE.DoExampleManager: TModalResult;
|
function TMainIDE.DoExampleManager: TModalResult;
|
||||||
@ -7600,6 +7611,7 @@ var
|
|||||||
FPCVersion, FPCRelease, FPCPatch: integer;
|
FPCVersion, FPCRelease, FPCPatch: integer;
|
||||||
PkgCompileFlags: TPkgCompileFlags;
|
PkgCompileFlags: TPkgCompileFlags;
|
||||||
ProfileChanged: Boolean;
|
ProfileChanged: Boolean;
|
||||||
|
BuilderCreated: Boolean;
|
||||||
begin
|
begin
|
||||||
if ToolStatus<>itNone then begin
|
if ToolStatus<>itNone then begin
|
||||||
IDEMessageDialog(lisNotNow,
|
IDEMessageDialog(lisNotNow,
|
||||||
@ -7615,6 +7627,9 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
BuilderCreated := fBuilder = Nil;
|
||||||
|
if BuilderCreated then
|
||||||
|
fBuilder:=TLazarusBuilder.Create;
|
||||||
{$IFNDEF EnableNewExtTools}
|
{$IFNDEF EnableNewExtTools}
|
||||||
MessagesView.BeginBlock;
|
MessagesView.BeginBlock;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -7630,7 +7645,7 @@ begin
|
|||||||
PkgCompileFlags:=PkgCompileFlags+[pcfCompileDependenciesClean];
|
PkgCompileFlags:=PkgCompileFlags+[pcfCompileDependenciesClean];
|
||||||
if BuildLazProfiles.Current.IdeBuildMode=bmCleanAllBuild then begin
|
if BuildLazProfiles.Current.IdeBuildMode=bmCleanAllBuild then begin
|
||||||
SourceEditorManager.ClearErrorLines;
|
SourceEditorManager.ClearErrorLines;
|
||||||
Result:=MakeLazarus(BuildLazProfiles.Current,
|
Result:=fBuilder.MakeLazarus(BuildLazProfiles.Current,
|
||||||
{$IFNDEF EnableNewExtTools}ExternalTools,{$ENDIF}
|
{$IFNDEF EnableNewExtTools}ExternalTools,{$ENDIF}
|
||||||
GlobalMacroList,
|
GlobalMacroList,
|
||||||
'',EnvironmentOptions.GetParsedCompilerFilename,
|
'',EnvironmentOptions.GetParsedCompilerFilename,
|
||||||
@ -7676,7 +7691,7 @@ begin
|
|||||||
|
|
||||||
// save extra options
|
// save extra options
|
||||||
IDEBuildFlags:=Flags;
|
IDEBuildFlags:=Flags;
|
||||||
Result:=SaveIDEMakeOptions(BuildLazProfiles.Current,GlobalMacroList,PkgOptions,
|
Result:=fBuilder.SaveIDEMakeOptions(BuildLazProfiles.Current,GlobalMacroList,PkgOptions,
|
||||||
IDEBuildFlags-[blfUseMakeIDECfg,blfDontClean]+[blfBackupOldExe]);
|
IDEBuildFlags-[blfUseMakeIDECfg,blfDontClean]+[blfBackupOldExe]);
|
||||||
if Result<>mrOk then begin
|
if Result<>mrOk then begin
|
||||||
DebugLn('TMainIDE.DoBuildLazarus: Save IDEMake options failed.');
|
DebugLn('TMainIDE.DoBuildLazarus: Save IDEMake options failed.');
|
||||||
@ -7686,7 +7701,7 @@ begin
|
|||||||
// make lazarus ide
|
// make lazarus ide
|
||||||
SourceEditorManager.ClearErrorLines;
|
SourceEditorManager.ClearErrorLines;
|
||||||
IDEBuildFlags:=IDEBuildFlags+[blfUseMakeIDECfg,blfDontClean];
|
IDEBuildFlags:=IDEBuildFlags+[blfUseMakeIDECfg,blfDontClean];
|
||||||
Result:=MakeLazarus(BuildLazProfiles.Current,
|
Result:=fBuilder.MakeLazarus(BuildLazProfiles.Current,
|
||||||
{$IFNDEF EnableNewExtTools}ExternalTools,{$ENDIF}
|
{$IFNDEF EnableNewExtTools}ExternalTools,{$ENDIF}
|
||||||
GlobalMacroList,
|
GlobalMacroList,
|
||||||
PkgOptions,EnvironmentOptions.GetParsedCompilerFilename,
|
PkgOptions,EnvironmentOptions.GetParsedCompilerFilename,
|
||||||
@ -7697,8 +7712,9 @@ begin
|
|||||||
if ProfileChanged then
|
if ProfileChanged then
|
||||||
MiscellaneousOptions.Save;
|
MiscellaneousOptions.Save;
|
||||||
finally
|
finally
|
||||||
|
if BuilderCreated then
|
||||||
|
FreeAndNil(fBuilder);
|
||||||
MainBuildBoss.SetBuildTargetProject1(true);
|
MainBuildBoss.SetBuildTargetProject1(true);
|
||||||
|
|
||||||
DoCheckFilesOnDisk;
|
DoCheckFilesOnDisk;
|
||||||
{$IFNDEF EnableNewExtTools}
|
{$IFNDEF EnableNewExtTools}
|
||||||
MessagesView.EndBlock;
|
MessagesView.EndBlock;
|
||||||
|
Loading…
Reference in New Issue
Block a user