glfs/x/lib/qt4.xml

602 lines
19 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 "1864987bdbb2f58f8ae8b350dfdbe133">
<!ENTITY qt4-size "231 MB">
<!ENTITY qt4-buildsize "1.9 GB">
<!ENTITY qt4-time "41 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>
&lfs73_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="mesalib"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="cacerts"/>,
<xref linkend="dbus"/>,
<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="mysql"/>,
<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>
<sect2 role="installation">
<title>Installation of Qt</title>
<caution>
<para>
If <application>Qt</application> is being reinstalled, run the
following commands from a console or non-Qt based window manager.
It overwrites <application>Qt</application> libraries that should
not be in use during the install process.
</para>
</caution>
<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>
Install <application>Qt</application> by running the
following commands:
</para>
<screen><userinput>./configure -confirm-license \
-opensource \
-release \
-prefix /usr \
-bindir /usr/lib/qt4/bin \
-headerdir /usr/include/qt4 \
-datadir /usr/share/qt4 \
-plugindir /usr/lib/qt4/plugins \
-importdir /usr/lib/qt4/imports \
-translationdir /usr/share/qt4/translations \
-sysconfdir /etc/xdg \
-docdir /usr/share/doc/qt4 \
-demosdir /usr/share/doc/qt4/demos \
-examplesdir /usr/share/doc/qt4/examples \
-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>
This package does not come with a test suite.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install &amp;&amp;
rm -rf /usr/tests &amp;&amp;
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</userinput></screen>
<para>
Remove references to the build directory from installed files by
running the following commands as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>find /usr/lib/libQt*.prl -exec sed -i -e \
'/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
find /usr/lib/pkgconfig/Qt*.pc -exec perl -pi -e \
"s, -L$(basename $PWD)/?\S+,,g" {} \;</userinput></screen>
<para>
Fix pkg-config files to point to the correct bindir by
running the following command as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>find /usr/lib/pkgconfig/Qt*.pc -exec sed -i -e \
"s@/usr/bin/@/usr/lib/qt4/bin/@g" {} \;</userinput></screen>
<para>
Symlink the <application>Qt</application> executables into
<filename class="directory">/usr/bin</filename> by running the
following commands as the
<systemitem class="username">root</systemitem> user:
</para>
<!-- This will be handled by qtchooser -->
<screen role="root"><userinput>for file in /usr/lib/qt4/bin/*
do
ln -sfv ../lib/qt4/bin/$(basename $file) /usr/bin/$(basename $file)
ln -sfv ../lib/qt4/bin/$(basename $file) /usr/bin/$(basename $file)-qt4
done</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<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 <application>Qt</application> developer.
</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-linkend -openssl-linkend</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>-plugin-sql-<replaceable>&lt;driver&gt;</replaceable></parameter>:
These switches enable SQL support in the
<application>Qt</application> libraries. Available drivers are:
ibase, mysql, psql, sqlite and odbc.
</para>
<para>
<parameter>-no-dbus</parameter>: 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>
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/qt.sh &lt;&lt; EOF
<literal># Begin /etc/profile.d/qt.sh
QTDIR=/usr
export QTDIR
# End /etc/profile.d/qt.sh</literal>
EOF</userinput></screen>
<para>
Create the menu entries for installed applications.
As the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root">install -dm755 /usr/share/applications
<userinput>cat &gt; /usr/share/applications/qtconfig-qt4.desktop &lt;&lt; "EOF"
<literal>[Desktop Entry]
Name=Qt4 Config
Comment=Configure Qt4 behavior, styles, fonts
Exec=qtconfig-qt4
Icon=qt4logo
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Settings;</literal>
EOF
cat &gt; /usr/share/applications/assistant-qt4.desktop &lt;&lt; "EOF"
<literal>[Desktop Entry]
Name=Qt4 Assistant
Comment=Shows Qt4 documentation and examples
Exec=assistant-qt4
Icon=assistant-qt4
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=designer-qt4
Icon=designer-qt4
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=linguist-qt4
Icon=linguist-qt4
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;</literal>
EOF</userinput></screen>
<para>
If you compiled <application>Qt</application> with
<application>D-Bus</application> support:
</para>
<screen role="root"><userinput>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=qdbusviewer-qt4
Icon=qdbusviewer-qt4
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Debugger;</literal>
EOF</userinput></screen>
</sect3>
</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, qdbus, qdbuscpp2xml,
qdbusviewer, qdbusxml2cpp, qdoc3, qhelpconverter, qhelpgenerator,
qmake, qmlplugindump, qmlviewer, qt3to4, qtconfig, qttracereplay,
rcc, uic, uic3, xmlpatterns and xmlpatternsvalidator
</seg>
<seg>
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
</seg>
<seg>
/usr/include/qt4,
/usr/lib/qt4,
/usr/share/qt4 and
/usr/share/doc/qt4
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="qt-assistant">
<term><command>assistant</command></term>
<listitem>
<para>
is a tool for presenting on-line documentation.
</para>
<indexterm zone="qt4 qt-assistant">
<primary sortas="b-assistant">assistant</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-designer">
<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 qt-designer">
<primary sortas="b-designer">designer</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-linguist">
<term><command>linguist</command></term>
<listitem>
<para>
provides support for translating applications into
local languages.
</para>
<indexterm zone="qt4 qt-linguist">
<primary sortas="b-linguist">linguist</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-lrelease">
<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 qt-lrelease">
<primary sortas="b-lrelease">lrelease</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-lupdate">
<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 qt-lupdate">
<primary sortas="b-lupdate">lupdate</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-moc">
<term><command>moc</command></term>
<listitem>
<para>
generates Qt meta object support code.
</para>
<indexterm zone="qt4 qt-moc">
<primary sortas="b-moc">moc</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-pixeltool">
<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 qt-pixeltool">
<primary sortas="b-pixeltool">pixeltool</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-qmake">
<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 qt-qmake">
<primary sortas="b-qmake">qmake</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-qt3to4">
<term><command>qt3to4</command></term>
<listitem>
<para>
qt3to4 is a tool to help update Qt3 code to Qt4.
</para>
<indexterm zone="qt4 qt-qt3to4">
<primary sortas="b-qt3to4">qt3to4</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-qtconfig">
<term><command>qtconfig</command></term>
<listitem>
<para>
is used to customize the appearance of Qt applications.
</para>
<indexterm zone="qt4 qt-qtconfig">
<primary sortas="b-qtconfig">qtconfig</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-rcc">
<term><command>rcc</command></term>
<listitem>
<para>
is a resource compiler used in conjunction with designer.
</para>
<indexterm zone="qt4 qt-rcc">
<primary sortas="b-rcc">rcc</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-uic">
<term><command>uic</command></term>
<listitem>
<para>
is a Qt user interface compiler.
</para>
<indexterm zone="qt4 qt-uic">
<primary sortas="b-uic">uic</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="qt-uic3">
<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 qt-uic3">
<primary sortas="b-uic3">uic3</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>