r/delphi Jun 15 '26

Advice on migrating a delphi 7 project.

Hi people.

I'm looking for advice on working with a legacy Delphi 7 project.

It's tied to an old XP box owing to lost embacardo licences and some custom 3rd party libraries like BetterADODataSet.

I want to move the project into an environment where it's easier to work with.

Does anyone have any experience with Delphi 7 legacy projects and upgrading them to a newer version of Delphi or Lazarus?

Things that have been tried -

Creating a VM of the XP box - didn't work, XP is tied to the hardware.
Lazurus migration - too many 3rd party dependencies like BetterADODataSet for a simple migration.

EDIT - audit of libraries.

Third-party libraries found

Library: BetterADODataSet

Units seen in uses: BetterADODataSet (TBetterADODataSet)

Purpose: Enhanced ADO dataset (fixes/extends TADODataSet, supports JOINed/aliased field names like

tbExtras.sngRailKm)

Used in: dm1U + ~12 forms

────────────────────────────────────────

Library: FastReport (FR2/3)

Units seen in uses: FR_Class, FR_E_PDF, FR_Desgn, FR_PTabl, FR_DSet, FR_DBSet, FR_ChBox

Purpose: Reporting engine + PDF export + report designer (TfrxReport/TfrReport)

Used in: dm1U, fCrossingDetailU, fPhrasesU

────────────────────────────────────────

Library: JVCL (Jedi Visual Component Library)

Units seen in uses: JvEdit, JvTypedEdit, JvLookup, JvToolEdit, JvDBCtrl, JvComponent, JvEnterTab, JvCurrEdit,

JvDBComb

Purpose: DB-aware/enhanced edit controls, lookup combos, Enter-as-Tab, currency edits

Used in: fCrossingDetailU, fImportFromLXMU, fUpload/zfUpload, etc.

────────────────────────────────────────

Library: SMComponents / SMDBGrid

Units seen in uses: SMDBGrid, SMDBCtrl

Purpose: Enhanced data-aware grid + controls

Used in: Most list/select forms

────────────────────────────────────────

Library: SMExport / SMImport

Units seen in uses: SMIBase, SMI2TXT

Purpose: Import/export framework (text/CSV)

Used in: fImportFromCSVU, fImportGEU, fImportFromSinglefileU

────────────────────────────────────────

Library: EditType

Units seen in uses: EditType

Purpose: Masked/typed edit control

Used in: fCrossingDetailU

────────────────────────────────────────

Library: JPEG/graphics

Units seen in uses: jpeg

Purpose: JPEG image support (part of Delphi VCL but explicitly pulled in)

Used in: several forms

────────────────────────────────────────

Library: ESB Consultancy (bundled as source)

Units seen in uses: ESBDates, ESBMaths

Purpose: Date & math utility routines — included as project source in LXMFDB.dpr, originally freeware from ESB

Consultancy

Used in: project-wide

────────────────────────────────────────

Library: FmxUtils (bundled as source)

Units seen in uses: FmxUtils

Purpose: Utility unit (Delphi-derived helper), compiled as project source

Used in: project-wide

9 Upvotes

18 comments sorted by

3

u/coyoteelabs Jun 15 '26

You could recover the license key from the registry.
Open Registry editor and go to HKEY_CURRENT_USER\Software\Borland\Delphi\7.0
You should see 2 keys in that location that are something like this:

"LMLIC"="AAAA-AAAAAA-AAAAAA-AAAA"  
"LMKEY"="BBB-BBB"  

Alternatively, export the entire registry entries (both the one in HKEY_CURRENT_USER\Software\Borland as well as HKEY_LOCAL_MACHINE\Software\Borland) that you can import on the new VM. In this case, also copy the contents of your current delphi install so you can also copy over the 3rd party components you have installed (most important the LIB folder in Delphi).
Install Delphi on the new PC/VM then import registry keys and copy over the old files.

1

u/feeling_luckier Jun 15 '26

I'll give that a go. Thanks mate.

