Memnarch / Delphinus

An alternative Packagemanager for the Delphi-IDE
Mozilla Public License 2.0
235 stars 64 forks source link

Not possible to have one design-time package depending on another #93

Open michaliskambi opened 1 year ago

michaliskambi commented 1 year ago

I'm submitting a problem that we started talking about in

Initially I thought that we can "live without this fix" for some time for CGE, but actually we do not, fixing this is critical for us.

We need an ability to have one design-time unit depend on another design-time unit . In our case, that is unavoidable because 1. we need a base package supporting both Win32 and Win64 (so that our component is registered for both architectures, and https://github.com/castle-engine/castle-engine/issues/498 can be solved) and 2. we need another package, design-time-only, that uses Delphi ToolsAPI unit which is in Win32-only designide package.

The setup with 2 design-time packages works nicely in Delphi, when performing manual installation from Delphi IDE. But installing this using Delphinus, just as we discussed in threads linked above: Delphinus seems to install first design-time package too quick, and then the BPL file is locked, but compilation of 2nd design-time package really wants to modify it.

You can reproduce it by cloning https://github.com/castle-engine/castle-engine/ repository , switching to the split-delphi-design-time-package branch, and then trying to install it using Delphinus "Install from folder". I'm attaching a full installation log showing the problem in this report. A short version of this log:

Compiling castle_engine.dproj
Win32
installed
Win64
Success
Compiling castle_engine_design.dproj
Win32
......
_PasCoreCompile:
  C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\dcc32.exe
.......
castle_engine_design.dpk
.......
C:\Program Files (x86)\Embarcadero\Studio\22.0\Bin\CodeGear.Delphi.Targets(412,5): error F2039: Could not create output file 'C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\castle_engine.bpl' 
......
Error: Installation failed

So we installed castle_engine.dpk OK, but then compiling castle_engine_design.dpk tries to modify castle_engine.bpl ... which is not possible, as it is installed in Delphi by this point.

delphinus_log.txt

michaliskambi commented 1 year ago

@Memnarch I know we lately flooded you with new issues, resulting from our usage of Delphinus in Castle Game Engine :) To recap, we now have:

If I can influence your priorities, I would ask to handle this ticket (to support design-time packages depending on each other) first. This is really critical to us, to unblock non-trivial package dependencies in CGE, and be able to fix https://github.com/castle-engine/castle-engine/issues/498 .

the-Arioch commented 1 year ago

Some comments on dependencies in DPK/DPROJ added to https://github.com/castle-engine/castle-engine/issues/84#issuecomment-1627717133