I am working on a component for delphi 7and for quick installation without having to touch. IDEI am making a simple installer according to this Marjan Venema SO 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' }
{
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;
It works great! [enter image description here] [2]
C:\Program Files\Borland\Delphi7\Projects\Bpl\Pack.bpl. but installed id componenthidden
can anyone tell me how unhide componentto install?
EDIT
may be useful:
1) I already have a bplcomponent file , so I copy directly to the directory delphi 7 C:\Program Files\Borland\Delphi7\Projects\Bpland modify the registry HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Known Packages.
2) registercomponent procedure
implementation
procedure Register;
begin
RegisterComponents('comp', [Tcomp]);
end;
source
share