* change define WINDOWS to MSWINDOWS so it does not apply to WinCE

git-svn-id: trunk@29290 -
This commit is contained in:
florian 2014-12-14 18:06:29 +00:00
parent f1eb00a450
commit 45d3bc623c

View File

@ -5144,28 +5144,28 @@ end;
procedure TBuildEngine.SysDeleteTree(Const ADirectoryName: String); procedure TBuildEngine.SysDeleteTree(Const ADirectoryName: String);
function IntRemoveTree(const ADirectoryName: String) : boolean; function IntRemoveTree(const ADirectoryName: String) : boolean;
{$ifdef WINDOWS} {$ifdef MSWINDOWS}
{ pulling in shellapi with all it dependent units and packages makes things too { pulling in shellapi with all it dependent units and packages makes things too
complicated so just add the constants here } complicated so just add the constants here }
const const
FO_DELETE = $0003; FO_DELETE = $0003;
FOF_SILENT = $0004; FOF_SILENT = $0004;
FOF_NOCONFIRMATION = $0010; FOF_NOCONFIRMATION = $0010;
{$endif WINDOWS} {$endif MSWINDOWS}
var var
i: integer; i: integer;
{$ifdef WINDOWS} {$ifdef MSWINDOWS}
SHFileOpStruct: TSHFileOpStruct; SHFileOpStruct: TSHFileOpStruct;
DirBuf: array[0..MAX_PATH+1] of TCHAR; DirBuf: array[0..MAX_PATH+1] of TCHAR;
{$else WINDOWS} {$else MSWINDOWS}
searchRec: TSearchRec; searchRec: TSearchRec;
SearchResult: longint; SearchResult: longint;
s: string; s: string;
{$endif WINDOWS} {$endif MSWINDOWS}
begin begin
result := true; result := true;
{$ifdef WINDOWS} {$ifdef MSWINDOWS}
try try
FillChar(SHFileOpStruct, Sizeof(SHFileOpStruct), 0); FillChar(SHFileOpStruct, Sizeof(SHFileOpStruct), 0);
FillChar(DirBuf, Sizeof(DirBuf), 0); FillChar(DirBuf, Sizeof(DirBuf), 0);
@ -5180,7 +5180,7 @@ procedure TBuildEngine.SysDeleteTree(Const ADirectoryName: String);
except except
Result := False; Result := False;
end; end;
{$else WINDOWS} {$else MSWINDOWS}
SearchResult := FindFirst(IncludeTrailingPathDelimiter(ADirectoryName)+AllFilesMask, faAnyFile+faSymLink, searchRec); SearchResult := FindFirst(IncludeTrailingPathDelimiter(ADirectoryName)+AllFilesMask, faAnyFile+faSymLink, searchRec);
try try
while SearchResult=0 do while SearchResult=0 do