Board index » delphi » D3: Editing DCP files?

D3: Editing DCP files?

Hi,

I need to modify the "requires" clause of a DCP file (a Borland
design package, to be more accurate).

And I only have the DCP file + the compiled DPL. Is there any way
to do this?

In particular I would like to *remove* one file from the requires
list.
--
Stefan.Hoffmeis...@UNI-Passau.DE
http://kakadu.rz.uni-passau.de/~w4hoff01/
University of Passau, Bavaria, Germany

 

Re:D3: Editing DCP files?


On Fri, 09 May 1997 14:04:08 GMT, Stefan.Hoffmeis...@Uni-Passau.de

Quote
(Stefan Hoffmeister) wrote:
>I need to modify the "requires" clause of a DCP file (a Borland
>design package, to be more accurate).

>And I only have the DCP file + the compiled DPL. Is there any way
>to do this?

>In particular I would like to *remove* one file from the requires
>list.

I've just installed D3 and haven't had any changes to play with it
yet, but the D3 help file in the topic "Compiling packages" says:

"DCP       A binary image containing a package header and the
concatenation of all DCU files in the package. A single DCP file is
created for each package. The base name for the DCP is the base name
of the DPK source file."

The word "concatenation" is important here. I think a "package" is
simply a header + a dump of the DCUs. So you might succeed by simply
editing the header and removing some bytes from the file.

Regards,

Jani J?rvinen
Helsinki Finland

Tools, information, tips, reviews & bug lists
for professional Delphi, Win32 and WinHelp developers.

mailto:ja...@dystopia.fi
http://www.dystopia.fi/~janij/

Re:D3: Editing DCP files?


On Fri, 09 May 1997 14:04:08 GMT, Stefan.Hoffmeis...@Uni-Passau.de

Quote
(Stefan Hoffmeister) wrote:
>I need to modify the "requires" clause of a DCP file (a Borland
>design package, to be more accurate).

>And I only have the DCP file + the compiled DPL. Is there any way
>to do this?

>In particular I would like to *remove* one file from the requires
>list.

I think you can open the DPL file in the package editor, change the
requires list and recompile the package. I do not recommend changing
Borland's design-time packages this way, though, unless you are
replacing one of the required packages with your own that contains the
same units.

--
Ray Lischner            
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

Re:D3: Editing DCP files?


: n...@junk.mail (Ray Lischner) wrote:

Quote
>On Fri, 09 May 1997 14:04:08 GMT, Stefan.Hoffmeis...@Uni-Passau.de
>(Stefan Hoffmeister) wrote:

>>I need to modify the "requires" clause of a DCP file (a Borland
>>design package, to be more accurate).

>>And I only have the DCP file + the compiled DPL. Is there any way
>>to do this?

>>In particular I would like to *remove* one file from the requires
>>list.

>I think you can open the DPL file in the package editor,

Interesting! It does work - although it is a DLL!

Quote
> change the
>requires list and recompile the package.

This, it seems, is impossible.

Quote
>I do not recommend changing
>Borland's design-time packages this way, though, unless you are
>replacing one of the required packages with your own that contains the
>same units.

Unfortunately it seems that it *must* be done. I am just afraid
of shouting "BUG" (again) for the moment: Take a peek at
DCLDB30.DCL, the database design package.

On the requires page, you will notice "DBX30.DCL", a package,
that is thoroughly marked "INTERNAL" in its version information
and effectively seems to make it impossible to "require"
"DCLDB30.DCL" oneself to get access to the database editors.

IOW: I think that "DCLDB30.DCL" shipped with D3 Pro has a major
flaw / bug, in that it "requires" a package it never should even
see.

I will be happy to concede defeat if somebody can show me how to
successfully "requires DCLDB30". I always get an error "Required
package DbX30.dpk not found". I will equally happy to shout "bug"
(and get a fix/workaround!) <g>.
--
Stefan.Hoffmeis...@UNI-Passau.DE
http://kakadu.rz.uni-passau.de/~w4hoff01/
University of Passau, Bavaria, Germany

Re:D3: Editing DCP files?


On Sat, 10 May 1997 00:07:37 GMT, Stefan.Hoffmeis...@Uni-Passau.de

Quote
(Stefan Hoffmeister) wrote:
>Unfortunately it seems that it *must* be done. I am just afraid
>of shouting "BUG" (again) for the moment: Take a peek at
>DCLDB30.DCL, the database design package.

>On the requires page, you will notice "DBX30.DCL", a package,
>that is thoroughly marked "INTERNAL" in its version information
>and effectively seems to make it impossible to "require"
>"DCLDB30.DCL" oneself to get access to the database editors.

