So I'm developing a graphic library providing a custom SVG image format which may be used within a TPicture, or any VCL component supporting a graphic image, like e.g a TImage. I wrote and maintain my library package since the XE7 compiler version, and my code is backward compatible until the XE2 version.
In order to declare my custom graphic format to the IDE, I call the following code from the initialization section of my graphic class
Vcl.Graphics.TPicture.RegisterFileFormat('svg', 'Scalable Vector Graphics', TWSVGGraphic);
However this seems to no longer works since the last RAD Studio 10.3.3 Rio version. I already faced a similar issue in the past, for which I could find a solution: Delphi - How to correctly register a graphic class since XE8?
So, apparently Embarcadero changed the rules since the 10.3.3 Rio version. Once again. My graphic class is no longer registered correctly since this version. Sometimes it is, sometimes it isn't. For example, when I open my IDE for the first time, it isn't. When I try to debug my package in design time, it is. When I try to run a project, sometimes it is, sometimes it isn't.
Has someone faced a similar issue? Are the rules about the initialization section changed in the most recent compiler versions? Finally, what the hell is wrong with my code?
Or perhaps I still not understand how to correctly register a graphic class in Delphi, even after so many years. In this case, I would be very grateful if someone may explain me how to correctly register a graphic class, in order to never more facing a such issue in the future.