How to find and remove unused Delphi packages from a project

How to find and remove unused Delphi runtime packages from a project that uses packages?

I have a Delphi project that is made up of several packages, in the requires part of the packages there are several Borland/3rd party packages listed (rtl.dcp, vcl.dcp ect) I know I need most of them, but there are ones I know I don't need that have crept in there over time, maybe a component used them once but then that component was removed, or maybe it was from me testing code.

How do I find out which are needed and which are not? and if they are not needed will they still need to be distributed with the final application or have any impact on the size/ memory requirement of the app?

I am trying to make it all as streamline as possible.

Answers


If you specify a package to be used as runime package, all the packages that package requires need to be deployed as runtime package as well. Delphi's compiler automatically checks if this is the case. So you don't need to explicitly require rtl.dcp, as long as you require one of your other packages that does. This means you could only specify the runtime packages you are sure of you need and the rest will be added by the compiler. Then you only need to check what packages you need to deploy in the end.


Need Your Help

Building a photo array from database tables

php mysql sql arrays foreach

So I have been fighting this for months now and am hoping to find a solution here once and for all. I am using phppwinty as a php library for pwinty.com.

Why are didBeginContact called multiple times?

ios cocoa sprite-kit

In an iOS game that uses Sprite Kit along with the contact detection in Sprite Kit's build-in physics engine, I decrease the Hero's number lives by one each time he gets in contact with an enemy. T...