When installing Vampyre Imaging in Lazarus (which Castle_base depend on) it breaks the standard Timage component in Lazarus. Am I doing something wrong here?
Is there a way of using Castle_base without Vampyre Imaging?
Failing that is there a work around for using Vampyre Imaging in Lazarus in a way that doesn’t break Timage?
I must be getting old, because it took me a while to recall we actually had exactly this issue in CGE editor and we fixed it by changing Vampyre (the version packaged with CGE). It was done by this commit: Temporarily undefine COMPONENT_SET_LCL in Vampyre, to not break · castle-engine/[email protected] · GitHub
So: I guess your answer to “AD 2” is that you didn’t use Vampyre provided by CGE, you downloaded Vampyre through other means.
The quick solution would be then to remove your Vampyre version, follow our manual Install | Manual | Castle Game Engine , and click “Register Lazarus Packages” mentioned there. This will use proper Vampyre packages, bundled with CGE, and will not break anything in LCL.
TODO: We should of course submit it to upstream ( GitHub - galfar/imaginglib: Object Pascal image loading, saving and manipulation library. ) and have it fixed there. I marked this as “TODO” in Temporarily undefine COMPONENT_SET_LCL in Vampyre, to not break · castle-engine/[email protected] · GitHub but didn’t follow. I also found related Lazarus mailing thread recently ( [Lazarus] Strange issue with TImage and lazarus 2.2.2 ) though by a quick scan, it doesn’t offer a quick solution.
Thanks Michalis, yes this was the problem.
I must have sourced the Vampyre package from another source not knowing that the Vampyre package was located at castle_game_engine\src\vampyre_imaginglib\src\Packages. I have got it working now using the Vampyre package included in the CGE files.
On a side note, I tried to install CGE using the standard install method which uses the CGE editor but I don’t see any Castle packages in Lazarus. Is this expected?
After doing “Register Lazarus Packages” you should see the CGE packages known to Lazarus, e.g. in Lazarus “Packages → Install/Uninstall Packages” you should see
They are not automatically installed, they will be initially just in the “Available for installation” column. So you will not see the “Castle” component palette tab.
And that’s OK – unless you want to use some CGE components with LCL, like TCastleControl, you don’t really need to install CGE packages. You can and should install them only if you want to use TCastleControl, following Use engine inside Lazarus form using TCastleControl | Manual | Castle Game Engine .
Well that is what I expected but they didn’t show in the Install/Uninstall Packages in Lazarus. I have installed them directly from the .pkg files and it seems to be working correctly now.
Thanks for your help on this one.