Avatar of peterx
peterx

asked on 

Problems with new (old) components

I just installed Delphi 5 E, and now i´m
installing some new components.
The problem is that after installing a couple,
and they work ok, i tried to install a component
called TRoundButton, programmed by Brendan Rempel
in October 1996 (worked ok in Delphi 3).
It givs error messages about 16 bit...
and asks then if its ok to recompile dclusr50.dpk
(1 kb) in lib folder. After doing that it doesn´t work,
and all the other new components have disappeared
too from components bar, but the files are still there
in their own folders in lib.
The same thing happened after i tried to
install RX Library 2.60 component (http://rx.demo.ru).
How can I prevent this from happening?

Thanks in advance
Peter
Delphi

Avatar of undefined
Last Comment
peterx
Avatar of peterx
peterx

ASKER

PS.
It seems to happen with all the new components,
after installing a new one Delphi compiles dclusr50.dpk,
and registers the new component and unregisters the
previous one. (Both are still in the library path, but
only the latest one is in the palette)
Avatar of simonet
simonet
Flag of Brazil image

In order for components to be installed in Delphi 5, they must follow one of the rules above:

- Be a PAS file that complies to the new code standards set with Delphi 5 (minor differences from D4, so most components will work)

- Be a Delphi 5 DCU, built for the same service level of the Delphi 5 you have. So far there has been only one service pack released for D5. DCUs built for D2/3/4 will not work. DCUs built for a different service pack of D5 won't work either.


BTW, what is exactly this "16-bit" message?

Alex
Avatar of peterx
peterx

ASKER

LCDLabel component gives following error mess:
first a box: cannot access package information for package
DCLUSR50.BPL  and then after compiling
[Fatal Error] dclusr50.dpk(33):
Read error on 'c:\borland\delphi5\lib\lcdlabel\LCD_Lab.dcu'

RButton after compiling:
[Warning] Unit 'Bpanel' implicitly imported into package 'Dclusr50'
[Warning] Unit 'Rbutton' implicitly imported into package 'Dclusr50'
[Error] RLINK32: Unsupported 16bit resource in file
"c:\borland\delphi5\Lib\rbutton\bpreg.dcr"

I have installed all components after reading the text file,
and done excatly like it says.
(using the .dcu or .pas file)
Both of them cause all the other new components to disappear!
In all the descriptions for the components they say that the
only line I have to change when installing is the 'Unit file name',
and the rest hsould be left as default, in my case the package
file name is always:
c:\borland\delphi5\Lib\dclusr50.dpk
is this right?
Avatar of simonet
simonet
Flag of Brazil image

Here's how to fix the errors:

>Read error on 'c:\borland\delphi5\lib\lcdlabel\LCD_Lab.dcu'

That DCU was built for another version of Delphi. Unless you have LCD_Lab.PAS, there's nothing you can do.

>[Error] RLINK32: Unsupported 16bit resource in file

Open the offending file in Image Editor (it was installed when you installed Delphi) and then simply save the file. this will convert it to a 32-bit resource file.

>Both of them cause all the other new components to disappear!

That's because Delphi needs all the components in the entire package to be working ok, or the package won't be installed, thus causing all the components it contains to disappear from the IDE. Once you get the problems above solved, everything will be back to normal.

>and done excatly like it says. (using the .dcu

Make sure the DCUs are built for the exact version of Delphi you have or they will give the save error as LCD_Lab.DCU, causing the entire package installation to fail.

>c:\borland\delphi5\Lib\dclusr50.dpk

That's fine.


Alex
Avatar of mhervais
mhervais

if I understand well your message,
the compile seems to be unable to read a DCR File which is usually a file dedicated to store Images, cursors ...

what I would do, AFTER MAKING a COPY OF THIS FILE is to try to open this DCR with d5's image editor to see if it loads everything (with D5 -> Tools -> Image editor),

and if everything looks fine, to save this file again with save as... under the same name.

Might be better after

HTH

Marc
Avatar of simonet
simonet
Flag of Brazil image

>file dedicated to store Images,

A DCR is simply a resource file (just like any .RES file) and can store anything.

Alex
Avatar of peterx
peterx

ASKER

I have all the .pas files,
do you mean that if I load and compile them in Delphi 5
and then install the component,
everything should work?
Avatar of simonet
simonet
Flag of Brazil image

No, you should install the PAS file, not the DCU. If you have the PAS files, you can forget about the DCUs.

The biggest flaw here (and I strongly blame Borland for that), is that when you are installing a component, the open file dialog box for the "Install component" dialog defaults to the DCU, so users do not see the PAS files.

In that open file dialog, you should set the file type combo box to the PAS files, not the DCUs. If that option is now shown, simply type *.PAS file the filename and the pas files will be displayed. Install them instead of the correspondent DCUs.

Alex
Avatar of peterx
peterx

ASKER

Resaving the .dcr file fixed one problem :)
However after installing the second new component
I got the same f. message:

The component palette has been updated as a result
of rebuilding installed package
c:\borland\delphi5\Projects\Bpl\dclusr50.bpl.
The following component(s) have been registered:TGradientFill.
The following component(s) are no longer registered:TDigitalDisplay.
Avatar of simonet
simonet
Flag of Brazil image

>The component palette has been updated as a result of rebuilding installed package

That's a good message! Means that all components could be compiled by Delphi.

>The following component(s) have been registered:TGradientFill.

Good too!

>The following component(s) are no longer registered:TDigitalDisplay.

You forgot to add the file of that component to the package. Reinstall only that component (the PAS file) to dclusr50.dpk and everything will work.

Alex

Avatar of peterx
peterx

ASKER

Fantastic!
Now I could install four new components and they all worked,
but when I closed Delphi and restarted it,
they weren´t there anymore.
What am I doing wrong?
Avatar of simonet
simonet
Flag of Brazil image

Hmmm... let's go through a checklist:

1) Dif you let Delphi save the DPK file before closing it?

2) Are the generated DPL/BPL files in the Delphi search path? (look for dclusr50.dpl and .bpl, and make sure they are in Delphi's library path).

3) Go to Components | Install packages and make sure that the package "Borland User Components" package is installed and checked.

If all that fails, let me know.

yours,

Alex
Avatar of peterx
peterx

ASKER

sorry the delay, my network was down.

I don´t have a dclusr50.dpl
but in folder ..\Projects\Bpl\ I have these files:

dclusr50.~bpl
dclusr50.bpl
dclusr50.dcp

This is my library path after installing two components,
which both are gone again after rebooting:

$(DELPHI)\Lib;$(DELPHI)\Bin;$(DELPHI)\Imports;
$(DELPHI)\Projects\Bpl;$(DELPHI)\lib\digitaldisplay;$(DELPHI)\lib\lcdlabel

This is the quetion I get when I close Delphi,
and I choose 'Yes'.
Save changes to project Dclusr50?
ASKER CERTIFIED SOLUTION
Avatar of simonet
simonet
Flag of Brazil image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of peterx
peterx

ASKER

Adjusted points from 25 to 100
Avatar of peterx
peterx

ASKER

Yes it was.
Thanks a million Alex!!!!!
(100)
Regs
Peter
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo