PDA

View Full Version : Delphi XE7 - Compiling a package deletes the other package it's depending on



vgo
03-10-2014, 07:11 AM
Moving my stuff to Delphi XE7 and stumbled upon a strange error...

I have a package, let's call it PackageOne, it has some common components.
Then I have a package called PackageTwo, it has some special components and it's installed only if needed. It depends on PackageOne.

I compile PackageOne and install it, everything's fine. The components are visible etc.
Then I compile PackageTwo, after a while it notices the dependency on PackageOne because it uses some of the same unit files. It asks if I want to include it and I say "yes".

Then the interesting part, for some reason it then deletes all PackageOne binaries (bpl, dcp) and starts compiling it and then fails because it can't find PackageOne.bpl anywhere, which it just deleted so obviously it cannot be found! When I restart Delphi I get the same error about missing PackageOne.bpl.

I don't understand how compiling a package deletes another it's depening on, I've never seen this happen before...

Any ideas?

EDIT: I tried one more thing, both packages were in the same directory, so I moved PackageTwo to another directory and then it compiled fine. It's strange though, I've had packages in the same directory before and had no problems...

Ñuño Martínez
05-10-2014, 12:46 PM
I think that, before compiling any package, it removes all binaries of the package directory. I mean "del $(PATH)\*.bpl; $(PATH)\*.dcp".

vgo
06-10-2014, 06:58 AM
No it doesn't. If it did, then you could never install more than one package!
There was 2 other packages my PackageTwo was depending on and it didn't delete those.

I fixed the problem by moving the package file to another directory than the package it was depending on.