Not to me on time, even to this boring, but again I got a challenge on my shoulders is really difficult to meet.
The fact is migrating an application from Delphi to Lazarus is easy, by the way, but specifically this beautiful Delphi library im wornking on make a heavy use of Windows API messages…
Reviewing the steps to begin to migrate an application to Delphi Lazarus are very simple.
- Create a new structure, independent of the one containing the Delphi application, so that you touches does not affect your Delphi application (is basic but very few do it).
- For each Delphi project file (only for the dpr)
- For each .pas file executes the following command
- For each delphi form execute this command
- Lazarus uses a resource file for each form, with extension lrs. To generate:
lazres unit1.lrs unit1.lfm lazres unit1.lrs unit1.lfm
Made. We already have everything we need to take the first step in our journey of 1000 miles (the more important).Now just compile and see what happens.
Usually some functions or calls vary somewhat between Delphi and Lazarus. It could put some of them here, but it makes no sense because they are many. Instead I will give you a way to resolve discrepancies in the simplest way, or by various methods that generally make me reach the correct result:
If you can not find an identifier or method just look in the sources references in the sources of Lazarus. Sounds silly? Is the simplest way, this way you can know that unit is defined and objects that use it.
If the identifier or method does not exist in lazarus, go to the forums Lazarus and looking for. Sure someone before you crash with that stone and found how to setp out
If none of that works, the friend google comes to the rescue. You might try Lazarus discrepantname or add the word replacement, and so on.
Finally, as the case may happen in the library that attempt to migrate, that there are too many calls to the Windows API. In this case point 2 and 3 are generally much help.
- Subscribe to groups Lazarus and fpc. Who better than those who have already been there can help you? Even if a feature is not suported they will help you to implement it and produce the miracle of Lazarus and fpc library get enriched.
In other deliveries i will comment about my progress in the conversion and as the problems were resolved.