Lazarus

Programming => Widgetset => QT => Topic started by: dbannon on November 24, 2019, 02:50:50 am

Title: Qt5 bindings for Ubuntu 18.04
Post by: dbannon on November 24, 2019, 02:50:50 am
Some discussion here https://forum.lazarus.freepascal.org/index.php/topic,47125.msg340226.html about making it easier to get QT5 widget set going on LTS Ubuntus a bit easier.

I have made two deb files that replace the Ubuntu 18.04 official repo version of libQt5Pas1 and, if needed the dev version of the same thing. As I cannot upload debs to here, they are on my apps Github page, see  https://github.com/tomboy-notes/tomboy-ng/releases/latest

The main one is suitable for you to direct your end users to install before installing a QT5 app on Ubuntu 18.04 or to install over top of an existing (repo based) libQt5Pas1.  It will also install Qt5 if necessary if you use something that resolves dependencies ie
Code: [Select]
sudo apt install ./libqt5pas1_2.6~beta-5_amd64.deb <enter>But remember you MUST prepend the ./ to the filename or set a valid path to the filename. And don't use the silly 'Software' application to install it, it will not resolve dependencies. No reason why you should not use the contents of that deb in your own deb file.

If you already have the development version of libqt5pas, then you MUST uninstall it before installing the new library, the new library breaks the official Ubuntu -dev package. after installing the new package, install its companian -dev package, you need that to develop Qt5 apps with Lazarus.

Note that this approach is not necessary for U19.10 and will not help at all for U16.04

Please test, if others find this useful I will reference it on the wiki.

Background - all I have done is download the official Ubuntu packages, opened them up, replaced the library with one built according to the Lazarus instructions, uped the version number and altered the homepages and maintainer contact. Rebuilt the debs with rev'ed version number.

Davo
Title: Re: Qt5 bindings for Ubuntu 18.04
Post by: ChrisR on November 25, 2019, 06:17:46 pm
Davo-

I tested your libqt5pas1 on a Ubuntu 18.04 machine and it worked like a charm for running applications. The dev file allowed my to compile new QT5 applications with Lazarus on 18.04. Great job. This is very useful.
Title: Re: Qt5 bindings for Ubuntu 18.04
Post by: dbannon on November 27, 2019, 03:53:11 am
Good, thanks for letting me know ChrisR, I'll pop some reference to it onto the QT Widget page - https://wiki.freepascal.org/Qt5_Interface

Davo
Title: Re: Qt5 bindings for Ubuntu 18.04
Post by: ChrisR on December 02, 2019, 05:08:35 pm
Davo-

Yaroslav Halchenko rebuilt the bindings for 18.04 and added them to the NeuroDebian repository:
  http://neuro.debian.net/index.html#how-to-use-this-repository

This would allow users to get the fixed version as long as neurodebian is part of their sources list, e.g.

wget -O- http://neuro.debian.net/lists/bionic.us-nh.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
sudo apt-get update
sudo apt install libqt5pas1

I have checked and it works on my 18.04 system. If others can confirm that it is the solution, maybe it can be moved to the default Debian repositories.
Title: Re: Qt5 bindings for Ubuntu 18.04
Post by: dbannon on December 02, 2019, 10:31:25 pm
ChrisR, did you also get the -dev package ?  End users dont need it but you do ...

Davo
Title: Re: Qt5 bindings for Ubuntu 18.04
Post by: ChrisR on December 23, 2019, 04:34:03 pm
Davo-
  Yaroslav provides the QT5pas package, but not the dev package. I got that from your Github repository, but I will ask Yaroslav if he can also host the dev package. QT5 is looking really good on Lazarus, the developers deserve a lot of credit.
Title: Re: Qt5 bindings for Ubuntu 18.04
Post by: dbannon on December 23, 2019, 11:18:19 pm
While fine for dev work, i am not totally convinced this is a good approach for end users who use U18.04.  I have a separate machine I build each release of my app on, its U18.04 and at least 6 to 8 times now, its compile has failed with messages about Qt5. Each time I fix it by uninstalling and reinstalling the updated libqt5pas* packages but I am quite sure they have not been overwritten so cannot work out why its necessary.

So, I am reluctant to suggest this is an end user solution. Great for people like 'us' who are happy to do that  uninstall - reinstall but you cannot ask end users to do that.  So, for my app, I still also ship a GTK2 version and U18.04 is quite happy with it. Sigh ....

Davo
TinyPortal © 2005-2018