mirror of https://gitlab.com/basile.b/dexed.git
more for #10, handle mainSourceFile
This commit is contained in:
parent
c95c8ff54b
commit
782f5ff59c
|
@ -419,7 +419,10 @@ begin
|
||||||
fSrcs.Clear;
|
fSrcs.Clear;
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
// auto folders
|
// auto folders & files
|
||||||
|
item := fJSON.Find('mainSourceFile');
|
||||||
|
if item <> nil then
|
||||||
|
fSrcs.Add(ExtractRelativepath(fBasePath, item.AsString));
|
||||||
tryAddFromFolder(fBasePath + 'src');
|
tryAddFromFolder(fBasePath + 'src');
|
||||||
tryAddFromFolder(fBasePath + 'source');
|
tryAddFromFolder(fBasePath + 'source');
|
||||||
// custom folders
|
// custom folders
|
||||||
|
@ -444,6 +447,9 @@ begin
|
||||||
conf := getCurrentCustomConfig;
|
conf := getCurrentCustomConfig;
|
||||||
if conf <> nil then
|
if conf <> nil then
|
||||||
begin
|
begin
|
||||||
|
item := conf.Find('mainSourceFile');
|
||||||
|
if item <> nil then
|
||||||
|
fSrcs.Add(ExtractRelativepath(fBasePath, item.AsString));
|
||||||
// custom folders in current config
|
// custom folders in current config
|
||||||
item := conf.Find('sourcePaths');
|
item := conf.Find('sourcePaths');
|
||||||
if item <> nil then
|
if item <> nil then
|
||||||
|
@ -467,7 +473,6 @@ begin
|
||||||
//
|
//
|
||||||
deleteDups(fSrcs);
|
deleteDups(fSrcs);
|
||||||
// TODO-cDUB: manage exclusions from 'excludedSourceFiles' (global + curr conf)
|
// TODO-cDUB: manage exclusions from 'excludedSourceFiles' (global + curr conf)
|
||||||
// + mainSourceFile.
|
|
||||||
finally
|
finally
|
||||||
lst.Free;
|
lst.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -478,6 +483,11 @@ var
|
||||||
tt: TJSONData;
|
tt: TJSONData;
|
||||||
begin
|
begin
|
||||||
result := true;
|
result := true;
|
||||||
|
if value.Find('mainSourceFile') <> nil then
|
||||||
|
begin
|
||||||
|
fBinKind := executable;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
tt := value.Find('targetType');
|
tt := value.Find('targetType');
|
||||||
if tt <> nil then
|
if tt <> nil then
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue