Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-08

Experiences in converting Delphi apps

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lee Jenkins

Hi all,

I'm thinking of porting a subset of my Delphi apps to Lazarus/LCL. These are apps that use minimal or no 3rd party components and have been written with some assumptions such as using PathDelim and friends with an eye towards possible conversion at some point.

I tried the Delphi project converter in Lazarus for a simple utility app that I had previously written in delphi and it seemed to work pretty good. Personally, I'd like to convert as much as possible to work in {$mode objfpc} which means more manual conversion here and there I'm thinking.

Anyone ported any significant projects from delphi to Lazarus/LCL that would like to share your experience and any not so obvious gotchas I should look out for?

Thank you,

Warm Regards, Lee

Reply by email

Juha Manninen gmail
to Lee Jenkins

Hi

If you don't have Windows API calls or other Windows specific technology, you have a chance of make it. :-)

The biggest problem in conversion is still the form file, .dfm / .lfm. Components which exist in VCL but not in LCL are replaced by a "fall-back" LCL component. Like TValueListEditor is replaced with TStringGrid. However, those components have different properties which can be removed of course but then the component doesn't behave as expected. Otherwise the form file conversion is decent. It can deal with nested components structures for example.

I guess you noticed the settings for replacement units, types and function names. Please take a note during your conversion or any missing settings and report them, either here or as a bug report.

Regards,
Juha

Reply by email

Mattias Gaertner
to Lee Jenkins: I'm thinking of porting a subset of my Delphi apps to Lazarus/LCL. These are apps that…
Show quoted text 16 lines
Hi all, I'm thinking of porting a subset of my Delphi apps to Lazarus/LCL. These are apps that use minimal or no 3rd party components and have been written with some assumptions such as using PathDelim and friends with an eye towards possible conversion at some point. I tried the Delphi project converter in Lazarus for a simple utility app that I had previously written in delphi and it seemed to work pretty good. Personally, I'd like to convert as much as possible to work in {$mode objfpc} which means more manual conversion here and there I'm thinking. Anyone ported any significant projects from delphi to Lazarus/LCL that would like to share your experience and any not so obvious gotchas I should look out for?

See here:

http://wiki.lazarus.freepascal.org/Code_Conversion_Guide

http://wiki.lazarus.freepascal.org/Multiplatform_Programming_Guide

Mattias

Reply by email

Luca Olivetti
to Bogusław Brandys: Lee Jenkins pisze: OLE automation sucks.I tried controlling Excel but it's impossible but…

En/na Bogus?aw Brandys ha escrit:

OLE automation sucks.I tried controlling Excel but it's impossible but it's a fpc problem.

I successfully controlled OpenOffice.org.
Checking my notes (I don't remember the full details), it seems that the com machinery interfered with message processing: I was calling ProcessMessages in a loop to check if the Cancel button was pressed, but it didn't work. I put the loop in a separate thread and I had no further problems.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

Bogusław Brandys
to Lee Jenkins: I'm thinking of porting a subset of my Delphi apps to Lazarus/LCL. These are apps that…

Lee Jenkins pisze:

Show quoted text 27 lines
Hi all, I'm thinking of porting a subset of my Delphi apps to Lazarus/LCL. These are apps that use minimal or no 3rd party components and have been written with some assumptions such as using PathDelim and friends with an eye towards possible conversion at some point. I tried the Delphi project converter in Lazarus for a simple utility app that I had previously written in delphi and it seemed to work pretty good. Personally, I'd like to convert as much as possible to work in {$mode objfpc} which means more manual conversion here and there I'm thinking. Anyone ported any significant projects from delphi to Lazarus/LCL that would like to share your experience and any not so obvious gotchas I should look out for? Thank you, -- Warm Regards, Lee --

OLE automation sucks.I tried controlling Excel but it's impossible but it's a fpc problem.

Boguslaw

Reply by email