[Lazarus] Resources without RC files

Ondrej Pokorny lazarus at kluug.net
Thu May 4 09:09:04 CEST 2023


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.

I will raise the question in the FPC mailing list.

Ondrej



More information about the lazarus mailing list