Recent

Author Topic: SplahAbout error  (Read 1431 times)

chrv

  • Jr. Member
  • **
  • Posts: 68
SplahAbout error
« on: June 26, 2024, 12:38:09 pm »
Hi all,

Trying go install SplashAbout.lpk(1.4.3.0) in lasarus 3.2 via OPM.
I get un error message saying <Cannot install pakage: "splashabout.lpk">
I can trace to uversion at line 111
Code: Pascal  [Select][+][-]
  1. function GetWidgetSet: string;
  2. begin
  3.   case WidgetSet.LCLPlatform of
  4.     lpGtk:   Result := WIDGETSET_GTK;
  5.     lpGtk2:  Result := WIDGETSET_GTK2;
  6.     lpWin32: Result := WIDGETSET_WIN;
  7.     lpWinCE: Result := WIDGETSET_WINCE;
  8.     lpCarbon:Result := WIDGETSET_CARBON;
  9.     lpQT:    Result := WIDGETSET_QT;
  10.     lpfpGUI: Result := WIDGETSET_fpGUI;
  11.   else
  12.     Result:=WIDGETSET_OTHER;
  13.   end;
  14. end;
It seams the compaler don't know about lb... (lpGtk, lpGtk2, lpWin32...).
What am I missing ?
Win32 Laz 2.0.12 FPC 3.2.0 AND Laz 3.4 FPC 3.2.2

BlueIcaro

  • Hero Member
  • *****
  • Posts: 804
    • Blog personal
Re: SplahAbout error
« Reply #1 on: June 26, 2024, 01:01:02 pm »
Hello, I have SplashAbout installed por OPM. I don't have any problem.

I use Lazarus 3.4 with fpc 3.2.2 (last release).

If you are using Win32 Lazarus 2.0.12 FPC 3.2.0 as you said in your foot of your message. May be you need update you Lazarus

/BlueIcaro

Thaddy

  • Hero Member
  • *****
  • Posts: 16198
  • Censorship about opinions does not belong here.
Re: SplahAbout error
« Reply #2 on: June 26, 2024, 01:55:31 pm »
Well, the code is not correct anyway: win32 and gtk3 and a couple of Qt's....
That code needs serious attention....
Hard coding versions is and has never been a good idea. Simply bad code that happens to work for most, by accident, but it doesn't for some....
« Last Edit: June 26, 2024, 02:07:25 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

chrv

  • Jr. Member
  • **
  • Posts: 68
Re: SplahAbout error
« Reply #3 on: June 26, 2024, 02:00:36 pm »
Thank you for your reply.

I installed Lazarus 3.1 via OPM (Lazarus 2.0.12 is also installed on this same PC).
This works correctly for all installed components (more than 20, including PowerdBy).
Installation fails only with SplashAbout.
Win32 Laz 2.0.12 FPC 3.2.0 AND Laz 3.4 FPC 3.2.2

Thaddy

  • Hero Member
  • *****
  • Posts: 16198
  • Censorship about opinions does not belong here.
Re: SplahAbout error
« Reply #4 on: June 26, 2024, 02:10:13 pm »
Glad it works for you, but the code that you found is indeed wrong, it was never your problem: the Laz maintainers should fix that code!
If I smell bad code it usually is bad code and that includes my own code.

wp

  • Hero Member
  • *****
  • Posts: 12471
Re: SplahAbout error
« Reply #5 on: June 26, 2024, 03:48:23 pm »
the Laz maintainers should fix that code!
What a nonsense! The SplashAbout package is third-party code and has never been part of Lazarus. Why should the Lazarus team fix it? Primarily it is the package author's task to do this. I am aware that the original author probably has retired and will not maintain the package any more - that's his good right! He already did a lot donating his work to the FP/Laz community.

I've been picking up a lot of abandoned packages and tried to keep them up and running. But this one is a particularly difficult case. From all my knowledge SplashAbout is hosted on sourceforge ccr, and the most current version there is 1.2.1.2 - it is compiling and running fine with current Lazarus and does not contain the faulty code discussed here (although I would vote to give the package some visual brush-up). But why is the OPM version so many versions head - it is marked as v1.4.3.0? Who brought in the faulty code? How is this possible? Unfortunately the OPM package infrastructure is not transparent, it is not clear when new packages arrive and are replacing old versions, in particular since this now no longer happens in that "eternal" Online-Package-Manager forum thread...

I am trying to contact the OPM maintainer "GetMem", and ask to revert the version 1.4.3 to 1.2.1.2/ccr.
« Last Edit: June 26, 2024, 05:31:49 pm by wp »

chrv

  • Jr. Member
  • **
  • Posts: 68
Re: SplahAbout error
« Reply #6 on: June 26, 2024, 04:55:50 pm »
@wp
splashabout V1.2.1.2 installed without problem from sourceforge ccr

Thanks a lot
Win32 Laz 2.0.12 FPC 3.2.0 AND Laz 3.4 FPC 3.2.2

Thaddy

  • Hero Member
  • *****
  • Posts: 16198
  • Censorship about opinions does not belong here.
Re: SplahAbout error
« Reply #7 on: June 26, 2024, 05:31:49 pm »
Sorry my fault, I thought is was part of the distribution.
Does not mean that the code is not at fault, so it is not nonsense: it is bad code.
If I smell bad code it usually is bad code and that includes my own code.

gsa

  • New Member
  • *
  • Posts: 11
Re: SplahAbout error
« Reply #8 on: June 26, 2024, 06:03:24 pm »

But why is the OPM version so many versions head - it is marked as v1.4.3.0? Who brought in the faulty code? How is this possible?


It seems the original author himself created version 1.4.3.0 (see https://wiki.lazarus.freepascal.org/SplashAbout)

The wiki page mentions a download link to "http://www.charcodelvalle.com/splashabout/splashabout_component.zip ". This link is not a valid one.

The WidgetSet.LCLPlatform types (lpGtk, lpGtk2, lpGtk3, ....) moved to LCLPlatformDef two or three years ago.

If you replace the unit "uversion.pas" by the attached one then OPM Version 1.4.3.0 will compile.

Gerd

wp

  • Hero Member
  • *****
  • Posts: 12471
Re: SplahAbout error
« Reply #9 on: June 26, 2024, 06:13:29 pm »
You are right. But svn log messages show that the original auther ("gbamber") made modifications in the ccr files later in Janary 2020. Therefore, I think that v1.2.1.2 is the most current one. Maybe the ccr version should be given a new version number, v.1.4.4 or v1.4.3.1, to become consistent with the wiki?

 

TinyPortal © 2005-2018