mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 03:59:28 +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;
|
||||
end;
|
||||
|
||||
TResourceFile = Class(TConditionalString);
|
||||
|
||||
{ TPackageVariant }
|
||||
|
||||
TPackage = Class;
|
||||
@ -587,6 +589,13 @@ Type
|
||||
Property Dependencies[Index : Integer] : TDependency Read GetDependency Write SetDependency; default;
|
||||
end;
|
||||
|
||||
{ TResourceFiles }
|
||||
|
||||
TResourceFiles = Class(TConditionalStrings)
|
||||
public
|
||||
Procedure GetInstallFiles(AList : TStrings; const APrefixU, APrefixB : String; ACPU:TCPU; AOS : TOS); virtual;
|
||||
end;
|
||||
|
||||
{ TTarget }
|
||||
|
||||
TTarget = Class(TNamedItem)
|
||||
@ -605,6 +614,7 @@ Type
|
||||
FUnitPath,
|
||||
FIncludePath : TConditionalStrings;
|
||||
FDependencies : TDependencies;
|
||||
FResourceFiles : TResourceFiles;
|
||||
FCommands : TCommands;
|
||||
FDirectory: String;
|
||||
FExtension: String;
|
||||
@ -644,6 +654,7 @@ Type
|
||||
Procedure GetInstallFiles(List : TStrings; const APrefixU, APrefixB : String; ACPU:TCPU; AOS : TOS); virtual;
|
||||
Procedure GetArchiveFiles(List : TStrings; ACPU:TCPU; AOS : TOS); virtual;
|
||||
Property Dependencies : TDependencies Read FDependencies;
|
||||
Property ResourceFiles: TResourceFiles read FResourceFiles;
|
||||
Property Commands : TCommands Read FCommands;
|
||||
Property State : TTargetState Read FTargetState;
|
||||
Property TargetType : TTargetType Read FTargetType Write FTargetType;
|
||||
@ -2817,6 +2828,21 @@ begin
|
||||
Result := GPluginManager;
|
||||
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 }
|
||||
|
||||
procedure TfpmResolvePackagePathsPlugin.ResolveUnitConfigFilenameForBasePath(
|
||||
@ -8558,6 +8584,7 @@ begin
|
||||
FIncludePath:=TConditionalStrings.Create(TConditionalString);
|
||||
FObjectPath:=TConditionalStrings.Create(TConditionalString);
|
||||
FDependencies:=TDependencies.Create(TDependency);
|
||||
FResourceFiles:=TResourceFiles.Create(TResourceFile);
|
||||
FCommands:=TCommands.Create(TCommand);
|
||||
end;
|
||||
|
||||
@ -8568,6 +8595,7 @@ begin
|
||||
FreeAndNil(FObjectPath);
|
||||
FreeAndNil(FIncludePath);
|
||||
FreeAndNil(FDependencies);
|
||||
FreeAndNil(FResourceFiles);
|
||||
FreeAndNil(FCommands);
|
||||
FreeAndNil(Foptions);
|
||||
inherited Destroy;
|
||||
@ -8594,6 +8622,7 @@ begin
|
||||
DestTarget.FileType := FileType;
|
||||
DestTarget.Directory := Directory;
|
||||
DestTarget.ResourceStrings := ResourceStrings;
|
||||
DestTarget.ResourceFiles.Assign(ResourceFiles);
|
||||
DestTarget.Install := Install;
|
||||
DestTarget.FTargetSourceFileName := fTargetSourceFileName;
|
||||
DestTarget.ObjectPath.Assign(ObjectPath);
|
||||
@ -8844,6 +8873,7 @@ begin
|
||||
List.Add(APrefixU + RSTFileName);
|
||||
end;
|
||||
end;
|
||||
FResourceFiles.GetInstallFiles(List, APrefixU, APrefixB, ACPU, AOS);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user