mirror of https://gitlab.com/basile.b/dexed.git
compiler paths, activate auto detection of GDC
This commit is contained in:
parent
c719622a75
commit
027aa4349b
|
@ -247,9 +247,10 @@ begin
|
||||||
fPaths.loadFromFile(fname);
|
fPaths.loadFromFile(fname);
|
||||||
if not isCompilerValid(dmd) then
|
if not isCompilerValid(dmd) then
|
||||||
autoDetectDMD;
|
autoDetectDMD;
|
||||||
|
if not isCompilerValid(gdc) then
|
||||||
|
autoDetectGDC;
|
||||||
|
|
||||||
// #148 / #210
|
// #148 / #210
|
||||||
// if not isCompilerValid(gdc) then
|
|
||||||
// autoDetectGDC;
|
|
||||||
// if not isCompilerValid(ldc) then
|
// if not isCompilerValid(ldc) then
|
||||||
// autoDetectLDC;
|
// autoDetectLDC;
|
||||||
fPathsBackup.Assign(fPaths);
|
fPathsBackup.Assign(fPaths);
|
||||||
|
@ -880,28 +881,24 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompilersPathsEditor.autoDetectGDC;
|
procedure TCompilersPathsEditor.autoDetectGDC;
|
||||||
var
|
|
||||||
path: string;
|
|
||||||
str: TStringList;
|
|
||||||
begin
|
begin
|
||||||
path := exeFullName('gdc' + exeExt);
|
{$IFDEF LINUX}
|
||||||
if path.fileExists then
|
if '/usr/bin/gdc'.fileExists then
|
||||||
begin
|
fPaths.GdcExeName:='/usr/bin/dmd';
|
||||||
fPaths.GdcExeName:= path;
|
// redhat
|
||||||
str := TStringList.Create;
|
if '/usr/lib/gcc/x86_64-redhat-linux/9/include/d'.dirExists then
|
||||||
try
|
fPaths.GdcRuntimePath:='/usr/lib/gcc/x86_64-redhat-linux/9/include/d'
|
||||||
path := path.extractFileDir.extractFilePath;
|
else if '/usr/lib/gcc/x86_64-redhat-linux/10/include/d'.dirExists then
|
||||||
FindAllDirectories(str, path, true);
|
fPaths.GdcRuntimePath:='/usr/lib/gcc/x86_64-redhat-linux/10/include/d'
|
||||||
for path in str do
|
// debian
|
||||||
if pos('include' + DirectorySeparator + 'd', path) > 0 then
|
else if '/usr/lib/gcc/x86_64-linux-gnu/9/include/d'.dirExists then
|
||||||
begin
|
fPaths.GdcRuntimePath:='/usr/lib/gcc/x86_64-linux-gnu/9/include/d'
|
||||||
fPaths.GdcRuntimePath:= path;
|
else if '/usr/lib/gcc/x86_64-linux-gnu/10/include/d'.dirExists then
|
||||||
break;
|
fPaths.GdcRuntimePath:='/usr/lib/gcc/x86_64-linux-gnu/10/include/d'
|
||||||
end;
|
// arch
|
||||||
finally
|
else if 'usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/d'.dirExists then
|
||||||
str.Free;
|
fPaths.GdcRuntimePath:='usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/d';
|
||||||
end;
|
{$ENDIF}
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompilersPathsEditor.autoDetectLDC;
|
procedure TCompilersPathsEditor.autoDetectLDC;
|
||||||
|
|
Loading…
Reference in New Issue