mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 18:49:19 +02:00
fixed FileMask for FPCSrc scan
git-svn-id: trunk@5600 -
This commit is contained in:
parent
37b0e23d7b
commit
269377f97f
@ -2997,11 +2997,15 @@ var
|
|||||||
if ADirPath='' then exit;
|
if ADirPath='' then exit;
|
||||||
if not (ADirPath[length(ADirPath)]=PathDelim) then
|
if not (ADirPath[length(ADirPath)]=PathDelim) then
|
||||||
ADirPath:=ADirPath+PathDelim;
|
ADirPath:=ADirPath+PathDelim;
|
||||||
if FindFirst(ADirPath+'*.*',faAnyFile,FileInfo)=0 then begin
|
if FindFirst(ADirPath+FileMask,faAnyFile,FileInfo)=0 then begin
|
||||||
repeat
|
repeat
|
||||||
AFilename:=FileInfo.Name;
|
AFilename:=FileInfo.Name;
|
||||||
|
if (AFilename='.') or (AFilename='..') then continue;
|
||||||
|
writeln('Browse Filename=',AFilename,' IsDir=',(FileInfo.Attr and faDirectory)>0);
|
||||||
i:=High(IgnoreDirs);
|
i:=High(IgnoreDirs);
|
||||||
while (i>=Low(IgnoreDirs)) and (AFilename<>IgnoreDirs[i]) do dec(i);
|
while (i>=Low(IgnoreDirs)) and (AFilename<>IgnoreDirs[i]) do dec(i);
|
||||||
|
if CompareText(AFilename,'fcl')=0 then
|
||||||
|
writeln('Browse ',AFilename,' IsDir=',(FileInfo.Attr and faDirectory)>0,' Ignore=',i>=Low(IgnoreDirs));
|
||||||
if i>=Low(IgnoreDirs) then continue;
|
if i>=Low(IgnoreDirs) then continue;
|
||||||
AFilename:=ADirPath+AFilename;
|
AFilename:=ADirPath+AFilename;
|
||||||
if (FileInfo.Attr and faDirectory)>0 then begin
|
if (FileInfo.Attr and faDirectory)>0 then begin
|
||||||
@ -3169,7 +3173,7 @@ var
|
|||||||
SrcPathMacro: String;
|
SrcPathMacro: String;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseFPCSrcScan}
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
DebugLn('CreateFPCSrcTemplate ',FPCSrcDir,': length(UnitSearchPath)=',length(UnitSearchPath),' Valid=',UnitLinkListValid,' PPUExt=',PPUExt);
|
DebugLn('CreateFPCSrcTemplate ',FPCSrcDir,': length(UnitSearchPath)=',DbgS(length(UnitSearchPath)),' Valid=',DbgS(UnitLinkListValid),' PPUExt=',PPUExt);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
if (FPCSrcDir='') or (not DirPathExists(FPCSrcDir)) then exit;
|
if (FPCSrcDir='') or (not DirPathExists(FPCSrcDir)) then exit;
|
||||||
|
@ -44,6 +44,11 @@ type
|
|||||||
|
|
||||||
const
|
const
|
||||||
SpecialChar = '#'; // used to use PathDelim, e.g. #\
|
SpecialChar = '#'; // used to use PathDelim, e.g. #\
|
||||||
|
{$IFDEF win32}
|
||||||
|
FileMask = '*.*';
|
||||||
|
{$ELSE}
|
||||||
|
FileMask = '*';
|
||||||
|
{$ENDIF}
|
||||||
{$ifdef win32}
|
{$ifdef win32}
|
||||||
{$define CaseInsensitiveFilenames}
|
{$define CaseInsensitiveFilenames}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
21
ide/main.pp
21
ide/main.pp
@ -8544,7 +8544,8 @@ begin
|
|||||||
CurOptions:='-T'+Project1.CompilerOptions.TargetOS
|
CurOptions:='-T'+Project1.CompilerOptions.TargetOS
|
||||||
else
|
else
|
||||||
CurOptions:='';
|
CurOptions:='';
|
||||||
{writeln('TMainIDE.RescanCompilerDefines A ',CurOptions,
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('TMainIDE.RescanCompilerDefines A ',CurOptions,
|
||||||
' OnlyIfCompilerChanged=',OnlyIfCompilerChanged,
|
' OnlyIfCompilerChanged=',OnlyIfCompilerChanged,
|
||||||
' Valid=',InputHistories.FPCConfigCache.Valid(true),
|
' Valid=',InputHistories.FPCConfigCache.Valid(true),
|
||||||
' ID=',InputHistories.FPCConfigCache.FindItem(CurOptions),
|
' ID=',InputHistories.FPCConfigCache.FindItem(CurOptions),
|
||||||
@ -8552,14 +8553,17 @@ begin
|
|||||||
' EnvCompilerFilename=',EnvironmentOptions.CompilerFilename,
|
' EnvCompilerFilename=',EnvironmentOptions.CompilerFilename,
|
||||||
' CurDefinesCompilerOptions="',CurDefinesCompilerOptions,'"',
|
' CurDefinesCompilerOptions="',CurDefinesCompilerOptions,'"',
|
||||||
' CurOptions="',CurOptions,'"',
|
' CurOptions="',CurOptions,'"',
|
||||||
'');}
|
'');
|
||||||
|
{$ENDIF}
|
||||||
// rescan compiler defines
|
// rescan compiler defines
|
||||||
// ask the compiler for its settings
|
// ask the compiler for its settings
|
||||||
if OnlyIfCompilerChanged
|
if OnlyIfCompilerChanged
|
||||||
and (CurDefinesCompilerFilename=EnvironmentOptions.CompilerFilename)
|
and (CurDefinesCompilerFilename=EnvironmentOptions.CompilerFilename)
|
||||||
and (CurDefinesCompilerOptions=CurOptions) then
|
and (CurDefinesCompilerOptions=CurOptions) then
|
||||||
exit;
|
exit;
|
||||||
//writeln('TMainIDE.RescanCompilerDefines B rebuilding FPC templates');
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('TMainIDE.RescanCompilerDefines B rebuilding FPC templates');
|
||||||
|
{$ENDIF}
|
||||||
CompilerTemplate:=CodeToolBoss.DefinePool.CreateFPCTemplate(
|
CompilerTemplate:=CodeToolBoss.DefinePool.CreateFPCTemplate(
|
||||||
EnvironmentOptions.CompilerFilename,CurOptions,
|
EnvironmentOptions.CompilerFilename,CurOptions,
|
||||||
CreateCompilerTestPascalFilename,CompilerUnitSearchPath,
|
CreateCompilerTestPascalFilename,CompilerUnitSearchPath,
|
||||||
@ -8583,7 +8587,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//writeln('TMainIDE.RescanCompilerDefines B rescanning FPC sources UnitLinksValid=',UnitLinksValid);
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('TMainIDE.RescanCompilerDefines B rescanning FPC sources UnitLinksValid=',UnitLinksValid);
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
// create compiler macros to simulate the Makefiles of the FPC sources
|
// create compiler macros to simulate the Makefiles of the FPC sources
|
||||||
CompilerUnitLinks:='';
|
CompilerUnitLinks:='';
|
||||||
@ -8595,7 +8601,9 @@ begin
|
|||||||
CodeToolBoss.GetCompiledSrcExtForDirectory(''),
|
CodeToolBoss.GetCompiledSrcExtForDirectory(''),
|
||||||
TargetOS,TargetProcessor,
|
TargetOS,TargetProcessor,
|
||||||
UnitLinksValid, CompilerUnitLinks, CodeToolsOpts);
|
UnitLinksValid, CompilerUnitLinks, CodeToolsOpts);
|
||||||
//writeln('TMainIDE.RescanCompilerDefines C UnitLinks=',copy(CompilerUnitLinks,1,100));
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
|
writeln('TMainIDE.RescanCompilerDefines C UnitLinks=',copy(CompilerUnitLinks,1,100));
|
||||||
|
{$ENDIF}
|
||||||
if FPCSrcTemplate<>nil then begin
|
if FPCSrcTemplate<>nil then begin
|
||||||
CodeToolBoss.DefineTree.RemoveRootDefineTemplateByName(
|
CodeToolBoss.DefineTree.RemoveRootDefineTemplateByName(
|
||||||
FPCSrcTemplate.Name);
|
FPCSrcTemplate.Name);
|
||||||
@ -10437,6 +10445,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.731 2004/06/25 00:30:15 mattias
|
||||||
|
fixed FileMask for FPCSrc scan
|
||||||
|
|
||||||
Revision 1.730 2004/06/19 10:06:26 mattias
|
Revision 1.730 2004/06/19 10:06:26 mattias
|
||||||
added check for form name not a unit name
|
added check for form name not a unit name
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user