lazbuild: implemented loading packages

git-svn-id: trunk@9806 -
This commit is contained in:
vincents 2006-09-04 14:50:19 +00:00
parent a22d3ff035
commit 55c2a73d66
2 changed files with 18 additions and 3 deletions

View File

@ -32,9 +32,9 @@ uses
Classes, SysUtils, CustApp, LCLProc, Forms, Controls, FileUtil,
CodeToolManager, Laz_XMLCfg,
MacroIntf,
IDEProcs, InitialSetupDlgs, OutputFilter, Compiler, TransferMacros,
EnvironmentOpts, IDETranslations, LazarusIDEStrConsts, LazConf,
BasePkgManager, PackageDefs, PackageLinks, PackageSystem;
IDEProcs, InitialSetupDlgs, OutputFilter, Compiler, CompilerOptions,
TransferMacros, EnvironmentOpts, IDETranslations, LazarusIDEStrConsts,
LazConf, BasePkgManager, PackageDefs, PackageLinks, PackageSystem;
type
@ -62,6 +62,11 @@ type
var AnOutDirectory: string);
// package graph
procedure PackageGraphAddPackage(Pkg: TLazPackage);
// compiler options
function OnSubstituteCompilerOption(Options: TParsedCompilerOptions;
const UnparsedValue: string; PlatformIndependent: boolean
): string;
protected
function BuildFile(Filename: string): boolean;
function BuildPackage(const AFilename: string): boolean;
@ -142,6 +147,14 @@ begin
if FileExists(Pkg.FileName) then PkgLinks.AddUserLink(Pkg);
end;
function TLazBuildApplication.OnSubstituteCompilerOption(
Options: TParsedCompilerOptions; const UnparsedValue: string;
PlatformIndependent: boolean): string;
begin
// TODO: real parsing and substution
Result:=UnparsedValue;
end;
function TLazBuildApplication.BuildFile(Filename: string): boolean;
begin
Result:=false;
@ -262,6 +275,7 @@ begin
GlobalMacroList:=TTransferMacroList.Create;
IDEMacros:=TLazIDEMacros.Create;
CompilerOptions.OnParseString:=@OnSubstituteCompilerOption;
{$WARNING TODO TLazBuildApplication.SetupMacros}
end;

View File

@ -730,6 +730,7 @@ begin
//end;
// finally try the history lists of the Dependency Owner (Project/Package)
if (Result=nil) and (Dependency.Owner<>nil)
and assigned(DependencyOwnerGetPkgFilename)
and DependencyOwnerGetPkgFilename(Self,Dependency) then
Result:=FindLinkWithDependencyInTree(FUserLinksSortID,Dependency);
end;