What, exactly is the problem? You can include DCLDB30.DPL in the
requires list for any design-time package. The only reason DBX30.DPL
would be a problem is if it contains a unit whose name conflicts with
a name in your package.

Quote
>I will be happy to concede defeat if somebody can show me how to
>successfully "requires DCLDB30". I always get an error "Required
>package DbX30.dpk not found". I will equally happy to shout "bug"
>(and get a fix/workaround!) <g>.

That should happen only if Delphi thinks it needs to recompiled DBX30,
but it shouldn't think that unless you have a unit name conflict.
--
Ray Lischner            
Author of Secrets of Delphi 2 (http://www.tempest-sw.com/secrets/)

Re:D3: Editing DCP files?


Stefan Hoffmeister <Stefan.Hoffmeis...@Uni-Passau.de> wrote in article
<337e7ccd.12575...@news.rz.uni-passau.de>...

Quote
> Unfortunately it seems that it *must* be done. I am just afraid
> of shouting "BUG" (again) for the moment: Take a peek at
> DCLDB30.DCL, the database design package.

> On the requires page, you will notice "DBX30.DCL", a package,
> that is thoroughly marked "INTERNAL" in its version information
> and effectively seems to make it impossible to "require"
> "DCLDB30.DCL" oneself to get access to the database editors.

I think you miss the point of difference between run-time packages and
design-time packages. DCLDB30 is a design-time package which can only be
used at design time in the Delphi IDE not be used at run-time in your
program. Since design-time packages are design-time only, you can not
recompile them at run-time for debugging purposes. I regard that particular
thing as a major drawback of Delphi 3.0, as it makes writing experts,
component and property editors a lot harder than in Delphi 2.0.

Since design-time packages are bound only to design-time, Borland does not
need to ship all underlying sources and packages. So it is perfectly valid
for a design-time package to require DBX30, since it is available:

Directory of P:\Program Files\Borland\Delphi3\BIN
DBX30    DPL       684,488  03-20-97  3:00a dbx30.dpl

Directory of P:\Program Files\Borland\Delphi3\LIB
DBX30    DCP       451,318  03-20-97  3:00a dbx30.dcp

--
Jeroen Pluimers
P.S.O. Delphi training/consultancy
Badhoevedorp, the Netherlands

Re:D3: Editing DCP files?


: "Jeroen W. Pluimers" <j...@xs4all.nl> wrote:

Quote
>Stefan Hoffmeister <Stefan.Hoffmeis...@Uni-Passau.de> wrote in article
><337e7ccd.12575...@news.rz.uni-passau.de>...

>> Unfortunately it seems that it *must* be done. I am just afraid
>> of shouting "BUG" (again) for the moment: Take a peek at
>> DCLDB30.DCL, the database design package.

>> On the requires page, you will notice "DBX30.DCL", a package,
>> that is thoroughly marked "INTERNAL" in its version information
>> and effectively seems to make it impossible to "require"
>> "DCLDB30.DCL" oneself to get access to the database editors.

>I think you miss the point of difference between run-time packages and
>design-time packages. DCLDB30 is a design-time package which can only be
>used at design time in the Delphi IDE not be used at run-time in your
>program.

I am not trying to use it at runtime, but in a design package of
my own.

Quote
>Since design-time packages are design-time only, you can not
>recompile them at run-time for debugging purposes. I regard that particular
>thing as a major drawback of Delphi 3.0, as it makes writing experts,
>component and property editors a lot harder than in Delphi 2.0.

>Since design-time packages are bound only to design-time, Borland does not
>need to ship all underlying sources and packages. So it is perfectly valid
>for a design-time package to require DBX30, since it is available:

>Directory of P:\Program Files\Borland\Delphi3\BIN
>DBX30    DPL       684,488  03-20-97  3:00a dbx30.dpl

>Directory of P:\Program Files\Borland\Delphi3\LIB
>DBX30    DCP       451,318  03-20-97  3:00a dbx30.dcp

In the meantime I have learnt that DbX30 "is" the database
explorer...

You may be right, but the problem with my fresh Delphi 3
Professional is that I cannot require DCLDB30 in one of my very
own design packages to get the property editors. And because of
this behaviour it is impossible to install third-party component
packs, including, but certainly not limited to: TeeChart Pro 3.0
and RX 2.31.

Given that TeeChart (Standard) is part of Delphi 3.0, I doubt
that David Berneda has made a mistake in "requiring" DCLDB30.
--
Stefan.Hoffmeis...@UNI-Passau.DE
http://kakadu.rz.uni-passau.de/~w4hoff01/
University of Passau, Bavaria, Germany

Other Threads