Browse Source

* Allow vendor specific registry XML files. Patch by Iluha Companets. Fixes issue #40910

Michaël Van Canneyt 11 months ago
parent
commit
9956cafa65
2 changed files with 3 additions and 0 deletions
  1. 1 0
      packages/fcl-registry/src/registry.pp
  2. 2 0
      packages/fcl-registry/src/xregreg.inc

+ 1 - 0
packages/fcl-registry/src/registry.pp

@@ -308,6 +308,7 @@ ResourceString
 
 
 var
 var
   GlobalXMLFile : Boolean = False;
   GlobalXMLFile : Boolean = False;
+  VendorXMLFile : Boolean = False;
 
 
 implementation
 implementation
 
 

+ 2 - 0
packages/fcl-registry/src/xregreg.inc

@@ -176,6 +176,8 @@ var s : string;
 begin
 begin
   FStringSizeIncludesNull:=False;
   FStringSizeIncludesNull:=False;
   s:=includetrailingpathdelimiter(GetAppConfigDir(GlobalXMLFile));
   s:=includetrailingpathdelimiter(GetAppConfigDir(GlobalXMLFile));
+  if VendorXMLFile and (VendorName <> '') and (ApplicationName <> '') then
+    s:= Copy(s, 1, Length(s)-Length(ApplicationName)-1);
   {$ifdef XMLRegfile_in_CurDir}
   {$ifdef XMLRegfile_in_CurDir}
   s:='.' + PathDelim;
   s:='.' + PathDelim;
   {$endif}
   {$endif}