-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Descrição do bug/problema
Os erros, apresentam-se nos seguintes locais:
Erro "a)" no arquivo SynCommons.pas:
function GetDelphiCompilerVersion: RawUTF8;
begin
result :=
{$ifdef FPC}
'Free Pascal'
{$ifdef VER2_6_4}+' 2.6.4'{$endif}
{$ifdef VER3_0_0}+' 3.0.0'{$endif}
{$ifdef VER3_0_1}+' 3.0.1'{$endif}
{$ifdef VER3_0_2}+' 3.0.2'{$endif}
{$ifdef VER3_1_1}+' 3.1.1'{$endif}
{$ifdef VER3_2} +' 3.2' {$endif}
{$ifdef VER3_3_1}+' 3.3.1'{$endif}
{$else}
{$ifdef VER130} 'Delphi 5'{$endif}
{$ifdef CONDITIONALEXPRESSIONS} // Delphi 6 or newer
{$if defined(KYLIX3)}'Kylix 3'
{$elseif defined(VER140)}'Delphi 6'
{$elseif defined(VER150)}'Delphi 7'
{$elseif defined(VER160)}'Delphi 8'
{$elseif defined(VER170)}'Delphi 2005'
{$elseif defined(VER185)}'Delphi 2007'
{$elseif defined(VER180)}'Delphi 2006'
{$elseif defined(VER200)}'Delphi 2009'
{$elseif defined(VER210)}'Delphi 2010'
{$elseif defined(VER220)}'Delphi XE'
{$elseif defined(VER230)}'Delphi XE2'
{$elseif defined(VER240)}'Delphi XE3'
{$elseif defined(VER250)}'Delphi XE4'
{$elseif defined(VER260)}'Delphi XE5'
{$elseif defined(VER265)}'AppMethod 1'
{$elseif defined(VER270)}'Delphi XE6'
{$elseif defined(VER280)}'Delphi XE7'
{$elseif defined(VER290)}'Delphi XE8'
{$elseif defined(VER300)}'Delphi 10 Seattle'
{$elseif defined(VER310)}'Delphi 10.1 Berlin'
{$elseif defined(VER320)}'Delphi 10.2 Tokyo'
{$elseif defined(VER330)}'Delphi 10.3 Rio'
{$elseif defined(VER340)}'Delphi 10.4 Sydney'
{$elseif defined(VER350)}'Delphi 10.5 Next'
{$ifend}
{$endif CONDITIONALEXPRESSIONS}
{$endif FPC}
{$ifdef CPU64} +' 64 bit' {$else} +' 32 bit' {$endif}
end;
A linha 59280 apresentada na mensagem de erro é no "end;" acima;
Erro "b)" no arquivo uRESTDWSynBase.pas:
If (UpperCase(Copy (Cmd, 1, 3)) = 'GET') Then
Begin
vCmd := RemoveBackslashCommands(Ctxt.URL);
{$IFDEF MSWINDOWS}
If vCmd <> '' Then
If vCmd[InitStrPos] = '\' Then
Delete(vCmd, 1, 1);
vCmd := StringReplace(vCmd, '/', '\', [rfReplaceAll]);
{$ENDIF}
sFile := FRootPath + vCmd;
If Pos('?', sFile) > 0 Then
sFile := Copy(sFile, 1, Pos('?', sFile) -1);
If (Pos('.HTML', UpperCase(sFile)) > 0) Then
Begin
sContentType:='text/html';
sCharSet := 'utf-8';
End
Else If (Pos('.PNG', UpperCase(sFile)) > 0) Then
sContentType := 'image/png'
Else If (Pos('.ICO', UpperCase(sFile)) > 0) Then
sContentType := 'image/ico'
Else If (Pos('.GIF', UpperCase(sFile)) > 0) Then
sContentType := 'image/gif'
Else If (Pos('.JPG', UpperCase(sFile)) > 0) Then
sContentType := 'image/jpg'
Else If (Pos('.JS', UpperCase(sFile)) > 0) Then
sContentType := 'application/javascript'
Else If (Pos('.PDF', UpperCase(sFile)) > 0) Then
sContentType := 'application/pdf'
Else If (Pos('.CSS', UpperCase(sFile)) > 0) Then
sContentType:='text/css';
If (vPathTraversalRaiseError) And
(DWFileExists(sFile, FRootPath)) And
(SystemProtectFiles(sFile)) Then
Begin
Try
Ctxt.OutContentType := 'application/json';
Ctxt.OutContent := escape_chars(cEventNotFound);
Result := 404;
Exit;
Finally
DestroyComponents;
End;
End;
If DWFileExists(sFile, FRootPath) then
Begin
Ctxt.OutContentType := GetMIMEType(sFile);
mb := TStringStream.Create('');
Try
{$IFNDEF FPC}
{$if CompilerVersion < 21}
TMemoryStream(mb).LoadFromFile(sFile);
{$ELSE}
mb.LoadFromFile(sFile);
{$IFEND}
{$ELSE}
TMemoryStream(mb).LoadFromFile(sFile);
{$ENDIF}
Ctxt.OutContent := SockString(mb.DataString);
Finally
FreeAndNil(mb);
End;
Exit;
End;
End;
A linha1275 é: sContentType:='text/html';
Passos para reproduzir o problema
- Em Tools/Options/Language/Delphi/Library, incluímos todas as "Library Paths" da versão 1.4.3, conforme instruções de instalação;
- Quando partimos para abrir o projeto "RestEasyObjectCV" e clicar no primeiro item da lista, que é o "RestDatawareCORE.bpl", e clicamos em seguida no botão direito/Install, geraram as seguintes mensagens de erro:
a) [dcc32 Error] SynCommons.pas(59280): E2015 Operator not applicable to this operand type
b) [dcc32 Fatal Error] uRESTDWSynBase.pas(1275): F2063 Could not compile used unit 'SynCommons.pas'
Comportamento esperado
Que o "Install" mostre uma mensagem de "exclamação" (!) informando que tudo deu certo.
Imagens do problema
No response
Versão REST DataWare:
1.4.3 (CORE143 do Gledson Prego, adaptada para Delphi 12.x)
IDE:
Delphi 12.3
Sistema Operacional:
Windows 10
Relator do Problema
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo