Forum > Packages and Libraries

LazAutoUpdate package needs an update

(1/2) > >>

indydev:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Uses  Classes, SysUtils, LCLVersion, LCLPlatformDef; Function GetFileVersion: String;Function GetProductVersion: String;Function GetCompiledDate: String;Function GetCompilerInfo: String;Function GetTargetInfo: String;Function GetOS: String;Function GetResourceStrings(oStringList : TStringList) : Boolean;Function GetLCLVersion: String;function GetWidgetSet: string; Const  WIDGETSET_GTK        = 'GTK widget set';  WIDGETSET_GTK2       = 'GTK 2 widget set';  WIDGETSET_WIN        = 'Win32/Win64 widget set';  WIDGETSET_WINCE      = 'WinCE widget set';  WIDGETSET_CARBON     = 'Carbon widget set';  WIDGETSET_QT         = 'QT widget set';  WIDGETSET_fpGUI      = 'fpGUI widget set';  WIDGETSET_OTHER      = 'Other gui'; Implementation Uses  resource, versiontypes, versionresource, InterfaceBase;  {$IF (lcl_major > 0) and (lcl_minor > 6)}, LCLPlatformDef {$ENDIF};  //commenting out this line fixes first error 
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:
The author of LazAutoUpdate has a user page on the wiki. It contains contact information.

Bart

wp:
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:
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:
@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.

Navigation

[0] Message Index

[#] Next page

Go to full version