Lazarus

Programming => Packages and Libraries => Topic started by: MartynA on November 19, 2019, 06:06:56 pm

Title: Installing RX library in Lazarus v.2.0.6 (again)
Post by: MartynA on November 19, 2019, 06:06:56 pm
I posted this q https://forum.lazarus.freepascal.org/index.php/topic,47443.0.html (https://forum.lazarus.freepascal.org/index.php/topic,47443.0.html) over the weekend, and as it hasn't had an answer, I've continued trying to install the RX library myself.  I've made a bit of progress but am stuck again.

The page here

https://wiki.lazarus.freepascal.org/RXfpc (https://wiki.lazarus.freepascal.org/RXfpc)

was last updated on 10 December 2018.  The link in the Download section leads me to here

https://sourceforge.net/projects/lazarus-ccr/files/rxfpc (https://sourceforge.net/projects/lazarus-ccr/files/rxfpc)

where the most recent version is rxfpx 1.1.5.98 dated 1 September 2007, which predates Lazarus v.2 by over a decade.  I'll come back to this download in a moment.

I cannot get the link in the SVN section of wiki.lazarus.freepascal.org/RXfpc to open using TortoiseSVN - I get the error message

  Unable to connect to a repository at URL 'https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/rx (https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/rx)'
  'svnroot/lazarus-ccr/components/rx' path not found

(Btw, I am not a regular TortoiseSVN user, I just installed it to try and make progress with this exercise.)

So, continuing with rxfpx 1.1.5.98, I download this to my \Lazarus2\Components\rx folder and try to compile the package rxnew.  Until I edit rxnew.lpk and folderlister.pli I get the error message about rx which pops up the PackageGraph window.  Once I have made that edit, the package starts to compile but compilation fails at line 402 of dbutils.pas

 
Code: Pascal  [Select]
  1.      Bookmark := DataSet.Bookmark;
  2.  
with the message

  dbutils.pas(402,26) Error: Incompatible types: got "TBytes" expected "AnsiString"

which I'm guessing is due to some change in the definition of TDataSet since the rxnew.lpk
package dated 1 September 2007.

So, could somebody please confirm whether the links in

https://wiki.lazarus.freepascal.org/RXfpc (https://wiki.lazarus.freepascal.org/RXfpc)

are correct and update them if not.

Alternatively, assuming there is no more recent version of sourceforge.net/projects/lazarus-ccr/files/rxfpc is available, please could someone suggest how to correct the 'Incompatible types' error above.

Thanks, Martyn
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: winni on November 19, 2019, 06:37:06 pm
Hi

I think the latest version from 2018 is this:

https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/rx/trunk/ (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/rx/trunk/)

But it looks all realy chaotic: No author, no maintainer and 10 years no update.

Winni
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: wp on November 19, 2019, 06:48:49 pm
The first place where you should look for a package is the Online Package Manager which you can access from Lazarus menu "Packages". Check the item "rx", click "Install", wait... - that's all. Normally. In case of RX it is a bit more complicated because it contains several addon-packages which depend on other packages. If you don't want to install these you should open the "rx" node in the Online Package Manager and uncheck the items "rxdbgrid_export_fpspreadsheet", "rxdbgrid_print", "rx_lazreport" and "rx_sort_zeos"  before the installation.

I tested this and failed with Laz 2.0.6. Failure also with Laz trunk.
(*) No problem with Laz 2.0.4.

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

I updated the link to the svn version in the wiki article.

[EDIT & UPDATE]
(*) As discussed below (reply #8) the failure is due a mixup of paths to different rx versions on my system.
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: wp on November 19, 2019, 06:51:49 pm
But it looks all realy chaotic: No author, no maintainer and 10 years no update.
This is not correct. Alexey is very active, also here in the forum. The last update of the svn sources was on Oct 28.
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: winni on November 19, 2019, 07:02:20 pm
A component group which is last edition is from 2007 - it seems.

And there is somewhere an update from 2018.

And I shall have the idea to look in the Online Packet Manager.

Boy - you are funny!

Winni
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: wp on November 19, 2019, 08:07:21 pm
The problem is not the library itself which is very well maintained and supported - it is the wiki where nobody has noticed that the links are outdated until MartinA's post. I fixed the links and updated the installation description.

And yes: there are so many crappy Lazarus packages out there that the Online Package Manager is always the first choice to find a working version! Users more likely report broken OPM packages than broken wiki links.
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: kjteng on November 20, 2019, 03:05:17 am
I  installed rxnew package (version 3.3.2.220) with Lazarus v.2.0.6 (under windows 7) ... no problem.
I got the code from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/rx/
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: GetMem on November 20, 2019, 06:26:12 am
@wp

I don't have any problem installing rx from OPM. I tried both with Lazarus 2.0.6 and Trunk, FPC 3.0.4.
Title: Re: Installing RX library in Lazarus v.2.0.6 (again)
Post by: wp on November 20, 2019, 10:46:36 am
Installation of the OPM-rx into Laz 2.0.6 crashed with message 'rxToolbar.pas: Identifier not found "sTop"'. I found "sTop" in unit rxdconst - but this was taken from the rx trunk that I have on my disk, too. After cleaning up package paths (removing rx trunk directory in "Package" > "Package links") I got this running. I could fix the installation for Laz trunk in the same way.

There is still an issue with rx, although not with the OPM version, but with the trunk version. Trying to compile rxnew.lpk with Laz 2.0.6 fails in RxDBBGrid because the grid property OnUserCheckboxImage does not exist in the ancestor. It does exist in Laz trunk, but not in Laz 2.0.6.

Alex, I hope you don't mind that I updated the rx svn repository with an IF version check condition around this property.