Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stuck with Delphi.NET and Delphi 2007

My company has a major problem. We developed an application consisting of more than 1.000.000 lines of code in Delphi.NET. Because of this we are stuck with Delphi 2007 and .NET 2.0.

As technology and usecases are moving on we need to migrate to another development platform. So far we tried several tools which promised to convert Delphi.NET to C# code - each of this tools had several problems like wrong indexing of strings (Delphi 1 C# 0) or when types were used to declare array boundaries.

After that approach we tried to decompile the Delphi.NET assembly - the code that comes back from that is hardly readable and has hundreds of helper functions which call into Borland specific assemblies. I already looked at the possibility to write a transpiler myself, but the ambiguous syntax of Delphi is too hard to implement in a straight forward grammar.

So now the great question, is there any possibilty left that does not include translating all of the code by hand? Or maybe a migration path which allows to migrate partially and stepwise?

like image 999
user3768733 Avatar asked Jun 23 '14 19:06

user3768733


1 Answers

Check out tools like: http://www.9rays.net/TourStep.aspx?TourStepID=21

While it may not be as simple as running your entire Delphi app through it and getting C# source in return, these kind of IL translators / decompilers are pretty accurate. My advice would be to run a few assemblies through and regression test to spot check accuracy. Chances are very high that you'll have to do some remediation in the generated code, but it's better than rewriting the entire application.

Also: check out http://blogs.msdn.com/b/danielfe/archive/2004/06/15/156087.aspx

like image 84
Serialize Avatar answered Nov 01 '22 17:11

Serialize