mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 12:20:19 +02:00
* Generate manifest-files for each package while archiving multiple packages
git-svn-id: trunk@31433 -
This commit is contained in:
parent
038c647ed2
commit
621c9c357c
@ -1205,7 +1205,7 @@ Type
|
|||||||
Procedure UnInstall(Packages : TPackages);
|
Procedure UnInstall(Packages : TPackages);
|
||||||
Procedure ZipInstall(Packages : TPackages);
|
Procedure ZipInstall(Packages : TPackages);
|
||||||
Procedure Archive(Packages : TPackages);
|
Procedure Archive(Packages : TPackages);
|
||||||
procedure Manifest(Packages: TPackages);
|
procedure Manifest(Packages: TPackages; Package: TPackage);
|
||||||
procedure PkgList(Packages: TPackages);
|
procedure PkgList(Packages: TPackages);
|
||||||
Procedure Clean(Packages : TPackages; AllTargets: boolean);
|
Procedure Clean(Packages : TPackages; AllTargets: boolean);
|
||||||
|
|
||||||
@ -4866,8 +4866,6 @@ end;
|
|||||||
|
|
||||||
procedure TCustomInstaller.Archive;
|
procedure TCustomInstaller.Archive;
|
||||||
begin
|
begin
|
||||||
// Force generation of manifest.xml, this is required for the repository
|
|
||||||
BuildEngine.Manifest(Packages);
|
|
||||||
NotifyEventCollection.CallEvents(neaBeforeArchive, self);
|
NotifyEventCollection.CallEvents(neaBeforeArchive, self);
|
||||||
BuildEngine.Archive(Packages);
|
BuildEngine.Archive(Packages);
|
||||||
NotifyEventCollection.CallEvents(neaAfterArchive, self);
|
NotifyEventCollection.CallEvents(neaAfterArchive, self);
|
||||||
@ -4877,7 +4875,7 @@ end;
|
|||||||
procedure TCustomInstaller.Manifest;
|
procedure TCustomInstaller.Manifest;
|
||||||
begin
|
begin
|
||||||
NotifyEventCollection.CallEvents(neaBeforeManifest, self);
|
NotifyEventCollection.CallEvents(neaBeforeManifest, self);
|
||||||
BuildEngine.Manifest(Packages);
|
BuildEngine.Manifest(Packages, nil);
|
||||||
NotifyEventCollection.CallEvents(neaAfterManifest, self);
|
NotifyEventCollection.CallEvents(neaAfterManifest, self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7558,17 +7556,20 @@ begin
|
|||||||
For I:=0 to Packages.Count-1 do
|
For I:=0 to Packages.Count-1 do
|
||||||
begin
|
begin
|
||||||
P:=Packages.PackageItems[i];
|
P:=Packages.PackageItems[i];
|
||||||
|
// Force generation of manifest.xml, this is required for the repository
|
||||||
|
Manifest(nil, P);
|
||||||
Archive(P);
|
Archive(P);
|
||||||
end;
|
end;
|
||||||
NotifyEventCollection.CallEvents(neaAfterArchive, Self);
|
NotifyEventCollection.CallEvents(neaAfterArchive, Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TBuildEngine.Manifest(Packages: TPackages);
|
procedure TBuildEngine.Manifest(Packages: TPackages; Package: TPackage);
|
||||||
Var
|
Var
|
||||||
L : TStrings;
|
L : TStrings;
|
||||||
I : Integer;
|
I : Integer;
|
||||||
P : TPackage;
|
P : TPackage;
|
||||||
|
FN: string;
|
||||||
begin
|
begin
|
||||||
NotifyEventCollection.CallEvents(neaBeforeManifest, Self);
|
NotifyEventCollection.CallEvents(neaBeforeManifest, Self);
|
||||||
Log(vlDebug, SDbgBuildEngineGenerateManifests);
|
Log(vlDebug, SDbgBuildEngineGenerateManifests);
|
||||||
@ -7578,14 +7579,25 @@ begin
|
|||||||
Log(vlDebug, Format(SDbgGenerating, [ManifestFile]));
|
Log(vlDebug, Format(SDbgGenerating, [ManifestFile]));
|
||||||
L.Add('<?xml version="1.0"?>');
|
L.Add('<?xml version="1.0"?>');
|
||||||
L.Add('<packages>');
|
L.Add('<packages>');
|
||||||
|
if assigned(Packages) then
|
||||||
|
begin
|
||||||
For I:=0 to Packages.Count-1 do
|
For I:=0 to Packages.Count-1 do
|
||||||
begin
|
begin
|
||||||
P:=Packages.PackageItems[i];
|
P:=Packages.PackageItems[i];
|
||||||
Log(vlInfo, Format(SInfoManifestPackage,[P.Name]));
|
Log(vlInfo, Format(SInfoManifestPackage,[P.Name]));
|
||||||
P.GetManifest(L);
|
P.GetManifest(L);
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
if assigned(Package) then
|
||||||
|
begin
|
||||||
|
Log(vlInfo, Format(SInfoManifestPackage,[Package.Name]));
|
||||||
|
Package.GetManifest(L);
|
||||||
end;
|
end;
|
||||||
L.Add('</packages>');
|
L.Add('</packages>');
|
||||||
L.SaveToFile(ManifestFile);
|
FN := ManifestFile;
|
||||||
|
if assigned(Package) then
|
||||||
|
FN := FixPath(Package.Directory, True)+FN;
|
||||||
|
L.SaveToFile(FN);
|
||||||
Finally
|
Finally
|
||||||
L.Free;
|
L.Free;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user