mirror of https://gitlab.com/basile.b/dexed.git
DUB projects, detect dep import path from "path" property
This commit is contained in:
parent
1ddae5765a
commit
8f0c4a52ad
|
@ -1306,6 +1306,7 @@ procedure TCEDubProject.updateImportPathsFromJson;
|
||||||
q: TSemVer;
|
q: TSemVer;
|
||||||
u: PSemVer;
|
u: PSemVer;
|
||||||
i: integer;
|
i: integer;
|
||||||
|
c: TJSONObject;
|
||||||
begin
|
begin
|
||||||
if obj.findObject('dependencies' + suffix, deps) then
|
if obj.findObject('dependencies' + suffix, deps) then
|
||||||
begin
|
begin
|
||||||
|
@ -1317,8 +1318,19 @@ procedure TCEDubProject.updateImportPathsFromJson;
|
||||||
for i := 0 to deps.Count-1 do
|
for i := 0 to deps.Count-1 do
|
||||||
begin
|
begin
|
||||||
n := deps.Names[i];
|
n := deps.Names[i];
|
||||||
s := z + n;
|
|
||||||
|
|
||||||
|
// local path specified
|
||||||
|
if deps.findObject(n, c) and c.findAny('path', j) then
|
||||||
|
begin
|
||||||
|
s := expandFilenameEx(fBasePath, j.AsString);
|
||||||
|
if (s + 'source').dirExists then
|
||||||
|
fImportPaths.Add(s)
|
||||||
|
else if (s + 'src').dirExists then
|
||||||
|
fImportPaths.Add(s);
|
||||||
|
continue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
s := z + n;
|
||||||
// Try to fetch if not present at all
|
// Try to fetch if not present at all
|
||||||
if not fLocalPackages.find(n, pck) and dubBuildOptions.autoFetch then
|
if not fLocalPackages.find(n, pck) and dubBuildOptions.autoFetch then
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue