mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 04:07:57 +02:00
ideconfig: less dependency on codetools
This commit is contained in:
parent
e4d8512e69
commit
a6933c07a9
@ -60,7 +60,7 @@ uses
|
||||
CodeToolsStructs, KeywordFuncLists, LinkScanner, FileProcs,
|
||||
// LazUtils
|
||||
LazStringUtils, LazFileUtils, FileUtil, LazFileCache,
|
||||
LazUTF8, UTF8Process, LazDbgLog, AvgLvlTree, Laz2_XMLCfg;
|
||||
LazUTF8, UTF8Process, LazDbgLog, AvgLvlTree, Laz2_XMLCfg, FPCAdds;
|
||||
|
||||
const
|
||||
ExternalMacroStart = ExprEval.ExternalMacroStart;
|
||||
@ -1090,8 +1090,8 @@ function GetDefaultSrcCPUForTargetCPU(const TargetCPU: string): string;
|
||||
procedure SplitLazarusCPUOSWidgetCombo(const Combination: string;
|
||||
out CPU, OS, WidgetSet: string);
|
||||
function GetCompiledFPCVersion: integer;
|
||||
function GetCompiledTargetOS: string;
|
||||
function GetCompiledTargetCPU: string;
|
||||
function GetCompiledTargetOS: string; deprecated 'use FPCAdds';
|
||||
function GetCompiledTargetCPU: string; deprecated 'use FPCAdds';
|
||||
function GetDefaultCompilerFilename(const TargetCPU: string = ''; Cross: boolean = false): string;
|
||||
procedure GetTargetProcessors(const TargetCPU: string; aList: TStrings);
|
||||
function GetFPCTargetOS(TargetOS: string): string; // normalize
|
||||
@ -3717,12 +3717,12 @@ end;
|
||||
|
||||
function GetCompiledTargetOS: string;
|
||||
begin
|
||||
Result:=lowerCase({$I %FPCTARGETOS%});
|
||||
Result:=FPCAdds.GetCompiledTargetOS;
|
||||
end;
|
||||
|
||||
function GetCompiledTargetCPU: string;
|
||||
begin
|
||||
Result:=lowerCase({$I %FPCTARGETCPU%});
|
||||
Result:=FPCAdds.GetCompiledTargetCPU;
|
||||
end;
|
||||
|
||||
function GetDefaultCompilerFilename(const TargetCPU: string;
|
||||
|
@ -23,6 +23,9 @@ type
|
||||
TCompareMemSize = PtrUInt;
|
||||
PHandle = ^THandle;
|
||||
|
||||
function GetCompiledTargetOS: string;
|
||||
function GetCompiledTargetCPU: string;
|
||||
|
||||
function StrToWord(const s: string): word;
|
||||
|
||||
function AlignToPtr(const p: Pointer): Pointer; inline;
|
||||
@ -30,6 +33,16 @@ function AlignToInt(const p: Pointer): Pointer; inline;
|
||||
|
||||
implementation
|
||||
|
||||
function GetCompiledTargetOS: string;
|
||||
begin
|
||||
Result:=lowerCase({$I %FPCTARGETOS%});
|
||||
end;
|
||||
|
||||
function GetCompiledTargetCPU: string;
|
||||
begin
|
||||
Result:=lowerCase({$I %FPCTARGETCPU%});
|
||||
end;
|
||||
|
||||
function StrToWord(const s: string): word;
|
||||
var
|
||||
i: Integer;
|
||||
|
@ -31,8 +31,6 @@ uses
|
||||
LCLIntf, LazConf, InterfaceBase, LCLPlatformDef, Clipbrd, LCLVersion,
|
||||
// LazUtils
|
||||
FPCAdds, LazFileUtils,
|
||||
// Codetools
|
||||
DefineTemplates,
|
||||
// IDE
|
||||
LazarusIDEStrConsts, EnvironmentOpts;
|
||||
|
||||
|
@ -51,11 +51,11 @@ uses
|
||||
LCLProc, Forms, Controls, LCLType, StdCtrls, ExtCtrls, Buttons, Dialogs,
|
||||
LCLPlatformDef, CheckLst, Menus, ComCtrls,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazFileCache,
|
||||
// LazControls
|
||||
DividerBevel,
|
||||
FPCAdds, FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazFileCache,
|
||||
// Codetools
|
||||
CodeToolManager, DefineTemplates,
|
||||
// LazControls
|
||||
DividerBevel,
|
||||
// IDEIntf
|
||||
IdeIntfStrConsts, LazIDEIntf, IDEMsgIntf, IDEHelpIntf, IDEImagesIntf, IDEWindowIntf,
|
||||
PackageIntf, IDEExternToolIntf, IDEDialogs, IDEUtils,
|
||||
@ -733,9 +733,9 @@ begin
|
||||
CodeToolBoss.CompilerDefinesCache.ConfigCaches.GetDefaultCompilerTarget(
|
||||
EnvironmentOptions.GetParsedCompilerFilename,'',fCompilerTargetOS,fCompilerTargetCPU);
|
||||
if fCompilerTargetOS='' then
|
||||
fCompilerTargetOS:=GetCompiledTargetOS;
|
||||
fCompilerTargetOS:=FPCAdds.GetCompiledTargetOS;
|
||||
if fCompilerTargetCPU='' then
|
||||
fCompilerTargetCPU:=GetCompiledTargetCPU;
|
||||
fCompilerTargetCPU:=FPCAdds.GetCompiledTargetCPU;
|
||||
fTargetOS:=fProfile.FPCTargetOS;
|
||||
fTargetCPU:=fProfile.FPCTargetCPU;
|
||||
TargetLCLPlatform:=LCLPlatformDirNames[fProfile.TargetPlatform];
|
||||
@ -758,14 +758,14 @@ begin
|
||||
// no user defined target directory
|
||||
// => find it automatically
|
||||
IsCrossCompiling:=false;
|
||||
if (CompareText(fTargetOS,GetCompiledTargetOS)<>0)
|
||||
or (CompareText(fTargetCPU,GetCompiledTargetCPU)<>0) then
|
||||
if (CompareText(fTargetOS,FPCAdds.GetCompiledTargetOS)<>0)
|
||||
or (CompareText(fTargetCPU,FPCAdds.GetCompiledTargetCPU)<>0) then
|
||||
begin
|
||||
IsCrossCompiling:=true;
|
||||
if IfPairIs(fTargetCPU,GetCompiledTargetCPU,'i386','x86_64') then
|
||||
if IfPairIs(fTargetCPU,FPCAdds.GetCompiledTargetCPU,'i386','x86_64') then
|
||||
begin
|
||||
if (fTargetOS=GetCompiledTargetOS)
|
||||
or IfPairIs(fTargetOS,GetCompiledTargetOS,'win32','win64') then
|
||||
if (fTargetOS=FPCAdds.GetCompiledTargetOS)
|
||||
or IfPairIs(fTargetOS,FPCAdds.GetCompiledTargetOS,'win32','win64') then
|
||||
IsCrossCompiling:=false; // a 32 or 64bit IDE is more a flavor than cross compiling
|
||||
end;
|
||||
end;
|
||||
|
@ -42,8 +42,8 @@ uses
|
||||
ExprEval, BasicCodeTools, CodeToolManager, DefineTemplates, CodeCache,
|
||||
FileProcs, CodeToolsCfgScript, LinkScanner,
|
||||
// LazUtils
|
||||
LConvEncoding, FileUtil, LazFileUtils, LazFileCache, LazUTF8, Laz2_XMLCfg,
|
||||
LazUtilities, LazStringUtils, LazMethodList,
|
||||
FPCAdds, LConvEncoding, FileUtil, LazFileUtils, LazFileCache, LazUTF8,
|
||||
Laz2_XMLCfg, LazUtilities, LazStringUtils, LazMethodList,
|
||||
// BuildIntf
|
||||
BaseIDEIntf, IDEOptionsIntf, ProjectIntf, MacroIntf, PublishModuleIntf,
|
||||
IDEExternToolIntf, CompOptsIntf, MacroDefIntf,
|
||||
@ -292,6 +292,11 @@ begin
|
||||
Result:=CompareIdentifierPtrs(Pointer(UnitName),Pointer(UnitFile^.FileUnitName));
|
||||
end;
|
||||
|
||||
procedure OnCompilerParseStampIncreased;
|
||||
begin
|
||||
CodeToolBoss.DefineTree.ClearCache;
|
||||
end;
|
||||
|
||||
{ TBuildManager }
|
||||
|
||||
procedure TBuildManager.OnProjectDestroy(Sender: TObject);
|
||||
|
@ -40,11 +40,11 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, contnrs, strutils,
|
||||
// LazUtils
|
||||
LazUTF8, LazFileUtils, LazUtilities, LazLoggerBase,
|
||||
// LCL
|
||||
Forms, Controls,
|
||||
FPCAdds, LazUTF8, LazFileUtils, LazUtilities, LazLoggerBase,
|
||||
// Codetools
|
||||
DefineTemplates, LinkScanner, CodeToolManager, TransferMacros,
|
||||
// LCL
|
||||
Forms, Controls,
|
||||
// BuildIntf
|
||||
IDEExternToolIntf,
|
||||
// IdeIntf
|
||||
@ -324,10 +324,10 @@ begin
|
||||
if AProject.BuildModes.Count>1 then
|
||||
Title+=Format(lisMode, [AProject.ActiveBuildMode.Identifier]);
|
||||
TargetOS:=AProject.CompilerOptions.GetEffectiveTargetOS;
|
||||
if TargetOS<>GetCompiledTargetOS then
|
||||
if TargetOS<>FPCAdds.GetCompiledTargetOS then
|
||||
Title+=Format(lisOS, [TargetOS]);
|
||||
TargetCPU:=AProject.CompilerOptions.GetEffectiveTargetCPU;
|
||||
if TargetCPU<>GetCompiledTargetCPU then
|
||||
if TargetCPU<>FPCAdds.GetCompiledTargetCPU then
|
||||
Title+=Format(lisCPU, [TargetCPU]);
|
||||
TargetFilename:=AProject.CompilerOptions.CreateTargetFilename;
|
||||
if TargetFilename<>'' then
|
||||
|
@ -291,6 +291,7 @@ var
|
||||
Options: TBaseCompilerOptions absolute AOptions;
|
||||
Syy: TCompileReasons;
|
||||
IsProj: Boolean;
|
||||
CompFiles: TStringList;
|
||||
begin
|
||||
IsProj := Options is TProjectCompilerOptions;
|
||||
chkCreateMakefile.Checked := Options.CreateMakefileOnBuild;
|
||||
@ -313,12 +314,21 @@ begin
|
||||
ReadSettingsParsers(Options.ExecuteBefore,ExecBeforeParsersCheckListBox);
|
||||
|
||||
// compiler path
|
||||
with cobCompiler do begin
|
||||
Items.BeginUpdate;
|
||||
Items.Assign(EnvironmentOptions.CompilerFileHistory);
|
||||
AddFilenameToList(Items,DefaultCompilerPath);
|
||||
SetComboBoxText(cobCompiler,Options.CompilerPath,cstFilename);
|
||||
Items.EndUpdate;
|
||||
CompFiles:=TStringList.Create;
|
||||
try
|
||||
CompFiles.Assign(EnvironmentOptions.CompilerFileHistory);
|
||||
if CompFiles.Count=0 then
|
||||
GetDefaultCompilerFilenames(CompFiles);
|
||||
|
||||
with cobCompiler do begin
|
||||
Items.BeginUpdate;
|
||||
Items.Assign(CompFiles);
|
||||
AddFilenameToList(Items,DefaultCompilerPath);
|
||||
SetComboBoxText(cobCompiler,Options.CompilerPath,cstFilename);
|
||||
Items.EndUpdate;
|
||||
end;
|
||||
finally
|
||||
CompFiles.Free;
|
||||
end;
|
||||
if Options is TProjectCompilerOptions then
|
||||
with TProjectCompilerOptions(Options) do
|
||||
|
@ -360,6 +360,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFilesOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
CompFiles: TStringList;
|
||||
begin
|
||||
with AOptions as TEnvironmentOptions do
|
||||
begin
|
||||
@ -373,15 +375,25 @@ begin
|
||||
// compiler filename
|
||||
FOldCompilerFilename:=CompilerFilename;
|
||||
FOldRealCompilerFilename:=GetParsedCompilerFilename;
|
||||
with CompilerPathComboBox do
|
||||
begin
|
||||
Items.BeginUpdate;
|
||||
Items.Assign(CompilerFileHistory);
|
||||
AddFilenameToList(Items,FindDefaultCompilerPath);
|
||||
AddFilenameToList(Items,FindDefaultExecutablePath('fpc'+GetExecutableExt));
|
||||
Items.EndUpdate;
|
||||
|
||||
CompFiles:=TStringList.Create;
|
||||
try
|
||||
CompFiles.Assign(CompilerFileHistory);
|
||||
if CompFiles.Count=0 then
|
||||
GetDefaultCompilerFilenames(CompFiles);
|
||||
|
||||
with CompilerPathComboBox do
|
||||
begin
|
||||
Items.BeginUpdate;
|
||||
Items.Assign(CompFiles);
|
||||
AddFilenameToList(Items,FindDefaultCompilerPath);
|
||||
AddFilenameToList(Items,FindDefaultExecutablePath('fpc'+GetExecutableExt));
|
||||
Items.EndUpdate;
|
||||
end;
|
||||
SetComboBoxText(CompilerPathComboBox,CompilerFilename,cstFilename,MaxComboBoxCount);
|
||||
finally
|
||||
CompFiles.Free;
|
||||
end;
|
||||
SetComboBoxText(CompilerPathComboBox,CompilerFilename,cstFilename,MaxComboBoxCount);
|
||||
|
||||
// FPC src dir
|
||||
FOldFPCSourceDir:=FPCSourceDirectory;
|
||||
|
@ -36,7 +36,7 @@ uses
|
||||
// CodeTools
|
||||
DefineTemplates, CodeToolManager, FileProcs,
|
||||
// LazUtils
|
||||
LazFileUtils, LazUTF8,
|
||||
FPCAdds, LazFileUtils, LazUTF8,
|
||||
// Other
|
||||
IDEWindowIntf, LazIDEIntf, BaseBuildManager,
|
||||
Project, EnvironmentOpts, LazarusIDEStrConsts, AboutFrm, TransferMacros;
|
||||
|
@ -30,7 +30,7 @@ unit IDEInfoDlg;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LazFileUtils, LazUTF8,
|
||||
Classes, SysUtils, LazFileUtils, LazUTF8, FPCAdds,
|
||||
CodeToolManager, DefineTemplates, LinkScanner,
|
||||
Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,
|
||||
LCLProc, ButtonPanel, LazHelpHTML, LazHelpIntf,
|
||||
@ -243,7 +243,7 @@ begin
|
||||
sl.Add('Lazarus version: '+GetLazarusVersionString);
|
||||
sl.Add('Lazarus revision: '+LazarusRevisionStr);
|
||||
sl.Add('Lazarus build date: '+{$I %date%});
|
||||
sl.Add('Lazarus was compiled for '+GetCompiledTargetCPU+'-'+GetCompiledTargetOS);
|
||||
sl.Add('Lazarus was compiled for '+FPCAdds.GetCompiledTargetCPU+'-'+FPCAdds.GetCompiledTargetOS);
|
||||
sl.Add('Lazarus was compiled with FPC '+{$I %FPCVERSION%});
|
||||
sl.Add('');
|
||||
end;
|
||||
|
@ -47,7 +47,7 @@ uses
|
||||
// CodeTools
|
||||
FileProcs, CodeToolManager, DefineTemplates,
|
||||
// LazUtils
|
||||
FileUtil, LazUTF8, LazFileUtils, LazFileCache, LazLoggerBase,
|
||||
FPCAdds, FileUtil, LazUTF8, LazFileUtils, LazFileCache, LazLoggerBase,
|
||||
// IdeIntf
|
||||
IdeIntfStrConsts, MacroDefIntf, IDEDialogs, IDEImagesIntf, IDEUtils,
|
||||
// DebuggerIntf
|
||||
|
@ -105,6 +105,8 @@ function CheckFPCExeQuality(AFilename: string; out Note: string;
|
||||
function SearchFPCExeCandidates(StopIfFits: boolean;
|
||||
const TestSrcFilename: string): TSDFileInfoList;
|
||||
procedure SetupFPCExeFilename;
|
||||
function FindDefaultCompilerPath: string; // full path of GetDefaultCompilerFilename
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings); // list of standard paths of compiler on various distributions
|
||||
|
||||
// Pas2js compiler
|
||||
function CheckPas2jsQuality(AFilename: string; out Note: string;
|
||||
@ -581,6 +583,53 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function FindDefaultCompilerPath: string;
|
||||
var
|
||||
FileNames: TStringList;
|
||||
i: Integer;
|
||||
begin
|
||||
{$IFDEF MSWindows}
|
||||
Result := SearchFileInPath(GetDefaultCompilerFilename,
|
||||
format('%sfpc\%s\bin\%s',
|
||||
[AppendPathDelim(ProgramDirectory), DefaultFPCVersion, DefaultFPCTarget]),
|
||||
GetEnvironmentVariableUTF8('PATH'),';',
|
||||
[]);
|
||||
if Result <> '' then exit;
|
||||
Result := DefaultDrive + AppendPathDelim(ProgramDirectory) +
|
||||
format('fpc\%s\bin\%s\%s',
|
||||
[DefaultFPCVersion, DefaultFPCTarget, GetDefaultCompilerFilename]);
|
||||
{$ELSE}
|
||||
Result:=FindDefaultExecutablePath(GetDefaultCompilerFilename);
|
||||
{$ENDIF}
|
||||
if FileExistsUTF8(Result) then exit;
|
||||
|
||||
FileNames := TStringList.Create;
|
||||
GetDefaultCompilerFilenames(FileNames);
|
||||
try
|
||||
for i := 0 to FileNames.Count -1 do begin
|
||||
Result := FileNames[i];
|
||||
if FileExistsUTF8(Result) then exit;
|
||||
end;
|
||||
finally
|
||||
FileNames.Free;
|
||||
end;
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings);
|
||||
begin
|
||||
{$IFDEF MSWindows}
|
||||
List.Add(DefaultDrive + format('\fpc\%s\bin\%s\%s',
|
||||
[DefaultFPCVersion, DefaultFPCTarget, GetDefaultCompilerFilename]));
|
||||
List.Add(AppendPathDelim(ProgramDirectory) + format('fpc\%s\bin\%s\%s',
|
||||
[DefaultFPCVersion, DefaultFPCTarget, GetDefaultCompilerFilename]));
|
||||
{$ELSE}
|
||||
AddFilenameToList(List,'/usr/local/bin/'+GetDefaultCompilerFilename);
|
||||
AddFilenameToList(List,'/usr/bin/'+GetDefaultCompilerFilename);
|
||||
AddFilenameToList(List,'/opt/fpc/'+GetDefaultCompilerFilename);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function ValueOfKey(const aLine, aKey: string; var aValue: string): boolean;
|
||||
// If aKey is found in aLine, separate a quoted number following "aKey =",
|
||||
// save it to aValue and return True. Return False if aKey is not found.
|
||||
|
@ -902,8 +902,6 @@ begin
|
||||
CompilerFilename:=TrimFilename(FXMLCfg.GetValue(
|
||||
Path+'CompilerFilename/Value',CompilerFilename));
|
||||
LoadRecentList(FXMLCfg,FCompilerFileHistory,Path+'CompilerFilename/History/',rltFile);
|
||||
if FCompilerFileHistory.Count=0 then
|
||||
GetDefaultCompilerFilenames(FCompilerFileHistory);
|
||||
FPCSourceDirectory:=FXMLCfg.GetValue(Path+'FPCSourceDirectory/Value',FPCSourceDirectory);
|
||||
LoadRecentList(FXMLCfg,FFPCSourceDirHistory,Path+'FPCSourceDirectory/History/',rltFile);
|
||||
MakeFilename:=TrimFilename(FXMLCfg.GetValue(Path+'MakeFilename/Value',MakeFilename));
|
||||
|
@ -81,6 +81,9 @@ Files in this package are for the main configuration of the IDE."/>
|
||||
</Item>
|
||||
</Files>
|
||||
<RequiredPkgs>
|
||||
<Item>
|
||||
<PackageName Value="CodeTools"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="DebuggerIntf"/>
|
||||
</Item>
|
||||
@ -90,9 +93,6 @@ Files in this package are for the main configuration of the IDE."/>
|
||||
<Item>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="CodeTools"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item>
|
||||
|
@ -61,14 +61,6 @@ var
|
||||
PrimaryConfigPath,
|
||||
SecondaryConfigPath: string;
|
||||
|
||||
{---------------------------------------------------------------------------
|
||||
function FindDefaultCompilerPath: string;
|
||||
---------------------------------------------------------------------------}
|
||||
function FindDefaultCompilerPath: string;
|
||||
begin
|
||||
Result:=FindDefaultExecutablePath(GetDefaultCompilerFilename);
|
||||
end;
|
||||
|
||||
{---------------------------------------------------------------------------
|
||||
function FindDefaultMakePath: string;
|
||||
---------------------------------------------------------------------------}
|
||||
@ -96,13 +88,6 @@ begin
|
||||
Result:='~/tmp/';
|
||||
end;
|
||||
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings);
|
||||
begin
|
||||
AddFilenameToList(List,'/usr/local/bin/'+GetDefaultCompilerFilename);
|
||||
AddFilenameToList(List,'/usr/bin/'+GetDefaultCompilerFilename);
|
||||
AddFilenameToList(List,'/opt/fpc/'+GetDefaultCompilerFilename);
|
||||
end;
|
||||
|
||||
procedure GetDefaultMakeFilenames(List: TStrings);
|
||||
begin
|
||||
AddFilenameToList(List,'/usr/bin/make');
|
||||
|
@ -61,21 +61,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function FindDefaultCompilerPath: string;
|
||||
begin
|
||||
Result := SearchFileInPath(GetDefaultCompilerFilename,
|
||||
format('%sfpc\%s\bin\%s',
|
||||
[AppendPathDelim(ProgramDirectory), DefaultFPCVersion, DefaultFPCTarget]),
|
||||
GetEnvironmentVariableUTF8('PATH'),';',
|
||||
[]);
|
||||
if Result <> '' then exit;
|
||||
Result := DefaultDrive + AppendPathDelim(ProgramDirectory) +
|
||||
format('fpc\%s\bin\%s\%s',
|
||||
[DefaultFPCVersion, DefaultFPCTarget, GetDefaultCompilerFilename]);
|
||||
if FileExistsUTF8(Result) then exit;
|
||||
Result := FindExecutableInList(@GetDefaultCompilerFilenames);
|
||||
end;
|
||||
|
||||
function FindDefaultMakePath: string;
|
||||
begin
|
||||
Result := SearchFileInPath('make.exe',
|
||||
@ -106,14 +91,6 @@ begin
|
||||
Result := DefaultDrive + '\windows\temp\';
|
||||
end;
|
||||
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings);
|
||||
begin
|
||||
List.Add(DefaultDrive + format('\fpc\%s\bin\%s\%s',
|
||||
[DefaultFPCVersion, DefaultFPCTarget, GetDefaultCompilerFilename]));
|
||||
List.Add(AppendPathDelim(ProgramDirectory) + format('fpc\%s\bin\%s\%s',
|
||||
[DefaultFPCVersion, DefaultFPCTarget, GetDefaultCompilerFilename]));
|
||||
end;
|
||||
|
||||
procedure GetDefaultMakeFilenames(List: TStrings);
|
||||
begin
|
||||
List.Add(DefaultDrive + format('\fpc\%s\bin\%s\make.exe',
|
||||
|
@ -48,9 +48,7 @@ interface
|
||||
uses
|
||||
SysUtils, Classes,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazUtilities,
|
||||
// Codetools
|
||||
DefineTemplates;
|
||||
FPCAdds, FileUtil, LazFileUtils, LazUTF8, LazLoggerBase, LazUtilities;
|
||||
|
||||
const
|
||||
LazarusVersionStr = {$I version.inc};
|
||||
@ -81,8 +79,6 @@ procedure GetDefaultTestBuildDirs(List: TStrings);
|
||||
function CreateCompilerTestPascalFilename: string;
|
||||
|
||||
function FindDefaultExecutablePath(const Executable: string): string;
|
||||
procedure GetDefaultCompilerFilenames(List: TStrings); // list of standard paths of compiler on various distributions
|
||||
function FindDefaultCompilerPath: string; // full path of GetDefaultCompilerFilename
|
||||
function FindDefaultMakePath: string; // full path of "make"
|
||||
procedure GetDefaultMakeFilenames(List: TStrings); // list of standard paths of "make" on various distributions
|
||||
function GetDefaultFPCSrcDirectories: TStringList;
|
||||
@ -392,11 +388,17 @@ begin
|
||||
TargetOS:=LowerCase(TargetOS);
|
||||
Result:='';
|
||||
case TargetOS of
|
||||
'browser','nodejs','electron','module': exit('');
|
||||
'linux',
|
||||
'freebsd',
|
||||
'netbsd',
|
||||
'openbsd',
|
||||
'dragonfly',
|
||||
'darwin',
|
||||
'ios',
|
||||
'solaris',
|
||||
'haiku',
|
||||
'android': Result:='lib';
|
||||
end;
|
||||
SrcOS:=GetDefaultSrcOSForTargetOS(TargetOS);
|
||||
if CompareText(SrcOS, 'unix') = 0 then
|
||||
Result:='lib';
|
||||
end;
|
||||
|
||||
function MakeStandardLibFilename(TargetOS, Filename: string): string;
|
||||
|
Loading…
Reference in New Issue
Block a user