Recent

Author Topic: LazAutoUpdate package needs an update  (Read 1138 times)

indydev

  • Jr. Member
  • **
  • Posts: 64
LazAutoUpdate package needs an update
« on: November 23, 2023, 08:39:43 pm »
Using the OPM I tried to install LazAutoUpdate package and got an error. I opted to open with the package manager and found that it wouldn't compile. Going through the code I found two errors.  The first is in versionsupport.pas where a unit reference is duplicated

Code: Pascal  [Select][+][-]
  1. Uses
  2.   Classes, SysUtils, LCLVersion, LCLPlatformDef;
  3.  
  4. Function GetFileVersion: String;
  5. Function GetProductVersion: String;
  6. Function GetCompiledDate: String;
  7. Function GetCompilerInfo: String;
  8. Function GetTargetInfo: String;
  9. Function GetOS: String;
  10. Function GetResourceStrings(oStringList : TStringList) : Boolean;
  11. Function GetLCLVersion: String;
  12. function GetWidgetSet: string;
  13.  
  14. Const
  15.   WIDGETSET_GTK        = 'GTK widget set';
  16.   WIDGETSET_GTK2       = 'GTK 2 widget set';
  17.   WIDGETSET_WIN        = 'Win32/Win64 widget set';
  18.   WIDGETSET_WINCE      = 'WinCE widget set';
  19.   WIDGETSET_CARBON     = 'Carbon widget set';
  20.   WIDGETSET_QT         = 'QT widget set';
  21.   WIDGETSET_fpGUI      = 'fpGUI widget set';
  22.   WIDGETSET_OTHER      = 'Other gui';
  23.  
  24. Implementation
  25.  
  26. Uses
  27.   resource, versiontypes, versionresource, InterfaceBase;
  28.   {$IF (lcl_major > 0) and (lcl_minor > 6)}, LCLPlatformDef {$ENDIF};  //commenting out this line fixes first error
  29.  

I am unsure why that line is there if there isn't an {$IF} {$ENDIF} around the first unit reference in the main uses clause.  Maybe there is something that will cause me trouble later?  I don't see how.

The second has to do with LazUTF8SysUtils  and the useof TStringListUTF8 in ushortcut.pas. The LazUTF8SysUtils unit is deprecated and the use of TStringListUTF8 no longer needed.  See https://wiki.freepascal.org/Lazarus_3.0_release_notes#LazUTF8Classes_and_LazUTF8SysUtils_units

I renamed LazUTF8SysUtils to LazSysUtils since some of the functionality remains in that unit (although it may not be needed at all for this package), and replaced TStringListUTF8 with TStringList throughout ushortcut.pas.

I suppose some {$IF}{$ENDIF} blocks will be needed to maintain backwards compatibility, but I don't need that.

I am posting here as I saw a reference to posting here in the documentation.

Bart

  • Hero Member
  • *****
  • Posts: 5289
    • Bart en Mariska's Webstek
Re: LazAutoUpdate package needs an update
« Reply #1 on: November 23, 2023, 10:12:53 pm »
The author of LazAutoUpdate has a user page on the wiki. It contains contact information.

Bart

wp

  • Hero Member
  • *****
  • Posts: 11915
Re: LazAutoUpdate package needs an update
« Reply #2 on: November 23, 2023, 10:51:18 pm »
I think the original sources of the development version are in the lazautoupdate folder of ccr (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/lazautoupdate/latest_stable/). Loading the versionsupport unit I see a different uses line compared to what you show in the first post, LCLPlatformDef is not mentioned any more. I compiled with Laz/main+fpc3.2.2 and with Laz/main+fpc/main and got no errors.

So please could you check the ccr version of lazautoupdate; if that is ok we just need to update the OPM version.

indydev

  • Jr. Member
  • **
  • Posts: 64
Re: LazAutoUpdate package needs an update
« Reply #3 on: November 24, 2023, 05:24:54 am »
The OPM downloads version 0.3.8, yet the JSON content says 0.3.9 and the address does point to the 0.3.9 version. Maybe you already changed it? These files are different from what I downloaded from the OPM. These files work.

balazsszekely

  • Guest
Re: LazAutoUpdate package needs an update
« Reply #4 on: November 24, 2023, 06:20:58 am »
@indydev
I updated the package in OPM.

PS: You can always check if an updated version of a particular package is available on the author's website. You have to enable "Check external repositories..." in OPM->Options, then wait a few minutes(please see attached image for more details). This is not true for every package, but in case of LazAutoUpdate, version 0.3.9 was already available on sourceforge.
« Last Edit: November 24, 2023, 07:16:21 am by GetMem »

indydev

  • Jr. Member
  • **
  • Posts: 64
Re: LazAutoUpdate package needs an update
« Reply #5 on: November 24, 2023, 07:43:53 pm »
I spoke too soon. Linux still does not work due to the use of LazUTF8Classes. I PM'd the author. He's been on the forum recently.

 

TinyPortal © 2005-2018