Opkman: Preparing OPM for the integration with the build in Package Manager. Step4.

git-svn-id: trunk@56669 -
This commit is contained in:
balazs 2017-12-08 10:55:32 +00:00
parent 5fff4bbf99
commit 9e8a489027
11 changed files with 1077 additions and 63 deletions

2
.gitattributes vendored
View File

@ -3585,6 +3585,8 @@ components/onlinepackagemanager/opkman_downloader.pas svneol=native#text/pascal
components/onlinepackagemanager/opkman_fpcdef.inc svneol=native#text/pascal
components/onlinepackagemanager/opkman_installer.pas svneol=native#text/pascal
components/onlinepackagemanager/opkman_intf.pas svneol=native#text/pascal
components/onlinepackagemanager/opkman_intf_packagelistfrm.lfm svneol=native#text/plain
components/onlinepackagemanager/opkman_intf_packagelistfrm.pas svneol=native#text/pascal
components/onlinepackagemanager/opkman_mainfrm.lfm svneol=native#text/plain
components/onlinepackagemanager/opkman_mainfrm.pas svneol=native#text/pascal
components/onlinepackagemanager/opkman_options.pas svneol=native#text/pascal

View File

@ -20,7 +20,7 @@
<Description Value="Online package manger"/>
<License Value="GPL"/>
<Version Major="1" Release="1" Build="2"/>
<Files Count="25">
<Files Count="26">
<Item1>
<Filename Value="onlinepackagemanagerintf.pas"/>
<HasRegisterProc Value="True"/>
@ -127,6 +127,10 @@
<Filename Value="opkman_intf.pas"/>
<UnitName Value="opkman_intf"/>
</Item25>
<Item26>
<Filename Value="opkman_intf_packagelistfrm.pas"/>
<UnitName Value="opkman_intf_packagelistfrm"/>
</Item26>
</Files>
<i18n>
<EnableI18N Value="True"/>

View File

@ -16,7 +16,7 @@ uses
opkman_packagedetailsfrm, opkman_updates, opkman_createjsonforupdatesfrm,
opkman_uploader, opkman_repositories, opkman_createrepositoryfrm,
opkman_repositorydetailsfrm, opkman_addrepositorypackagefrm, opkman_intf,
LazarusPackageIntf;
opkman_intf_packagelistfrm, LazarusPackageIntf;
implementation

View File

@ -35,7 +35,7 @@ uses
// LazUtils
LazFileUtils,
// IdeIntf
LazIDEIntf,
LazIDEIntf, PackageIntf,
// OpkMan
opkman_const, opkman_options;
@ -123,6 +123,7 @@ procedure InitLocalRepository;
function SecToHourAndMin(const ASec: LongInt): String;
function FormatSize(Size: Int64): String;
function FormatSpeed(Speed: LongInt): String;
function GetPackageTypeString(aPackageType: TLazPackageType): String;
function GetDirSize(const ADirName: String; var AFileCnt, ADirCnt: Integer): Int64;
procedure FindPackages(const ADirName: String; APackageList: TStrings);
procedure FindAllFilesEx(const ADirName: String; AFileList: TStrings);
@ -205,6 +206,16 @@ begin
Result := FormatFloat('#,##0.0 GB/s', Speed / GB);
end;
function GetPackageTypeString(aPackageType: TLazPackageType): String;
begin
case aPackageType of
lptRunAndDesignTime: Result := rsMainFrm_VSTText_PackageType0;
lptDesignTime: Result := rsMainFrm_VSTText_PackageType1;
lptRunTime: Result := rsMainFrm_VSTText_PackageType2;
lptRunTimeOnly: Result := rsMainFrm_VSTText_PackageType3;
end;
end;
function GetDirSize(const ADirName: String; var AFileCnt, ADirCnt: Integer): Int64;
var
DirSize: Int64;

View File

@ -201,7 +201,7 @@ resourcestring
rsMainFrm_rsRepositoryCleanup1 = '%s packages deleted!';
rsMainFrm_rsPackageDependency0 = 'Package "%s" depends on package "%s". '
+'Resolve dependency?';
rsMainFrm_rsPackageDependency1 = 'Not resolving dependencies might lead to install failure!';
rsMainFrm_rsPackageDependency1 = 'Not resolving dependencies might lead to install failure! Continue?';
rsMainFrm_rsPackageRating = 'Your vote for package "%s" is: %s. Thank you for voting!';
rsMainFrm_rsUninstall = '%sAre you sure you wish to uninstall the checked packages?' + sLineBreak +
'Please note: in order for the changes to take effect you must rebuid the IDE.';
@ -472,7 +472,22 @@ resourcestring
rsAddRepositoryPackageFrm_bCancel_Hint = 'Close the dialog';
//OPMinterface
rsOPMInterfaceConf = 'Do you wish to install the following online package(s):';
rsOPMInterfaceRebuildConf = 'In order for the changes to take effect you must rebuild the IDE. Rebuild now?';
//OPMIntfPackageList
rsOPMIntfPackageListFrm_Caption = 'Install online packages';
rsOPMIntfPackageListFrm_pnInfo = 'Please check before install: Lazarus/FPC compatibility, widgetset support, license and version info';
rsOPMIntfPackageListFrm_VSTHeaderColumn_LazarusPackage = 'Lazarus Package';
rsOPMIntfPackageListFrm_VSTHeaderColumn_Data = 'Data';
rsOPMIntfPackageListFrm_VSTText_Description = 'Description';
rsOPMIntfPackageListFrm_VSTText_Author = 'Author';
rsOPMIntfPackageListFrm_VSTText_LazCompatibility = 'Lazarus compatibility';
rsOPMIntfPackageListFrm_VSTText_FPCCompatibility = 'FPC compatibility';
rsOPMIntfPackageListFrm_VSTText_SupportedWidgetsets = 'Supported widgetsets';
rsOPMIntfPackageListFrm_VSTText_Packagetype = 'Package type';
rsOPMIntfPackageListFrm_VSTText_License = 'License';
rsOPMIntfPackageListFrm_VSTText_Dependecies = 'Dependencies';
rsOPMIntfPackageListFrm_VSTText_Version = 'Version';
implementation

View File

