mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:00:43 +02:00
implemented inherited compiler options
git-svn-id: trunk@4059 -
This commit is contained in:
parent
aa0f5a45d5
commit
74214654f9
File diff suppressed because it is too large
Load Diff
@ -4260,7 +4260,7 @@ begin
|
||||
Left:=5;
|
||||
Width:=MaxX-Left-Left;
|
||||
Height:=16;
|
||||
Caption:=dlgEdHintCommand ;
|
||||
Caption:=dlgEdHintCommand;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
@ -4272,7 +4272,7 @@ begin
|
||||
Left:=0;
|
||||
Width:=MaxX-Left-Left;
|
||||
Height:=MaxY-Top;
|
||||
Options:=[tvoReadOnly, tvoShowButtons, tvoShowRoot,
|
||||
Options:=Options+[tvoReadOnly, tvoShowButtons, tvoShowRoot,
|
||||
tvoShowLines, tvoRowSelect, tvoKeepCollapsedNodes, tvoShowSeparators];
|
||||
OnMouseUp:=@KeyMappingTreeViewMouseUp;
|
||||
Images:=Self.ImageList;
|
||||
|
@ -563,6 +563,7 @@ resourcestring
|
||||
dlgCOLinking = 'Linking';
|
||||
dlgCOMessages = 'Messages';
|
||||
dlgCOOther = 'Other';
|
||||
dlgCOInherited = 'Inherited';
|
||||
dlgShowCompilerOptions = 'Show compiler options';
|
||||
dlgCOOpts = 'Options: ';
|
||||
dlgCOStyle = 'Style:';
|
||||
|
@ -1039,7 +1039,7 @@ begin
|
||||
fActiveEditorIndexAtStart := -1;
|
||||
FAutoCreateForms := true;
|
||||
fBookmarks := TProjectBookmarkList.Create;
|
||||
fCompilerOptions := TCompilerOptions.Create;
|
||||
fCompilerOptions := TCompilerOptions.Create(Self);
|
||||
FFlags:=DefaultProjectFlags;
|
||||
fIconPath := '';
|
||||
fJumpHistory:=TProjectJumpHistory.Create;
|
||||
@ -2296,6 +2296,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.104 2003/04/14 18:03:47 mattias
|
||||
implemented inherited compiler options
|
||||
|
||||
Revision 1.103 2003/04/13 13:45:04 mattias
|
||||
implemented broken dependencies dialog
|
||||
|
||||
|
@ -1299,6 +1299,7 @@ type
|
||||
tvsStateChanging,
|
||||
tvsManualNotify,
|
||||
tvsUpdating,
|
||||
tvsPainting,
|
||||
tvsMouseCapture,
|
||||
tvsWaitForDragging,
|
||||
tvsDblClicked,
|
||||
@ -1500,6 +1501,8 @@ type
|
||||
procedure Expand(Node: TTreeNode); dynamic;
|
||||
procedure GetImageIndex(Node: TTreeNode); virtual;
|
||||
procedure GetSelectedIndex(Node: TTreeNode); virtual;
|
||||
procedure InitializeWnd; override;
|
||||
procedure Invalidate; override;
|
||||
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
||||
procedure Loaded; override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y:
|
||||
@ -1754,6 +1757,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.72 2003/04/14 18:03:48 mattias
|
||||
implemented inherited compiler options
|
||||
|
||||
Revision 1.71 2003/04/13 13:45:04 mattias
|
||||
implemented broken dependencies dialog
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
const
|
||||
TTreeNodeStreamVersion : word = 1;
|
||||
TVAutoHeightString = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789|\()^';
|
||||
|
||||
// maximum scroll range
|
||||
//MAX_SCROLL = 32767;
|
||||
@ -2556,7 +2557,6 @@ procedure TCustomTreeView.CreateWnd;
|
||||
begin
|
||||
Exclude(FStates,tvsStateChanging);
|
||||
inherited CreateWnd;
|
||||
UpdateDefaultItemHeight;
|
||||
|
||||
//TreeView_SetBkColor(Handle, ColorToRGB(Color));
|
||||
//TreeView_SetTextColor(Handle, ColorToRGB(Font.Color));
|
||||
@ -2576,6 +2576,18 @@ begin
|
||||
// SetImageList(StateImages.Handle, TVSIL_STATE);
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.InitializeWnd;
|
||||
begin
|
||||
inherited InitializeWnd;
|
||||
UpdateDefaultItemHeight;
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.Invalidate;
|
||||
begin
|
||||
if tvsPainting in FStates then exit;
|
||||
inherited Invalidate;
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.DestroyWnd;
|
||||
//var Node: TTreeNode;
|
||||
begin
|
||||
@ -2858,7 +2870,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
if tvoAutoItemHeight in ChangedOptions then
|
||||
UpdateDefaultItemHeight;
|
||||
UpdateDefaultItemHeight;
|
||||
if ([tvoHideSelection,tvoReadOnly,tvoShowButtons,tvoShowRoot,tvoShowLines]
|
||||
* ChangedOptions)<>[]
|
||||
then
|
||||
@ -2866,16 +2878,22 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.UpdateDefaultItemHeight;
|
||||
var
|
||||
NewDefItemHeight: Integer;
|
||||
begin
|
||||
if HandleAllocated and (tvoAutoItemHeight in FOptions) then begin
|
||||
FDefItemHeight:=
|
||||
Canvas.TextHeight('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789|\()^')
|
||||
+2 // border
|
||||
;
|
||||
if (Images<>nil) and (Images.Height>FDefItemHeight) then
|
||||
FDefItemHeight:=Images.Height;
|
||||
if (StateImages<>nil) and (StateImages.Height>FDefItemHeight) then
|
||||
FDefItemHeight:=StateImages.Height;
|
||||
if (tvoAutoItemHeight in FOptions)
|
||||
and HandleAllocated and Canvas.HandleAllocated then begin
|
||||
NewDefItemHeight:=Canvas.TextHeight(TVAutoHeightString)+2; // +2 for border
|
||||
if NewDefItemHeight<2 then NewDefItemHeight:=2;
|
||||
if (Images<>nil) and (Images.Height>NewDefItemHeight) then
|
||||
NewDefItemHeight:=Images.Height;
|
||||
if (StateImages<>nil) and (StateImages.Height>NewDefItemHeight) then
|
||||
NewDefItemHeight:=StateImages.Height;
|
||||
if NewDefItemHeight<>FDefItemHeight then begin
|
||||
FDefItemHeight:=NewDefItemHeight;
|
||||
Include(FStates,tvsTopsNeedsUpdate);
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -3884,7 +3902,10 @@ var
|
||||
SpaceRect, DrawRect: TRect;
|
||||
Node: TTreeNode;
|
||||
begin
|
||||
if tvsUpdating in FStates then exit;
|
||||
if [tvsUpdating,tvsPainting]*FStates<>[] then exit;
|
||||
Include(FStates,tvsPainting);
|
||||
if (tvoAutoItemHeight in fOptions) then
|
||||
UpdateDefaultItemHeight;
|
||||
UpdateScrollbars;
|
||||
with Canvas do begin
|
||||
if Assigned(FOnCustomDraw) or Assigned(FOnAdvancedCustomDraw) then begin
|
||||
@ -3939,6 +3960,7 @@ begin
|
||||
if not CustomDraw(DrawRect,cdPostPaint) then exit;
|
||||
end;
|
||||
end;
|
||||
Exclude(FStates,tvsPainting);
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.DoPaintNode(Node: TTreeNode);
|
||||
|
@ -49,12 +49,17 @@ uses
|
||||
CompilerOptions, Forms, FileCtrl, IDEProcs, ComponentReg;
|
||||
|
||||
type
|
||||
TLazPackageID = class;
|
||||
TLazPackage = class;
|
||||
TLazPackageID = class;
|
||||
TPkgFile = class;
|
||||
TBasePackageEditor = class;
|
||||
TPkgDependency = class;
|
||||
|
||||
TIteratePackagesEvent =
|
||||
procedure(APackage: TLazPackageID) of object;
|
||||
TGetAllRequiredPackagesEvent =
|
||||
procedure(FirstDependency: TPkgDependency; var List: TList) of object;
|
||||
|
||||
|
||||
{ TPkgComponent }
|
||||
|
||||
@ -247,7 +252,24 @@ type
|
||||
procedure SetLazPackage(const AValue: TLazPackage);
|
||||
procedure SetModified(const NewValue: boolean); override;
|
||||
public
|
||||
constructor Create(ThePackage: TLazPackage);
|
||||
procedure Clear; override;
|
||||
procedure GetInheritedCompilerOptions(var OptionsList: TList); override;
|
||||
function GetOwnerName: string; override;
|
||||
public
|
||||
property LazPackage: TLazPackage read FLazPackage write SetLazPackage;
|
||||
end;
|
||||
|
||||
|
||||
{ TPkgAdditinoalCompilerOptions }
|
||||
|
||||
TPkgAdditionalCompilerOptions = class(TAdditionalCompilerOptions)
|
||||
private
|
||||
FLazPackage: TLazPackage;
|
||||
procedure SetLazPackage(const AValue: TLazPackage);
|
||||
public
|
||||
constructor Create(ThePackage: TLazPackage);
|
||||
function GetOwnerName: string; override;
|
||||
public
|
||||
property LazPackage: TLazPackage read FLazPackage write SetLazPackage;
|
||||
end;
|
||||
@ -311,7 +333,6 @@ type
|
||||
|
||||
TLazPackage = class(TLazPackageID)
|
||||
private
|
||||
FAddDependCompilerOptions: TAdditionalCompilerOptions;
|
||||
FAuthor: string;
|
||||
FAutoCreated: boolean;
|
||||
FAutoInstall: TPackageInstallType;
|
||||
@ -334,7 +355,7 @@ type
|
||||
FReadOnly: boolean;
|
||||
FRemovedFiles: TList; // TList of TPkgFile
|
||||
FRegistered: boolean;
|
||||
FUsageOptions: TAdditionalCompilerOptions;
|
||||
FUsageOptions: TPkgAdditionalCompilerOptions;
|
||||
function GetAutoIncrementVersionOnBuild: boolean;
|
||||
function GetAutoUpdate: boolean;
|
||||
function GetComponentCount: integer;
|
||||
@ -407,9 +428,9 @@ type
|
||||
procedure RemoveUsedByDependency(Dependency: TPkgDependency);
|
||||
procedure ChangeID(const NewName: string; NewVersion: TPkgVersion);
|
||||
procedure UpdateEditorRect;
|
||||
procedure GetAllRequiredPackages(var List: TList);
|
||||
procedure GetInheritedCompilerOptions(var OptionsList: TList);
|
||||
public
|
||||
property AddDependCompilerOptions: TAdditionalCompilerOptions
|
||||
read FAddDependCompilerOptions;
|
||||
property Author: string read FAuthor write SetAuthor;
|
||||
property AutoCreated: boolean read FAutoCreated write SetAutoCreated;
|
||||
property AutoIncrementVersionOnBuild: boolean
|
||||
@ -439,7 +460,7 @@ type
|
||||
property ReadOnly: boolean read FReadOnly write SetReadOnly;
|
||||
property RemovedFilesCount: integer read GetRemovedCount;
|
||||
property RemovedFiles[Index: integer]: TPkgFile read GetRemovedFiles;
|
||||
property UsageOptions: TAdditionalCompilerOptions
|
||||
property UsageOptions: TPkgAdditionalCompilerOptions
|
||||
read FUsageOptions;
|
||||
end;
|
||||
|
||||
@ -476,6 +497,8 @@ var
|
||||
// All TPkgDependency are added to this AVL tree (sorted for names, not version!)
|
||||
PackageDependencies: TAVLTree; // tree of TPkgDependency
|
||||
|
||||
OnGetAllRequiredPackages: TGetAllRequiredPackagesEvent;
|
||||
|
||||
|
||||
function PkgFileTypeIdentToType(const s: string): TPkgFileType;
|
||||
function LazPackageTypeIdentToType(const s: string): TLazPackageType;
|
||||
@ -1372,15 +1395,13 @@ end;
|
||||
constructor TLazPackage.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
FAddDependCompilerOptions:=TAdditionalCompilerOptions.Create;
|
||||
FComponents:=TList.Create;
|
||||
FFiles:=TList.Create;
|
||||
FRemovedFiles:=TList.Create;
|
||||
FCompilerOptions:=TPkgCompilerOptions.Create;
|
||||
FCompilerOptions.LazPackage:=Self;
|
||||
FUsageOptions:=TAdditionalCompilerOptions.Create;
|
||||
FCompilerOptions:=TPkgCompilerOptions.Create(Self);
|
||||
FInstalled:=pitNope;
|
||||
FAutoInstall:=pitNope;
|
||||
FUsageOptions:=TPkgAdditionalCompilerOptions.Create(Self);
|
||||
FFlags:=[lpfAutoIncrementVersionOnBuild,lpfAutoUpdate];
|
||||
end;
|
||||
|
||||
@ -1392,7 +1413,6 @@ begin
|
||||
FreeAndNil(FComponents);
|
||||
FreeAndNil(FCompilerOptions);
|
||||
FreeAndNil(FUsageOptions);
|
||||
FreeAndNil(FAddDependCompilerOptions);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -1426,7 +1446,6 @@ begin
|
||||
FPackageType:=lptRunAndDesignTime;
|
||||
FRegistered:=false;
|
||||
FUsageOptions.Clear;
|
||||
FAddDependCompilerOptions.Clear;
|
||||
end;
|
||||
|
||||
procedure TLazPackage.LockModified;
|
||||
@ -1522,8 +1541,6 @@ begin
|
||||
LoadPkgDependencyList(Path+'RequiredPkgs/',
|
||||
FFirstRequiredDependency,pdlRequires);
|
||||
FUsageOptions.LoadFromXMLConfig(XMLConfig,Path+'UsageOptions/');
|
||||
FAddDependCompilerOptions.LoadFromXMLConfig(
|
||||
XMLConfig,Path+'AddDependCompilerOptions/');
|
||||
LoadRect(XMLConfig,Path+'EditorRect/',fEditorRect);
|
||||
Modified:=false;
|
||||
UnlockModified;
|
||||
@ -1583,8 +1600,6 @@ begin
|
||||
SavePkgDependencyList(Path+'RequiredPkgs/',
|
||||
FFirstRequiredDependency,pdlRequires);
|
||||
FUsageOptions.SaveToXMLConfig(XMLConfig,Path+'UsageOptions/');
|
||||
FAddDependCompilerOptions.SaveToXMLConfig(
|
||||
XMLConfig,Path+'AddDependCompilerOptions/');
|
||||
SaveRect(XMLConfig,Path+'EditorRect/',fEditorRect);
|
||||
Modified:=false;
|
||||
end;
|
||||
@ -1889,6 +1904,32 @@ begin
|
||||
Editor.Left+Editor.Width,Editor.Top+Editor.Height);
|
||||
end;
|
||||
|
||||
procedure TLazPackage.GetAllRequiredPackages(var List: TList);
|
||||
begin
|
||||
if Assigned(OnGetAllRequiredPackages) then
|
||||
OnGetAllRequiredPackages(FirstRequiredDependency,List);
|
||||
end;
|
||||
|
||||
procedure TLazPackage.GetInheritedCompilerOptions(var OptionsList: TList);
|
||||
var
|
||||
PkgList: TList; // list of TLazPackage
|
||||
Cnt: Integer;
|
||||
i: Integer;
|
||||
begin
|
||||
PkgList:=nil;
|
||||
GetAllRequiredPackages(PkgList);
|
||||
if PkgList<>nil then begin
|
||||
OptionsList:=TList.Create;
|
||||
Cnt:=PkgList.Count;
|
||||
for i:=0 to Cnt-1 do begin
|
||||
writeln('TLazPackage.GetInheritedCompilerOptions A ');
|
||||
OptionsList.Add(TLazPackage(PkgList[i]).UsageOptions);
|
||||
end;
|
||||
end else begin
|
||||
OptionsList:=nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TPkgComponent }
|
||||
|
||||
procedure TPkgComponent.SetPkgFile(const AValue: TPkgFile);
|
||||
@ -2041,11 +2082,49 @@ begin
|
||||
if Modified and (LazPackage<>nil) then LazPackage.Modified:=true;
|
||||
end;
|
||||
|
||||
constructor TPkgCompilerOptions.Create(ThePackage: TLazPackage);
|
||||
begin
|
||||
inherited Create(ThePackage);
|
||||
fLazPackage:=ThePackage;
|
||||
end;
|
||||
|
||||
procedure TPkgCompilerOptions.Clear;
|
||||
begin
|
||||
inherited Clear;
|
||||
end;
|
||||
|
||||
procedure TPkgCompilerOptions.GetInheritedCompilerOptions(var OptionsList: TList
|
||||
);
|
||||
begin
|
||||
LazPackage.GetInheritedCompilerOptions(OptionsList);
|
||||
end;
|
||||
|
||||
function TPkgCompilerOptions.GetOwnerName: string;
|
||||
begin
|
||||
writeln('TPkgCompilerOptions.GetOwnerName ',HexStr(Cardinal(Self),8),' ',HexStr(Cardinal(fLazPackage),8));
|
||||
Result:=LazPackage.IDAsString;
|
||||
end;
|
||||
|
||||
{ TPkgAdditionalCompilerOptions }
|
||||
|
||||
procedure TPkgAdditionalCompilerOptions.SetLazPackage(const AValue: TLazPackage
|
||||
);
|
||||
begin
|
||||
if FLazPackage=AValue then exit;
|
||||
FLazPackage:=AValue;
|
||||
end;
|
||||
|
||||
constructor TPkgAdditionalCompilerOptions.Create(ThePackage: TLazPackage);
|
||||
begin
|
||||
inherited Create(ThePackage);
|
||||
FLazPackage:=ThePackage;
|
||||
end;
|
||||
|
||||
function TPkgAdditionalCompilerOptions.GetOwnerName: string;
|
||||
begin
|
||||
Result:=LazPackage.IDAsString;
|
||||
end;
|
||||
|
||||
initialization
|
||||
PackageDependencies:=TAVLTree.Create(@ComparePkgDependencyNames);
|
||||
|
||||
|
@ -42,9 +42,6 @@ uses
|
||||
PackageDefs, LazConf;
|
||||
|
||||
type
|
||||
TIteratePackagesEvent =
|
||||
procedure(APackage: TLazPackageID) of object;
|
||||
|
||||
|
||||
{ TPackageLink }
|
||||
|
||||
|
@ -142,6 +142,7 @@ type
|
||||
procedure AddStaticBasePackages;
|
||||
procedure ClosePackage(APackage: TLazPackage);
|
||||
procedure MarkNeededPackages;
|
||||
procedure MarkAllPackagesAsNotVisited;
|
||||
procedure CloseUnneededPackages;
|
||||
procedure ChangePackageID(APackage: TLazPackage;
|
||||
const NewName: string; NewVersion: TPkgVersion;
|
||||
@ -165,6 +166,8 @@ type
|
||||
Event: TIteratePackagesEvent);
|
||||
procedure IteratePackagesSorted(Flags: TFindPackageFlags;
|
||||
Event: TIteratePackagesEvent);
|
||||
procedure GetAllRequiredPackages(FirstDependency: TPkgDependency;
|
||||
var List: TList);
|
||||
public
|
||||
property AbortRegistration: boolean read FAbortRegistration
|
||||
write SetAbortRegistration;
|
||||
@ -287,6 +290,7 @@ end;
|
||||
|
||||
constructor TLazPackageGraph.Create;
|
||||
begin
|
||||
OnGetAllRequiredPackages:=@GetAllRequiredPackages;
|
||||
FTree:=TAVLTree.Create(@CompareLazPackageID);
|
||||
FItems:=TList.Create;
|
||||
end;
|
||||
@ -299,6 +303,8 @@ begin
|
||||
RegisterComponentsProc:=nil;
|
||||
if RegisterNoIconProc=@RegisterNoIconGlobalHandler then
|
||||
RegisterNoIconProc:=nil;
|
||||
if OnGetAllRequiredPackages=@GetAllRequiredPackages then
|
||||
OnGetAllRequiredPackages:=nil;
|
||||
Clear;
|
||||
FItems.Free;
|
||||
FTree.Free;
|
||||
@ -790,7 +796,7 @@ begin
|
||||
AddFile('calendar.pp','Calendar',pftUnit,[pffHasRegisterProc],cpLCL);
|
||||
|
||||
// add unit paths
|
||||
AddDependCompilerOptions.UnitPath:=
|
||||
UsageOptions.UnitPath:=
|
||||
'$(LazarusDir)/lcl/units;$(LazarusDir)/lcl/units/$(LCLWidgetType)';
|
||||
|
||||
// add requirements
|
||||
@ -857,7 +863,7 @@ var
|
||||
Dependency: TPkgDependency;
|
||||
begin
|
||||
if Count=0 then exit;
|
||||
// mark all packages as unneeded and not visited
|
||||
// mark all packages as unneeded
|
||||
for i:=0 to FItems.Count-1 do begin
|
||||
Pkg:=TLazPackage(FItems[i]);
|
||||
Pkg.Flags:=Pkg.Flags-[lpfNeeded];
|
||||
@ -898,6 +904,18 @@ begin
|
||||
FreeMem(PkgStack);
|
||||
end;
|
||||
|
||||
procedure TLazPackageGraph.MarkAllPackagesAsNotVisited;
|
||||
var
|
||||
i: Integer;
|
||||
Pkg: TLazPackage;
|
||||
begin
|
||||
// mark all packages as not visited
|
||||
for i:=FItems.Count-1 downto 0 do begin
|
||||
Pkg:=TLazPackage(FItems[i]);
|
||||
Pkg.Flags:=Pkg.Flags-[lpfVisited];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLazPackageGraph.CloseUnneededPackages;
|
||||
var
|
||||
i: Integer;
|
||||
@ -1190,6 +1208,53 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLazPackageGraph.GetAllRequiredPackages(
|
||||
FirstDependency: TPkgDependency; var List: TList);
|
||||
var
|
||||
Pkg: TLazPackage;
|
||||
PkgStack: PLazPackage;
|
||||
StackPtr: Integer;
|
||||
|
||||
procedure PutPackagesFromDependencyListOnStack(CurDependency: TPkgDependency);
|
||||
var
|
||||
RequiredPackage: TLazPackage;
|
||||
begin
|
||||
while CurDependency<>nil do begin
|
||||
if CurDependency.LoadPackageResult=lprSuccess then begin
|
||||
RequiredPackage:=CurDependency.RequiredPackage;
|
||||
if (not (lpfVisited in RequiredPackage.Flags)) then begin
|
||||
RequiredPackage.Flags:=RequiredPackage.Flags+[lpfVisited];
|
||||
PkgStack[StackPtr]:=RequiredPackage;
|
||||
inc(StackPtr);
|
||||
end;
|
||||
end;
|
||||
CurDependency:=CurDependency.NextRequiresDependency;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
// initialize
|
||||
MarkAllPackagesAsNotVisited;
|
||||
// create stack
|
||||
GetMem(PkgStack,SizeOf(Pointer)*Count);
|
||||
StackPtr:=0;
|
||||
// put dependency list on stack
|
||||
PutPackagesFromDependencyListOnStack(FirstDependency);
|
||||
// mark all required packages
|
||||
while StackPtr>0 do begin
|
||||
// get required package from stack
|
||||
dec(StackPtr);
|
||||
Pkg:=PkgStack[StackPtr];
|
||||
// add package to list
|
||||
if List=nil then List:=TList.Create;
|
||||
List.Add(Pkg);
|
||||
// put all required packages on stack
|
||||
PutPackagesFromDependencyListOnStack(Pkg.FirstRequiredDependency);
|
||||
end;
|
||||
// clean up
|
||||
FreeMem(PkgStack);
|
||||
end;
|
||||
|
||||
initialization
|
||||
PackageGraph:=nil;
|
||||
|
||||
|
@ -378,7 +378,7 @@ begin
|
||||
// Usage page
|
||||
LazPackage.PackageType:=NewPackageType;
|
||||
LazPackage.AutoUpdate:=(UpdateRadioGroup.ItemIndex=0);
|
||||
with LazPackage.AddDependCompilerOptions do begin
|
||||
with LazPackage.UsageOptions do begin
|
||||
UnitPath:=UnitPathEdit.Text;
|
||||
IncludePath:=IncludePathEdit.Text;
|
||||
ObjectPath:=ObjectPathEdit.Text;
|
||||
@ -817,12 +817,14 @@ begin
|
||||
else
|
||||
UpdateRadioGroup.ItemIndex:=1;
|
||||
|
||||
UnitPathEdit.Text:=LazPackage.AddDependCompilerOptions.UnitPath;
|
||||
IncludePathEdit.Text:=LazPackage.AddDependCompilerOptions.IncludePath;
|
||||
ObjectPathEdit.Text:=LazPackage.AddDependCompilerOptions.ObjectPath;
|
||||
LibraryPathEdit.Text:=LazPackage.AddDependCompilerOptions.LibraryPath;
|
||||
LinkerOptionsMemo.Text:=LazPackage.AddDependCompilerOptions.LinkerOptions;
|
||||
CustomOptionsMemo.Text:=LazPackage.AddDependCompilerOptions.CustomOptions;
|
||||
with LazPackage.UsageOptions do begin
|
||||
UnitPathEdit.Text:=UnitPath;
|
||||
IncludePathEdit.Text:=IncludePath;
|
||||
ObjectPathEdit.Text:=ObjectPath;
|
||||
LibraryPathEdit.Text:=LibraryPath;
|
||||
LinkerOptionsMemo.Text:=LinkerOptions;
|
||||
CustomOptionsMemo.Text:=CustomOptions;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPackageOptionsDialog.ReadPkgTypeFromPackage;
|
||||
|
Loading…
Reference in New Issue
Block a user