delphidelphi-6

How can I determine used libraries in a Delhpi 6 application (source available)


I have a fairly large D6 project I need to hand over to other people. Similar to this question except here, all source is available

However, I have made several experiments and tests over the years, and I have a fairly large amount of libraries, mostly open source. The other people only need required / used libraries.

What method would I use simplest to list all used libraries / units ? Something along this example:

Delphi project: myproject.dpr
Project path:   c:\data\mytest

Units:
   c:\delphi\lib\unit1.pas
   c:\delhpi\opensource\jcl\cryptmain.pas
   c:\delhpi\opensource\jcl\cryptmaininclude.pas
   c:\data\mytest\demounit.pas

Of course even nicer if I could know in which unit in my project the other libraries are used. But not necessary.

As far as I know, the D6 IDE does not offer to "package project" with every needed PAS or DCU, which is really I would be after.

The manual way would be to find as many as I can, then experiment and add until I can build.


Solution

  • You can use the tool "Pascal analyzer" from Paganza Software (https://www.peganza.com). It has a free version called "Pascal analyzer Lite".
    It parses Delphi or Borland Pascal source code. It builds large internal tables of identifiers, and collects other information such as calls between subprograms.

    You can see the online documentation here.

    Include a "Uses Report" and a "Third-party Dependencies Report" among others, trhat can be usefuls for you.

    Image of all reports that incklude this tools:

    enter image description here