Author Topic: Error installing EyeCandyControls via OPM  (Read 1270 times)

chrv

  • Jr. Member
  • **
  • Posts: 71
Error installing EyeCandyControls via OPM
« on: July 24, 2023, 11:19:39 am »
Hi all,

When trying to (re)install ECControls via OPM, i get the message "Cannot compile package" > error "Cannot install packege: "eccontrols.lpk".
(see attached PNG)

If i compile the package  eccontrols V0.9.58, i get "eccontrols.pas(11,3) Fatal: Cannot find LazarusPachageIntf used by eccontorls. Check if package FCL is in the dependencies of package eccontrols"   >> No

I tried several times without succes. What can i try now ?
Win32 Laz 2.0.12 FPC 3.2.0 AND Laz 3.4 FPC 3.2.2

Fibonacci

  • Hero Member
  • *****
  • Posts: 1089
  • Behold, I bring salvation - Unleashed Pascal
    • fibo.gg
Re: Error installing EyeCandyControls via OPM
« Reply #1 on: July 24, 2023, 11:30:15 am »
Can't help you but I can check if it compiles, and the result is in the attachment

FPC 3.3.1 and IDE 3.99, x86

Maybe reinstall will help
Unleashed Pascal: async/await, parallel for, match, tuples, string interpolation, inline vars, autofree, no-RTTI & tons more. Star on GitHub

chrv

  • Jr. Member
  • **
  • Posts: 71
Re: Error installing EyeCandyControls via OPM
« Reply #2 on: July 24, 2023, 11:55:31 am »
Thank you for trying to help

Reinstalling lazarus is not an option ... for now

FPC 3.2 Lasarus 2.0.12 Win10 32
Win32 Laz 2.0.12 FPC 3.2.0 AND Laz 3.4 FPC 3.2.2

Handoko

  • Hero Member
  • *****
  • Posts: 5560
  • My goal: build my own game engine using Lazarus
Re: Error installing EyeCandyControls via OPM
« Reply #3 on: July 24, 2023, 12:19:57 pm »
If reinstalling Lazarus is not allowed, maybe you can consider to install multiple Lazaruses in the same computer.

Quote
The main purpose of fpcdeluxe is to provide a means for installing and updating multiple versions of FPC and Lazarus in a self-contained manner. Self-contained meaning that an install by fpcupdeluxe will have no influence on (interference with) your system: Hence you can install multiple versions of FPC and Lazarus.
Source: https://wiki.freepascal.org/fpcupdeluxe

If you're afraid of something bad might happen with your current Lazarus installation, you can create a backup of your Windows system before trying fpcupdeluxe:
Win10 > System Restore > Create a restore point.

wp

  • Hero Member
  • *****
  • Posts: 13665
Re: Error installing EyeCandyControls via OPM
« Reply #4 on: July 24, 2023, 12:48:07 pm »
The issue is that the EyeCandy package is stored in the new Lazarus format of xml files - the author should have checked the box "Maximize compatibility of LPK files" in the package options to avoid this.

Nevertheless, you can fix the format of the lpk file yourself: Download the "fixlp" tool from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/applications/fixlp/ (use the "Download snapshot" button) and compile it. Copy the binary into the EC_Controls folder of your EC_Controls installation and execute
Code: [Select]
fixlp eccontrols.lpk
Now you should be able to compile the package. Start the IDE, go to "Package" > "Open Package File (.lpk)" and open the eccontrols.lpk file. Click on "Compile" to compile the package - it should work now. Then click on "Use" > "Install" and allow the IDE to rebuild itself. After a while the IDE restarts and you have the EyeCandy Controls on the component palette.

--------------------

[EDIT]
Or, to avoid having to patch the lpk file, I am attaching an already-patched version of eccontrols.lpk. Simply extract the file from the attached zip and write it over the orginal file in your installation. Then proceed with "Package" > "Open Package file".
« Last Edit: July 24, 2023, 12:56:20 pm by wp »

chrv

  • Jr. Member
  • **
  • Posts: 71
Re: Error installing EyeCandyControls via OPM
« Reply #5 on: July 24, 2023, 01:49:39 pm »
[SOLVED]
@Handoko: Thanks for your response. I already use FPCupDelux. Works well.
@wp: (as usual) you're right. Thanks to you, ECControls are correctly (re)installed on my system. Thank you so much.
Win32 Laz 2.0.12 FPC 3.2.0 AND Laz 3.4 FPC 3.2.2

madref

  • Hero Member
  • *****
  • Posts: 1123
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Error installing EyeCandyControls via OPM
« Reply #6 on: August 11, 2026, 05:21:41 pm »
I know this is an old thread...
But now we are using Lazarus Trunk 4 and EyeCandy is giving problems again.


Now it the procedure TCustomECProgressBar.DrawGroove;
Error: ecprogressbar.pas(663,19) Error: Wrong number of parameters specified for call to "Scale"
Code: Pascal  [Select][+][-]
  1.             aStr:=Scale.GetStringPosition(Position, ProgressDigits)+aStr;


Can any1 help?
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Tahoe 26.2
Lazarus 4.99 (rev main_4_99-5237-g51ac8a52ee) FPC 3.3.1 x86_6

wp

  • Hero Member
  • *****
  • Posts: 13665
Re: Error installing EyeCandyControls via OPM
« Reply #7 on: August 11, 2026, 11:56:56 pm »
Put a "Self." before the "Scale":
Code: Pascal  [Select][+][-]
  1.  aStr:=Self.Scale.GetStringPosition(Position, ProgressDigits)+aStr;
This is because this line is inside a "with Canvas do" block, and FPC 3.3.1 added a "Scale" method to TCanvas...

For Laz 4.99 there is another compilation issue, in ECSwitch, SetState, where the method "CompareMethods" is not found - replace it by "SameMethod(--- same arguments ---)".

madref

  • Hero Member
  • *****
  • Posts: 1123
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Error installing EyeCandyControls via OPM
« Reply #8 on: August 12, 2026, 12:46:05 am »
Thanks WP
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Main Platform:
--------------
Mac OS X Tahoe 26.2
Lazarus 4.99 (rev main_4_99-5237-g51ac8a52ee) FPC 3.3.1 x86_6

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4743
  • I like bugs.
Re: Error installing EyeCandyControls via OPM
« Reply #9 on: August 12, 2026, 08:46:00 am »
Put a "Self." before the "Scale":
...
This is because this line is inside a "with Canvas do" block, and FPC 3.3.1 added a "Scale" method to TCanvas...
A good example of problems caused by "with". Code is changed. Then some other code far away which has not been changed for years breaks.
"with" should be used sparingly! A robust solution here would be to remove the "with Canvas do" block and use "Canvas." prefix.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018