On Tue, 14 Feb 2006 17:22:21 -0300
Alexsander Rosa <[EMAIL PROTECTED]> wrote:

> I was looking at the sources of "main.pp", specifically in the
> DoConvertDelphi* bit. In my opinion, it would be better if the conversion
> tool was *separated* from the IDE, as a standalone application. In the
> current design, it's very embedded in the IDE, and with several menu items
> to be used. I was thinking about a different design, where the typical use
> would be:
> 
> 1) Select a directory where the Delphi project is

1b) Open in the Lazarus IDE a Delphi project

> 2) Click "Convert to Lazarus"
> 3) Watch the progress bar run ;-)
> 
> Optionally, the user could specify two places: LCL_DIR and VCL_DIR, where
> the tool would read the classes to get the available properties, removing
> them from the DFM files (and commenting out in the PAS files). A
> "translation table" could be used to replace the property instead of
> removing the entire line from the DFM. In the PAS files, the Uses section
> would be corrected, and so on.
> 
> I would like to start coding as soon as possible, but I'm putting this
> here in order to discuss this design and get ideas.

About LCL_DIR and VCL_DIR:
- The tool must work without Delphi sources too.
- The tool should also work with Delphi packages.
- The tool should also convert Delphi projects, which require packages. A
LCL_DIR is not enough.

The idea is that:
It first scans the project for required packages and searches corresponding
lazarus packages.
Then it loads the needed packages.
Then it scans for search paths and compiler options.
Then it converts each .pas file and does a simple conversion of the .dfm to
.lfm files.
Then it searches for all used classes in the .lfm files and collects all
properties.
Then it finishes the conversion of the .lfm files.

The package stuff, the compiler options and the .lpi parts require so many
parts of the IDE, that it will be quite hard to create a separated
application. That's why I suggest to create instead a package with the
conversion functions. You can write a small application to test the basic
functions, like converting simple Delphi projects. 


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to