From d875e8ef93d09ff524e528a2d43e4d4a9770fe7d Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 11 Jul 2008 15:43:48 +0000 Subject: [PATCH] lazbuild: implemented compiling IDE git-svn-id: trunk@15749 - --- ide/lazbuild.lpr | 26 +++++++++++++++++++++++++- packager/pkgmanager.pas | 5 +---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 920491ec74..f703da7321 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -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, diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index cfecb5219a..2fd7c70286 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -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(