@ -31,9 +31,9 @@ interface
uses
Classes, SysUtils, Forms, Dialogs, Controls, contnrs, fpjson,
// IdeIntf
LazIDEIntf, PackageIntf, PackageLinkIntf, PackageDependencyIntf,
LazIDEIntf, PackageIntf, PackageLinkIntf, PackageDependencyIntf, IDECommands,
// OPM
opkman_timer, opkman_downloader, opkman_serializablepackages;
opkman_timer, opkman_downloader, opkman_serializablepackages, opkman_installer;
type
@ -50,20 +50,26 @@ type
procedure InitOPM;
procedure SynchronizePackages;
procedure AddToInstallList(const AName, AURL: String);
function Download(const ADstDir: String; AParentForm: TForm): TModalResult;
function Extract(const ASrcDir, ADstDir: String; AParentForm: TForm;
const AIsUpdate: Boolean = False): TModalResult;
function Install(AParentForm: TForm; var AInstallStatus: TInstallStatus;
var ANeedToRebuild: Boolean): TModalResult;
function IsInLinkList(const AName, AURL: String): Boolean;
function ResolveDependencies(AParentForm: TForm): TModalResult;
function CanInstallPackages(APkgLinks: TList; AParentForm: TForm): TModalResult;
function CanInstallPackages(AParentForm: TForm): TModalResult;
public
constructor Create;
destructor Destroy; override;
public
function InstallPackages(APkgLinks: TList; AParentForm: TForm;
const AResolveDependencies: Boolean = True): TModalResult; override;
var ANeedToRebuild: Boolean): TModalResult; override;
end;
implementation
uses opkman_common, opkman_options, opkman_const;
uses opkman_common, opkman_options, opkman_const, opkman_progressfrm, opkman_zipper,
opkman_intf_PackageListFrm;
{ TOPMInterfaceEx }
@ -184,8 +190,6 @@ begin
if (UpperCase(LazPackage.Name) = UpperCase(AName)) and
(UpperCase(Options.RemoteRepository[Options.ActiveRepositoryIndex] + MetaPackage.RepositoryFileName) = UpperCase(AURL)) then
begin
MetaPackage.Checked := True;
LazPackage.Checked := True;
FPackagesToInstall.Add(LazPackage);
Break;
end;
@ -199,6 +203,7 @@ var
PackageList: TObjectList;
PkgFileName: String;
DependencyPkg: TLazarusPackage;
MetaPkg: TMetaPackage;
Msg: String;
begin
Result := mrNone;
@ -215,21 +220,26 @@ begin
if DependencyPkg <> nil then
begin
if (not DependencyPkg.Checked) and
((SerializablePackages.IsDependencyOk(TPackageDependency(PackageList.Items[I]), DependencyPkg)) and
((not (DependencyPkg.PackageState = psInstalled)) or ((DependencyPkg.PackageState = psInstalled) and (not (SerializablePackages.IsInstalledVersionOk(TPackageDependency(PackageList.Items[I]), DependencyPkg.InstalledFileVersion)))))) then
(UpperCase(TLazarusPackage(FPackagesToInstall.Items[I]).Name) <> UpperCase(PkgFileName)) and
((SerializablePackages.IsDependencyOk(TPackageDependency(PackageList.Items[J]), DependencyPkg)) and
((not (DependencyPkg.PackageState = psInstalled)) or ((DependencyPkg.PackageState = psInstalled) and (not (SerializablePackages.IsInstalledVersionOk(TPackageDependency(PackageList.Items[J]), DependencyPkg.InstalledFileVersion)))))) then
begin
if (Result = mrNone) or (Result = mrYes) then
begin
Msg := Format(rsMainFrm_rsPackageDependency0, [TLazarusPackage(FPackagesToInstall.Items[I]).Name, DependencyPkg.Name]);
Result := MessageDlgEx(Msg, mtConfirmation, [mbYes, mbYesToAll, mbNo, mbNoToAll, mbCancel], AParentForm);
if Result in [mrNo, mrNoToAll] then
MessageDlgEx(rsMainFrm_rsPackageDependency1, mtInformation, [mbOk], AParentForm);
if MessageDlgEx(rsMainFrm_rsPackageDependency1, mtInformation, [mbYes, mbNo], AParentForm) <> mrYes then
Exit(mrCancel);
if (Result = mrNoToAll) or (Result = mrCancel) then
Exit;
Exit(mrCancel);
end;
if Result in [mrYes, mrYesToAll] then
begin
DependencyPkg.Checked := True;
MetaPkg := SerializablePackages.FindMetaPackageByLazarusPackage(DependencyPkg);
if MetaPkg <> nil then
MetaPkg.Checked := True;
FPackageDependecies.Add(DependencyPkg);
end;
end;
@ -239,57 +249,158 @@ begin
PackageList.Free;
end;
end;
Result := mrOk;
end;
function TOPMInterfaceEx.CanInstallPackages(APkgLinks: TList;
AParentForm: TForm): TModalResult;
function TOPMInterfaceEx.CanInstallPackages(AParentForm: TForm): TModalResult;
var
PkgListStr: String;
I: Integer;
PackageLink: TPackageLink;
LazarusPkg: TLazarusPackage;
MetaPkg: TMetaPackage;
begin
Result := mrOK;
PkgListStr := '';
for I := 0 to APkgLinks.Count - 1 do
begin
PackageLink := TPackageLink(APkgLinks.Items[I]);
if PkgListStr = '' then
PkgListStr := '"' + PackageLink.Name + '"'
else
PkgListStr := PkgListStr + ', "' + PackageLink.Name + '"';
Result := mrCancel;
IntfPackageListFrm := TIntfPackageListFrm.Create(AParentForm);
try
IntfPackageListFrm.PopupMode := pmExplicit;
IntfPackageListFrm.PopupParent := AParentForm;
IntfPackageListFrm.PopulateTree(FPackagesToInstall);
IntfPackageListFrm.ShowModal;
if IntfPackageListFrm.ModalResult = mrOk then
begin
for I := FPackagesToInstall.Count - 1 downto 0 do
begin
LazarusPkg := TLazarusPackage(FPackagesToInstall.Items[I]);
if IntfPackageListFrm.IsLazarusPackageChecked(LazarusPkg.Name) then
begin
LazarusPkg.Checked := True;
MetaPkg := SerializablePackages.FindMetaPackageByLazarusPackage(LazarusPkg);
if MetaPkg <> nil then
MetaPkg.Checked := True;
end
else
FPackagesToInstall.Delete(I);
end;
if FPackagesToInstall.Count > 0 then
Result := mrOK;
end;
finally
IntfPackageListFrm.Free;
end;
if Trim(PkgListStr) <> '' then
if MessageDlgEx(rsOPMInterfaceConf + ' ' + PkgListStr + ' ?', mtConfirmation, [mbYes, mbNo], AParentForm) <> mrYes then
Result := mrCancel;
end;
function TOPMInterfaceEx.Download(const ADstDir: String; AParentForm: TForm): TModalResult;
begin
ProgressFrm := TProgressFrm.Create(AParentForm);
try
ProgressFrm.SetupControls(0);
PackageDownloader.OnPackageDownloadProgress := @ProgressFrm.DoOnPackageDownloadProgress;
PackageDownloader.OnPackageDownloadError := @ProgressFrm.DoOnPackageDownloadError;
PackageDownloader.OnPackageDownloadCompleted := @ProgressFrm.DoOnPackageDownloadCompleted;
PackageDownloader.DownloadPackages(ADstDir);
Result := ProgressFrm.ShowModal;
finally
ProgressFrm.Free;
end;
end;
function TOPMInterfaceEx.Extract(const ASrcDir, ADstDir: String;
AParentForm: TForm; const AIsUpdate: Boolean): TModalResult;
begin
ProgressFrm := TProgressFrm.Create(AParentForm);
try
PackageUnzipper := TPackageUnzipper.Create;
try
ProgressFrm.SetupControls(1);
PackageUnzipper.OnZipProgress := @ProgressFrm.DoOnZipProgress;
PackageUnzipper.OnZipError := @ProgressFrm.DoOnZipError;
PackageUnzipper.OnZipCompleted := @ProgressFrm.DoOnZipCompleted;
PackageUnzipper.StartUnZip(ASrcDir, ADstDir, AIsUpdate);
Result := ProgressFrm.ShowModal;
finally
if Assigned(PackageUnzipper) then
PackageUnzipper := nil;
end;
finally
ProgressFrm.Free;
end;
end;
function TOPMInterfaceEx.Install(AParentForm: TForm; var AInstallStatus: TInstallStatus;
var ANeedToRebuild: Boolean): TModalResult;
begin
ProgressFrm := TProgressFrm.Create(AParentForm);
try
ProgressFrm.SetupControls(2);
Result := ProgressFrm.ShowModal;
if Result = mrOk then
begin
AInstallStatus := ProgressFrm.InstallStatus;
ANeedToRebuild := ProgressFrm.NeedToRebuild;
end;
finally
ProgressFrm.Free;
end;
end;
function TOPMInterfaceEx.InstallPackages(APkgLinks: TList; AParentForm: TForm;
const AResolveDependencies: Boolean = True): TModalResult;
var ANeedToRebuild: Boolean): TModalResult;
var
I: Integer;
InstallStatus: TInstallStatus;
begin
Result := CanInstallPackages(APkgLinks, AParentForm);
if Result = mrCancel then
Exit;
FPackagesToInstall.Clear;
for I := 0 to APkgLinks.Count - 1 do
AddToInstallList(TPackageLink(APkgLinks.Items[I]).Name + '.lpk', TPackageLink(APkgLinks.Items[I]).LPKUrl);
if AResolveDependencies then
Result := CanInstallPackages(AParentForm);
if Result = mrCancel then
Exit;
Result := ResolveDependencies(AParentForm);
if Result = mrCancel then
Exit;
for I := 0 to FPackageDependecies.Count - 1 do
FPackagesToInstall.Insert(0, FPackageDependecies.Items[I]);
PackageAction := paInstall;
if SerializablePackages.DownloadCount > 0 then
begin
if ResolveDependencies(AParentForm) = mrCancel then
Exit;
for I := 0 to FPackageDependecies.Count - 1 do
FPackagesToInstall.Insert(0, FPackageDependecies.Items[I]);
Result := Download(Options.LocalRepositoryArchive, AParentForm);
SerializablePackages.GetPackageStates;
end;
MessageDlgEx('Not yet implemented!', mtInformation, [mbOk], AParentForm);
{ for I := 0 to FPackagesToInstall.Count - 1 do
MessageDlgEx(TLazarusPackage(FPackagesToInstall.Items[I]).Name + sLineBreak +
TLazarusPackage(FPackagesToInstall.Items[I]).Author, mtInformation, [mbOk], AParentForm);}
Result := mrOk;
if Result = mrOk then
begin
if SerializablePackages.ExtractCount > 0 then
begin
Result := Extract(Options.LocalRepositoryArchive, Options.LocalRepositoryPackages, AParentForm);
SerializablePackages.GetPackageStates;
end;
if Result = mrOk then
begin
if Options.DeleteZipAfterInstall then
SerializablePackages.DeleteDownloadedZipFiles;
if SerializablePackages.InstallCount > 0 then
begin
InstallStatus := isFailed;
ANeedToRebuild := False;
Result := Install(AParentForm, InstallStatus, ANeedToRebuild);
if Result = mrOk then
begin
SerializablePackages.MarkRuntimePackages;
SerializablePackages.GetPackageStates;
if (ANeedToRebuild) and ((InstallStatus = isSuccess) or (InstallStatus = isPartiallyFailed)) then
ANeedToRebuild := MessageDlgEx(rsOPMInterfaceRebuildConf, mtConfirmation, [mbYes, mbNo], AParentForm) = mrYes;
end;
end;
end;
end;
SerializablePackages.RemoveErrorState;
SerializablePackages.RemoveCheck;
end;
end.

View File

