Sign in Join

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

Mailing lists / lazarus / 2009-11

Delphi to Lazarus converter

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Howard Page-Clark

Hi,

I had a go at converting some of Gary Darby's code from the DelphiForFun website, since he seems to have run into trouble doing so.

Converting several projects manually worked OK, and they compile under Lazarus fine with the odd tweak to replace Windows-specific code in his more advanced projects.

However, trying to use "Tools -> Convert Delphi project to Lazarus project" fails every time with the debugln message:

"ConvertDelphiToLazarusProject failed reading Delphi configs"

This is because there are no .cfg or .dof files for any of Gary's Delphi projects that I have looked at.

Surely it was intended that non-existent Delphi config files should not abort the conversion process? Is this a bug or IMHO an unwelcome feature?

yours

Howard

Reply by email

Mattias Gaertner
to Howard Page-Clark
Show quoted text 21 lines
Hi, I had a go at converting some of Gary Darby's code from the DelphiForFun website, since he seems to have run into trouble doing so. Converting several projects manually worked OK, and they compile under Lazarus fine with the odd tweak to replace Windows-specific code in his more advanced projects. However, trying to use "Tools -> Convert Delphi project to Lazarus project" fails every time with the debugln message: "ConvertDelphiToLazarusProject failed reading Delphi configs" This is because there are no .cfg or .dof files for any of Gary's Delphi projects that I have looked at. Surely it was intended that non-existent Delphi config files should not abort the conversion process? Is this a bug or IMHO an unwelcome feature?

It was an uninitialized function result, fixed today. Can you test with lazarus from svn and see if this bug is fixed?

Mattias

Reply by email

Juha Manninen
to Mattias Gaertner

Heh, amazing!

It was an uninitialized function result, fixed today. Can you test with lazarus from svn and see if this bug is fixed? Mattias

My first commit to Lazarus is already solving dire problems of other people. :-)

I am planning to look at the converter code more because it outputs too many messages and dialogs to the user.
For example LCL package must always be added to dependencies. No need to ask about it.
Same thing when removing Windows unit dependency. It is done anyway so why to show a dialog? Actually all unit dependency removal could be done silently and automatically. There could be just a comment added to the source file telling about commented-out unit names.

Then I had pascal file with a syntax error. The converter gave an error messagebox which is ok but then it gave more messageboxes, maybe 6 or so.

These messages are ok if you convert one unit but a big project is a different thing.

Regards,
Juha Manninen

---

P.S.

Maybe little off-topic, but function ReadDelphiPackageConfigFiles still has the same problem as ReadDelphiProjectConfigFiles had. Are you planning to fix it or should I send more patches?

Also I am wondering about many functions returning ALWAYS mrOk and then those return values are tested elsewhere. It is quite useless. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091107/1ee3ab14/attachment.html>

Reply by email