Recent

Author Topic: Stand Alone Qt5/6 library releases.  (Read 1480 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2995
    • tomboy-ng, a rewrite of the classic Tomboy
Stand Alone Qt5/6 library releases.
« on: December 11, 2023, 11:53:11 pm »
I know this has been discussed before but the current situation really is really making it a real problem.

Qt5 and Qt6 have made huge strides in recent months, for many people its preferable to gtk2 on Linux.  But end users are very, very uncomfortable when it comes to installing a third (or fourth) party library when they download and install our applications.

Further, because of the lag time between release of a product and its appearance in the distros it will be a much long time before we can assume even half our end users will have access to an appropriate library. 18 months in the case of Debian and all its spin offs.

The problem lies with linking libqt[5,6]Pas release to the corresponding Lazarus release.  The Qt libraries have been ready to go for some months now, we see no sign of a Lazarus release. I am not sure, maybe the libraries were finalized before Debian Bookworm was released. But distros will not take software until its formally released !

zeljko, can we please spin libqt5/6pas off as a standalone library ?  Get it out there now ?  If it goes into Debian Trixie soon, it will be picked up by, eg, Ubuntu 24.04 which is a long term release. If we miss that, it would be sad indeed !

Move it into a new tree under https://gitlab.com/freepascal.org/lazarus, give it your blessing and Alexey and I will start harrassing the distros.

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1632
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Stand Alone Qt5/6 library releases.
« Reply #1 on: December 12, 2023, 08:00:16 am »
Yes, I agree that qt5 and qt6 should be moved from lazarus tree, I'll discuss it with other developers first.

Bad Sector

  • Jr. Member
  • **
  • Posts: 69
    • Runtime Terror
Re: Stand Alone Qt5/6 library releases.
« Reply #2 on: December 24, 2023, 10:06:52 pm »
One alternative - and a bit hacky but it seems to work - is to link libQt6Pas statically. You need to modify the Qt6Pas.pro file to make it build a static library and then modify the qt62.pas file in lcl/interfaces/qt6 so that it links with the static library (you need to install it system-wide so the linker can find it).

Here is an image showing this in practice: https://i.imgur.com/Cw89XtC.png

Notice the required libraries in the top left terminal, it links against the Qt6 (and C++) libraries directly instead of via Qt6Pas. The modifications to qt62.pas are shown in the Lazarus source editor and the modification to Qt6Pas.pro in the bottom left terminal.

I just tried and haven't done any excessive testing, however i did something similar to link statically against Gtk1 itself (so that the binary only requires X11 and can run even if Gtk1 isn't installed - which is the case in pretty much all distros out there :-P) and tried it in a bunch of systems and worked, so i'd expect this to work too.

Obviously this is for binary downloads and wont work with source releases as it requires modifying the LCL interface code.
Kostas "Bad Sector" Michalopoulos
Runtime Terror

 

TinyPortal © 2005-2018