Archive: Dependency checks


Dependency checks
Hi,


Does anyone know how one could automate a dependency check to make sure all the dlls are included in the installer? Like using the depends.exe that comes with VS.

This would prevent, say, forgetting to recompile some dll and sending it with a dependency on msvcrtd.dll


I think only with third part app for reading dependencies....
Although, if you build your app, you sure will know which DLL nor OCX are required...


Well, sure I do :P

The issue is not finding which DLLs it depends on, that can be done only once. The issue is making sure you are not releasing your software with the DLLs compiled *in the wrong way* ;)

It's not uncommon for someone to forget recompiling a part of the system into release mode after stressfull sessions of bug hunting in the much more friendly debug mode :)

Then you send the installer to the poor user without the dev environment and it won't work due to those daunting DLL not found messages.

Including the debug DLLs into the distribution is absolutely wrong, of course. Not only wrong, but potentialy illegal, since in most cases you are not even allowed to redistribute the debug DLLs.

I just wanted to know if someone knew how I could extract the information, writting a python script or whatever to automate the process before calling makensis would be the easy part after that.


In Source\Plugins.cpp the exports are examined. It uses some macros and definitions from WinNT.h. It shouldn't be too hard to modify it to check the imports. Some useful information can be found at:

http://msdn.microsoft.com/library/de..._peeringpe.asp
http://www.windowsitlibrary.com/Cont...1/4.html?Ad=1&