HOW TO INSTALL A COMPONENT ON DELPHI

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

HOW TO INSTALL A COMPONENT ON DELPHI

Postby Kambiz » November 26th, 2008, 11:59 am

If you don't know how to install a component that does not have its own package, read the next post or follow the following link:
http://delphi.about.com/od/vclusing/ss/installpasvcl.htm
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: Don't know how to install a component?

Postby ZardoZ » April 8th, 2009, 4:31 am

Delphi 2007, 2009 always require dpk file.
Menu "Install Component" removed.
ZardoZ
Member
Member
 
Posts: 1
Joined: April 8th, 2009, 4:23 am
Location: Russia

Re: Don't know how to install a component?

Postby Kambiz » April 27th, 2009, 6:10 pm

To add a component that do not have its own package, you have to add the component's files in to a new or existing package, and then rebuild/install the package.

To create a new package on Delphi 2009 follow these steps:

  1. From IDE menu bar select: File » New » Other...
  2. Select Delphi Projects category from the tree, and then select Package, and press OK.
  3. Rename the package to whatever you want. But remember to choose a unique name.
    1.png
    Renaming package
    1.png (14.83 KiB) Viewed 28977 times
  4. Right click on Contains section, and the click on Add... item to add component files (usually *.pas files) to the package.
    2.png
    Adding files to the package
    2.png (10.13 KiB) Viewed 28978 times
  5. Some components (those who define their own property editors) may need a reference for DesignIDE.dcp file. To do so, right click on Requires section, and then click on Add Reference... item. You can find DesignIDE.dcp in Lib path of your Delphi installation.
    3.png
    Adding references to the package
    3.png (16.43 KiB) Viewed 28979 times
  6. Now right click on the package's name, and select Install item to install the components. If the components are already installed, you should select Compile or Rebuild items.
    4.png
    Installing the package
    4.png (17.25 KiB) Viewed 28978 times
  7. Finally, save and close the package.


But it's not done yet. You have to be sure that the components' files are in search path of Delphi. Follow these steps now:

  1. From the IDE menu bar select: Tools » Options...
  2. Select Library - Win32 category, and then click button with ellipsis which is in front of Library Path.
    5.png
    Library Path
    5.png (52 KiB) Viewed 28977 times
  3. For each path components' (unit) files, enter or browse/select path in the edit box and then click the Add button.
    6.png
    Adding component's path
    6.png (28.5 KiB) Viewed 28977 times
  4. And finally close two dialog boxes by clicking on the OK buttons.

Procedure of adding new packages/components to other versions of Delphi is more or less similar to Delphi 2009.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: Don't know how to install a component?

Postby mjsmithsr » April 28th, 2009, 12:41 am

I followed the instructions but it failed at step 6 with the following message:

[DCC Fatal Error] RotImgReg.pas(19): F1026 File not found: 'DesignIntf.dcu'
mjsmithsr
Member
Member
 
Posts: 2
Joined: April 27th, 2009, 2:31 pm

Re: Don't know how to install a component?

Postby Kambiz » May 3rd, 2009, 1:28 pm

Make sure DELPHIAREA.INC to be either in the same folder of component's units or in Delphi search path.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby AbdiA » December 14th, 2010, 2:12 pm

My problem is the same.Working with Delphi 2007, I can't install RotateImage, however I followed your instructions. At install, message is
'File not found: DsgnIntf.dcu'.
DELPHIAREA.INC is in MyLib.
What can I do?
AbdiA
Member
Member
 
Posts: 3
Joined: December 14th, 2010, 1:28 pm

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby Kambiz » December 14th, 2010, 2:32 pm

Add DesignIDE.dcp to the required clause of the package. This file is located in Lib path of your Delphi installation.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby AbdiA » December 14th, 2010, 7:13 pm

Of course, I added DesignIDE dcp. to the required clause of the package (strictly followed the steps you wrote), and AFTER recieved 'File not found: DsgnIntf.dcu' message.
Must I add something else to the required clause ? Any idea?
AbdiA
Member
Member
 
Posts: 3
Joined: December 14th, 2010, 1:28 pm

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby data man » December 15th, 2010, 9:30 pm

AbdiA wrote:File not found: DsgnIntf.dcu'

Check your DELPHIAREA.INC. In the Delphi 2007 unit named as DesignIntf
2B OR NOT 2B = FF - sometimes the code is only code (almost Duerf Omolhcs Dnumsigis) ©
The best plugin for FAR is Windows 7 ©
User avatar
data man
Active Member
Active Member
 
Posts: 5
Joined: December 6th, 2010, 2:19 am
Location: Outskirts of The Milky Way

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby AbdiA » December 16th, 2010, 2:46 pm

It succeeded. Thank you for the help.
AbdiA
Member
Member
 
Posts: 3
Joined: December 14th, 2010, 1:28 pm

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby kaouane » January 12th, 2011, 6:22 pm

Thank you very very very much Kambiz;
Baraka allaho fika ya rajol.
kaouane
Active Member
Active Member
 
Posts: 14
Joined: January 12th, 2011, 5:02 pm
Location: Algiers, Algeria

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby PCPete » March 14th, 2012, 5:05 am

Hi, sorry to ask such a stupid question, but I'm having problems getting FindFile demo to run in Delphi 2010.

I'm a very experienced Delphi developer (since 1985!!), but I almost never deal with installing or building components myself.

If I open the original DPR, then I immediately get the error :
Code: Select all
Field MainForm.FindFile does not have a corresponding component. Remove the declaration? (Y/N/C/H)


Interestingly, if I answer "No", the project compiles fine, but of course I get an invalid access error as soon as I click the 'Find' button.

So, if I follow the D2009 instructions for building a package using the FindFile.pas source, then install that package, I get a new component tab called "Delphi Area" with the new component showing.

However... if I add the component to the form, it automatically names the component 'FindFile1'. If I try to rename it, it tells me the component declaration already exists. So if I comment out the
Code: Select all
FindFile : TFindFile;
in the MainForm's class declaration, I can successfully rename the component. The project then compiles fine (as it does without the component, as described above).

However, then when I click 'Find' in the running application, nothing happens. Tracing the code, the component appears to be initialised, and performs a search, but uses null (empty) strings, not the strings entered in the main form's edit fields.

What am I doing wrong?

Again, I apologise for asking such a basic question; but without a good understanding of how components are supposed to work, and whether or not they need to be built when they obviously already exist in the calling source, is really confusticating for me!

Thanks in advance for any suggestions.

Oh, yeah, I'm running this on Win7 x64 Premium, on a Core i5 2.9GHz (Gigabyte Z68X-UD3H-B3 mobo), with 16G physical RAM and all bog-standard config settings.
PCPete
Member
Member
 
Posts: 1
Joined: March 14th, 2012, 4:50 am

Re: HOW TO INSTALL A COMPONENT ON DELPHI

Postby Kambiz » March 24th, 2012, 2:49 pm

Because you have already opened and saved the demo before installing the components, the demo file is corrupted.
Just download the component once again and run the demo.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron