mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 08:30:58 +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/ideimagesintf.xml svneol=native#text/plain
|
||||||
ideintf/docs/ideoptionsintf.xml svneol=native#text/plain
|
ideintf/docs/ideoptionsintf.xml svneol=native#text/plain
|
||||||
ideintf/docs/lazideintf.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.lfm svneol=native#text/plain
|
||||||
ideintf/fieldseditor.pas svneol=native#text/pascal
|
ideintf/fieldseditor.pas svneol=native#text/pascal
|
||||||
ideintf/fieldslist.lfm svneol=native#text/plain
|
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"/>
|
<UnitName Value="compoptsintf"/>
|
||||||
</Item68>
|
</Item68>
|
||||||
</Files>
|
</Files>
|
||||||
|
<LazDoc Paths="docs"/>
|
||||||
<i18n>
|
<i18n>
|
||||||
<EnableI18N Value="True"/>
|
<EnableI18N Value="True"/>
|
||||||
<OutDir Value="languages"/>
|
<OutDir Value="languages"/>
|
||||||
|
@ -243,7 +243,8 @@ type
|
|||||||
function GetPackageOfEditorItem(Sender: TObject): TIDEPackage; virtual; abstract;
|
function GetPackageOfEditorItem(Sender: TObject): TIDEPackage; virtual; abstract;
|
||||||
|
|
||||||
// install
|
// install
|
||||||
function CheckInstallPackageList(PkgIDList: TObjectList): boolean; virtual; abstract;
|
function CheckInstallPackageList(PkgIDList: TObjectList;
|
||||||
|
Flags: TPkgInstallInIDEFlags = []): boolean; virtual; abstract;
|
||||||
function InstallPackages(PkgIdList: TObjectList;
|
function InstallPackages(PkgIdList: TObjectList;
|
||||||
Flags: TPkgInstallInIDEFlags = []): TModalResult; virtual; abstract;
|
Flags: TPkgInstallInIDEFlags = []): TModalResult; virtual; abstract;
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ type
|
|||||||
property AddToProjectUsesSection: boolean read FAddToProjectUsesSection
|
property AddToProjectUsesSection: boolean read FAddToProjectUsesSection
|
||||||
write SetAddToProjectUsesSection;
|
write SetAddToProjectUsesSection;
|
||||||
property Author: string read FAuthor write SetAuthor;
|
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
|
property AutoIncrementVersionOnBuild: boolean
|
||||||
read GetAutoIncrementVersionOnBuild
|
read GetAutoIncrementVersionOnBuild
|
||||||
write SetAutoIncrementVersionOnBuild;
|
write SetAutoIncrementVersionOnBuild;
|
||||||
|
@ -302,7 +302,8 @@ type
|
|||||||
function DoInstallPackage(APackage: TLazPackage): TModalResult;
|
function DoInstallPackage(APackage: TLazPackage): TModalResult;
|
||||||
function DoUninstallPackage(APackage: TLazPackage;
|
function DoUninstallPackage(APackage: TLazPackage;
|
||||||
Flags: TPkgUninstallFlags; ShowAbort: boolean): TModalResult;
|
Flags: TPkgUninstallFlags; ShowAbort: boolean): TModalResult;
|
||||||
function CheckInstallPackageList(PkgIDList: TObjectList): boolean; override;
|
function CheckInstallPackageList(PkgIDList: TObjectList;
|
||||||
|
Flags: TPkgInstallInIDEFlags = []): boolean; override;
|
||||||
function InstallPackages(PkgIdList: TObjectList;
|
function InstallPackages(PkgIdList: TObjectList;
|
||||||
Flags: TPkgInstallInIDEFlags = []): TModalResult; override;
|
Flags: TPkgInstallInIDEFlags = []): TModalResult; override;
|
||||||
procedure DoTranslatePackage(APackage: TLazPackage);
|
procedure DoTranslatePackage(APackage: TLazPackage);
|
||||||
@ -3668,7 +3669,8 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPkgManager.CheckInstallPackageList(PkgIDList: TObjectList): boolean;
|
function TPkgManager.CheckInstallPackageList(PkgIDList: TObjectList;
|
||||||
|
Flags: TPkgInstallInIDEFlags): boolean;
|
||||||
var
|
var
|
||||||
NewFirstAutoInstallDependency: TPkgDependency;
|
NewFirstAutoInstallDependency: TPkgDependency;
|
||||||
PkgList: TFPList;
|
PkgList: TFPList;
|
||||||
@ -3676,6 +3678,7 @@ var
|
|||||||
APackage: TLazPackage;
|
APackage: TLazPackage;
|
||||||
ADependency: TPkgDependency;
|
ADependency: TPkgDependency;
|
||||||
NextDependency: TPkgDependency;
|
NextDependency: TPkgDependency;
|
||||||
|
SaveFlags: TPkgSaveFlags;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
PkgList:=nil;
|
PkgList:=nil;
|
||||||
@ -3685,7 +3688,7 @@ begin
|
|||||||
pdlRequires,Self,true);
|
pdlRequires,Self,true);
|
||||||
|
|
||||||
// load all required packages
|
// 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
|
// remove all top level runtime packages from the list
|
||||||
// Note: it's ok if a designtime package uses a runtime package
|
// Note: it's ok if a designtime package uses a runtime package
|
||||||
@ -3707,7 +3710,8 @@ begin
|
|||||||
APackage:=TLazPackage(PkgList[i]);
|
APackage:=TLazPackage(PkgList[i]);
|
||||||
if (not APackage.AutoCreated)
|
if (not APackage.AutoCreated)
|
||||||
and (APackage.IsVirtual or APackage.Modified) then begin
|
and (APackage.IsVirtual or APackage.Modified) then begin
|
||||||
if DoSavePackage(APackage,[])<>mrOk then exit;
|
SaveFlags:=[];
|
||||||
|
if DoSavePackage(APackage,SaveFlags)<>mrOk then exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user