mirror of https://gitlab.com/basile.b/dexed.git
fix #98 - sources not detected in subPackages described in JSON objects
This commit is contained in:
parent
56a9024583
commit
f4e95cc4c5
|
@ -3,6 +3,7 @@
|
||||||
## Bugs fixed
|
## Bugs fixed
|
||||||
|
|
||||||
- DUB projects, access violation for subpackages entries described using JSON objects.
|
- DUB projects, access violation for subpackages entries described using JSON objects.
|
||||||
|
- DUB projects, source files of subpackage described in an object not visible in the project inspector (#98)
|
||||||
|
|
||||||
# v3.9.14
|
# v3.9.14
|
||||||
|
|
||||||
|
|
|
@ -1371,6 +1371,26 @@ begin
|
||||||
fSrcs.Add(patchPlateformPath(ExtractRelativepath(fBasePath, abs)));
|
fSrcs.Add(patchPlateformPath(ExtractRelativepath(fBasePath, abs)));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
procedure trySubpPackages(a: TJSONArray);
|
||||||
|
var
|
||||||
|
n: TJSONData;
|
||||||
|
o: TJSONObject;
|
||||||
|
i: integer;
|
||||||
|
j: TJSONtype;
|
||||||
|
begin
|
||||||
|
for i := 0 to a.Count-1 do
|
||||||
|
begin
|
||||||
|
j := a.Types[i] ;
|
||||||
|
if j = jtString then
|
||||||
|
tryAddFromFolder(fBasePath + a.Strings[i])
|
||||||
|
else if j = jtObject then
|
||||||
|
begin
|
||||||
|
o := a.Objects[i];
|
||||||
|
if o.findAny('name', n) then
|
||||||
|
tryAddFromFolder(fBasePath + n.AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
var
|
var
|
||||||
pth: string;
|
pth: string;
|
||||||
//glb: TRegExpr;
|
//glb: TRegExpr;
|
||||||
|
@ -1407,13 +1427,7 @@ begin
|
||||||
tryAddRelOrAbsFile(arr.Strings[i]);
|
tryAddRelOrAbsFile(arr.Strings[i]);
|
||||||
// subpackages
|
// subpackages
|
||||||
if fJSON.findArray('subPackages', arr) then
|
if fJSON.findArray('subPackages', arr) then
|
||||||
for i := 0 to arr.Count-1 do
|
trySubpPackages(arr);
|
||||||
begin
|
|
||||||
if arr.JSONType = jtString then
|
|
||||||
tryAddFromFolder(fBasePath + arr.Strings[i])
|
|
||||||
else if arr.JSONType = jtObject then
|
|
||||||
tryAddFromFolder(arr.Objects[i].Strings['name']);
|
|
||||||
end;
|
|
||||||
// by config
|
// by config
|
||||||
conf := getCurrentCustomConfig;
|
conf := getCurrentCustomConfig;
|
||||||
if conf.isAssigned then
|
if conf.isAssigned then
|
||||||
|
@ -1438,13 +1452,7 @@ begin
|
||||||
end;
|
end;
|
||||||
// subpackages
|
// subpackages
|
||||||
if conf.findArray('subPackages', arr) then
|
if conf.findArray('subPackages', arr) then
|
||||||
for i := 0 to arr.Count-1 do
|
trySubpPackages(arr);
|
||||||
begin
|
|
||||||
if arr.JSONType = jtString then
|
|
||||||
tryAddFromFolder(fBasePath + arr.Strings[i])
|
|
||||||
else if arr.JSONType = jtObject then
|
|
||||||
tryAddFromFolder(arr.Objects[i].Strings['name']);
|
|
||||||
end;
|
|
||||||
// custom files in current config
|
// custom files in current config
|
||||||
if conf.findArray('sourceFiles', arr) then
|
if conf.findArray('sourceFiles', arr) then
|
||||||
for i := 0 to arr.Count-1 do
|
for i := 0 to arr.Count-1 do
|
||||||
|
|
Loading…
Reference in New Issue