Search code examples
delphicomponentsdelphi-7custom-component

Delphi 7, installed component is hidden on installation


I am working on a component for Delphi 7 and for quick installation without having to touch the IDE. I am making a simple installer according to this answer.

    procedure TForm1.Button1Click(Sender: TObject);
    var
      sDelphi7PackageName : string;
      sDelphi7Path,fileSource,fileDest : string;
      sDelphi7packBPL,sDelphi7PathMenuBPL  : string;
    begin
       sDelphi7Path:=ReadRegistryValues('\Software\Borland\Delphi\7.0',FALSE,'RootDir',1,TRUE);{<-- returns the 'C:\Program Files\Borland\Delphi7' }

      {#1. Install .bpl}
      sDelphi7BPL:=sDelphi7Path+'\Projects\Bpl\Pack.bpl';
      WriteValueToRegisTry('\Software\Borland\Delphi\7.0\Known   Packages',FALSE,sDelphi7BPL,'Delphi 7 compo Bpl File'); {<-- writes to the registry}
     
      fileSource:=ExtractFilePath(Application.ExeName)+'\Packages\comPack.bpl';
      fileDest:=sDelphi7BPL;
      CopyFile(PChar(fileSource), PChar(fileDest), False);
      end;

This works fine:

Delphi Programming BPL Files

C:\Program Files\Borland\Delphi7\Projects\Bpl\Pack.bpl. but the component installed id hidden

can anyone tell me how to unhide the component on installation?

EDIT

May be useful:

  1. I already have the bpl file of the component so I am copying it directly to the Delphi 7 directory C:\Program Files\Borland\Delphi7\Projects\Bpl and modifying the registry HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Known Packages.

  2. The register procedure of the component

    implementation procedure Register; begin RegisterComponents('comp', [Tcomp]); end;


Solution

  • In the registry, under HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Palette, find the entry named 'comp.Hidden' and edit it to remove the class name of your component (or delete the entry altogether).