I would like to upgrade my Delphi version but cannot because my current project depends on older, no longer supported components. Is it possible to move these components to a newer release of Delphi?
-
You effectively ask how to support unsupported components. But that's the point of "no longer". And the most obvious answer should have come to your mind already: adapt/improve the sources. So what kind of answers did you expect?– AmigoJackDec 4, 2022 at 20:42
-
I sort of expected a civil answer AmigoJack– Seti NetDec 20, 2022 at 6:24
1 Answer
The ability to port older components to newer Delphi versions can depend on several things:
Do you have the source code of these components, or only pre-built packages? If it is the latter, I'm afraid you are out of luck. Pre-built packages are limited to the specific compiler version they were built for. But, if you do have full source code, porting to newer Delphi version becomes a viable option.
Do these components heavily rely on libraries that ship with Delphi? If they do, porting to a newer Delphi version might be quite difficult, especially if those libraries have seen significant changes over the years.
Does the source code of these components heavily rely on assembler language or pointer math? If it does, adding support for 64-bit versions will be very difficult due to 64-bit having its own assembler language and different size of pointers.
So, in short, if you have full source code for these components, the answer is YES.
But, is it worth it? That depends on how much code refactoring would be required. Often, authors drop support for older components simply because porting them to newer Delphi versions would require a lot more work than is worth it for them.
-
2If the components are non-visual a 4th option becomes available: in the old Delphi version, compile a DLL which wraps all the access to that component, so you're still able to create instances in any newer Delphi version at runtime using your own DLL. Dec 5, 2022 at 1:25