glfs/x/lib/qt4.xml

748 lines
23 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY qt4-download-http
"http://download.qt-project.org/official_releases/qt/4.8/&qt4-version;/qt-everywhere-opensource-src-&qt4-version;.tar.gz">
<!ENTITY qt4-download-ftp " ">
<!ENTITY qt4-md5sum "2edbe4d6c2eff33ef91732602f3518eb">
<!ENTITY qt4-size "231 MB">
<!ENTITY qt4-buildsize "2.0 GB">
<!ENTITY qt4-time "37 SBU">
]>
<sect1 id="qt4" xreflabel="Qt-&qt4-version;">
<?dbhtml filename="qt4.html" ?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Qt-&qt4-version;</title>
<indexterm zone="qt4">
<primary sortas="a-Qt">Qt</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Qt</title>
<para>
<application>Qt</application> is a cross-platform application
framework that is widely used for developing application software
with a graphical user interface (GUI) (in which cases Qt is classified
as a widget toolkit), and also used for developing non-GUI programs such
as command-line tools and consoles for servers. One of the major users
of <application>Qt</application> is <application>KDE</application>.
</para>
&lfs75_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&qt4-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&qt4-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &qt4-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &qt4-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &qt4-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &qt4-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Qt Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="xorg7-lib"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="alsa-lib"/>,
<xref linkend="mesalib"/>,
<xref linkend="cacerts"/>,
<xref linkend="glib2"/>,
<xref linkend="icu"/> (unicode support),
<xref linkend="libjpeg"/>,
<xref linkend="libmng"/>,
<xref linkend="libpng"/>,
<xref linkend="libtiff"/>,
<xref linkend="openssl"/>, and
<xref linkend="sqlite"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="cups"/>,
<xref linkend="gtk2"/> (GTK+ 2 theme support),
<xref linkend="gst-plugins-base"/> (For QtWebKit HTML5 Video),
<xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
<xref linkend="postgresql"/>,
<xref linkend="pulseaudio"/>, and
<xref linkend="unixodbc"/>
</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/qt4"/>
</para>
</sect2>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../../xincludes/qt-alternatives.xml"/>
<sect2 role="installation">
<title>Installation of Qt</title>
<caution>
<para>
If you did not install some of the recommended dependencies, examine
<command>./configure --help</command> output to check how to disable
them or use internal versions bundled in the source tarball.
</para>
</caution>
<warning>
<para>
If <application>Qt4</application> is being reinstalled into the
same directory as an existing instance, run the commands done by
<systemitem class="username">root</systemitem> such as
<command>make instal</command> from a console or non-Qt4 based
window manager. It overwrites <application>Qt4</application>
libraries that should not be in use during the install process.
</para>
</warning>
<note>
<para>
The build time and space required for the full
<application>Qt</application> is quite long. The instructions below
do not build the tutorials and examples. Removing the
<parameter>-nomake</parameter> lines will create a complete build.
</para>
</note>
<para>
Fix DoS vulnerability in the GIF image handler:
</para>
<screen><userinput>sed -i -e '631a if (image->isNull()) { state = Error; return -1; }' \
src/gui/image/qgifhandler.cpp</userinput></screen>
<!-- ==== Method 1 ====== -->
<bridgehead renderas="sect3">Method 1: Installing in /usr</bridgehead>
<para>
Install <application>Qt4</application> into the <filename
class='directory'>/usr</filename> hierarchy by running the following
commands:
</para>
<screen><userinput>export QT4LINK=/usr
sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \
config.tests/unix/libmng/libmng.cpp &amp;&amp;
sed -i '/CONFIG -/ a\isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..' \
src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro &amp;&amp;
./configure -prefix /usr \
-bindir /usr/bin \
-plugindir /usr/lib/qt4/plugins \
-importdir /usr/lib/qt4/imports \
-headerdir /usr/include/qt4 \
-datadir /usr/share/qt4 \
-sysconfdir /etc/xdg \
-docdir /usr/share/doc/qt4 \
-demosdir /usr/share/doc/qt4/demos \
-examplesdir /usr/share/doc/qt4/examples \
-translationdir /usr/share/qt4/translations \
-confirm-license \
-opensource \
-release \
-dbus-linked \
-openssl-linked \
-system-sqlite \
-no-phonon \
-no-phonon-backend \
-no-nis \
-no-openvg \
-nomake demos \
-nomake examples \
-optimized-qmake &amp;&amp;
make</userinput></screen>
<para>
This package does not come with a test suite.
</para>
<para>
Remove references to the build directory from the
<filename class="extension">.pc</filename> files by running
the following command:
</para>
<screen><userinput>find . -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \;</userinput></screen>
<para>Now as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
rm -rf /usr/tests</userinput></screen>
<para>
Remove references to the build directory from installed files by
running the following command as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>for file in 3Support CLucene Core DBus Declarative DesignerComponents \
Designer Gui Help Multimedia Network OpenGL Script \
ScriptTools Sql Svg Test UiTools WebKit XmlPatterns Xml phonon; do
[ -e /usr/lib/libQt${file}.prl ] &amp;&amp;
sed -r '/^QMAKE_PRL_BUILD_DIR/d;s/(QMAKE_PRL_LIBS =).*/\1/' \
-i /usr/lib/libQt${file}.prl
done
unset file</userinput></screen>
<!-- ==== Method 2 ====== -->
<bridgehead renderas="sect3">Method 2: Installing in /opt/qt-&qt4-version;</bridgehead>
<para>
This section provides for installing Qt4 almost all of the files in the
<filename class="directory">/opt</filename> directory.
</para>
<screen><userinput>export QT4DIR=/opt/qt-&qt4-version; &amp;&amp;
export QT4LINK=/opt/qt4 &amp;&amp;
sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" \
config.tests/unix/libmng/libmng.cpp &amp;&amp;
sed -i '/CONFIG -/ a\isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..' \
src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro &amp;&amp;
./configure -prefix $QT4DIR \
-sysconfdir /etc/xdg \
-confirm-license \
-opensource \
-release \
-dbus-linked \
-openssl-linked \
-system-sqlite \
-plugin-sql-sqlite \
-no-phonon \
-no-phonon-backend \
-no-nis \
-no-openvg \
-nomake demos \
-nomake examples \
-optimized-qmake &amp;&amp;
make</userinput></screen>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install
ln -svfn $QT4DIR /opt/qt4</userinput></screen>
<para>
Remove references to the build directory from installed files by
running the following command as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>for file in `basename -a -s .prl $QT4DIR/lib/lib*.prl`; do
sed -r -e '/^QMAKE_PRL_BUILD_DIR/d' \
-e 's/(QMAKE_PRL_LIBS =).*/\1/' \
-i $QT4DIR/lib/${file}.prl
perl -pi -e "s, -L$PWD/?\S+,,g" $QT4DIR/lib/pkgconfig/${file##lib}.pc
done
unset file</userinput></screen>
<!-- ==== Common ====== -->
<bridgehead renderas="sect3">Continuing for Both Methods</bridgehead>
<para>
For all methods, install images and create the menu entries
for installed applications. Be sure that the <envar>QT4LINK</envar>
variable is defined in root's environment and
as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>install -v -Dm644 src/gui/dialogs/images/qtlogo-64.png \
/usr/share/pixmaps/qt4logo.png &amp;&amp;
install -v -Dm644 tools/assistant/tools/assistant/images/assistant-128.png \
/usr/share/pixmaps/assistant-qt4.png &amp;&amp;
install -v -Dm644 tools/designer/src/designer/images/designer.png \
/usr/share/pixmaps/designer-qt4.png &amp;&amp;
install -v -Dm644 tools/linguist/linguist/images/icons/linguist-128-32.png \
/usr/share/pixmaps/linguist-qt4.png &amp;&amp;
install -v -Dm644 tools/qdbus/qdbusviewer/images/qdbusviewer-128.png \
/usr/share/pixmaps/qdbusviewer-qt4.png &amp;&amp;
install -dm755 /usr/share/applications &amp;&amp;
cat &gt; /usr/share/applications/assistant-qt4.desktop &lt;&lt; EOF
<literal>[Desktop Entry]
Name=Qt4 Assistant
Comment=Shows Qt4 documentation and examples
Exec=$QT4LINK/bin/assistant
Icon=assistant-qt4.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;</literal>
EOF
cat &gt; /usr/share/applications/designer-qt4.desktop &lt;&lt; EOF
<literal>[Desktop Entry]
Name=Qt4 Designer
Comment=Design GUIs for Qt4 applications
Exec=$QT4LINK/bin/designer
Icon=designer-qt4.png
MimeType=application/x-designer;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;</literal>
EOF
cat &gt; /usr/share/applications/linguist-qt4.desktop &lt;&lt; EOF
<literal>[Desktop Entry]
Name=Qt4 Linguist
Comment=Add translations to Qt4 applications
Exec=$QT4LINK/bin/linguist
Icon=linguist-qt4.png
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;</literal>
EOF
cat &gt; /usr/share/applications/qdbusviewer-qt4.desktop &lt;&lt; EOF
<literal>[Desktop Entry]
Name=Qt4 QDbusViewer
GenericName=D-Bus Debugger
Comment=Debug D-Bus applications
Exec=$QT4LINK/bin/qdbusviewer
Icon=qdbusviewer-qt4.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Debugger;</literal>
EOF
cat &gt; /usr/share/applications/qtconfig-qt4.desktop &lt;&lt; EOF
<literal>[Desktop Entry]
Name=Qt4 Config
Comment=Configure Qt4 behavior, styles, fonts
Exec=$QT4LINK/bin/qtconfig
Icon=qt4logo.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Settings;</literal>
EOF</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<command>sed -i ...</command>: First command fixes detection of
<application>libmng</application> 2.0 and second one prevents configure
script from writing to the root directory if building as privileged user.
</para>
<para>
<parameter>-confirm-license</parameter>: Accept license
without prompting user during configuration.
</para>
<para>
<parameter>-opensource</parameter>: Install the opensource
version of <application>Qt</application>.
</para>
<para>
<parameter>-release</parameter>: This switch disables
building with debugging symbols.
</para>
<para>
<parameter>-nomake examples -nomake demos</parameter>:
These switches disable building programs that are only of
interest to a developer using <application>Qt</application>.
</para>
<para>
<parameter>-system-sqlite</parameter>: This switch enables use
the system version of <application>SQLite</application>.
</para>
<para>
<parameter>-no-nis</parameter>: This switch disables support
for Network Information Service (NIS) which has been
deprecated in recent versions of <application>Glibc</application>.
</para>
<para>
<parameter>-no-phonon -no-phonon-backend</parameter>: These
switches disable building of the bundled
<application>Phonon</application> library. Better version
is provided by <xref linkend="phonon"/> package.
</para>
<para>
<parameter>-dbus-linked -openssl-linked</parameter>: These
switches enable explicit linking of the
<application>D-Bus</application> and
<application>OpenSSL</application> libraries into
<application>Qt</application> libraries instead of
<command>dlopen()</command>-ing them.
</para>
<para>
<parameter>-no-openvg</parameter>: This switch disables
<application>OpenVG</application> support in
<application>Qt</application>.
</para>
<para>
<parameter>-optimized-qmake</parameter>: This switch enables
building of the optimized <command>qmake</command> program.
</para>
<para>
<option>-no-dbus</option>: Use this switch if you don't have
<application>D-Bus</application> installed.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Qt</title>
<sect3 id="qt4-config">
<title>Configuration Information</title>
<para>
If you installed <application>Qt</application> in /usr,
create an environment variable needed by certain packages.
As the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>cat &gt; /etc/profile.d/qt4.sh &lt;&lt; EOF
<literal># Begin /etc/profile.d/qt4.sh
QT4DIR=/usr
export QT4DIR
# End /etc/profile.d/qt4.sh</literal>
EOF</userinput></screen>
<para>
If you installed <application>Qt</application> in a location other
than /usr, you need to update the following configuration files so
that <application>Qt</application> is correctly found by other packages
and system processes.</para>
<para>As the <systemitem class="username">root</systemitem> user, update
the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
run-time cache file:
</para>
<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
<literal># Begin Qt addition
/opt/qt4/lib
# End Qt addition</literal>
EOF
ldconfig</userinput></screen>
<indexterm zone="qt4 qt4-config">
<primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
</indexterm>
<para>
As the <systemitem class="username">root</systemitem> user, create
the <filename>/etc/profile.d/qt4.sh</filename> file:
</para>
<screen role="root"><userinput>cat &gt; /etc/profile.d/qt4.sh &lt;&lt; EOF
<literal># Begin /etc/profile.d/qt4.sh
QT4DIR=/opt/qt4
pathappend /opt/qt4/bin PATH
pathappend /opt/qt4/lib/pkgconfig PKG_CONFIG_PATH
export QT4DIR
# End /etc/profile.d/qt4.sh</literal>
EOF</userinput></screen>
</sect3>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/setqt.xml"/>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
assistant, designer, lconvert, linguist,
lrelease, lupdate, moc, pixeltool,
qcollectiongenerator, qdbuscpp2xml, qdbus,
qdbusviewer, qdbusxml2cpp, qdoc3, qhelpconverter,
qhelpgenerator, qmake, qmlplugindump, qmlviewer,
qt3to4, qtconfig, qttracereplay, rcc, uic3,
uic, xmlpatterns, and xmlpatternsvalidator
</seg>
<seg>
libQtUiTools.a, libQt3Support.so, libQtCLucene.so, libQtCore.so,
libQtDBus.so, libQtDeclarative.so, libQtDesignerComponents.so,
libQtDesigner.so, libQtGui.so, libQtHelp.so, libQtMultimedia.so,
libQtNetwork.so, libQtOpenGL.so, libQtScript.so, libQtScriptTools.so,
libQtSql.so, libQtSvg.so, libQtTest.so, libQtWebKit.so,
libQtXmlPatterns.so, and libQtXml.so, and several plugins under
/opt/qt4/imports and /opt/qt4/plugins
</seg>
<seg>
/usr/include/qt4,
/usr/lib/qt4,
/usr/share/doc/qt4, and
/usr/share/qt4
OR
/opt/qt4 and
/opt/qt-&qt4-version;
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="assistant-qt4">
<term><command>assistant</command></term>
<listitem>
<para>
is a tool for presenting on-line documentation.
</para>
<indexterm zone="qt4 assistant-qt4">
<primary sortas="b-assistant-qt4">assistant</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="designer-qt4">
<term><command>designer</command></term>
<listitem>
<para>
is a full-fledged GUI builder. It includes
powerful features such as preview mode, automatic widget
layout, support for custom widgets, and an advanced
property editor.
</para>
<indexterm zone="qt4 designer-qt4">
<primary sortas="b-designer-qt4">designer</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="linguist-qt4">
<term><command>linguist</command></term>
<listitem>
<para>
provides support for translating applications into
local languages.
</para>
<indexterm zone="qt4 linguist-qt4">
<primary sortas="b-linguist-qt4">linguist</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="lrelease-qt4">
<term><command>lrelease</command></term>
<listitem>
<para>
is a simple command line tool. It reads a Qt project
file and produces message files used by the application.
</para>
<indexterm zone="qt4 lrelease-qt4">
<primary sortas="b-lrelease-qt4">lrelease</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="lupdate-qt4">
<term><command>lupdate</command></term>
<listitem>
<para>
reads a Qt project file, finds the translatable
strings in the specified source, header and Qt Designer
interface files, and produces or updates the translation
files listed in the project file.
</para>
<indexterm zone="qt4 lupdate-qt4">
<primary sortas="b-lupdate-qt4">lupdate</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="moc-qt4">
<term><command>moc</command></term>
<listitem>
<para>
generates Qt meta object support code.
</para>
<indexterm zone="qt4 moc-qt4">
<primary sortas="b-moc-qt4">moc</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pixeltool-qt4">
<term><command>pixeltool</command></term>
<listitem>
<para>
is a desktop magnifier and as you move your mouse around
the screen it will show the magnified contents in its window.
</para>
<indexterm zone="qt4 pixeltool-qt4">
<primary sortas="b-pixeltool-qt4">pixeltool</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qmake-qt4">
<term><command>qmake</command></term>
<listitem>
<para>
uses information stored in project files to
determine what should go in the makefiles it
generates.
</para>
<indexterm zone="qt4 qmake-qt4">
<primary sortas="b-qmake-qt4">qmake</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt3to4-qt4">
<term><command>qt3to4</command></term>
<listitem>
<para>
qt3to4 is a tool to help update Qt3 code to Qt4.
</para>
<indexterm zone="qt4 qt3to4-qt4">
<primary sortas="b-qt3to4-qt4">qt3to4</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qtconfig-qt4">
<term><command>qtconfig</command></term>
<listitem>
<para>
is used to customize the appearance of Qt applications.
</para>
<indexterm zone="qt4 qtconfig-qt4">
<primary sortas="b-qtconfig-qt4">qtconfig</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="rcc-qt4">
<term><command>rcc</command></term>
<listitem>
<para>
is a resource compiler used in conjunction with designer.
</para>
<indexterm zone="qt4 rcc-qt4">
<primary sortas="b-rcc-qt4">rcc</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="uic-qt4">
<term><command>uic</command></term>
<listitem>
<para>
is a Qt user interface compiler.
</para>
<indexterm zone="qt4 uic-qt4">
<primary sortas="b-uic-qt4">uic</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="uic3-qt4">
<term><command>uic3</command></term>
<listitem>
<para>
is a tool to generate Qt4 code out of
user interface files generated by the Qt3
version of designer.
</para>
<indexterm zone="qt4 uic3-qt4">
<primary sortas="b-uic3-qt4">uic3</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>