Is there a way to select designtime packages on a project bases?
Packages are very useful in large project to keep the build time acceptable, but they are a real pita in those large projects too. When one developer adds a new package, it breaks to build for all other until they install the new package on their machine. And then there is versioning of the packages ...
So has anyone a proper solution for this? (it has been bothering me for years now)
At my previous job I wrote a little tool to help us with versioning packages. I really should recreate that tool in my spare time and make it available. The tool was not hard to write though, so maybe you can implement something like it yourself.
Basically it worked like this:
A possible extension would have been to be able to save/load the selection of packages and store that selection with each project so you can have only the packages loaded that are needed for a particular project.
I implemented all this when the company was moving from Delphi 5/7 to Delphi 2007. We had a lot of problems with package versioning before and wanted some way to version all the different packages.
This approach offered some nice advantages:
This wasn't just used for some in-house components alone, the repo also included some of the big component packages: Raize Components, JCL/JVCL (Using their installer instead of the tool though), DevExpress Quantum Grid 3 and 4, TurboPower AsyncPro
This is not easy too do. You can do it though, with the use of a custom registry hack, and a specific bds shortcut per configuration you are interested in:
To use, just create a new shortcut and modify the command line to pass e.g. -rMyAlternateBDSReg. Then after launching that once, the reg entry is created and they can configure that alternate registry all they want, deleting packages, etc, without worrying about messing up the default install.
From codegear
If you set up a configuration for each project, you can then start the appropriate shortcut for the given project. It's not automatic, but it is better than having everything there all the time.
A nice side effect is that the load times will be improved.
We put the source for our packages in source control along with a batchfile that rebuilds them. If there is a change in the tree for packages then we rebuild them. This doesn't address installing new packages, but there are registry hits that can take care of that, so it is possible that we could include .reg snippets maybe to handle that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With