2014-02-26 03:00:30 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE note PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
2015-11-13 22:24:57 +08:00
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2014-02-26 03:00:30 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
|
|
|
|
2015-09-21 06:38:20 +08:00
|
|
|
<!-- $LastChangedBy$
|
|
|
|
$Date$ -->
|
2014-02-26 03:00:30 +08:00
|
|
|
|
|
|
|
<sect3>
|
|
|
|
<title>Choosing Qt Program Versions</title>
|
|
|
|
|
|
|
|
<para>If you install both Qt4 and Qt5, you can use some simple
|
2015-11-13 22:24:57 +08:00
|
|
|
scripts to select the currently active set of Qt programs. As the
|
2014-02-26 03:00:30 +08:00
|
|
|
<systemitem class="username">root</systemitem> user, create
|
|
|
|
the following scripts:</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>cat > /usr/bin/setqt4 << 'EOF'
|
2015-04-01 01:58:49 +08:00
|
|
|
<literal>if [ "x$QT5DIR" != "x/usr" ] && [ "x$QT5DIR" != "x" ]; then pathremove $QT5DIR/bin; fi
|
2014-03-04 21:30:09 +08:00
|
|
|
if [ "x$QT4DIR" != "x/usr" ]; then pathprepend $QT4DIR/bin; fi
|
2014-02-26 03:00:30 +08:00
|
|
|
echo $PATH</literal>
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>cat > /usr/bin/setqt5 << 'EOF'
|
2015-04-01 01:58:49 +08:00
|
|
|
<literal>if [ "x$QT4DIR" != "x/usr" ] && [ "x$QT4DIR" != "x" ]; then pathremove $QT4DIR/bin; fi
|
2014-02-26 03:00:30 +08:00
|
|
|
if [ "x$QT5DIR" != "x/usr" ]; then pathprepend $QT5DIR/bin; fi
|
|
|
|
echo $PATH</literal>
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
|
|
|
<para>You should now be able to use the appropriate Qt version by running
|
2014-03-01 07:16:23 +08:00
|
|
|
<command>source setqt4</command> or <command>source setqt5</command> as
|
2014-02-26 03:00:30 +08:00
|
|
|
desired. (Setting the PATH wont work in a subshell.) Another technique that
|
|
|
|
can be used is to create appropriate alias additions to your ~/.bashrc like
|
|
|
|
<command>alias setqt4='source setqt4'</command>.</para>
|
|
|
|
|
|
|
|
</sect3>
|