@ -0,0 +1,480 @@
object IntfPackageListFrm: TIntfPackageListFrm
Left = 349
Height = 453
Top = 250
Width = 688
BorderIcons = [biSystemMenu]
Caption = 'Package list'
ClientHeight = 453
ClientWidth = 688
OnCreate = FormCreate
OnDestroy = FormDestroy
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.9.0.0'
object ButtonPanel1: TButtonPanel
Left = 6
Height = 26
Top = 421
Width = 676
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
ButtonOrder = boCloseOKCancel
TabOrder = 0
ShowButtons = [pbOK, pbCancel]
ShowBevel = False
end
object pnInfo: TPanel
Left = 0
Height = 27
Top = 0
Width = 688
Align = alTop
Alignment = taLeftJustify
BevelOuter = bvNone
ClientHeight = 27
ClientWidth = 688
ParentColor = False
TabOrder = 1
object pnExpCol: TPanel
Left = 634
Height = 27
Top = 0
Width = 54
Align = alRight
BevelOuter = bvNone
ClientHeight = 27
ClientWidth = 54
TabOrder = 0
object spExpand: TSpeedButton
Tag = 1
Left = 4
Height = 20
Top = 4
Width = 21
Anchors = [akRight, akBottom]
Flat = True
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000010000
0003066D009A056800CE066C009B0000000B0000000E00000010000000120000
00140000001600000018000000190000001A0000001600000004000000020000
00050C8200CE2BDF1AFF0C8100D0000000160000001B0000001F000000240000
00280000002C0000002F0404046B1414148415151544000000080B6A00990E8C
00CC0E8C00CC3DE22CFF0E8C00CC0E8C00CC0B6A009904240000000000000000
00000101010004040444433F3F9EEADADAFF373737741E1E1E00109500CC52E7
41FF52E741FF52E741FF52E741FF52E741FF109500CC10950000052701000303
030004040433302E2E96DDD1D1FF646060903E3E3E4B40404000129C0099129D
00CC129D00CC66EB55FF129D00CC129D00CC129C0099082A0300040404000404
04252221218CCCC4C4FF535151863D3D3D384040400042424200129D0000107A
030014A100D175EE64FF129300E50404048704040479040404560404042A1615
1583BCB8B8FF4746467C3C3C3C2A3E3E3E0040404000424242001E1E1E001111
112A177A09CD2BAA18EE67C256EBF9F3EDD6EEE8E3C49D9791A52B292887AFAD
ADFF3C3C3C733B3B3B1F3D3D3D003E3E3E004040400042424200262626143D3C
3B74DFD9D3B8F7EFE6D1F6EDE4CEF6EDE4CEF6EDE4CEF3E6D9CBDED1C4BE4746
447B373737243C3C3C003D3D3D003E3E3E00404040004242420031313149ADA6
9E9DF6ECE2CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF5E9DFCBEAD5BFC3A89D
939731313149313131003131310031313100313131003131310038383865E7D8
CAB8F6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEE8D2BBC0E1CF
BCB13838386538383800383838003838380038383800383838003E3E3E6FEDDB
C8C5F6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEE8D2BBC0E8D2BBC0E9D4
BEBE3E3E3E6F3E3E3E003E3E3E003E3E3E003E3E3E003E3E3E0043434360E4D3
C1B2E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E0CB
B6AC43434360434343004343430043434300434343004343430049494943B0A4
9791F2E4D6C8F6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF1E3D5C8E8D2BBC0AD9F
918E4949494349494900494949004949490049494900494949004D4D4D11605D
5B64D9C8B8A4F6ECE2CDF6EDE4CEF6EDE4CEF6ECE2CDEBD8C4C2D5C1AEA15F5D
5A644D4D4D114C4C4C004C4C4C004C4C4C004C4C4C004C4C4C004E4E4E005151
512163605E62B6ACA28EEDE3D9B5F4EADFC7E6D5C5AFB1A3948B63605E625151
51214E4E4E004E4E4E004E4E4E004E4E4E003B3B3B00272727004E4E4E005151
510054545411555555405555555A555555655555555A55555540545454115151
51004E4E4E004E4E4E003B3B3B00141414000000000000000000
}
OnClick = spExpandClick
ShowHint = True
ParentShowHint = False
end
object spCollapse: TSpeedButton
Tag = 2
Left = 28
Height = 20
Top = 4
Width = 21
Anchors = [akRight, akBottom]
Flat = True
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000010000
00030000000400000006000000090000000B0000000E00000010000000120000
00140000001600000018000000190000001A0000001600000004000000020000
0005000000080000000C00000011000000160000001B0000001F000000240000
00280000002C0000002F0404046B141414841515154400000008000062990000
80CC000080CC000080CC000080CC000080CC0000629900002200000000000000
00000101010004040444433F3F9EEADADAFF373737741E1E1E00000098CC5E5E
F7FF5E5EF7FF5E5EF7FF5E5EF7FF5E5EF7FF000098CC00009800010128000303
030004040433302E2E96DDD1D1FF646060903E3E3E4B404040000000A6990000
A7CC0000A7CC0000A7CC0000A7CC0000A7CC0000A69903032C00040404000404
04252221218CCCC4C4FF535151863D3D3D3840404000424242000000A7000303
82000202571604040456040404790404048704040479040404560404042A1615
1583BCB8B8FF4746467C3C3C3C2A3E3E3E0040404000424242001E1E1E001111
112A2928287DA3A09EA9EFEAE5C5F9F3EDD6EEE8E3C49D9791A52B292887AFAD
ADFF3C3C3C733B3B3B1F3D3D3D003E3E3E004040400042424200262626143D3C
3B74DFD9D3B8F7EFE6D1F6EDE4CEF6EDE4CEF6EDE4CEF3E6D9CBDED1C4BE4746
447B373737243C3C3C003D3D3D003E3E3E00404040004242420031313149ADA6
9E9DF6ECE2CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF5E9DFCBEAD5BFC3A89D
939731313149313131003131310031313100313131003131310038383865E7D8
CAB8F6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEE8D2BBC0E1CF
BCB13838386538383800383838003838380038383800383838003E3E3E6FEDDB
C8C5F6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEE8D2BBC0E8D2BBC0E9D4
BEBE3E3E3E6F3E3E3E003E3E3E003E3E3E003E3E3E003E3E3E0043434360E4D3
C1B2E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E8D2BBC0E0CB
B6AC43434360434343004343430043434300434343004343430049494943B0A4
9791F2E4D6C8F6EDE4CEF6EDE4CEF6EDE4CEF6EDE4CEF1E3D5C8E8D2BBC0AD9F
918E4949494349494900494949004949490049494900494949004D4D4D11605D
5B64D9C8B8A4F6ECE2CDF6EDE4CEF6EDE4CEF6ECE2CDEBD8C4C2D5C1AEA15F5D
5A644D4D4D114C4C4C004C4C4C004C4C4C004C4C4C004C4C4C004E4E4E005151
512163605E62B6ACA28EEDE3D9B5F4EADFC7E6D5C5AFB1A3948B63605E625151
51214E4E4E004E4E4E004E4E4E004E4E4E003B3B3B00272727004E4E4E005151
510054545411555555405555555A555555655555555A55555540545454115151
51004E4E4E004E4E4E003B3B3B00141414000000000000000000
}
OnClick = spCollapseClick
ShowHint = True
ParentShowHint = False
end
end
end
object imTree: TImageList
left = 8
top = 64
Bitmap = {
4C690A0000001000000010000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DB4D82B4BB2D8AF4AB0D7BC48AED631FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004EB6
D9164DB4D8844BB2D7EF9CD5EAFF88CCE7FF45ACD5F344AAD48C42A7D31AFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF004FB7DA054EB6D9654CB4
D8DB92CFE5FFE6F8FCFFE3F6FEFFAFDDF2FFB2E4F7FF72C0E1FF3FA4D1E03DA2
D06C3BA0CF09FFFFFF00FFFFFF00FFFFFF004FB7D9464EB5D9C27EC6E0FFD1EE
F7FFF6FFFFFFF0FEFFFFCBEDFBFF50ADDAFF8BD7F7FFAAE1F9FF95D6F2FF62B2
DBFF399DCEC8369ACD4DFFFFFF004FB7D99F4DB5D9FEA5D9EDFFD2EBF5FFBEDE
EDFF95C9DEFF89C3DBFF70B8D6FF6ABADEFF90D7F5FF7FCFF5FF9DDBF8FFAAE3
FAFF84CAECFF51A6D5FF3295CBA64DB4D8FBE1F8FEFFCDEBF9FF92D2EDFF84CC
EBFF6FBFE5FF56B1DBFF3B94C8FFCEECFAFFD9F5FFFFB9EAFFFF95DFFEFF77D5
FFFFA5E4FFFF84DCFBFF2F92C9FB4BB2D7F0E2F8FDFFD4F3FFFFB0E4FAFF86CF
F1FF7FD0F5FF78D0F5FF4CB1E4FFB0E4FAFFB6E9FFFF9BE1FFFF78D6FEFF40BD
F5FF3DB5E9FF90D5F1FF2D8FC8F049B0D6F8DBF6F8FFD9F3FFFFD5F3FFFFBDEB
FFFF89D5F7FF69C9F5FF4CB4E9FF8DDAFBFF8CDCFFFF48C4F9FF38B6ECFF48BF
E8FF48B8E7FF90D3F1FF2B8DC7FA47ADD5FB92E7D4FF80E5D8FFC8F1FDFFC8EF
FFFFBAEBFFFF92DBFBFF56C1F1FF48C2F9FF3BBDF0FF47C5ECFF45BDE9FF43B5
E6FF39ADD4FF88D2CCFF288AC6FF44AAD4F7A8EDE2FF41D6B3FF49D8BAFF8CE4
E4FFB3EAFFFFADE7FFFF7CD9FEFF48C7EFFF43C4EAFF43BEE8FF3DB3DCFF2DAE
A9FF29B188FF85D3BBFF2687C5FE42A8D3F9E7FBFEFFD0F3F9FF46D7B8FF39D4
AEFF50D9C3FF8EE2F2FF96E1FEFF48C6EBFF3FBCE3FF30AFB1FF24AC84FF24AD
81FF67BFC2FF83C4ECFF2485C4F840A5D2BB77BDDCFFBFE5F6FFDBF6FFFF9EE8
EBFF37D3ACFF37D2ACFF55D8D1FF37B8BCFF24AA85FF22AA7CFF4DB7A9FF86C6
EBFF74B3E4FF4A90CAFF2283C3C13DA2D0063BA0CF65399DCEDB7DC0E0FFC7EE
FCFFCBF2FEFF65DDD0FF33D1A8FF22AA7CFF35B091FF89CBE8FF82C1EBFF5397
D0FF2384C3E02282C26D2080C20AFFFFFF00FFFFFF00369ACD163498CC853295
CBEF82C4E5FFCCF4FFFFBCEEFAFF88D1E4FF8ACEF0FF5FA4D7FF2586C4F32384
C38D2182C21BFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003093
CA2B2E90C9A52C8EC8FE8FCDEBFF6FB7E2FF408EC8FF2485C4AC2383C331FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF002A8BC6462889C5BE2687C5C42485C44DFFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
0000000000000000000000000000C8E6F240C6E5F04000000000000000001CA7
1D6014AB26BF1FB438FF19AA23FF00000000000000000000000000000000C9E7
F220C2E7F4CFB3E6F9FFACE1F9FFADE1F8FFAEE1F7FFAEE1F6FFADDFF5FF90D8
DCFF77E294FF98EDAAFF5BC962FF000000000000000000000000C9E7F230BFE8
F6EFADE7FCFFABE3F9FFA3DEF8FFA9E1FAFFB0E4F9FFB7E7F9FFB6E7F9FFA7DE
F5FFB8F4C3FFB6F4B7FF5AC65BFF0000000000000000C9E7F230B6E7F8EFA4E0
F8FFA5E1F9FF95D6F3FFB0E4F7FFA6DFF8FFA4DFFAFFA5DFFAFFACE2F9FFA7DF
F6FF7BD296FF67CC67FF2EB02EFFD1BDA9FFC9BAA7FFAFD4DAFFA2DEF5FF98D7
F1FF9AD8F3FFA0DEF6FF97D8F4FFA5DEF5FFAEE3F9FF9FDCF8FF8CD3F3FF75C6
EDFF3CAA82FF20A921FF0DA00DFFD1BDA9FFCAEBF5FFA8E0F4FF8DCEE8FFA0DD
F6FF92D2EDFF9BD9F3FF78BFDDFF9BDAF7FF89D0F0FF79C9EFFF61BEE9FF57B8
E4FF299058FF15A415FF10A110FFD1BDA9FFC2E5F1FF99D0E4FFAAE4FBFF87CA
E6FFA4DFF8FF79C0DDFF9CDBF4FF7FC1DCFF6399ABFF5A91A4FF48656BFF91B2
BE8F19A02460029A0280059B0550D1BDA9FFEEF7FAFFC1E8F3FF90CFE8FFA4DE
F4FF86C9E6FF98D7F1FF85C4DFFF6E7F7FFF9A8A7BFFC1B5ABFF77604EFFDCD5
D030000000000000000000000000D1BDA9FFF5FAFCFFB3D5DFFF8CC6DDFFAEE0
F0FF96CFE4FFA3DBF1FF739DA9FFB7ADA0FFF2EBE4FFFFFFFFFF8F7966FF0000
0000000000000000000000000000D1BDA9FFFFFFFFFFFBF5EEFFE1E6E4FFB6D0
D7FF99C6D5FF87BBCDFFC4CAC6FFF7F1EAFFFBF5EEFFFFFFFFFF8F7966FF0000
0000000000000000000000000000D1BDA9FFFFFFFFFFFAF2EAFFFAF2EAFFFAF2
EAFFFAF2EAFFF3EEE8FFFAF2EAFFFAF2EAFFFAF2EAFFFFFFFFFF8F7966FF0000
0000000000000000000000000000D1BDA9FFFFFFFFFFF9F0E7FFF9F0E7FFF9F0
E7FFF9F0E7FFF9F0E7FFF9F0E7FFF9F0E7FFF9F0E7FFFFFFFFFF8F7966FF0000
0000000000000000000000000000C9B4A1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8F7966FF0000
0000000000000000000000000000927C69FF8F7966FF8F7966FF8F7966FF8F79
66FF8F7966FF8F7966FF8F7966FF8F7966FF8F7966FF8F7966FF8F7966FF0000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000004D46
45114D4645DD4D4645FF4C4544EC4B4444B5494544D545403F4F000000000000
0000000000000000000000000000000000000000000000000000000000004A44
42E647423FFF464140FF3C3230FF352725FF392C2AFF413C3BFF3F3A393A0000
0000000000000000000000000000000000000000000000000000413C3A15413D
3BFF423C3AFF301F1BFF5D7270FF719798FF464D4CFF2E1E1AFF3B3735750000
00000000000000000000000000000000000000000000000000003B39391E3024
21FF2D1B13FF343031FF99EAF2FFB6FFFFFFA7FDFFFF4A585DFF291F1A740000
00000000000000000000000000000000000000000000000000003519001B667B
81FF74B8D9FF95E7FFFF9AE8FFFF8BD5FCFF9AF4FFFF84C6CFFF2713055E0000
00000000000000000000000000000000000000000000000000000C3CA51DACEF
FFFF8CE8FFFF74D0FFFF5BC4FBFF56C3FAFF59CEFFFF4FAFE9FF223F853C0000
00000000000000000000000000000000000000000000000000000000000086D0
FFFF49B9F9FF3AB0F8FF3EB3FAFF40B3F9FF47C3FFFF37A1F2FF0D35BE240000
0000000000000000000000000000000000000000000000000000000000002D80
EAD14CBFFFFF2BA6FCFF3AAAFAFF3AABFAFF27AEFFFF0B4496BB000000000000
0000000000000000000000000000000000000000000000000000180400317278
89E77BC3FFFF198AF0FF0A87FDFF0281F4FF55A9FDFF9B939DFF332A14760000
000000000000000000000000000000000000000000001F1B1963736F6DFFFFFF
FFFFFDFEFFFFCAD8F6FFA4BBD5FFBACFEDFFFFFFFFFFFFFFFFFF50494AFF221E
1CB500000000000000000000000000000000191614467A7576FF7F7B7AFF7D79
78FFFFFFFFFFFFECC2FFFFCE56FFFFF4BEFFF5F8FFFF989392FF322A29FF433E
3DFF282423950000000000000000191615483C3736CC9A9696FF352F2FFF2A25
24FF706E71FFFFFFFFFFEBC170FFFFFFFFFF969396FF211A1AFF45403FFF4944
43FF302B2AFF221F1F4C0000000033302EB47A7674FF5C5654FF373330FF322C
2AFF575355FFFFFFFCFFE4AF55FFFFFFFAFF807F84FF272221FF403B39FF423D
3BFF3A3734FF23201EC400000000474342D27E7976FF3E3836FF393533FF3630
2EFF3B3D43FFFDEFD4FFD4901DFFFFF9D4FF63666CFF241E1BFF3E3836FF3E39
37FF3F3D39FF211E1CE6000000003A3835CD555351FF35312FFF383432FF3C36
34FF272B38FFFFEEC6FFEB8B00FFFFEA9AFF6D7587FF25201BFF383432FF332F
2DFF2E2A29FF1F1B1AE500000000100D0C000F0D0C38171312971A1817CE1E1A
18F6131218F3625847F3563100F3685030F32C2F39F7120E0EDF1C1817B01512
1286150F104B1816152100000000000000000000000000000000000000000000
000000000000653E2F8C663E2EEB663F30E96643358300000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000067473BB5694639FFFDE6D8FFFDE6D8FF694639FF674A3FB1000000000000
000000000000000000000000000000000000000000000000000000000000582A
180F694639FFFDE6D8FFFDE6D8FFFDE6D8FFFDE6D8FF694639FF674A3FB10000
00000000000000000000000000000000000067473BB9694639FF694639FF6946
39FFF3C0A0FFFAE1D1FFFDE6D8FFFDE6D8FFFDE6D8FFF3C0A0FF694639FF6946
39FF694639FF67473BB90000000067473BB967463AFFFDE6D8FFFDE6D8FFFDE6
D8FFFDE6D8FFFDE6D8FFFDE6D8FFFDE6D8FFFDE6D8FFFDE6D8FFFDE6D8FFFDE6
D8FFFDE6D8FF67463AFC67473BB967473BB9694639FFFDE6D8FF313131FF3131
31FF313131FF857468FFFDE6D8FFFDE6D8FF857468FF313131FF313131FF3131
31FFFDE6D8FF694639FF67473BB900000000694639FFEBB492FFFDE6D8FF3131
31FFFDFFFFFF313131FFF9DBC9FFEFBFA1FF313131FFFDFFFFFF313131FFEBB4
92FFEBB492FF694639FF000000000000000000000000694639FFFDE6D8FFFDE6
D8FF857468FF313131FFEBB492FFEBB492FF313131FF857468FFEBB492FFEBB4
92FF694639FF00000000000000000000000000000000694639FFFDE6D8FFFDE6
D8FF313131FFEBB492FFEBB492FFEBB492FFEBB492FF313131FFEBB492FFEBB4
92FF694639FF000000000000000000000000694639FFEBB492FFFDE6D8FFFDE6
D8FF313131FFEBB492FF313131FF313131FFEBB492FF313131FFEBB492FFEBB4
92FFEBB492FF694639FF0000000067473BB9694639FFFDE6D8FFFCE2D2FFEBB4
92FF313131FFEBB492FF313131FF313131FFEBB492FF313131FFEBB492FFEBB4
92FFEBB492FF694639FF67473BB967473BB967463AFFFCE2D2FFEBB492FFEBB4
92FFEBB492FF656061FFEBB492FFEBB492FF656061FFEBB492FFEBB492FFEBB4
92FFEBB492FF67463AFF67473BB90000000067473BB9694639FF694639FF6946
39FFEBB492FFEBB492FFEBB492FFEBB492FFEBB492FFEBB492FF694639FF6946
39FF694639FF67473BB900000000000000000000000000000000000000000000
0000694639FFEBB492FFEBB492FFEBB492FFEBB492FF694639FF000000000000
0000000000007878780100000000000000000000000000000000000000000000
000067473BB9694639FFEBB492FFEBB492FF694639FF674A3FB1000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000068483CB4694639FF694639FF684A3E9A00000000000000000000
0000000000000000000000000000759FC7FE668FB0FE69839BFE918F93FEC8B4
A2FECDA78CFEC69573FEC3906FFEC5A590FEC5A691FEC4A591FEC49E85FEC085
5EFEC0855DFEC59574F9C5A48E386B8EB0FE79AECEFE6381A2FE7A8396FEA791
83FEEBA36FFEFA893CFEFB934DFEFCE5D5FEFDAC7AFEFDAB78FEFD9A5BFEFC65
04FEFB6502FEF96707FDD58B5BF992B0C4FE6E92B0FE6CA2C7FE617A99FE798B
97FEB39074FEF69856FEFC9A58FEFDD7BEFEFE670BFEFE6506FEFE6502FEFE65
00FEFD6500FEFD6500FDE0752CFDA3C7D8FE5A84AAFE66A5D2FE577FA6FE7299
B1FE8E7771FEEB9D67FEFCA062FEFEEEE3FEFEC6A2FEFEC59FFEFE8334FEFE65
00FEFE6500FEFE6500FEE0752BFE4D5368FE4E6F98FE5489C0FE5080B2FE566A
87FE73534EFED9925FFEFCA367FEFED9C2FEFE6E16FEFE6C12FEFE6607FEFE64
01FEFE6500FEFE6500FEE1752CFE403D49FE75A5BCFE82C9E7FE73B1D8FE5B82
96FE87746EFEE8A371FEFCA468FEFED6BCFEFE9652FEFEBD93FEFEBA8EFEFEA7
70FEFE6D0FFEFE6500FEE1752CFE5B6A77FE6F9EB0FE9AD4F1FE91D0EDFE7EAF
CCFE9D9896FEEEA775FEFC8E44FEFD8738FEFEB382FEFEB48AFEFE7B2CFEFECE
AEFEFEA168FEFE6401FEE1752CFE90B6CCFE4A586EFE8AC0DFFE86C6ECFE75B2
DDFE9FA3A3FEF4B17FFEFC8B3DFEFD7012FEFEB382FEFEAC7DFEFE6E16FEFEC9
A7FEFE9859FEFE6500FEE1752CFE8DC2D9FE374254FE6DAAD6FE65A7DAFE7ABA
DCFE9DB2BCFEE8B28BFEFB924AFEFD7418FEFEB484FEFEDECBFEFEC7A3FEFEA5
6CFEFE6808FEFE6500FEE1752CFE5A7994FE405770FE659CCDFE5A91C7FE82BC
DAFEAFCAD3FECFB097FEF79B5BFEFD7B24FEFEB687FEFEAA79FEFE6506FEFE64
03FEFE6403FEFE6500FEE1752CFE343A4AFE74A2BDFE72ADDFFE477CA4FE5872
86FE858988FEA68B72FEEB985DFEFC802BFEFEAA72FEFE9D64FEFE8A41FEFEB7
89FEFEBA8DFEFE7C2AFEE1752CFE444756FE769FBFFE89B7D9FE8EAEBFFE4C46
4DFE52312AFE845738FEEE975CFEFC7F2AFEFE6C0CFEFE8438FEFECCACFEFE75
20FEFE731DFEFE6F13FEE1752CFE45596EFE87ACC7FE99C3D5FEB5DAE3FE98A2
A2FE5D4133FED1946BFEFA9753FEFC7921FEFE6806FEFEAD7DFEFEA46BFEFE64
01FEFE6500FEFE6500FEE1752BFE5E7E8EFE85A9BDFE9CBFCEFEA7C8D0FE9EA0
9AFEB69171FEF4A36BFEFC8737FEFD7112FEFE6602FEFEA46CFEFEB88AFEFE65
03FEFE6400FEFE6500FEE0752BFE546873FE838F9EFE899AA5FE817F81FECBAC
97FEF0AB7BFEFC9148FEFD761DFEFD6906FEFE6500FEFE7119FEFED1B4FEFEB4
84FEFDA167FEFD8437FDE08549F9717A82006B6B74FE9BA0A3FEA8A29EFEDBBD
A6FEE7AB7FFEE48E53FEE17B37FEE1752DFEE1742CFEE1742BFEE17B37FEE195
62FEE19460FEDF8B53F9D7966838000000000000000000000000000000000000
000000000000F1CF9020F1CF9034F1CF9034F1CF9015F1CD8DFFF1D091060000
000000000000000000000000000000000000000000000000000000000000F7D4
8C87F1CF8FFFF1CF8FFFF1CF8FD7F1CE90EAF1CE8EFFF0CD8EFFF1CD8DFF0000
000000000000000000000000000000000000415CF15F314AF585C0AAA651FFDD
83FFF4D08D5A000000000000000000000000EECA8ACBEFCA89FFF6C682FFCFD1
A06257F3FD8329EDF35F00000000415BF1C55978F3FF4866F3FF2539F4FF090E
FC1100000000000000000000000000000000EFCA89FFF4C5822DA2D6B45E79F8
FFFFA5F6FDFF4BF1F4FF15CEF6C53C55F0FF5270F2FF4662F1FF2F3FEFFF2420
EE8500000000000000000000000000000000000000000000000012F2FF8177F4
F9FF95F6FAFF41F2F4FF16C5F7FF2E3BEFFF374CEFFF3243EFFF282BEEFF231C
ED8800000000000000000000000000000000000000000000000013D2F67320E8
F4FF2BEDF4FF16DBF4FF19ABFAFF1618F74D1A1BF6FF1C1AF2FF1611F6E70000
00000000000000000000000000000000000000000000000000000000000018B3
F8E816B6F9FF0FA6FFFF0B99FF5C00000000D4A97EC95040D34A000000000000
0000000000000000000000000000000000000000000000000000000000000000
00001198FF34B7AB866AF3B0572EE3B56F74E6B76BFFEAB968E2000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000EFAC528ADDAA5E86DFAF68FFDEAF67E3DEAE67EFDEAE66930000
0000000000000000000000000000000000000000000000000000000000000000
000000000000DBA556C4D8A5575B00000000DBA95DA8DBA95CB7000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000D49F4D06D49F4DFFD59F4E0C00000000D8A4570CD6A254FFD5A1515A0000
0000000000000000000049B5742247B3708A45AD662200000000DE9A42FF0000
0000D19A42CFD099419A000000000000000000000000D29C4848D29C47FFD19A
4399000000003BB776444EBF87FF4FC28DFF47B26CFF35A95839DB9536B4CE95
38FFCD9537DF0000000000000000000000000000000000000000CF963C20CE95
38DCD99230FF3AB471C34FC28CFF50C491FF48B370FF34A753C1D88F29FFC98F
2AFFC88E26C3C88E26FF00000000000000000000000000000000000000000000
00000000000038AB5FBC46B26DFF48B36EFF43AB5EFF34A449BC000000000000
0000C88E25060000000000000000000000000000000000000000000000000000
0000000000003EA54C1B3FA44BFD3FA44DFF3EA245E83CA2451B000000000000
0000000000000000000000000000170B0B166952246F53411C59453418493B2F
1340392B113A32291237332512363325123632291237392B113A3B2F13404335
18484E3C1B545F4B20654031164340311643EFBB52FFEFBB52FFEFBB52FFDCAC
4BEBD5A648E4EFBB52FFECB952FFEBB952FFECB952FFE2B14DF2CB9E46D9EFBB
52FFEFBB52FFEFBB52FF8D6F3097624C1F68EEBA51FFEEBA51FF7A5F2A83FFFF
FF00FFFFFF00E2B14EFAE7B550FFE8B651FFEDB951FF43351548FFFFFF00342B
113ADCAD4BEDEEBA51FF9F7D35AB84682C90ECB84FFF6F562579FFFFFF00FFFF
FF00FFFFFF00D7A84BF5E3B24EFFEBB74FFFECB84FFF372A113CFFFFFF00FFFF
FF003B2F1340E9B54FFEAC863BBFAB8537BBA58036B3FFFFFF00FFFFFF00FFFF
FF00FFFFFF00D7A84AF5EAB64DFFEBB74DFFEBB74DFF372A113CFFFFFF00FFFF
FF00FFFFFF0084692D99BF9540D4BB913CCD261F0C28FFFFFF00FFFFFF00FFFF
FF00FFFFFF00DEAC49F4EAB64CFFEAB64CFFEAB64CFF372A113CFFFFFF00FFFF
FF00FFFFFF002621162BBC923ED2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00DDAC47F4E8B44AFFE8B44AFFE8B44AFF372A113CFFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00DCAB46F4E7B349FFE7B349FFE7B349FF372B123DFFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00DBA943F4E5B147FFE5B147FFE4B047FF392F1B46FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00DAA842F4E4B046FFE3AF46FFDCAA46FF39301C48FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00D8A640F4E1AD44FFDAA944FFD8A844FF352F1B46FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00D6A53EF4D9A842FFD7A742FFD9A842FF332B123DFFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00CE9F3EF6D5A541FFD7A641FFDEAA41FF3629103DFFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000004044
440224251F25D5A43FFFD6A53FFFDDA93FFFDEAA3FFF513E155EFFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000141505107159
238CB98E37DED7A53EFFDBA83EFFDCA83EFFDCA83EFFD19F3AF3826325972B20
0A2FFFFFFF00FFFFFF00FFFFFF00000000000000000040444401191A0E156951
2081644D1D785C46196C55411965563F166459431869634B1A736A501C7C2C22
0A34FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF0078CF82D475CD80FF73CA7DFE70C77AB4FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0077CF
821278CD82FF9CD9A7FF98D8A2FF6DC476ECFFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF0072C97CF497D8A2FF8DD297FF69C072BEFFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0079D083FF76CE81FF74CB7EFF71C9
7BFF6FC678FE97D7A1FF93D59DFF65BC6EF062B86AED5FB567EF5BB163EFFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0076CE80FF9BD9A6FF99D8A4FF98D7
A2FF96D7A1FF95D59EFF93D49CFF8FD198FF8CD095FF8ACF94FF57AD5EFFFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0073CB7DFF99D8A3FF97D7A1FF79CB
87FF69C377FF65C273FF64C171FF67C273FF66C071FF8BCF94FF53A95AFFFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0070C77AFF6DC477FF7CC985FF93D4
9CFF65C172FF62C06FFF5FBE6CFF5DBD69FF5ABB66FF88CF90FF66B56DFF4CA1
52FF489D4EFF45994AFFFFFFFF00FFFFFF00FFFFFF00FFFFFF0066BD6FFF90D2
99FF60BF6DFF5EBD6AFF5BBC68FF59BB64FF56BA61FF65BF6FFF83CC8BFF82CA
89FF80CA88FF419646FFFFFFFF00FFFFFF00FFFFFF00FFFFFF0063B96BFF8DD1
96FF5DBC69FF5ABB66FF58BA63FF55B960FF52B75DFF62BD6BFF81CA88FF7EC8
85FF7EC884FF3E9242FFFFFFFF00FFFFFF0065BC6EFF62B86AFF72C07AFF8BCF
93FF58BB64FF56BA61FF53B85FFF51B65BFF4FB559FF80CA87FF5CAC62FF4094
45F93D9142FF3A8E3FFFFFFFFF00FFFFFF0062B86AFF8BCF95FF8ACF92FF69C1
72FF86CD8EFF84CC8CFF83CB8AFF81CA88FF5DBB66FF7EC884FF409445FFFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF005EB465FF88CF91FF56B961FF85CD
8DFF65B56CFF4CA152FF499E4FFF5DAD63FF7CC783FF7BC681FF3C9041FFFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF005AAF61FF86CD8EFF84CC8CFF83CA
89FF4CA152FFFFFFFF00FFFFFF00429647FF7AC681FF76C37CFF398D3DFFFFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0056AB5DFF52A759FF4FA455FF4BA0
51FF489C4DF7FFFFFF00FFFFFF003E9243FD3B8F40FD398C3DF4368A3AE6FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF0036BAEC4438BBECF23FBDEDF33CBCEDF238BBECF236BAEC3FFFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0036B7
E9836ACBEFF6ABE4F8FBC6EFFCFDC3EEFCFDAAE3F8FB5DC6EEF536B7E980FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0036B3E58E7ED0
F0F7C7F1FEFEBEF1FFFFB6EFFFFFB6EFFFFFBFF1FFFFC8F1FEFE7ACFEFF736B3
E58EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0036AFE14769C5EAF6C4F2
FFFFABECFFFF88D8F4FF66BFE5FF65BFE4FF84D5F1FFACECFFFFC5F2FFFF5FC1
E8F536AFE139FFFFFF00FFFFFF00FFFFFF0036ABDD093CAEDEF299DBF4FBA5EA
FFFF81D5F3FF54AFDAFF51B2DDFF50B3DEFF53AED9FF7BCFEFFFA6EAFFFF97DA
F3FA3AADDEF236ABDD06FFFFFF00FFFFFF0036A7D9093CAADAF29AE0F8FC91E5
FFFF5FB7DEFF4CACD9FF48C0EEFF48C0EEFF4CAFDCFF5BB2DAFF92E5FFFF9ADF
F7FC3CAADAF236A7D909FFFFFF00FFFFFF0036A2D4063AA4D5F294DEF8FD86E2
FFFF59B0D9FF49A7D4FF48C0EEFF48C0EEFF49ABD8FF56ABD5FF87E3FFFF90DC
F7FC38A3D5F236A2D403FFFFFF00FFFFFF00FFFFFF00369DCF9D7CCEEFFA80DF
FFFF6CCAEFFF4695C3FF46A1CFFF46A4D2FF4595C3FF68C4EAFF81E0FFFF7ACD
EDFA369DCF97FFFFFF00FFFFFF00FFFFFF00FFFFFF003698CA3945A3D1F479D9
FAFE73DCFFFF63C4EBFF50A6D0FF50A5D0FF60C0E7FF73DCFFFF78D9FAFE41A0
CFF33698CA33FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF003693C57858B1
DBF76ED6FBFE6CD9FFFF6BD9FFFF6BD9FFFF6CD9FFFF6ED5FAFE56AFD9F63693
C575FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00368EC0644096
C5F365C0E7FE64D5FDFF64D7FFFF64D7FFFF66D7FEFF65C0E7FE3A91C2F2368E
C041FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00368ABC614493C2F396D9
F4FD66C3EBFF4FADD8FF49A1CEFD4AA2CFFD4FACD8FF68C3E9FF8ACDEBFB368A
BCA5368ABC17FFFFFF00FFFFFF00FFFFFF003686B811428EBDF39EDAF2FD86DF
FFFF65D7FFFF59BCE7FA3787B9F23989BBF25DC5EFFC68D7FFFF90E2FFFF7EBC
DDF93686B87AFFFFFF00FFFFFF00FFFFFF003682B41A458EBCF383D7F7FE63D6
FFFF56B9E5FA3783B5F23682B4393682B4553B88B9F35BC8F2FD6AD8FFFF91DA
F7FE3B86B7F23682B409FFFFFF00FFFFFF00FFFFFF00367EB0754590BFF456B1
DDF9377FB1F2367EB036FFFFFF00FFFFFF00367EB0643E88B9F360C7F1FD458F
BEF4367EB075FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00367BAD2B367B
AD86367BAD22FFFFFF00FFFFFF00FFFFFF00FFFFFF00367BAD61367BADC4367B
AD61FFFFFF00FFFFFF00FFFFFF00FFFFFF00DF943800E4993B00E89D3F00EA9F
4048EA9F4048E89D3F00E4993B00DF943800A76F2A006E481B00A46C2800A46C
280036230C000000000000000000FFFFFF00DF943800E4993B00E89D3F5CE89D
3FCCE89D3FCCE89D3F5CE4993B00DF943800DE933700DB903500DA8F3400DA8F
3400D4892F009B62200032200A00FFFFFF00DF943800E4993B5CE4993BCCFEDB
8FFFFEDB8FFFE4993BCCE4993B5CDF943800DE933700DB903500DA8F3400DA8F
3400D4892F00CD822A00C87D2600FFFFFF00DF94385CDF9438CCFCD68AFFFAC9
7DFFFAC97DFFFCD589FFDF9438CCDF94385CDE933700DB903500DA8F3400DA8F
3400D4892F00CD822A00C87D2600FFFFFF00DB903599DA8F34CCDA8F34CCF9D1
85FFF9D084FFDA8F34CCDA8F34CCDB903599D88D3300D88D3200D98E3399D98E
335CD4892F00CD822A00C87D2600FFFFFF00DA8F3400D78C3100D4892FCCF7CA
7EFFF6CA7EFFD4892FCCD4892F00D2872D00CF842B00D1862D00D4892FCCD489
2FCCD3882F5CCD822A00C87D2600FFFFFF00D3882F00CD822A00CD822ACCF5C8
7CFFF5C77BFFCD822ACCCB802966CD822A81CD822AAACD822AC5CD822ACCEEC7
7AFFCD822ACCCC812A5CC87D2600FFFFFF00C77C2500C77C2500C77C25CCF2C2
73FFECBB66FFC77C25CCCD8731D3DDA34CE8E2AD54F6E3AF55FDE3AE54FFDCA2
45FFECBF6AFFC77C25CCC77C2548FFFFFF00C0752000C0752000C07520CCECB7
51FFEBB54DFFD5983FDFE7AD43FBE3A22FFFE5A839FFE7AE43FFE7AF45FFE4A6
36FFEEBE5BFFC07520CCC0752048FFFFFF00B96E1B00B96E1B00B96E1BCCF2B9
40FFF2B83DFFEFB02EFEEEAB23FFE1A53BEFC9852CD9BD741FCFB96E1BCCF4BF
4BFFB96E1BCCBA6F1C5CBE731F00FFFFFF00B2671600B2671600B26716CCF9BC
31FFF7AD0BFFF7B115FFD5932AE4B26716AAB368173FB469170FB26716CCB267
16CCB368175CB96E1B00BE731F00FFFFFF00AC611100AC611100AC6111CCFFBD
25FFFEB204FFE6A425EFAC6111AAAF641413B2671600B1661500AD621299AD62
125CB2671600B96E1B00BE731F00FFFFFF007D450A00A65B0D00A65B0DCCFFBC
1EFFFFB70EFFBE7817D9A75C0E3FA75C0E0059340B0059330B00AC611100AC61
110059340B000000000000000000FFFFFF000000000079400700A05508CCFFBB
18FFFFB813FFA75D0BCFA055080F291603000000000000000000000000000000
0000000000000000000000000000FFFFFF000000000A000000189B5005CCFFBC
1CFFFFBB19FF9B5005CC0000001A0000001900000016000000130000000E0000
000A000000050000000200000000FFFFFF00000000130000002F723A02A6974C
02CC974C02CC723A02A600000033000000320000002C000000250000001C0000
00130000000A0000000400000000
}
end
end

