How to convert OWL / BP7 application to Delphi?

What tool / approach would you suggest converting a large 16-bit Windows GUI application written in old Borland Pascal 7 / OWL into Delphi?

Understanding the rather severe differences between OWL and VCL, as well as the differences between pointer manipulators in 16-bit pascal and the latest use of strings and objects in Delphi - are there any ways / tools that can help to avoid almost completely rewriting the application?

+4
source share
5 answers

I think you need to determine;

a) what part of the code is related to business logic, data manipulation (database) and such things as proprietary file structures, mathematical processing, etc.? This is material that can pretty much raise the β€œas is,” because it will most likely be written in Pascal with the much smaller, more obvious elements of OWL / BP7. For example, when I did this using the application, I had a series of units that were engaged in loading / saving proprietary files, material for calculating Easter eggs, material for working with mathematics on arrays, etc. - All this happened from BP7 to Delphi (1) with virtually no changes.

b) what part of the code is associated with the graphical interface (and nothing else) - message loop handlers, dialog element constructors, control properties, etc. This stuff will require a lot of work for the port in Delphi, and if you can not find someone with a good line in .RES β†’. DFM (or similar), I think you will look at creating this bit from scratch. Not bad, because if it is a 16-bit application for Windows, then you probably want to use this opportunity to at least make it more β€œmodern”. I think this will be the most time-consuming part of the project.

c) what part of the code uses things that, as you know, can be done differently in Delphi, but it will work like it is now, on pascal? This is where @BloodySmartie points to the transition to an earlier version of Delphi for me. You should port this project to something like Delphi 5/7, making obvious (and well understood) changes to things like string manipulation. The more of this material you can leave without transport, the better, in my opinion. Get something that works, and you will check the basic behavior, and then proceed with the refactoring / refinement process to make the most of Delphi when and when resources allow. You can have (like me) arrays of pointers in BP7, where each pointer goes to an array of pointers, which ultimately lead to the object - this is how we circumvented memory limitations in the 16-bit Windows world. When I first ported my application, these pointer arrays to pointer arrays still worked fine in Delphi, and I left them alone until I had time to do something more "Delphi-like" with structures.

But before you do all this - why are you porting the application? If you port it, because in any case you are going to make a reasonable amount of changes to the functionality of the application, then it may really be the right time to rewrite the application. Since you are rewriting in Delphi, you can still use pieces of functions and procedures that are still based on a business rule, so this is not necessarily a complete and complete rewrite from scratch.

+2
source

I assume that there is no means to support your migration, but I would try to run in the old version of Delphi, for example, 1,2 or 3. This syntax should be much closer to BP7 than the syntax of newer versions of Delphi.

At this time, you should first try to simply bring your application logic into delphi without any visual effects. Then use the form builder to restore your GUI.

An important point that you should pay attention to is that the DOS string is an ASCII String, and Delphi strings prior to Delphi 2007 are ANSI encoded. In Delphi 2009, the string keyword describes a unicode string.

+1
source

A long time ago, when I changed OWL to VCL (in C ++), it was easier to write everything from scratch. There may be some parts of the code that do not deal with the user interface and string manipulations, but otherwise they are different.

In fact, one of my biggest applications is still in OWL because I just don't rewrite it. While it works, let it be.

+1
source

we also had - and still have - tons of owl apps. therefore, we ported a 16-bit owl to a 32-bit owl and therefore must develop and maintain our owl-based applications (actually with Delphi 2007 for win32).

you can find this way easier and faster than switching to vcl.

amuses Andrey

+1
source

FrameworkPascal.com provides an effective solution with minimal changes to the source code of Windows 3.1. We have done this for a while, but now we offer a rounded solution with 32-bit compatible OWL modules. We also provide him with ODBC SQL modules, MAC-based security technology and special blocks like CRT devices that can process code written for DOS text and graphics modes, mixed, with new 32-bit graphics and application-oriented Windows 32/64 GUI, Legacy code can be compiled with OWL Windows MDI, starting with demos of application models that can be quickly changed.

0
source

All Articles