I have to update a Delphi XE installation for a project to a newer version of Delphi but I don't have much experience with Delphi, the problem is there are plenty of old packages and components in there. When I install a new version did I have to install all components again (if it possible to install it in this new version) or is it something like an update to my old installation and all installed stuff is now in the new version also?
- Start by eliminating the use of 3rd party components.Jens Borrisholt– Jens Borrisholt2015-05-06 08:54:39 +00:00Commented May 6, 2015 at 8:54
- 2@JensBorrisholt Eliminating 3rd party components simply to make upgrading easier is a pretty poor reason to do so.J...– J...2015-05-06 09:04:26 +00:00Commented May 6, 2015 at 9:04
- @J... I can think of 5-6 million other reasons to to soJens Borrisholt– Jens Borrisholt2015-05-06 10:22:43 +00:00Commented May 6, 2015 at 10:22
- 1@JensBorrisholt And I can certainly think of a few reasons not no. As a general rule, it is a good idea to use as few 3rd party components as possible, but also, as a general rule, re-inventing the wheel is often a foolish endeavour. You are making it sound like a one-sided issue - it certainly is not.J...– J...2015-05-06 10:28:04 +00:00Commented May 6, 2015 at 10:28
2 Answers
Updating a Delphi XE application to a newer Delphi is usually quite easy. The only serious issue could be third party components which you must install in the newer Delphi version. Check with each component vendor that a version exists for your target Delphi version.
I always strongly recommand to NOT use any third party component that has no source available. Also don't buy any third party component using a DLL, OCX or other external binary object.
When you buy a third party component, always buy the source code with it. Then throw away any pre-build package or dcu and recompile everything before any serious use. That way you'll be sure to have all required source code and work with that source code.
Once you have the source code, it becomes much easier to port to the next Delphi version. Usually there is just nothing to change (There was only one notable exception in the past between Delphi 2007 and Delphi 2010 when Unicode string were introduced).
When there is something to change, it is usually only the name of a "used" unit. Somtimes Embarcadero move one class from a unit to another one. Sometimes, you have to change a $IFDEF which specify a Delphi version. Look at {$IFDEF VER180} and similar to adapt to you current version (See the online help for such symbol).
And if you still have issues, then ask here...
Comments
Upgrading to newer version of Delphi might not be a trivial task.
First problem you will run into are Thid Party Components.
If you don't own the souce code for them it means that they come with precompiled packages and these packages unfortunately arent compatible between different Delphi versions.
If you do have source code for them you might be able to recompile them on newer Delphi versions but this might require you to do some code changes.
So I strongly recomend you first check to see if there are updated versions of these components available that support the Delphi version to which you are planning to upgrade.
For instance if your application relies on BDE (Borland Database Engine) that shipped with older versions of Delphi you Will be forced to do Quite some changes to properly set up the FireDac database framework that ships with newer delphi versions.