Jump to content
Prem1

Component installation.

Recommended Posts

Since having to reinstall Windows 11 with the save files and programs. It trashed my Delphi 10.4 community and I had to reinstall, then reinstall the component, "asyncpro" with some difficulty. I could not reinstall the component, "StatusBar Pro". For some reason it will not register in the component toolbar. What has changed in the method of installing components. I do not know, so I need some help if possible.

Share this post


Link to post

I do not get any error messages. Statusbar Pro has two files, "SPPro.pas, SBProReg.pas and include file, DELPHIAREA.INC". After doing a install component using SBPro.pas, it has put the resulting SBpro.bpl in the correct place. When I do an install component using SBProReg.pas it will not register the component in the component toolbar. This means I cannot put my statusbar pro statusbar back in my window, though all references to the status bar pro in my programme are accepted.

Thank you for your help.

Share this post


Link to post

if your "component" use a particular folder to store your BPL, you can try use default place (just let empty the OutPut to BPL/DCP on Project-Options-Compiling...) then the BPL/DCP goes to c:\users\PUBLIC\..Embarcadero folders (the default)

you can look if your unit "Register" use any special name to register your class to any specific pallete (look "RegisterComponents('Page Name', [<<array of class-compnents] )" and try changed for any other name not used

Share this post


Link to post

The progress so far. It is now showing errors in SBPro.pas. In the uses clause it cannot find the "Graphics" unit, the "Forms" unit, the "Menus" unit, the "ComCtrls" unit and the "Imglist" unit.

The problem is now. I have no idea where to find these myself.

Edited by Prem1

Share this post


Link to post

old IDE dont used "namespaces" when using external unit on "USES" clause, like this:

Quote

uses
  Windows,
  Messages,
  SysUtils,
  Variants,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs; // old way

current modern IDE, use "namespaces" OR NOT, to reference the unit, like this:

Quote

uses
  Winapi.Windows,
  Winapi.Messages,
  System.SysUtils,
  System.Variants,
  System.Classes,
  Vcl.Graphics,
  Vcl.Controls,
  Vcl.Forms,
  Vcl.Dialogs;   // RAD 11.3 using namespaces mode!

  //

  // in FireMonkey, is used:  FMX.xxxxxx-unit-name;

both above, have the same resulted by default in new modern IDE, like RAD XE...10.XX

 

this way, it's just to (Embarcadero) "organize" the unit the belong to same scope of usage! for example: Vcl.xxx, Vcl.yyy = belong to VCL framework!

 

this said, try use or remove the "namespaces" before unit name in your "USES" clause!

 

look at the "magic" happens when you dont use the "namespaces" in unit name:

Sem título.png

Edited by programmerdelphi2k
  • Thanks 1

Share this post


Link to post

if you dont get, try upload 3 files above and I can try install it in my IDE and see the problem... ok?

  • "SPPro.pas, SBProReg.pas and include file, DELPHIAREA.INC"  if exists others, upload it too!  zip...
Edited by programmerdelphi2k

Share this post


Link to post

Sorry for not being able to reply to you straightaway, but I was out all day yesterday. Uploaded zip file, or you should be able to pick up the necessary files via: http://www.g0dcp.co.uk/programs/sbprov1.81.zip. It is also still available from the Delphi area website: http://www.delphiarea.com/products/delphi-components/sbpro/.

Thank you for your help.

sbprov1.81.zip

Edited by Prem1

Share this post


Link to post

@Prem1

 

Im using RAD 11.3 Arch, and your files was installed without errors:

  • you need:
    1. Create a new Package VCL -> File New-Packages
    2. Add your 2 units into this package: SBPro.pas, SBProReg.pas   (was not necessary any other units from DelphiArea site)
    3. Add the "DESIGNIDE.DCP" in "requires" session:  ..\<<RAD-dir>>\LIB\Win32\Release  
    4. Add the "ToolAPI" path in your project "Search" -->  Project->Options->Delphi Compiler->Search Path  ( debug / release mode)
    5. build and install it!!!

image.thumb.png.4189a310c3528b7e6ca934f54dbc0eaf.png    image.thumb.png.56a5ed066f4448dbb715660f900a8b6b.png

Edited by programmerdelphi2k
  • Thanks 1

Share this post


Link to post

to compile the DBProDemo.dpr  add in your Project->Options->Delphi Compiler->Search Path -->> where is the DCUs files from new package

 

 

Sem título3.png

 

// SBProDemo...

unit Main;

{ ...$I DELPHIAREA.INC }  // <-------------

interface

uses
  Windows,
  Messages,
  SysUtils,
  Classes,
  Graphics,
  Controls,
  Forms,
  Dialogs,
  Menus,
  SBPro, {$IFDEF COMPILER4_UP} ImgList, {$ENDIF} Gauges,      // <-------------
  ExtCtrls, 
  StdCtrls,
  System.ImageList,
  Vcl.ImgList;      // <------------- not problem now!!!

type
  TForm1 = class(TForm)
    StatusBarPro1: TStatusBarPro;

 

Edited by programmerdelphi2k
  • Like 1

Share this post


Link to post

Thanks once again for your help. Your hints finally helped me to succeed. One thing I always doing wrong, was that I was compiling the registry file as a stand-alone file, instead of compiling it within the package. Once I did it right, its name registered on the component toolbar and working okay.

Thank you very much. Your help has been much appreciated.

Best regards
Prem

Edited by Prem1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×