Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Component, Package, Compiler Settings and Paths

Status
Not open for further replies.

PeterCross

Programmer
Mar 24, 2007
1
BE
Good evening, ladies and gentlemen,

After searching long en trying much, I have decided that I need to use the full capacity of all the brains on this forum to solve the problem. Maybe someone of you may have some ideas or has a solution.

First of all, I’ll give a short explanation of the problem, and then I will give a detailed description, hoping that someone would see the light.

Short Explanation

Who knows in which manner is it possible to install a home-made component, build and install it, in order to get exactly the same behaviour ( in the IDE ) like the gentle(wo)men of Codegear have done it in the VCL.

Detailed description

As an example, I have made my own component, this is derivated from the class TCustomLabel. This component has a published property Version with only a Getter. We also have made a published method: Makesound ( the implementation of this method is … Beep )

There also is a Register method so that may component will be registered properly, so I can use see it on the component pallet.

So far, so good, the component works and it does what is supposed to do.

I have put this component in my own package, so that later on, it would be easy to install it, transport it, etc.

Now, my question is ( and I can’t find very much about it ) which settings ( e.g. DebugInfo) need to be approached, which paths must be added in the project that uses the component, so that, and that is the magic thing, the behaviour of the component is exactly the same as the VCL-components of Borland.

Exactly the same means for me:
1. The component may not be re-recompiled when I do a build of my project.
2. A CTRL+Click on the unit name of the component in the uses clause of my project gets me to the source file of that component.
3. A CTRL+Click on the class name of the component in the interface section of my project leads me to the source file of the componet.
4. A CTRL+Click on the property (e.g. the Version property) of the component called in my project, jumps to the de source file of the component.
5. A CTRL+Click on a method of the component in my project brings me to the source file of the component.
6. The debugging thing must listen to "Use Debug DCU's" when I travel trough the source-code with F7/F8

But lets play ball…
What have we done till now and what does work and what doesn’t

Like I have mentioned above, I have made a package. I have builded with

• Debug Information: on
• Local Symbols: on
• Stack Frames: on
• The rest: default

The paths (of the package) are set as:
• Output directory : $(USR)\Bpl
• Unit output directory : $(USR)\lib\Delphi10
• Search Path :
• Debug source path : $(USR)\Source
• DCP output directory : $(USR)\Bpl
The package was build and installed. Several Delphi settings were changed ( let’s say added) :

• Library path : $(USR)\Bpl + $(USR)\Lib\Delphi10
• Browsing path : $(USR)\Source
• Debug DCU path : $(USR)\Lib\Delphi10\Debug ( that is the parking place of the with debuginfo compiled units )

I Have made al little test project and I have dropped my component on a form. After the build of the project I saw that point 1 was OK, because the source of the component was not recompiled.
Point 2, 3 and 4 did not work, but point 5 ( and that sounds weird ) did work.
Point 6 does not work at this moment, but the source of the problem is that the package was build with the Debug info, so we take care afterwards.
The magic thing is that all my demands do work with native VCL-components, I have tested them piece by piece with a TButton.

So, who sees the light? Who can help me out? If it is possible, but it must be because the people from Borland are able to.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top