mirror of https://gitlab.com/basile.b/dexed.git
fix, dub integration, a project that defines custom buildTypes was considered invalid
This commit is contained in:
parent
53d3ed6527
commit
458839102d
|
|
@ -441,8 +441,10 @@ end;
|
||||||
procedure TCEDubProject.udpateConfigsFromJson;
|
procedure TCEDubProject.udpateConfigsFromJson;
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
|
dat: TJSONData;
|
||||||
arr: TJSONArray = nil;
|
arr: TJSONArray = nil;
|
||||||
item: TJSONObject = nil;
|
item: TJSONObject = nil;
|
||||||
|
obj: TJSONObject = nil;
|
||||||
itemname: string;
|
itemname: string;
|
||||||
begin
|
begin
|
||||||
fBuildTypes.Clear;
|
fBuildTypes.Clear;
|
||||||
|
|
@ -469,15 +471,13 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
fBuildTypes.AddStrings(DubBuiltTypeName);
|
fBuildTypes.AddStrings(DubBuiltTypeName);
|
||||||
if fJSON.Find('buildTypes') <> nil then
|
dat := fJSON.Find('buildTypes');
|
||||||
|
if assigned(dat) and (dat.JSONType = jtObject) then
|
||||||
begin
|
begin
|
||||||
arr := fJSON.Arrays['buildTypes'];
|
obj := fJSON.Objects['buildTypes'];
|
||||||
for i := 0 to arr.Count-1 do
|
for i := 0 to obj.Count-1 do
|
||||||
begin
|
begin
|
||||||
item := TJSONObject(arr.Items[i]);
|
itemname := obj.Names[i];
|
||||||
if item.Find('name') = nil then
|
|
||||||
continue;
|
|
||||||
itemname := item.Strings['name'];
|
|
||||||
// defaults build types can be overridden
|
// defaults build types can be overridden
|
||||||
if fBuildTypes.IndexOf(itemname) <> -1 then
|
if fBuildTypes.IndexOf(itemname) <> -1 then
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue