The qtchooser package contains a wrapper used to select between Qt binary versions.
This package is known to build and work properly using an LFS-7.6 systemd platform.
Download (HTTP): http://macieira.org/qtchooser/qtchooser-39-g4717841.tar.gz
Download MD5 sum: fcf1b5e8373147e48ce72b9c1ffe3d10
Download size: 32 KB
Estimated disk space required: 1.6 MB
Estimated build time: less than 0.1 SBU
Qt-4.8.6 (for the testsuite)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/qtchooser
If both Qt4 and Qt5 are installed on the system, then Qt4 should be set as default unless stated otherwise.
Install qtchooser by running the following commands:
patch -Np1 -i ../qtchooser-39-upstream_fixes-1.patch && make
To test the results, issue: make check.
Now, as the root
user:
make install
The /etc/xdg/qtchooser/default.conf
configuration file contains paths to the Qt binaries and libraries which will be used
when the wrapper is run. It is ussually a symlink to a package
specific file, such as 4.conf
or
5.conf
. In first case, when
invoking the wrappers, Qt4
equivalents will be invoked. In second case, Qt5 equivalents will be invoked.
If both Qt4 and Qt5 are installed in /usr
, create the configuration files by running
the following commands as the root
user:
install -v -dm755 /etc/xdg/qtchooser && cat > /etc/xdg/qtchooser/qt4.conf << "EOF"/usr/lib/qt4/bin /usr/lib
EOF cat > /etc/xdg/qtchooser/qt5.conf << "EOF"/usr/lib/qt5/bin /usr/lib
EOF
If both Qt4 and Qt5 are installed in /opt
, create the configuration files by running
the following commands as the root
user:
install -v -dm755 /etc/xdg/qtchooser && cat > /etc/xdg/qtchooser/qt4.conf << "EOF"/opt/qt4/lib/qt4/bin /opt/qt4/lib
EOF cat > /etc/xdg/qtchooser/qt5.conf << "EOF"/opt/qt5/lib/qt5/bin /opt/qt5/lib
EOF
Replace /opt/qt4
and/or
/opt/qt5
if you used different
prefix.
To set Qt4 as the default, run
the following command as the root
user:
ln -sfv qt4.conf /etc/xdg/qtchooser/default.conf
To set Qt5 as the default, run
the following command as the root
user:
ln -sfv qt5.conf /etc/xdg/qtchooser/default.conf
You can also select default Qt using an environment variable.
To set Qt4 as the default, run the following command:
export QT_SELECT=qt4
To set Qt5 as the default, run the following command:
export QT_SELECT=qt5
Last updated on 2014-08-24 04:24:00 -0700