Reputation: 935
I have a query about the option in Delphi to build with or without runtime packages (Project->Option->Packages).
The executable file size seem to be smaller (389KB) when I checked the box "Build with runtime packages" compared to when I uncheck the box (3,521KB). Why is that the case?
I am having so much trouble building an installation disk for it and can't figure out what files should be included in the installation. I wonder if this might have anything to do with it, but I have tried both options already.
Upvotes: 9
Views: 7925
Reputation: 1941
Regarding your question "what files should be included in the installation": you can use Dependency Walker to track down the library dependencies.
Upvotes: 3
Reputation: 21640
One of the main reason for using run-time packages is when you need module granularity to deploy/update over a medium that does not accept well large files, like over a wire with a low bandwidth.
Because the run-time packages remain the same until you change your Delphi version - like forever for those still on D7 ;-) - it allows to deploy new versions or new applications without the payload of the RTL/VCL.
But like with DLLs, you have to be careful with the versioning.
Upvotes: 1
Reputation: 32334
The answers so far miss one crucial point: Runtime packages are useful in the same way as DLLs are useful if you have a suite of applications that work together and are installed together. You could of course link the VCL and third party libraries into all of them by building them without packages, but depending on the number of applications and used libraries the size of these applications combined will be larger than the size of them built with runtime packages plus the size of those runtime packages. This will make for larger setup packages, which isn't the big issue it once was.
But using all these applications at the same time will also bring a much higher load for the system. Since every application uses its own copy of the VCL and the other libraries all these need to be loaded from disc into memory, which causes more I/O. And then there will be several copies of them in memory, each taking up space for the code. When runtime packages are used each application will have its own memory area for data, but they will all share the same copy of the packages' code in memory.
For a single self-contained application without any special needs definitely build without packages.
Upvotes: 9
Reputation: 5975
Don't know about D2010, but in D2006 there is an option in the project menu called "Information for ProjectName".
This will show you which packages are included after you compile.
However, as Mason has stated, there is little advantage to using run time packages, and quite a few disadvantages.
Upvotes: 0
Reputation: 84550
When you build with runtime packages, the VCL and RTL are loaded from the packages and so their code doesn't have to be linked into your EXE. So the EXE gets smaller, but the total installation gets larger since you can't use smart linking to reduce the size of the packages.
As you've already noticed, using packages causes trouble for memory leak tracing, and it also causes trouble for debuggging. It's generally only worthwhile to use them if you're using plugins that will also need runtime packages.
Upvotes: 14