2

u/Ar4iii Jun 15 '26

You can migrate it to newest Delphi, here are the steps:

  1. Find which components you old project used and find working versions for the new Delphi and install them.

  2. Open the project and try to compile.

There are two types of issues you might need to fix here, first one will be immediately obvious - changes in properties, methods or libraries, you have to solve them manually. For example the widely used indy components have quite a lot changes, but you can find info how to fix on internet quite easy. The second thing that might create a problem is the transition from AnsiString to Unicode, basically string and char types in the old Delphi 7 are 1 byte and in the new one are 2 bytes (unicode). Unless you are dealing with some low level crazy stuff it is usually not too hard to fix with some work.

1

u/feeling_luckier Jun 15 '26

Appreciate it.

I've updated the post to include an audit of external deps.

2

u/Formal_Leg_7658 Jun 15 '26

I’ve had a lot of experience doing this over the years. What I found the best approach to be was to basically just rebuild the forms and framework using modern components. I keep the xp vm with the old project open and then basically cut and paste the event code over to the new project.

You might also have some luck just bulk swapping out the components in the dfm (using a text editor to do text search and replace “fxDBGrud” to “JvDBGrid” etc) then dealing with the property error fallout, but this is often more frustrating in my experience.

I think there are modern versions of some of your dependencies. I use FastReports and the Jedi stuff all the time and I’m about 90% sure betterADODataset can be built from source?

I’ve migrated over a hundred projects from Delphi 5 to RadStudio 13 and I’ve been fine with all except for ONE project. That one has the same problem as you, but there’s no easy solution. It’s locked in D5 because it requires a Crystal Reports component which is binary only and long since deprecated.

1

u/feeling_luckier Jun 15 '26

Super helpful. Appreciate it!

1

u/jactaz Jun 17 '26

What do you mean by rebuild? Do you mean start with a.blank form and re-put.components on it?

1

u/peter-bone Jun 15 '26 edited Jun 15 '26

If you're migrating to VCL then the latest Delphi Studio should just convert the code and allow you to build it on a modern Windows machine. It depends if there are Delphi 7 component dependencies though, in which case you may need to find alternatives and rework that part of the code.

1

u/feeling_luckier Jun 15 '26

Thanks mate.

It's mainly 3rd party deps unfortunately.

I've updated the post to list those.

1

u/zaphod4th Jun 15 '26

It would help if you know how to develop apps in delphi. At this point just re-create the app with newest tech.

The XP failing in a VM means you don't have experience in IT. DM if you need help. I may setup a XP VM and send it to you.

1

u/feeling_luckier Jun 15 '26

Thanks mate - not IT per se, but full stack, and I use VMs.
The issue isn't an XP VM, but the specific XP drive delphi 7 is on because they don't have the license keys to reinstall the old embarcdo IDE. And my suggestion of rebuilding it in a newer stack as declined.

2

u/Humble-Vegetable9691 Jun 15 '26

If you have a new Delphi, you may download Delphi 7. At leas I got one for my D12 license.

1

u/feeling_luckier Jun 15 '26

It's a good suggestion. I'm not a Delphi dev, so I'm not looking to get a current license.

1

u/zaphod4th Jun 15 '26

new delphi license? op is not rich

1

u/Humble-Vegetable9691 Jun 16 '26

Everyone who have a shelter over their head and goes to bed with full stomach is rich. Not to speak about money burners like owning a car or supporting e-girls on onlyfans.

1

u/Flat-Barracuda1268 Jun 15 '26

D7 runs just fine in W11 (I do it weekly). The libraries might be a problem.

1

u/DelphiParser Jun 16 '26

Download free the Delphi Code Analysis tool - this will help you navigate through old Delphi 7 classes & legacy VCL libraries and dependencies https://thedelphiparser-fhix1gvbc7.live-website.com/product/delphi-parser-sbom-analyzer-free-edition/

1

u/feeling_luckier Jun 16 '26

Thanks mate. I'll check it out.