Migration and Upgrade Center
Migration and Upgrade Resources for Delphi, C++ Builder and RAD StudioTalk to a Migration Specialist today
Delphi & C++Builder are used to create high quality applications that are used by millions of users around the world every day. As Delphi / C++Builder has evolved (with new language features and components) there has been a high consideration to backward compatibility to allow code just to open up and compile in the new versions. Despite some of the best backward compatibility on the market, some changes have needed breaking changes (e.g. jumping to Unicode).
The Upgrade and Migration Center is here to help you navigate your migration from older editions!
In summary: Your source code and forms will import, compile and execute in the current Delphi/C++Builder versions, but you may need to re-compile 3rd party libraries, make Unicode changes, and change Data Access Components if these apply.
Unicode support was added to RAD Studio, Delphi and C++Builder starting with the 2009 version. Many migration resources were developed at that time but are still useful today if upgrading from a pre-Unicode (2007 or earlier) version.
Delphi has made migration over the decades relatively painless, however, this doesn’t mean it’s always effortless and Unicode is one area where some attention may be required!
First, some good news, is many cases legacy Delphi applications that convert to the current Delphi version do so with few or no modifications. If you are working primarily with VCL components (whose support for Unicode has in most cases been considered carefully), or components from third-party vendors who have taken the time to understand the implications of Unicode support, you have an advantage.
Don’t panic if you use “millions of strings” in your application, it does NOT mean you have to change any code at all
Unicode Technical Overview
What determines the need to make any Unicode changes is how you’re using strings and for what purposes. If you’re not doing heavy text processing or manipulations and stick to the standard string operations, mostly likely your code will simply just work. Additionally, just because you have lots of string literals in your code that also doesn’t necessarily mean you have to make any code changes. The most common things that you do have to watch for is file I/O and interfacing with external non-Delphi libraries and/or DLLs.
As a start, look at these great white papers, technical articles, videos and migration tools to help you out with Delphi and Migration to Unicode:
Delphi and Unicode This white paper has been written to help developers that are using versions of Delphi or RAD Studio that were released previous to the launch of Delphi 2009. Read this paper if you are looking for more information on why and how to Unicode-enable a codebase that has been developed using a pre-Unicode enabled version.
Stories and Advice from the Front Lines
Whether you are in the early planning stages of migrating an existing application to Unicode-enabled RAD Studio, or in the midst of the process, Delphi Unicode Migration for Mere Mortals can help. Written with input from many of the leaders in the RAD Studio community, this white paper provides you with valuable techniques and advice that will smooth the way.
Webinar: Migrating Legacy Applications to Unicode-enabled Delphi with Cary Jensen
Cary Jensen has worked with Delphi developers around the world – including noted authors, leading third-party vendors, and front line developers – to learn how they approached their Unicode conversions, what challenges they faced, and what solutions they employed. Learn best practices for migration to Unicode in this informative webinar.
Dr. Bob's Unicode page and 8 Unicode Tips – Covers Unicode format and different string types
Popular Unicode article in the online documentation at DocWiki discusses "Unicode in RAD Studio"
Unicode Statistics Tool
Unicode Statistics Tool on your Delphi application and check if any Unicode changes are needed.
This Unicode Statistics Tool will assist you in collecting useful statistics for the time and effort needed to migrate your Delphi applications to Unicode.
The tool reviews your code and tells you where and what you will most likely have to change. This will at least give you an estimate of how many lines need to be reviewed.
NOTE: The Unicode Statistics Tool does not know if any of your lines of code really needs to be modified or replaced at all. It does tell you have at least some number of lines you should take a quick glance at. It could be as little as 0 changes needed. It really all depends on how you are using Strings and Chars in your application.
The result is Delphi is 100% Unicode. The migration is easy, the Visual Component Library (VCL) and the compiler handle many things.
The tool lists all used units, including Delphi units (and how many times each one was used), number of files, number of lines, and number of instances of String, Read, Write, SizeOf, etc.
Migrating your project from older versions of Delphi. The Pitfalls
Craig Chapman covers a range of migration topics including
- Cross platform migration
- Windows 64bit
- Unicode migration
Migrating to 64bit
Ever since Delphi XE2, it has been possible to generate Delphi 64bit applications from the same code base as your traditional Windows 32bit Delphi code. The business case for 64-bit for business is covered in this tech paper The Impact of 64-bit Applications to your Company’s Bottom Line
On the whole moving to 64bit (on Windows, but also iOS) is beautifully simple to achieve! It can be just as simple as adding the 64bit target platform in the project manager and rebuilding the project. This is a massive benefit over other languages that need different types declared to resolve the difference between the two platforms.
Building 64bit Applications with Delphi
Overview of how to build 64-bit Delphi applications with this short tutorial.
Delphi 64bit Code by Stephen Ball covering what is the same, what is different, predefine conditional compiler options and using assembler code.
Delphi 64bit code
Migrations of Database and Middleware
Migrating from the Borland Database Engine (BDE) or DBExpress
The Borland Database Engine (BDE) has been deprecated, and beginning with version XE8 the BDE has been removed from the Delphi installation, but is still available as a separate download from Code Central. All applications using the BDE are recommended to be migrated to FireDAC. If you are new to FireDAC Data Access Components, start here and look at the First Steps and Getting Started links.
dbExpress is also in maintenance only mode and users should look to migrate to FireDAC which offers more databases, is faster and provides more features.
FireDAC Skill Sprints - Migrating BDE applications to FireDAC and InterBase - David I
Featured RAD Studio tool reFind
DocWiki Migrating dbExpres to FireDAC
This article provides a tutorial showing how to migrate a simple client-server application using dbExpress data access components, such as TSQLConnection, TSQLQuery, TSQLTable, to FireDAC
An alternative to reFind, a Free Evaluation Edition of The Automatic Migration Scripting Wizard For Converting Legacy Delphi BDE Code to FireDAC
Delphi Parser BDE to FireDAC migration tool
FireDAC Skill Sprints is a series of 12 x 20minute videos teaching you the advanced features of FireDAC
Migrating 3rd Party Components / Libraries
What 3rd party libraries (components) are you using in your older Delphi?
The 3rd party plug-ins (libraries) need to be rebuilt in the current Delphi version. Having the source code makes this easier. You will need to re-compile your 3rd party components / libraries from older Delphi using the current Delphi 10.1 version so the components and libraries can be used in current Delphi projects.
Any 3rd party components / libraries without the source code may need updated versions for the current Delphi 10.1 version.
Check this link for some of the third party components available with RAD Studio and you can search all tools and components on the Embarcadero Technology Partner Directory.
The current Delphi includes the new Getit Package Manager to allow you to browse, download, purchase, and install GetIt packages into the current Delphi version. GetIt currently includes 31 of the popular free packages such as libraries, components, IDE extensions, and SDKs, like Open Source “TurboPack” Components, JEDI Visual Component Library, etc., certified to work in the current Delphi version!