Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grouping DLL's for use in Executable

Tags:

dll

delphi

Is there a way to group a bunch of DLL's and still use them at run time (not zipped up). Sorry this question sounds terse and stupid, but I'm not sure what more to ask.

I'll explain the situation though:

We've had two standalone Windows Applications and now one of our Applications has swelled to such ungainly proportions that the other application cannot run outside of the scope of the first app. We want to maintain some of the encapsulation we had while letting the smaller program in on some of the bigger program's features.

There is no problem in running the application, other than we don't want to send out all the 20-30 DLL's that the smaller project has.

like image 419
Peter Turner Avatar asked Dec 22 '22 05:12

Peter Turner


2 Answers

It is possible to do this by adding startup code which checks if the DLLs are present on the target system and if not then extracts them from the resources section (or simply tagged onto the end of the exe). A good example of this being done is Process Explorer - it's distributed as a single binary, but when run it extracts and installs a driver.

like image 198
BCran Avatar answered Jan 05 '23 08:01

BCran


If you have a situation where most, or all, of those assemblies have to be kept together, then I would highly recommend just merging the code files into the same project and recompiling. This would leave you with one assembly.

Of course there are other considerations like compile time, overall size of the final dll, how often various pieces change, and whether each component is deployed without the others.

One example of a company that did this is Telerik. Their dev components are all compiled into the same assembly. This makes deployment an absolute breeze. Contrasting that is Dev Express which put just about each control into it's own assembly. Because of this just maintaining, much less deploying, a Dev Express project is not something for the faint of heart.

(I don't work for either of those companies. However, I have a lot of experience with both toolkits.)

like image 36
NotMe Avatar answered Jan 05 '23 10:01

NotMe