On 04.05.2023 11:02, Michael Van Canneyt wrote:
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.

It is still confusing - in pas2js any file can be added as a resource with:

{$R abc.xyz}

In FPC only LFM, so hence the question why and how :)

Ondrej

--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to