mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 06:08:17 +02:00
IDEIntf: hints about CheckInstallPackageList and InstallPackages
git-svn-id: trunk@30765 -
This commit is contained in:
parent
8009fe6f7c
commit
339b4d136a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -4184,6 +4184,7 @@ ideintf/docs/formeditingintf.xml svneol=native#text/plain
|
||||
ideintf/docs/ideimagesintf.xml svneol=native#text/plain
|
||||
ideintf/docs/ideoptionsintf.xml svneol=native#text/plain
|
||||
ideintf/docs/lazideintf.xml svneol=native#text/plain
|
||||
ideintf/docs/packageintf.xml svneol=native#text/plain
|
||||
ideintf/fieldseditor.lfm svneol=native#text/plain
|
||||
ideintf/fieldseditor.pas svneol=native#text/pascal
|
||||
ideintf/fieldslist.lfm svneol=native#text/plain
|
||||
|
15
ideintf/docs/packageintf.xml
Normal file
15
ideintf/docs/packageintf.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<fpdoc-descriptions>
|
||||
<package name="IDEIntf">
|
||||
<module name="PackageIntf">
|
||||
<element name="TPackageEditingInterface.CheckInstallPackageList">
|
||||
<short>Use this function to do some sanity checks for the newly installed packages</short>
|
||||
<descr>PkgIDList is a list of TLazPackageID</descr>
|
||||
</element>
|
||||
<element name="TPackageEditingInterface.InstallPackages">
|
||||
<short>Install new packages into the IDE</short>
|
||||
<descr>PkgIDList is a list of TLazPackageID</descr>
|
||||
</element>
|
||||
</module>
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
@ -297,6 +297,7 @@
|
||||
<UnitName Value="compoptsintf"/>
|
||||
</Item68>
|
||||
</Files>
|
||||
<LazDoc Paths="docs"/>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
|
@ -243,7 +243,8 @@ type
|
||||
function GetPackageOfEditorItem(Sender: TObject): TIDEPackage; virtual; abstract;
|
||||
|
||||
// install
|
||||
function CheckInstallPackageList(PkgIDList: TObjectList): boolean; virtual; abstract;
|
||||
function CheckInstallPackageList(PkgIDList: TObjectList;
|
||||
Flags: TPkgInstallInIDEFlags = []): boolean; virtual; abstract;
|
||||
function InstallPackages(PkgIdList: TObjectList;
|
||||
Flags: TPkgInstallInIDEFlags = []): TModalResult; virtual; abstract;
|
||||
|
||||
|
@ -764,7 +764,7 @@ type
|
||||
property AddToProjectUsesSection: boolean read FAddToProjectUsesSection
|
||||
write SetAddToProjectUsesSection;
|
||||
property Author: string read FAuthor write SetAuthor;
|
||||
property AutoCreated: boolean read FAutoCreated write SetAutoCreated;
|
||||
property AutoCreated: boolean read FAutoCreated write SetAutoCreated; // do not save
|
||||
property AutoIncrementVersionOnBuild: boolean
|
||||
read GetAutoIncrementVersionOnBuild
|
||||
write SetAutoIncrementVersionOnBuild;
|
||||
|
@ -302,7 +302,8 @@ type
|
||||
function DoInstallPackage(APackage: TLazPackage): TModalResult;
|
||||
function DoUninstallPackage(APackage: TLazPackage;
|
||||
Flags: TPkgUninstallFlags; ShowAbort: boolean): TModalResult;
|
||||
function CheckInstallPackageList(PkgIDList: TObjectList): boolean; override;
|
||||
function CheckInstallPackageList(PkgIDList: TObjectList;
|
||||
Flags: TPkgInstallInIDEFlags = []): boolean; override;
|
||||
function InstallPackages(PkgIdList: TObjectList;
|
||||
Flags: TPkgInstallInIDEFlags = []): TModalResult; override;
|
||||
procedure DoTranslatePackage(APackage: TLazPackage);
|
||||
@ -3668,7 +3669,8 @@ begin
|
||||
Result:=mrOk;
|
||||
end;
|
||||
|
||||
function TPkgManager.CheckInstallPackageList(PkgIDList: TObjectList): boolean;
|
||||
function TPkgManager.CheckInstallPackageList(PkgIDList: TObjectList;
|
||||
Flags: TPkgInstallInIDEFlags): boolean;
|
||||
var
|
||||
NewFirstAutoInstallDependency: TPkgDependency;
|
||||
PkgList: TFPList;
|
||||
@ -3676,6 +3678,7 @@ var
|
||||
APackage: TLazPackage;
|
||||
ADependency: TPkgDependency;
|
||||
NextDependency: TPkgDependency;
|
||||
SaveFlags: TPkgSaveFlags;
|
||||
begin
|
||||
Result:=false;
|
||||
PkgList:=nil;
|
||||
@ -3685,7 +3688,7 @@ begin
|
||||
pdlRequires,Self,true);
|
||||
|
||||
// load all required packages
|
||||
if LoadDependencyList(NewFirstAutoInstallDependency,false)<>mrOk then exit;
|
||||
if LoadDependencyList(NewFirstAutoInstallDependency,piiifQuiet in Flags)<>mrOk then exit;
|
||||
|
||||
// remove all top level runtime packages from the list
|
||||
// Note: it's ok if a designtime package uses a runtime package
|
||||
@ -3707,7 +3710,8 @@ begin
|
||||
APackage:=TLazPackage(PkgList[i]);
|
||||
if (not APackage.AutoCreated)
|
||||
and (APackage.IsVirtual or APackage.Modified) then begin
|
||||
if DoSavePackage(APackage,[])<>mrOk then exit;
|
||||
SaveFlags:=[];
|
||||
if DoSavePackage(APackage,SaveFlags)<>mrOk then exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user