mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 09:59:17 +02:00
* Custom resource-files support
git-svn-id: trunk@41946 -
This commit is contained in:
parent
7601a4ba97
commit
3a964d8556
@ -517,6 +517,8 @@ Type
|
|||||||
Property RequireChecksum : Cardinal Read FRequireChecksum Write FRequireChecksum;
|
Property RequireChecksum : Cardinal Read FRequireChecksum Write FRequireChecksum;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TResourceFile = Class(TConditionalString);
|
||||||
|
|
||||||
{ TPackageVariant }
|
{ TPackageVariant }
|
||||||
|
|
||||||
TPackage = Class;
|
TPackage = Class;
|
||||||
@ -587,6 +589,13 @@ Type
|
|||||||
Property Dependencies[Index : Integer] : TDependency Read GetDependency Write SetDependency; default;
|
Property Dependencies[Index : Integer] : TDependency Read GetDependency Write SetDependency; default;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TResourceFiles }
|
||||||
|
|
||||||
|
TResourceFiles = Class(TConditionalStrings)
|
||||||
|
public
|
||||||
|
Procedure GetInstallFiles(AList : TStrings; const APrefixU, APrefixB : String; ACPU:TCPU; AOS : TOS); virtual;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TTarget }
|
{ TTarget }
|
||||||
|
|
||||||
TTarget = Class(TNamedItem)
|
TTarget = Class(TNamedItem)
|
||||||
@ -605,6 +614,7 @@ Type
|
|||||||
FUnitPath,
|
FUnitPath,
|
||||||
FIncludePath : TConditionalStrings;
|
FIncludePath : TConditionalStrings;
|
||||||
FDependencies : TDependencies;
|
FDependencies : TDependencies;
|
||||||
|
FResourceFiles : TResourceFiles;
|
||||||
FCommands : TCommands;
|
FCommands : TCommands;
|
||||||
FDirectory: String;
|
FDirectory: String;
|
||||||
FExtension: String;
|
FExtension: String;
|
||||||
@ -644,6 +654,7 @@ Type
|
|||||||
Procedure GetInstallFiles(List : TStrings; const APrefixU, APrefixB : String; ACPU:TCPU; AOS : TOS); virtual;
|
Procedure GetInstallFiles(List : TStrings; const APrefixU, APrefixB : String; ACPU:TCPU; AOS : TOS); virtual;
|
||||||
Procedure GetArchiveFiles(List : TStrings; ACPU:TCPU; AOS : TOS); virtual;
|
Procedure GetArchiveFiles(List : TStrings; ACPU:TCPU; AOS : TOS); virtual;
|
||||||
Property Dependencies : TDependencies Read FDependencies;
|
Property Dependencies : TDependencies Read FDependencies;
|
||||||
|
Property ResourceFiles: TResourceFiles read FResourceFiles;
|
||||||
Property Commands : TCommands Read FCommands;
|
Property Commands : TCommands Read FCommands;
|
||||||
Property State : TTargetState Read FTargetState;
|
Property State : TTargetState Read FTargetState;
|
||||||
Property TargetType : TTargetType Read FTargetType Write FTargetType;
|
Property TargetType : TTargetType Read FTargetType Write FTargetType;
|
||||||
@ -2817,6 +2828,21 @@ begin
|
|||||||
Result := GPluginManager;
|
Result := GPluginManager;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TResourceFiles }
|
||||||
|
|
||||||
|
procedure TResourceFiles.GetInstallFiles(AList: TStrings; const APrefixU, APrefixB: String; ACPU: TCPU; AOS: TOS);
|
||||||
|
Var
|
||||||
|
I : Integer;
|
||||||
|
R : TResourceFile;
|
||||||
|
begin
|
||||||
|
For I:=0 to Count-1 do
|
||||||
|
begin
|
||||||
|
R:=Tobject(Items[I]) as TResourceFile;
|
||||||
|
if (ACPU in R.CPUs) and (AOS in R.OSes) then
|
||||||
|
AList.Add(ConcatPaths([APrefixU, R.Value]));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TfpmResolvePackagePathsPlugin }
|
{ TfpmResolvePackagePathsPlugin }
|
||||||
|
|
||||||
procedure TfpmResolvePackagePathsPlugin.ResolveUnitConfigFilenameForBasePath(
|
procedure TfpmResolvePackagePathsPlugin.ResolveUnitConfigFilenameForBasePath(
|
||||||
@ -8558,6 +8584,7 @@ begin
|
|||||||
FIncludePath:=TConditionalStrings.Create(TConditionalString);
|
FIncludePath:=TConditionalStrings.Create(TConditionalString);
|
||||||
FObjectPath:=TConditionalStrings.Create(TConditionalString);
|
FObjectPath:=TConditionalStrings.Create(TConditionalString);
|
||||||
FDependencies:=TDependencies.Create(TDependency);
|
FDependencies:=TDependencies.Create(TDependency);
|
||||||
|
FResourceFiles:=TResourceFiles.Create(TResourceFile);
|
||||||
FCommands:=TCommands.Create(TCommand);
|
FCommands:=TCommands.Create(TCommand);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -8568,6 +8595,7 @@ begin
|
|||||||
FreeAndNil(FObjectPath);
|
FreeAndNil(FObjectPath);
|
||||||
FreeAndNil(FIncludePath);
|
FreeAndNil(FIncludePath);
|
||||||
FreeAndNil(FDependencies);
|
FreeAndNil(FDependencies);
|
||||||
|
FreeAndNil(FResourceFiles);
|
||||||
FreeAndNil(FCommands);
|
FreeAndNil(FCommands);
|
||||||
FreeAndNil(Foptions);
|
FreeAndNil(Foptions);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
@ -8594,6 +8622,7 @@ begin
|
|||||||
DestTarget.FileType := FileType;
|
DestTarget.FileType := FileType;
|
||||||
DestTarget.Directory := Directory;
|
DestTarget.Directory := Directory;
|
||||||
DestTarget.ResourceStrings := ResourceStrings;
|
DestTarget.ResourceStrings := ResourceStrings;
|
||||||
|
DestTarget.ResourceFiles.Assign(ResourceFiles);
|
||||||
DestTarget.Install := Install;
|
DestTarget.Install := Install;
|
||||||
DestTarget.FTargetSourceFileName := fTargetSourceFileName;
|
DestTarget.FTargetSourceFileName := fTargetSourceFileName;
|
||||||
DestTarget.ObjectPath.Assign(ObjectPath);
|
DestTarget.ObjectPath.Assign(ObjectPath);
|
||||||
@ -8844,6 +8873,7 @@ begin
|
|||||||
List.Add(APrefixU + RSTFileName);
|
List.Add(APrefixU + RSTFileName);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
FResourceFiles.GetInstallFiles(List, APrefixU, APrefixB, ACPU, AOS);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user