Jump to content
shun

Identifying Third-Party and Custom Components

Recommended Posts

Hello,

I am currently considering migrating a project developed with C++Builder. In this project, we are using both third-party and custom components, and I would like to assess their impact on the migration. Could anyone suggest tools or methods to identify these components effectively?

  • C++Builder: Version 5, Enterprise Edition

Any guidance would be greatly appreciated.

Thank you.

Share this post


Link to post
7 hours ago, shun said:

Could anyone suggest tools or methods to identify these components effectively?

AFAIK, there are no such tools. You just have to analyze your project sources yourself. Identify which components your project uses, and which package each component comes from. Then determine whether each package comes with the IDE, was developed in-house, or was obtained from a 3rd party.

 

It might be worth writing a small tool yourself to help you parse your DFMs/code looking for component names and use RTTI to extract unit/package information for each one. But I don't recall right now whether the RTTI in C++Builder 5 was rich enough to have that kind of information. I'll have to look next time I'm at my computer. 

Edited by Remy Lebeau
  • Like 1

Share this post


Link to post
9 hours ago, shun said:

Hello,

I am currently considering migrating a project developed with C++Builder. In this project, we are using both third-party and custom components, and I would like to assess their impact on the migration. Could anyone suggest tools or methods to identify these components effectively?

  • C++Builder: Version 5, Enterprise Edition

Any guidance would be greatly appreciated.

Thank you.

For Delphi, I would use "grep" on .dfm files, searching for lines starting with "object" and may be "inherited":

  object ActionList1: TActionList

From this lines, component type can be extracted. Remove duplicates, may be count occurencies...

It does not tell from which unit that component comes, but I suppose most of them could be identified.

 

  • Like 1

Share this post


Link to post

Did C++ Builder 5 default to storing the *.dfm files in a binary format ? If this is the case then the above advice won't work.

Share this post


Link to post
7 hours ago, Roger Cigol said:

Did C++ Builder 5 default to storing the *.dfm files in a binary format ?

AFAICR, yes.  My old team used BCB 5 and 6 exclusively, and when we started using source control, we had to manually set our DFMs to text format.

 

Edited by Remy Lebeau
  • Like 1

Share this post


Link to post

If you are not using runtime packages, then you could check for the libraries listed in the <LIBRARIES> section of the .bpr file. Usually third-party packages are installed outside the C++Builder application directory.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×