Avatar of Randy Rich
Randy RichFlag for United States of America

asked on 

Migrating from Delphi 5 to XE

I need to move several applications written in Delphi 5 up to be compatible with Windows 7 and 64 bit system.  I'm contemplating migrating up to Delphi XE.  I also use Infopower, Direct Oracle Access, Crystal Reports components.  I connect to an Oracle database.  Has anyone migrated applications along the same path and can you tell me of any things I need to watch out for?
Delphi

Avatar of undefined
Last Comment
Emmanuel PASQUIER
Avatar of Emmanuel PASQUIER
Emmanuel PASQUIER
Flag of France image

I still regularly use Delphi 5 as for some projects I really have to stick with it (plugins for application written with it, so no choice at all)

At the same time I used Delphi 7 for many years as my main dev plateform, and only recently decided to switch to Delphi XE (I was not convinced by intermediary versions like Delphi 2005, 2007 - And 2009, 2010 where a big step. I'll say why in a moment).

But one has to admin that Delphi XE is great.

So, abuot the jump from D5 to XE : it is like a move from Win95 to Vista directly. Most of your applications using standard components will work again with just a few touches and compilation, but some time you'll hit trouble.

First step : the 3rd party components. You'll have to decide which you want to keep, and the ones you'll have to change. Because a lot of standard new components exist now for XE that weren't there at D5 time or that the author didn't want to make compatible with such an old dog. And some are really worth the change.
- make a list of all the 3rd party components you use
- see if the author still exist, and which Delphi version is the last one supported.

if Delphi XE is supported , GREAT ! keep it !

otherwise, 3 possibilities (IF YOU HAVE CODE, OTHERWISE SKIP DIRECTLY TO LOOKING FOR ALTERNATE) :
- Delphi 2009/2010 : That should be just fine, and will only need maybe a few renaming of packages to avoid such bpl names like "WhateverLibrary_2009.bpl" which is awkward (but work perfectly)
The main problem (Unicode) is already fixed with such D2009 compatible packages
- Delphi 7-2007 : Most of the components will be Ok, as D7 (maybe even D6) introduced the major changes in component designs that are still used in newer Delphi (with some extensions of course) so if those libraries are not susceptible to Unicode problems, just rename packages if necessary and compile ! Working ? Great ! Not Working ? either you are a good delphi programmer and depending on the problem you might be able to fix it, or the compiler throw pages of errors and warning and you might consider looking for newest alternate solutions.
- Delphi 5 and below : try recompile, if they are not complex lib that might just work. most of the time, it won't and I will recommend forgetting it. It will be a pain already to make those work if you have to fight agains components designs AND unicode, but you will be condemned to maintain those alone for the time to come, without the author.

Now, about the most famous problem when switching to 2009 and above : Unicode !!!
All strings in delphi are now considered UNICODE (16 bits per char) and not ANSI (8 bit per char). And that impacts everything in the VCL. So if your code uses lots of PChar, you'll have trouble.
That particular problem can be difficult to overcome in some cases, but there are plenty How-To to get started by googling a bit, or here in ExEx.

ASKER CERTIFIED SOLUTION
Avatar of Emmanuel PASQUIER
Emmanuel PASQUIER
Flag of France image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Randy Rich
Randy Rich
Flag of United States of America image

ASKER

When you ran the delphi 5 and 7 simultaneously, did you run them on the same box?
Avatar of Geert G
Geert G
Flag of Belgium image

you can run all delphi versions on the same machine
but ... they got better at that since d6

d5 to d6
> variants unit (you'll have to the variants unit to almost all units)
> split into designtime and runtime packages

d6 to d7
> fastnet components to indy

if you have created any wizards/design time enhancements on delphi
> check www.gexperts.org > nice tool to have

d7 to d2007
> ok, not to many changes

d2009 and up
> unicode
new type varString

in one sentence ... lots of work :)

if you mean same machine, yes. Absolutely NO problems running both, even on the same project.

That is not the case with XE, as it changes automatically the .DFM files of the forms you open to add some default values for properties that were not there in D5 => problems opening them again with D5/D7
Avatar of Geert G
Geert G
Flag of Belgium image

oh yeah, lol we bumped into the win7 <> lower os version too
it changed all sizes of components on your form when using themes

so much for backward compatibility

you will need a good backup of every d5 project :)
Avatar of Randy Rich
Randy Rich
Flag of United States of America image

ASKER

Very quick and thorough response.  I feel much more prepared for the update.  Thanks
Avatar of Randy Rich
Randy Rich
Flag of United States of America image

ASKER

Can you tell me where Delphi XE is concerning 64 bit?
nowhere near I'm afraid.

maybe better luck with next Delphi version, due this year if they are not late. I've heard It should have both x64 and support for other platforms (like MAC OS)
look there (french, sorry, maybe you can translate with your browser) :
http://delphi.developpez.com/actu/20281/Delphi-en-phase-de-devenir-multiplateforme-l-EDI-d-Embarcadero-reste-limite-a-Windows-mais-compilera-pour-Linux-et-MacOS/
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo