fixed FileMask for FPCSrc scan

git-svn-id: trunk@5600 -
This commit is contained in:
mattias 2004-06-25 00:30:16 +00:00
parent 37b0e23d7b
commit 269377f97f
3 changed files with 27 additions and 7 deletions

View File

@ -2997,11 +2997,15 @@ var
if ADirPath='' then exit;
if not (ADirPath[length(ADirPath)]=PathDelim) then
ADirPath:=ADirPath+PathDelim;
if FindFirst(ADirPath+'*.*',faAnyFile,FileInfo)=0 then begin
if FindFirst(ADirPath+FileMask,faAnyFile,FileInfo)=0 then begin
repeat
AFilename:=FileInfo.Name;
if (AFilename='.') or (AFilename='..') then continue;
writeln('Browse Filename=',AFilename,' IsDir=',(FileInfo.Attr and faDirectory)>0);
i:=High(IgnoreDirs);
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;
AFilename:=ADirPath+AFilename;
if (FileInfo.Attr and faDirectory)>0 then begin
@ -3169,7 +3173,7 @@ var
SrcPathMacro: String;
begin
{$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}
Result:=nil;
if (FPCSrcDir='') or (not DirPathExists(FPCSrcDir)) then exit;

View File

@ -44,6 +44,11 @@ type
const
SpecialChar = '#'; // used to use PathDelim, e.g. #\
{$IFDEF win32}
FileMask = '*.*';
{$ELSE}
FileMask = '*';
{$ENDIF}
{$ifdef win32}
{$define CaseInsensitiveFilenames}
{$endif}

View File

@ -8544,7 +8544,8 @@ begin
CurOptions:='-T'+Project1.CompilerOptions.TargetOS
else
CurOptions:='';
{writeln('TMainIDE.RescanCompilerDefines A ',CurOptions,
{$IFDEF VerboseFPCSrcScan}
writeln('TMainIDE.RescanCompilerDefines A ',CurOptions,
' OnlyIfCompilerChanged=',OnlyIfCompilerChanged,
' Valid=',InputHistories.FPCConfigCache.Valid(true),
' ID=',InputHistories.FPCConfigCache.FindItem(CurOptions),
@ -8552,14 +8553,17 @@ begin
' EnvCompilerFilename=',EnvironmentOptions.CompilerFilename,
' CurDefinesCompilerOptions="',CurDefinesCompilerOptions,'"',
' CurOptions="',CurOptions,'"',
'');}
'');
{$ENDIF}
// rescan compiler defines
// ask the compiler for its settings
if OnlyIfCompilerChanged
and (CurDefinesCompilerFilename=EnvironmentOptions.CompilerFilename)
and (CurDefinesCompilerOptions=CurOptions) then
exit;
//writeln('TMainIDE.RescanCompilerDefines B rebuilding FPC templates');
{$IFDEF VerboseFPCSrcScan}
writeln('TMainIDE.RescanCompilerDefines B rebuilding FPC templates');
{$ENDIF}
CompilerTemplate:=CodeToolBoss.DefinePool.CreateFPCTemplate(
EnvironmentOptions.CompilerFilename,CurOptions,
CreateCompilerTestPascalFilename,CompilerUnitSearchPath,
@ -8583,7 +8587,9 @@ begin
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
CompilerUnitLinks:='';
@ -8595,7 +8601,9 @@ begin
CodeToolBoss.GetCompiledSrcExtForDirectory(''),
TargetOS,TargetProcessor,
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
CodeToolBoss.DefineTree.RemoveRootDefineTemplateByName(
FPCSrcTemplate.Name);
@ -10437,6 +10445,9 @@ end.
{ =============================================================================
$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
added check for form name not a unit name