View File

@ -0,0 +1,358 @@
unit opkman_intf_packagelistfrm;
{$mode objfpc}{$H+}
interface
uses
SysUtils, Classes,
// LCL
Forms, Controls, Buttons, Graphics, ExtCtrls, StdCtrls, LCLType, ButtonPanel,
Menus,
//IDEIntf
PackageIntf,
// OpkMan
opkman_VirtualTrees, opkman_const, opkman_serializablepackages, opkman_options,
opkman_Common;
type
{ TIntfPackageListFrm }
TIntfPackageListFrm = class(TForm)
ButtonPanel1: TButtonPanel;
imTree: TImageList;
pnExpCol: TPanel;
pnInfo: TPanel;
spCollapse: TSpeedButton;
spExpand: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure spCollapseClick(Sender: TObject);
procedure spExpandClick(Sender: TObject);
private
FVST: TVirtualStringTree;
FSortCol: Integer;
FSortDir: opkman_VirtualTrees.TSortDirection;
procedure VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; {%H-}TextType: TVSTTextType; var CellText: String);
procedure VSTGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode;
{%H-}Kind: TVTImageKind; Column: TColumnIndex; var {%H-}Ghosted: Boolean;
var ImageIndex: Integer);
procedure VSTCompareNodes(Sender: TBaseVirtualTree; Node1,
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
procedure VSTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
Button: TMouseButton; {%H-}Shift: TShiftState; {%H-}X, {%H-}Y: Integer);
procedure VSTGetHint(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
var LineBreakStyle: TVTTooltipLineBreakStyle; var HintText: String);
procedure VSTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
public
procedure PopulateTree(APkgList: TList);
function IsLazarusPackageChecked(AName: String): Boolean;
end;
var
IntfPackageListFrm: TIntfPackageListFrm;
implementation
{$R *.lfm}
type
PData = ^TData;
TData = record
DataType: Integer;
LazarusPackageName: String;
Description: String;
Author: String;
LazCompatibility: String;
FPCCompatibility: String;
SupportedWidgetSet: String;
PackageType: TLazPackageType;
License: String;
Dependencies: String;
Version: String;
Button: TSpeedButton;
end;
{ TIntfPackageListFrm }
procedure TIntfPackageListFrm.FormCreate(Sender: TObject);
begin
Caption := rsOPMIntfPackageListFrm_Caption;
pnInfo.Caption := ' ' + rsOPMIntfPackageListFrm_pnInfo;
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
FVST := TVirtualStringTree.Create(nil);
with FVST do
begin
Parent := Self;
Align := alClient;
Anchors := [akLeft, akTop, akRight];
Images := ImTree;
DefaultNodeHeight := MulDiv(25, Screen.PixelsPerInch, 96);
Indent := 22;
TabOrder := 0;
DefaultText := '';
Header.AutoSizeIndex := 1;
Header.SortColumn := 0;
Header.Height := MulDiv(25, Screen.PixelsPerInch, 96);
Colors.DisabledColor := clBlack;
with Header.Columns.Add do
begin
Position := 0;
Width := MulDiv(200, Screen.PixelsPerInch, 96);
Text := rsOPMIntfPackageListFrm_VSTHeaderColumn_LazarusPackage;
end;
with Header.Columns.Add do
begin
Position := 1;
Width := MulDiv(200, Screen.PixelsPerInch, 96);
Text := rsOPMIntfPackageListFrm_VSTHeaderColumn_Data;
end;
Header.Options := [hoAutoResize, hoColumnResize, hoRestrictDrag, hoShowSortGlyphs, hoVisible];
TreeOptions.MiscOptions := [toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning];
TreeOptions.PaintOptions := [toHideFocusRect, toShowRoot, toPopupMode, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages];
TreeOptions.SelectionOptions := [toFullRowSelect, toRightClickSelect];
TreeOptions.AutoOptions := [toAutoTristateTracking];
HintMode := hmHint;
ShowHint := True;
OnGetText := @VSTGetText;
OnGetImageIndex := @VSTGetImageIndex;
OnCompareNodes := @VSTCompareNodes;
OnHeaderClick := @VSTHeaderClick;
OnGetHint := @VSTGetHint;
OnFreeNode := @VSTFreeNode;
end;
FVST.NodeDataSize := SizeOf(TData);
end;
procedure TIntfPackageListFrm.FormDestroy(Sender: TObject);
begin
FVST.Free;
end;
procedure TIntfPackageListFrm.spCollapseClick(Sender: TObject);
begin
FVST.FullCollapse;
end;
procedure TIntfPackageListFrm.spExpandClick(Sender: TObject);
begin
FVST.FullExpand;
end;
procedure TIntfPackageListFrm.VSTGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: String);
var
Data: PData;
begin
Data := FVST.GetNodeData(Node);
case Column of
0: case Data^.DataType of
0: CellText := Data^.LazarusPackageName;
1: CellText := rsOPMIntfPackageListFrm_VSTText_Description;
2: CellText := rsOPMIntfPackageListFrm_VSTText_Author;
3: CellText := rsOPMIntfPackageListFrm_VSTText_LazCompatibility;
4: CellText := rsOPMIntfPackageListFrm_VSTText_FPCCompatibility;
5: CellText := rsOPMIntfPackageListFrm_VSTText_SupportedWidgetsets;
6: CellText := rsOPMIntfPackageListFrm_VSTText_Packagetype;
7: CellText := rsOPMIntfPackageListFrm_VSTText_License;
8: CellText := rsOPMIntfPackageListFrm_VSTText_Dependecies;
9: CellText := rsOPMIntfPackageListFrm_VSTText_Version;
end;
1: case Data^.DataType of
0: CellText := '';
1: CellText := Data^.Description;
2: CellText := Data^.Author;
3: CellText := Data^.LazCompatibility;
4: CellText := Data^.FPCCompatibility;
5: CellText := Data^.SupportedWidgetSet;
6: CellText := GetPackageTypeString(Data^.PackageType);
7: CellText := Data^.License;
8: CellText := Data^.Dependencies;
9: CellText := Data^.Version;
end;
end;
end;
procedure TIntfPackageListFrm.VSTGetImageIndex(Sender: TBaseVirtualTree;
Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
var Ghosted: Boolean; var ImageIndex: Integer);
var
Data: PData;
begin
Data := FVST.GetNodeData(Node);
if Column = 0 then
ImageIndex := Data^.DataType
end;
procedure TIntfPackageListFrm.VSTCompareNodes(Sender: TBaseVirtualTree; Node1,
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
var
Data1: PData;
Data2: PData;
begin
Data1 := Sender.GetNodeData(Node1);
Data2 := Sender.GetNodeData(Node2);
if Column = 0 then
Result := CompareText(Data1^.LazarusPackageName, Data2^.LazarusPackageName);
end;
procedure TIntfPackageListFrm.VSTHeaderClick(Sender: TVTHeader;
Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if (Column <> 0) and (Column <> 1) and (Column <> 3) then
Exit;
if Button = mbLeft then
begin
with Sender, Treeview do
begin
if (SortColumn = NoColumn) or (SortColumn <> Column) then
begin
SortColumn := Column;
SortDirection := opkman_VirtualTrees.sdAscending;
end
else
begin
if SortDirection = opkman_VirtualTrees.sdAscending then
SortDirection := opkman_VirtualTrees.sdDescending
else
SortDirection := opkman_VirtualTrees.sdAscending;
FSortDir := SortDirection;
end;
SortTree(SortColumn, SortDirection, False);
FSortCol := Sender.SortColumn;
end;
end;
end;
procedure TIntfPackageListFrm.VSTGetHint(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex;
var LineBreakStyle: TVTTooltipLineBreakStyle; var HintText: String);
var
Data: PData;
begin
Data := FVST.GetNodeData(Node);
if (Column = 0) then
Exit;
LineBreakStyle := hlbForceSingleLine;
case Data^.DataType of
1: HintText := Data^.Description;
7: HintText := Data^.License;
else
HintText := '';
end;
end;
procedure TIntfPackageListFrm.VSTFreeNode(Sender: TBaseVirtualTree;
Node: PVirtualNode);
var
Data: PData;
begin
Data := FVST.GetNodeData(Node);
Finalize(Data^);
end;
procedure TIntfPackageListFrm.PopulateTree(APkgList: TList);
var
I: Integer;
LazarusPkg: TLazarusPackage;
RootNode, Node: PVirtualNode;
RootData, Data: PData;
begin
for I := 0 to APkgList.Count - 1 do
begin
LazarusPkg := TLazarusPackage(APkgList.Items[I]);
//name
RootNode := FVST.AddChild(nil);
RootNode^.CheckType := ctTriStateCheckBox;
RootNode^.CheckState := csCheckedNormal;
RootData := FVST.GetNodeData(RootNode);
RootData^.LazarusPackageName := StringReplace(LazarusPkg.Name, '.lpk', '', [rfIgnoreCase, rfReplaceAll]);
RootData^.DataType := 0;
//description
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 1;
Data^.Description := LazarusPkg.Description;
//author
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 2;
Data^.Author := LazarusPkg.Author;
//LazCompatibility
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 3;
Data^.LazCompatibility := LazarusPkg.LazCompatibility;
//FPCCompatibility
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 4;
Data^.FPCCompatibility := LazarusPkg.FPCCompatibility;
//SupportedWidgetSet
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 5;
Data^.SupportedWidgetSet := LazarusPkg.SupportedWidgetSet;
//FPCCompatibility
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 6;
Data^.PackageType := LazarusPkg.PackageType;
//License
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 7;
Data^.License := LazarusPkg.License;
//Dependencies
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 8;
Data^.Dependencies := LazarusPkg.DependenciesAsString;
//FPCCompatibility
Node := FVST.AddChild(RootNode);
Data := FVST.GetNodeData(Node);
Data^.DataType := 9;
Data^.Version := LazarusPkg.VersionAsString;
end;
FVST.SortTree(0, sdAscending);
if FVST.RootNodeCount = 1 then
FVST.FullExpand
else
FVST.FullCollapse;
end;
function TIntfPackageListFrm.IsLazarusPackageChecked(AName: String): Boolean;
var
Node: PVirtualNode;
Data: PData;
begin
Result := False;
Node := FVST.GetFirst;
while Assigned(Node) do
begin
Data := FVST.GetNodeData(Node);
if UpperCase(Data^.LazarusPackageName + '.lpk') = UpperCase(AName) then
begin
Result := Node^.CheckState = csCheckedNormal;
Break;
end;
Node := FVST.GetNextSibling(Node);
end;
end;
end.

View File

@ -267,7 +267,8 @@ end;
procedure TProgressFrm.DoOnPackageDownloadCompleted(Sender: TObject);
begin
FCanClose := True;
FSuccess := True;
if FMdlRes <> mrNo then
FSuccess := True;
Close;
end;
@ -329,7 +330,8 @@ procedure TProgressFrm.DoOnZipCompleted(Sender: TObject);
begin
Application.ProcessMessages;
FCanClose := True;
FSuccess := True;
if FMdlRes <> mrNo then
FSuccess := True;
Close;
end;
@ -432,7 +434,8 @@ end;
procedure TProgressFrm.DoOnPackageInstallCompleted(Sender: TObject; ANeedToRebuild: Boolean; AInstallStatus: TInstallStatus);
begin
FCanClose := True;
FSuccess := True;
if FMdlRes <> mrNo then
FSuccess := True;
FNeedToRebuild := ANeedToRebuild;
FInstallStatus := AInstallStatus;
Application.ProcessMessages;

View File

@ -262,6 +262,7 @@ type
procedure DeletePackage(const AIndex: Integer);
function AddPackageFromJSON(JSON: TJSONStringType): Boolean;
function FindMetaPackage(const AValue: String; const AFindPackageBy: TFindPackageBy): TMetaPackage;
function FindMetaPackageByLazarusPackage(const ALazarusPackage: TLazarusPackage): TMetaPackage;
function FindPackageIndex(const AValue: String; const AFindPackageBy: TFindPackageBy): Integer;
function FindLazarusPackage(const APackageName: String): TLazarusPackage;
function JSONToPackages(JSON: TJSONStringType): Boolean;
@ -269,6 +270,7 @@ type
procedure GetPackageDependencies(const APkgFileName: String; List: TObjectList; Recurse, OnlyUnresolved: Boolean);
procedure GetPackageStates;
procedure RemoveErrorState;
procedure RemoveCheck;
procedure MarkRuntimePackages;
function Cleanup: Integer;
function IsDependencyOk(PackageDependency: TPackageDependency; DependencyPackage: TLazarusPackage): Boolean;
@ -773,6 +775,25 @@ begin
end;
end;
function TSerializablePackages.FindMetaPackageByLazarusPackage(
const ALazarusPackage: TLazarusPackage): TMetaPackage;
var
I, J: Integer;
begin
Result := nil;
for I := 0 to Count - 1 do
begin
for J := 0 to Items[I].FLazarusPackages.Count - 1 do
begin
if ALazarusPackage.Equals(TLazarusPackage(Items[I].FLazarusPackages.Items[J])) then
begin
Result := Items[I];
Break;
end;
end;
end;
end;
function TSerializablePackages.FindPackageIndex(const AValue: String;
const AFindPackageBy: TFindPackageBy): Integer;
var
@ -1340,12 +1361,30 @@ begin
for J := 0 to Items[I].FLazarusPackages.Count - 1 do
begin
LazarusPkg := TLazarusPackage(Items[I].FLazarusPackages.Items[J]);
//if psError in LazarusPkg.PackageStates then
if psError in LazarusPkg.PackageStates then
LazarusPkg.PackageStates := LazarusPkg.PackageStates - [psError];
end;
end;
end;
procedure TSerializablePackages.RemoveCheck;
var
I, J: Integer;
MetaPkg: TMetaPackage;
LazarusPkg: TLazarusPackage;
begin
for I := 0 to Count - 1 do
begin
MetaPkg := TMetaPackage(Items[I]);
MetaPkg.Checked := False;
for J := 0 to Items[I].FLazarusPackages.Count - 1 do
begin
LazarusPkg := TLazarusPackage(Items[I].FLazarusPackages.Items[J]);
LazarusPkg.Checked := False;
end;
end;
end;
procedure TSerializablePackages.MarkRuntimePackages;
var
I, J: Integer;

View File

@ -1251,7 +1251,8 @@ begin
Msg := Format(rsMainFrm_rsPackageDependency0, [Data^.LazarusPackageName, DataSearch^.LazarusPackageName]);
Result := MessageDlgEx(Msg, mtConfirmation, [mbYes, mbYesToAll, mbNo, mbNoToAll, mbCancel], TForm(FVST.Parent.Parent));
if Result in [mrNo, mrNoToAll] then
MessageDlgEx(rsMainFrm_rsPackageDependency1, mtInformation, [mbOk], TForm(FVST.Parent.Parent));
if MessageDlgEx(rsMainFrm_rsPackageDependency1, mtInformation, [mbYes, mbNo], TForm(FVST.Parent.Parent)) <> mrYes then
Exit;
if (Result = mrNoToAll) or (Result = mrCancel) then
Exit;
end;
@ -1378,16 +1379,6 @@ begin
end;
end;
function GetPackageTypeString(aPackageType: TLazPackageType): String;
begin
case aPackageType of
lptRunAndDesignTime: Result := rsMainFrm_VSTText_PackageType0;
lptDesignTime: Result := rsMainFrm_VSTText_PackageType1;
lptRunTime: Result := rsMainFrm_VSTText_PackageType2;
lptRunTimeOnly: Result := rsMainFrm_VSTText_PackageType3;
end;
end;
procedure TVisualTree.VSTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
var