[Lazarus] porting delphi project code

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jun 2 14:04:57 CEST 2013


> Juha Manninen <juha.manninen62 at gmail.com> hat am 2. Juni 2013 um 13:32
> geschrieben:
>[...]
> File jvcl.inc is included in most source files. It has tests :
>
> {$IFDEF DELPHI5}
> {$I jvcld5.inc}
> {$DEFINE JVCL_CONFIGURED}
> {$ENDIF DELPIH5}
>
> {$IFDEF DELPHI6}
> {$I jvcld6.inc}
> {$DEFINE JVCL_CONFIGURED}
> {$ENDIF DELPIH6}
>
> ... and so on for every Delphi and C++Builder version.
> Then :
>
> {$IFNDEF JVCL_CONFIGURED}
> {$IFDEF SUPPORTS_COMPILETIME_MESSAGES}
> {$MESSAGE FATAL 'Your Delphi/BCB version is not supported by this
> JVCL version!'}
> {$ELSE}
> 'Your Delphi/BCB version is not supported by this JVCL version!'
> {$ENDIF SUPPORTS_COMPILETIME_MESSAGES}
> {$ENDIF !JVCL_CONFIGURED}
>
> The {$ELSE} part is correctly triggered and throws an exception.
>
> There is no way to convert Jedi libs for Lazarus. The converter only
> should stop as gracefully as possible. I think it is rather good now
> because it clearly tells where the conversion failed and now it
> properly converts every file suggesfully parsed before the error.
>
> Still, this is a PITA for the automatic conversion because it happens
> with most non-trivial projects.

Maybe optionally add a -dDelphi7?


> Sometimes codetools has thrown exceptions because of unusual code
> which is still legal in Delphi. There was the old issue #16061 about a
> strange use of {$IF...
> I have not seen similar things recently, maybe codetools is so good now.

codetools now recognizes the "declared" call, but it simply results to true.

Mattias




More information about the Lazarus mailing list