Difference between revisions of "Installing Qt binary packages"

From GeopsyWiki
Jump to navigation Jump to search
Line 1: Line 1:
Note that Geopsy packages are developed and tested with Qt 4.5.0 or higher. At the time of writing this documentation, Qt 4.5.0 is not the standard version of most of the distributions listed here below.
+
Note that Geopsy packages (latest version 3.3.3) are developed and tested with Qt 5.14.0 or higher. At the time of writing this documentation, Qt 5.15 is not the standard version of most of the Linux distributions. Successful builds were reported with Qt 5.11. Error were encountered with Qt 5.9. If a sufficiently recent Qt is not available on your platform you can follow this tutorial to install binaries provided directly from [https://qt.io Qt].
  
== Preliminary tests ==
+
== Downloading online installer ==
  
On some Linux distributions, ''qmake'' is not directly available, but ''qmake4'' or ''qmake-qt4''. ''qmake'' utility certainly belongs to Qt 3 as checked here below.
+
[https://qt.io qt.io] is a fancy commercial website but not really handy to get access to the open-source Qt package
  
  qmake -version
+
* Go to [https://qt.io Qt]
  # Qmake version: 1.07a (Qt 3.3.8b)
+
* Click on "Download. Try. Buy" green button in the top right corner
  # Qmake is free software from Trolltech ASA.
+
* Scroll down to "Downloads for open source users"
 +
* Click on "Go open source" green button
 +
* Scroll down to bottom of the page
 +
* Click on "Download the Qt Online Installer" green button
 +
* Scroll down to the frame entitled "Your download"
 +
* Click on "Download" green button
 +
* You should get at least the download dialog box of your browser asking to open file "qt-unified-linux-x64-4.0.0-online.run"
  
Unless you want to compile softwares based on the old Qt 3, replacing ''qmake'' by ''qmake-qt4'' has no side effects. In any case, you can restore the initial state after installation is completed.
+
Great you have the file. Simple no?
  
  which qmake-qt4
+
== Change permissions and run the installer ==
  # /usr/bin/qmake-qt4
 
  cd /usr/bin
 
  mv qmake qmake-qt3
 
  ln -s qmake-qt4 qmake
 
  
If ''qmake4'' or ''qmake-qt4'' refers to version 4.5.0, Qt is properly installed, you can return to the [[Installation:Linux#Lapack|installation of Geopsy softwares]].
+
* Change permission to be able to execute it
  
== Ubuntu ==
+
  $ chmod a+x qt-unified-linux-x64-4.0.0-online.run
  
Run in a terminal:
+
* And start the installer
  
sudo apt-get install qt4-qmake
+
  $ ./qt-unified-linux-x64-4.0.0-online.run
sudo apt-get install libqt4-dev
 
  
Or install those packages through "Synaptic Software Manager" under Ubuntu<=10.04, "KPackageKit" under KUbuntu or a similar graphical software manager for more recent Ubuntu releases.
+
* You have to create a Qt account (as simple as breathing, isn't it?), if you have already one enter your credentials.
 +
* Click on "Next"
 +
* Certify that you have read and approve the obligations of using Open Source Qt
 +
* Click on "Next"
 +
* You receive a great "Welcome", nothing to do
 +
* Click on "Next"
 +
* Make your choice if you want or not to send pseudonymous,... it is up to you
 +
* Click on "Next"
 +
* A very important step: select the destination path, choose it carefully. It is better to avoid moving or renaming it later on.
 +
* Select "Default desktop installation"
 +
* Click on "Next"
 +
* Accept the license
 +
* Click on "Next"
 +
* Click on "Install"
  
== Gentoo ==
+
Now the the real installation starts. It may last a little bit.
  
Install Qt:
+
== The final touch ==
  
  emerge -av qt
+
Qt and the whole Qt Creator development environment is now installed.
  
You can wait for half an hour or so. Then, you are ready to continue the [[Installation:Linux#Lapack|installation of Geopsy softwares]].
+
  $ ls /path/you/chose/for/Qt
 +
    5.14.2          dist  Examples            installer.dat      Licenses        MaintenanceTool.dat  network.xml  Tools
 +
    components.xml  Docs  InstallationLog.txt  installerResources  MaintenanceTool  MaintenanceTool.ini  QtIcon.png
  
At the present time, to get Qt 4.5.1, you have to accept unstable keywords.
+
The interesting part of Qt is in folder 5.14.2 (or another version)
  
   ACCEPT_KEYWORDS="~x86" emerge -av qt
+
   $ ls /path/you/chose/for/Qt/5.14.2/gcc_64
 +
    bin/          include/      mkspecs/      plugins/      translations/
 +
    doc/          lib/          phrasebooks/  qml/
  
or
+
'qmake' building tool is in 'bin'. Add this path to your PATH
  
   ACCEPT_KEYWORDS="~amd64" emerge -av qt
+
   export PATH=/path/you/chose/for/Qt/5.14.2/gcc_64/bin:$PATH
  
== Fedora ==
+
If you do not want to pollute your .bashrc, create a file "env" where you intend to build geopsypack:
  
''TODO: graphical presentation''
+
  #!/bin/bash
 +
  export PATH=/path/you/chose/for/Qt/5.14.2/gcc_64/bin:$PATH
  
Tested on Fedore Core 10 for i386 target.
+
Whenever you want to start building geopsypack, source this file.
  
Package to install:
+
  source ./env
 
 
qt-devel
 
 
 
By default, Qt 4 on Fedora comes with suffix ''-qt4'' added to development tools (qmake, lrelease,...)
 
The best option is to define alias in your profile or symbolic links to these binaries
 
 
 
cd
 
test -d bin || mkdir bin
 
cd bin
 
ln -s /usr/bin/qmake-qt4 qmake
 
ln -s /usr/bin/lrelease-qt4 lrelease
 
 
 
Add ''~/bin'' to you PATH ([[Setting PATH variable|more information]])
 
 
 
Check that ''qmake'' is available.
 
 
 
qmake -v
 
 
 
== open SUSE ==
 
 
 
''TODO: graphical presentation''
 

Revision as of 21:16, 20 November 2020

Note that Geopsy packages (latest version 3.3.3) are developed and tested with Qt 5.14.0 or higher. At the time of writing this documentation, Qt 5.15 is not the standard version of most of the Linux distributions. Successful builds were reported with Qt 5.11. Error were encountered with Qt 5.9. If a sufficiently recent Qt is not available on your platform you can follow this tutorial to install binaries provided directly from Qt.

Downloading online installer

qt.io is a fancy commercial website but not really handy to get access to the open-source Qt package

  • Go to Qt
  • Click on "Download. Try. Buy" green button in the top right corner
  • Scroll down to "Downloads for open source users"
  • Click on "Go open source" green button
  • Scroll down to bottom of the page
  • Click on "Download the Qt Online Installer" green button
  • Scroll down to the frame entitled "Your download"
  • Click on "Download" green button
  • You should get at least the download dialog box of your browser asking to open file "qt-unified-linux-x64-4.0.0-online.run"

Great you have the file. Simple no?

Change permissions and run the installer

  • Change permission to be able to execute it
 $ chmod a+x qt-unified-linux-x64-4.0.0-online.run
  • And start the installer
 $ ./qt-unified-linux-x64-4.0.0-online.run
  • You have to create a Qt account (as simple as breathing, isn't it?), if you have already one enter your credentials.
  • Click on "Next"
  • Certify that you have read and approve the obligations of using Open Source Qt
  • Click on "Next"
  • You receive a great "Welcome", nothing to do
  • Click on "Next"
  • Make your choice if you want or not to send pseudonymous,... it is up to you
  • Click on "Next"
  • A very important step: select the destination path, choose it carefully. It is better to avoid moving or renaming it later on.
  • Select "Default desktop installation"
  • Click on "Next"
  • Accept the license
  • Click on "Next"
  • Click on "Install"

Now the the real installation starts. It may last a little bit.

The final touch

Qt and the whole Qt Creator development environment is now installed.

 $ ls /path/you/chose/for/Qt
   5.14.2          dist  Examples             installer.dat       Licenses         MaintenanceTool.dat  network.xml  Tools
   components.xml  Docs  InstallationLog.txt  installerResources  MaintenanceTool  MaintenanceTool.ini  QtIcon.png

The interesting part of Qt is in folder 5.14.2 (or another version)

 $ ls /path/you/chose/for/Qt/5.14.2/gcc_64
    bin/          include/      mkspecs/      plugins/      translations/ 
    doc/          lib/          phrasebooks/  qml/ 

'qmake' building tool is in 'bin'. Add this path to your PATH

 export PATH=/path/you/chose/for/Qt/5.14.2/gcc_64/bin:$PATH

If you do not want to pollute your .bashrc, create a file "env" where you intend to build geopsypack:

 #!/bin/bash
 export PATH=/path/you/chose/for/Qt/5.14.2/gcc_64/bin:$PATH

Whenever you want to start building geopsypack, source this file.

 source ./env