[Lazarus] Resources without RC files

Michael Van Canneyt michael at freepascal.org
Thu May 4 11:02:56 CEST 2023



On Thu, 4 May 2023, Ondrej Pokorny wrote:

> On 04.05.2023 08:38, Michael Van Canneyt wrote:
>> On Thu, 4 May 2023, Ondrej Pokorny via lazarus wrote:
>>> How is it possible that the LFM files are included directly but *.SQL 
>>> files are parsed as RC files?
>> 
>> Because the file extension is recognized ? LFM is included as RC_DATA, and 
>> probably everything that is not .lfm is assumed to be a RC format.
>> 
>> I believe fpcres also has this check.
>
> Thanks for the tip. I found it - it is directly in the compiler.
>
> In comprsrc.pas TWinLikeResourceFile.IsCompiled there is a logic that defines 
> what the compiler does with the included resource file based on the extension 
> or file header.
>
> I don't like the fact that there are hard-coded constants for what seems to 
> be (for a stranger) arbitrary file extensions and that it is not documented 
> anywhere.

Well, developers that are using lazarus and form files know what happens.

This is undoubtedly the majority of FPC users, so I don't think this is an
issue.

But it should definitely be documented.

Michael.


More information about the lazarus mailing list