mirror of https://gitlab.com/basile.b/dexed.git
fix libman libfiles were passed as -I and libpath as source lib.
This commit is contained in:
parent
67fba2aaae
commit
2ca12fa046
|
@ -41,8 +41,8 @@ type
|
||||||
constructor create(aOwner: TComponent); override;
|
constructor create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
//
|
//
|
||||||
procedure getAdditionalSources(const someAliases, aList: TStrings);
|
procedure getLibFiles(const someAliases, aList: TStrings);
|
||||||
procedure getAdditionalImport(const someAliases, aList: TStrings);
|
procedure getLibSources(const someAliases, aList: TStrings);
|
||||||
//
|
//
|
||||||
procedure loadFromFile(const aFilename: string);
|
procedure loadFromFile(const aFilename: string);
|
||||||
procedure saveToFile(const aFilename: string);
|
procedure saveToFile(const aFilename: string);
|
||||||
|
@ -71,60 +71,47 @@ end;
|
||||||
|
|
||||||
procedure TLibraryManager.updateDCD;
|
procedure TLibraryManager.updateDCD;
|
||||||
var
|
var
|
||||||
itm: TCollectionItem;
|
itm: TLibraryItem;
|
||||||
itmt: TLibraryItem;
|
i: NativeInt;
|
||||||
begin
|
begin
|
||||||
if not dcdOn then exit;
|
if not dcdOn then exit;
|
||||||
//
|
//
|
||||||
for itm in fCol do
|
for i := 0 to fCol.Count-1 do
|
||||||
begin
|
begin
|
||||||
itmt := TLibraryItem(itm);
|
itm := TLibraryItem(fCol.Items[i]);
|
||||||
ce_dcd.addDcdImport(itmt.libSourcePath);
|
ce_dcd.addDcdImport(itm.libSourcePath);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLibraryManager.getAdditionalSources(const someAliases, aList: TStrings);
|
procedure TLibraryManager.getLibFiles(const someAliases, aList: TStrings);
|
||||||
var
|
var
|
||||||
itm: TCollectionItem;
|
itm: TLibraryItem;
|
||||||
itmt: TLibraryItem;
|
i: NativeInt;
|
||||||
ext, src: string;
|
|
||||||
srcs: TStringList;
|
|
||||||
begin
|
begin
|
||||||
for itm in fCol do
|
for i := 0 to fCol.Count-1 do
|
||||||
begin
|
begin
|
||||||
itmt := TLibraryItem(itm);
|
itm := TLibraryItem(fCol.Items[i]);
|
||||||
if someAliases <> nil then
|
if someAliases <> nil then
|
||||||
if someAliases.IndexOf(itmt.libAlias) = -1 then continue;
|
if someAliases.IndexOf(itm.libAlias) = -1 then continue;
|
||||||
//
|
//
|
||||||
srcs := TStringList.Create;
|
if aList.IndexOf(itm.libFile) <> -1 then continue;
|
||||||
try
|
aList.Add(itm.libFile);
|
||||||
listFiles(srcs, itmt.libSourcePath, true);
|
|
||||||
for src in srcs do
|
|
||||||
begin
|
|
||||||
ext := extractFileExt(src);
|
|
||||||
if DExtList.IndexOf(ext) = -1 then continue;
|
|
||||||
if aList.IndexOf(src) <> -1 then continue;
|
|
||||||
aList.Add(src);
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
srcs.Free;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLibraryManager.getAdditionalImport(const someAliases, aList: TStrings);
|
procedure TLibraryManager.getLibSources(const someAliases, aList: TStrings);
|
||||||
var
|
var
|
||||||
itm: TCollectionItem;
|
itm: TLibraryItem;
|
||||||
itmt: TLibraryItem;
|
i: NativeInt;
|
||||||
begin
|
begin
|
||||||
for itm in fCol do
|
for i := 0 to fCol.Count-1 do
|
||||||
begin
|
begin
|
||||||
itmt := TLibraryItem(itm);
|
itm := TLibraryItem(fCol.Items[i]);
|
||||||
if someAliases <> nil then
|
if someAliases <> nil then
|
||||||
if someAliases.IndexOf(itmt.libAlias) = -1 then continue;
|
if someAliases.IndexOf(itm.libAlias) = -1 then continue;
|
||||||
//
|
//
|
||||||
if aList.IndexOf(itmt.libFile) <> -1 then continue;
|
if aList.IndexOf(itm.libSourcePath) <> -1 then continue;
|
||||||
aList.Add('-I' + itmt.libFile);
|
aList.Add('-I' + itm.libSourcePath);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -1128,8 +1128,8 @@ begin
|
||||||
dmdproc.Parameters.Add('-w');
|
dmdproc.Parameters.Add('-w');
|
||||||
dmdproc.Parameters.Add('-wi');
|
dmdproc.Parameters.Add('-wi');
|
||||||
dmdproc.Parameters.Add('-of' + fname {$IFDEF WINDOWS}+ '.exe'{$ENDIF});
|
dmdproc.Parameters.Add('-of' + fname {$IFDEF WINDOWS}+ '.exe'{$ENDIF});
|
||||||
LibraryManager.getAdditionalSources(nil, dmdproc.Parameters);
|
LibraryManager.getLibFiles(nil, dmdproc.Parameters);
|
||||||
LibraryManager.getAdditionalImport(nil, dmdproc.Parameters);
|
LibraryManager.getLibSources(nil, dmdproc.Parameters);
|
||||||
dmdproc.Execute;
|
dmdproc.Execute;
|
||||||
repeat ProcessOutputToMsg(dmdproc, mcEditor) until not dmdproc.Running;
|
repeat ProcessOutputToMsg(dmdproc, mcEditor) until not dmdproc.Running;
|
||||||
if (dmdProc.ExitStatus = 0) then
|
if (dmdProc.ExitStatus = 0) then
|
||||||
|
@ -1143,8 +1143,8 @@ begin
|
||||||
runproc.Execute;
|
runproc.Execute;
|
||||||
repeat ProcessOutputToMsg(runproc, mcEditor) until not runproc.Running;
|
repeat ProcessOutputToMsg(runproc, mcEditor) until not runproc.Running;
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
sysutils.DeleteFile(fname + '.exe');
|
//sysutils.DeleteFile(fname + '.exe');
|
||||||
sysutils.DeleteFile(fname + '.obj');
|
//sysutils.DeleteFile(fname + '.obj');
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
sysutils.DeleteFile(fname);
|
sysutils.DeleteFile(fname);
|
||||||
sysutils.DeleteFile(fname + '.o');
|
sysutils.DeleteFile(fname + '.o');
|
||||||
|
|
|
@ -259,8 +259,8 @@ begin
|
||||||
//
|
//
|
||||||
if fLibMan <> nil then
|
if fLibMan <> nil then
|
||||||
begin
|
begin
|
||||||
fLibMan.getAdditionalSources(fLibAliases, aList);
|
fLibMan.getLibFiles(fLibAliases, aList);
|
||||||
fLibMan.getAdditionalImport(fLibAliases, aList);
|
fLibMan.getLibSources(fLibAliases, aList);
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
TCompilerConfiguration(fOptsColl.Items[fConfIx]).getOpts(aList);
|
TCompilerConfiguration(fOptsColl.Items[fConfIx]).getOpts(aList);
|
||||||
|
|
|
@ -405,8 +405,8 @@ begin
|
||||||
end;
|
end;
|
||||||
//adds the libman entries
|
//adds the libman entries
|
||||||
with CEMainForm do begin
|
with CEMainForm do begin
|
||||||
Librarymanager.getAdditionalSources(nil, dmdproc.Parameters);
|
Librarymanager.getLibFiles(nil, dmdproc.Parameters);
|
||||||
Librarymanager.getAdditionalImport(nil, dmdproc.Parameters);
|
Librarymanager.getLibSources(nil, dmdproc.Parameters);
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
dmdproc.Execute;
|
dmdproc.Execute;
|
||||||
|
|
Loading…
Reference in New Issue