Lazarus

Programming => General => Topic started by: thehidden on March 04, 2021, 12:12:38 am

Title: How to convert a Lazarus Project to Delphi 10
Post by: thehidden on March 04, 2021, 12:12:38 am
Hi to all,

does anybody know about a tool to convert a Lazarus Project folder to Delphi? Best would be Delphi 10.33 or higher.

I need to convert a project to Delhi but I have found in the Wiki only information how to convert Delphi to Lazarus but not vice versa.

Thank you for help in advance.
Title: Re: How to convert a Lazarus Project to Delphi 10
Post by: wp on March 04, 2021, 12:47:20 am
Code: Pascal  [Select][+][-]
  1. {$IFDEF FPC}
  2.   {$R *.lfm}
  3. {$ELSE}
  4.   {$R *.dfm}
  5. {$ENDIF}
The attached simple project was first created by Lazarus (folder laz) and then converted to Delphi by taking above steps (folder delphi). The project can be opened and compile by both Delphi (use dproj file) and Lazarus (use lpi file)

Of course, this is a simple project. Large projects will be much more difficult, often impossible. Usually the decision to migrate from Delphi to Lazarus is a one-way street.
Title: Re: How to convert a Lazarus Project to Delphi 10
Post by: thehidden on March 04, 2021, 03:23:00 pm
Thank you for the information.

I give one of my project to a friend, but she is using Delphi and not Lazarus...
Title: Re: How to convert a Lazarus Project to Delphi 10
Post by: af0815 on March 04, 2021, 08:08:04 pm
She can install Lazarus side by side with Delphi. This is no problem
Title: Re: How to convert a Lazarus Project to Delphi 10
Post by: Leledumbo on March 05, 2021, 02:46:32 am
No such a tool exists yet AFAIK. Often the needs is the other way around and Delphi is admittedly still a competitor. If such a tool exists, it should be written for Delphi instead of Lazarus. Language-wise, newer Delphi also introduces some breaking changes although FPC catches up some with compiler directives. Writing a newer Delphi compatible Lazarus project is harder then, and you don't really get something from porting Lazarus projects, as Lazarus supports many more platforms both as a host and a target than even the latest Delphi.
TinyPortal © 2005-2018