简体   繁体   English

坚持使用Delphi.NET和Delphi 2007

[英]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. 我们在Delphi.NET中开发了一个由超过1.000.000行代码组成的应用程序。 Because of this we are stuck with Delphi 2007 and .NET 2.0. 因此,我们坚持使用Delphi 2007和.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. 到目前为止,我们尝试了几种承诺将Delphi.NET转换为C#代码的工具 - 这些工具中的每一个都有一些问题,比如错误的字符串索引(Delphi 1 C#0)或类型用于声明数组边界。

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. 在那种方法之后,我们尝试反编译Delphi.NET程序集 - 从中​​返回的代码几乎不可读,并且有数百个辅助函数调用Borland特定程序集。 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. 我已经看过自己编写一个转换器的可能性了,但Delphi的模糊语法很难用直接的语法实现。

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? 或者可能是允许部分和逐步迁移的迁移路径?

Check out tools like: http://www.9rays.net/TourStep.aspx?TourStepID=21 查看以下工具: http//www.9rays.net/TourStep.aspx?TopStepID = 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. 虽然它可能不像通过它运行整个Delphi应用程序并获得C#源代码那么简单,但这些IL转换器/反编译器非常准确。 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 另外:查看http://blogs.msdn.com/b/danielfe/archive/2004/06/15/156087.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM