lazbuild: implemented compiling IDE

git-svn-id: trunk@15749 -
This commit is contained in:
mattias 2008-07-11 15:43:48 +00:00
parent 1b29789902
commit d875e8ef93
2 changed files with 26 additions and 5 deletions

View File

@ -374,6 +374,7 @@ var
MakeMode: TMakeMode;
PkgOptions: String;
InheritedOptionStrings: TInheritedCompOptsStrings;
TargetDir: String;
begin
Result:=false;
@ -413,6 +414,21 @@ begin
PackageGraph.LoadStaticBasePackages;
PackageGraph.LoadAutoInstallPackages(BuildLazOptions.StaticAutoInstallPackages);
// save target directory
TargetDir:=MiscellaneousOptions.BuildLazOpts.TargetDirectory;
IDEMacros.SubstituteMacros(TargetDir);
if not ForceDirectory(TargetDir) then begin
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed creating IDE target directory "',TargetDir,'"');
exit;
end;
// save configs for 'make'
CurResult:=PackageGraph.SaveAutoInstallConfig;
if CurResult<>mrOk then begin
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving IDE make config files.');
exit;
end;
// first compile all lazarus components (LCL, SynEdit, CodeTools, ...)
// but not the IDE
CurResult:=BuildLazarus(MiscellaneousOptions.BuildLazOpts,
@ -433,7 +449,15 @@ begin
// create inherited compiler options
PkgOptions:=PackageGraph.GetIDEInstallPackageOptions(InheritedOptionStrings);
// save
CurResult:=SaveIDEMakeOptions(BuildLazOptions,
GlobalMacroList,PkgOptions,Flags+[blfOnlyIDE]);
if CurResult<>mrOk then begin
DebugLn('TLazBuildApplication.BuildLazarusIDE: failed saving idemake.cfg');
exit;
end;
// compile IDE
CurResult:=BuildLazarus(BuildLazOptions,
EnvironmentOptions.ExternalTools,GlobalMacroList,

View File

@ -3771,9 +3771,6 @@ function TPkgManager.DoSaveAutoInstallConfig: TModalResult;
var
TargetDir: String;
begin
Result:=PackageGraph.SaveAutoInstallConfig;
if Result<>mrOk then exit;
TargetDir:=MiscellaneousOptions.BuildLazOpts.TargetDirectory;
IDEMacros.SubstituteMacros(TargetDir);
if not ForceDirectory(TargetDir) then begin
@ -3784,7 +3781,7 @@ begin
exit;
end;
Result:=mrOk;
Result:=PackageGraph.SaveAutoInstallConfig;
end;
function TPkgManager.DoGetIDEInstallPackageOptions(