LazBuild: make changes required by the earlier refactoring.

git-svn-id: trunk@43979 -
This commit is contained in:
juha 2014-02-09 15:49:03 +00:00
parent 75a780c02e
commit 3a730fa23b

View File

@ -513,12 +513,10 @@ var
CurResult: TModalResult;
BuildLazProfiles: TBuildLazarusProfiles;
CurProf: TBuildLazarusProfile;
PkgOptions: String;
InheritedOptionStrings: TInheritedCompOptsStrings;
TargetDir: String;
InhOptStrs: TInheritedCompOptsStrings;
Builder: TLazarusBuilder;
TargetDir, s: String;
i: Integer;
s: String;
ProfileChanged: boolean;
begin
Result:=false;
if not Init then exit;
@ -587,62 +585,56 @@ begin
exit;
end;
// clean
ProfileChanged:=false;
if BuildLazProfiles.Current.IdeBuildMode=bmCleanAllBuild then begin
CurResult:=MakeLazarus(BuildLazProfiles.Current,
EnvironmentOptions.ExternalTools,GlobalMacroList,
'',EnvironmentOptions.GetParsedCompilerFilename,
EnvironmentOptions.GetParsedMakeFilename,
Flags+[blfDontBuild],
ProfileChanged);
Builder:=TLazarusBuilder.Create(BuildLazProfiles.Current);
try
Builder.ExtTools:=EnvironmentOptions.ExternalTools;
Builder.PkgOptions:='';
// clean
if BuildLazProfiles.Current.IdeBuildMode=bmCleanAllBuild then begin
CurResult:=Builder.MakeLazarus(Flags+[blfDontBuild]);
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 ConsoleVerbosity>=-1 then
DebugLn('TLazBuildApplication.BuildLazarusIDE: Clean all failed.');
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving IDE make config files.');
exit;
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;
// 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(
PackageGraph.FirstAutoInstallDependency,InheritedOptionStrings{%H-});
// create inherited compiler options
Builder.PkgOptions:=PackageGraph.GetIDEInstallPackageOptions(InhOptStrs{%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;
// save
CurResult:=Builder.SaveIDEMakeOptions(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;
// compile IDE
CurResult:=Builder.MakeLazarus(Flags+[blfUseMakeIDECfg,blfOnlyIDE]);
if CurResult<>mrOk then begin
if ConsoleVerbosity>=-1 then
DebugLn('TLazBuildApplication.BuildLazarusIDE: Building IDE failed.');
exit;
end;
finally
Builder.Free;
end;
Result:=true;