[feeb99a] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[feeb99a] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[751e96f] | 7 | <!ENTITY qt-download-http "http://ftp.silug.org/mirrors/ftp.trolltech.com/qt/source/qt-x11-free-&qt-version;.tar.bz2">
|
---|
[feeb99a] | 8 | <!ENTITY qt-download-ftp "ftp://ftp.trolltech.com/qt/source/qt-x11-free-&qt-version;.tar.bz2">
|
---|
[d8e2f89b] | 9 | <!ENTITY qt-md5sum "cf3c43a7dfde5bfb76f8001102fe6e85">
|
---|
| 10 | <!ENTITY qt-size "14.3 MB">
|
---|
| 11 | <!ENTITY qt-buildsize "261 MB">
|
---|
| 12 | <!ENTITY qt-time "11 SBU (full), 7.5 SBU (sub-tools)">
|
---|
[feeb99a] | 13 | ]>
|
---|
| 14 |
|
---|
[46bca118] | 15 | <sect1 id="qt" xreflabel="Qt-&qt-version;">
|
---|
[f82c9c69] | 16 | <?dbhtml filename="qt.html" ?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>Qt-&qt-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="qt">
|
---|
| 26 | <primary sortas="a-qt">Qt</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
[4e82a189] | 29 | <sect2 role="package">
|
---|
[f82c9c69] | 30 | <title>Introduction to Qt</title>
|
---|
| 31 |
|
---|
| 32 | <para>The <application>Qt</application> package contains a
|
---|
| 33 | <application>C++</application> GUI library. This is useful for creating
|
---|
| 34 | graphical applications or executing graphical applications that are
|
---|
| 35 | dynamically linked to the <application>Qt</application> library. One of
|
---|
| 36 | the major users of <application>Qt</application> is
|
---|
| 37 | <application>KDE</application>.</para>
|
---|
| 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (HTTP): <ulink url="&qt-download-http;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download (FTP): <ulink url="&qt-download-ftp;"/></para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download MD5 sum: &qt-md5sum;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download size: &qt-size;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated disk space required: &qt-buildsize;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Estimated build time: &qt-time;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | </itemizedlist>
|
---|
| 60 |
|
---|
[bf4f431] | 61 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[b276c41] | 62 | <itemizedlist spacing="compact">
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Required patch: <ulink
|
---|
| 65 | url="http://www.trolltech.com/developer/download/Qt-3.3.8-UTF-8-fix.diff"/></para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
[751e96f] | 68 |
|
---|
[f82c9c69] | 69 | <bridgehead renderas="sect3">Qt Dependencies</bridgehead>
|
---|
| 70 |
|
---|
| 71 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[e77976f] | 72 | <para role="required"><xref linkend="x-window-system"/></para>
|
---|
[f82c9c69] | 73 |
|
---|
| 74 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[76a39aa] | 75 | <para role="recommended"><xref linkend="libjpeg"/> and
|
---|
| 76 | <xref linkend="libmng"/></para>
|
---|
[f82c9c69] | 77 |
|
---|
[751e96f] | 78 | <para>Note: if for whatever reason you do not have the recommended
|
---|
| 79 | libraries installed on your system, you must remove the corresponding
|
---|
[c5c2654] | 80 | <parameter>-system-<replaceable><library></replaceable></parameter> and
|
---|
| 81 | <parameter>-plugin-imgfmt-<replaceable><library></replaceable></parameter>
|
---|
[751e96f] | 82 | parameters from the <command>configure</command> commands shown in the
|
---|
| 83 | instructions below.</para>
|
---|
[d9c80e1] | 84 |
|
---|
[f82c9c69] | 85 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[76a39aa] | 86 | <para role="optional"><xref linkend="nas"/>,
|
---|
[76b19ad] | 87 | <xref linkend="cups"/>,
|
---|
| 88 | <xref linkend="mysql"/>,
|
---|
| 89 | <xref linkend="postgresql"/>,
|
---|
| 90 | <xref linkend="unixodbc"/>,
|
---|
| 91 | <ulink url="http://sqlite.org/">SQLite</ulink> and
|
---|
| 92 | <ulink url="http://firebird.sourceforge.net/">Firebird</ulink></para>
|
---|
[f82c9c69] | 93 |
|
---|
[58c6057] | 94 | <para condition="html" role="usernotes">User Notes:
|
---|
| 95 | <ulink url="&blfs-wiki;/qt"/></para>
|
---|
| 96 |
|
---|
[f82c9c69] | 97 | </sect2>
|
---|
| 98 |
|
---|
| 99 | <sect2 role="installation">
|
---|
| 100 | <title>Installation of Qt</title>
|
---|
| 101 |
|
---|
[71cd2a5a] | 102 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
| 103 | href="../../xincludes/X11R6_symlink.xml"/>
|
---|
| 104 |
|
---|
| 105 | <!--<para>The <application>Qt</application> source hard codes the location
|
---|
| 106 | of the <application>X Window System</application> installation to
|
---|
[864b24de] | 107 | <filename class="directory">/usr/X11R6</filename>. If you've installed
|
---|
[ed87c5a] | 108 | the <application>X Window System</application> in any prefix other than
|
---|
| 109 | <filename class="directory">/usr/X11R6</filename>, then you should correct
|
---|
| 110 | the <application>qmake</application> configuration files with the following
|
---|
[dc19fbff] | 111 | commands, replacing <replaceable><PREFIX></replaceable> with the
|
---|
| 112 | installation prefix of the
|
---|
| 113 | <application>X Window System</application>:</para>
|
---|
[ed87c5a] | 114 |
|
---|
| 115 | <screen><userinput>for file in $(grep -lr "X11R6" *)
|
---|
| 116 | do
|
---|
| 117 | sed -i "s@/usr/X11R6@<replaceable><PREFIX></replaceable>@g" $file
|
---|
[71cd2a5a] | 118 | done</userinput></screen> -->
|
---|
[ed87c5a] | 119 |
|
---|
[f82c9c69] | 120 | <para>There are several ways to install a complicated package such as
|
---|
| 121 | <application>Qt</application>. The files are not completely position
|
---|
| 122 | independent. Installation procedures execute the program
|
---|
| 123 | <command>pkg-config</command> to determine the location of package
|
---|
| 124 | executables, libraries, headers, and other files. For
|
---|
| 125 | <application>Qt</application>, <command>pkg-config</command> will look
|
---|
| 126 | for the file <filename>lib/pkgconfig/qt-mt.pc</filename> which must be
|
---|
| 127 | modified if relocating the package. This file is set up correctly by
|
---|
| 128 | the build process.</para>
|
---|
| 129 |
|
---|
| 130 | <para>The default installation places the files in
|
---|
| 131 | <filename class='directory'>/usr/local/qt/</filename>. Many commercial
|
---|
| 132 | distributions place the files in the system's
|
---|
| 133 | <filename class='directory'>/usr</filename> hierarchy. The package can
|
---|
| 134 | also be installed in an arbitrary directory.</para>
|
---|
| 135 |
|
---|
| 136 | <para>This section will demonstrate two different methods.</para>
|
---|
| 137 |
|
---|
[4b48ee50] | 138 | <warning>
|
---|
| 139 | <para>Building <application>Qt</application> in a
|
---|
| 140 | <command>chroot</command> environment may fail.</para>
|
---|
| 141 | </warning>
|
---|
| 142 |
|
---|
[f82c9c69] | 143 | <note>
|
---|
| 144 | <para>The build time for <application>Qt</application> is quite long. If
|
---|
| 145 | you want to save some time and don't want the tutorials and examples,
|
---|
[751e96f] | 146 | change the first <command>make</command> command to:</para>
|
---|
[f82c9c69] | 147 |
|
---|
| 148 | <screen><userinput>make sub-tools</userinput></screen>
|
---|
| 149 |
|
---|
| 150 | </note>
|
---|
| 151 |
|
---|
| 152 | <sect3>
|
---|
| 153 | <title>Method 1 - Installing in the '/usr' Hierarchy</title>
|
---|
| 154 |
|
---|
| 155 | <para>The advantage of this method is that no updates to the
|
---|
| 156 | <filename>/etc/ld.so.conf</filename> or
|
---|
[58c6057] | 157 | <filename>/etc/man_db.conf</filename> files are required. The package
|
---|
[f82c9c69] | 158 | files are distributed within several subdirectories of the
|
---|
| 159 | <filename class='directory'>/usr</filename> hierarchy.
|
---|
| 160 | This is the method that most commercial distributions use.</para>
|
---|
| 161 |
|
---|
[033c86d] | 162 | <!--
|
---|
[f82c9c69] | 163 | <note>
|
---|
[884db0e3] | 164 | <para>The installation incorrectly uses <command>cp</command> to
|
---|
| 165 | install the files. This causes problems if the
|
---|
| 166 | <application>Qt</application> libraries are already in use (e.g.,
|
---|
| 167 | you are logged into your <application>KDE</application> desktop
|
---|
| 168 | environment). To avoid problems, <command>cp -f</command> is
|
---|
| 169 | replaced by <command>install</command> in
|
---|
| 170 | <filename>qmake.conf</filename>.</para>
|
---|
[f82c9c69] | 171 | </note>
|
---|
[033c86d] | 172 | -->
|
---|
[751e96f] | 173 |
|
---|
[033c86d] | 174 | <note>
|
---|
| 175 | <para>If <application>Qt</application> is being reinstalled, run the
|
---|
| 176 | following commands from a console or non-Qt based window manager.
|
---|
| 177 | It overwrites <application>Qt</application> libraries that should not
|
---|
| 178 | be in use during the install process.</para>
|
---|
| 179 | </note>
|
---|
[f82c9c69] | 180 |
|
---|
[b276c41] | 181 | <para>A <ulink
|
---|
| 182 | url='http://www.trolltech.com/company/newsroom/announcements/press.2007-03-30.9172215350'>security
|
---|
| 183 | vulnerability</ulink> has been identified in the
|
---|
| 184 | <application>Qt</application> package. Apply the patch to fix this
|
---|
| 185 | vulnerability with the following command:</para>
|
---|
| 186 |
|
---|
| 187 | <screen><userinput>patch -Np0 -i ../Qt-3.3.8-UTF-8-fix.diff</userinput></screen>
|
---|
| 188 |
|
---|
| 189 | <para>Continue with:</para>
|
---|
| 190 |
|
---|
[1afe6c26] | 191 | <screen><userinput>sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf &&
|
---|
[751e96f] | 192 |
|
---|
[972150e7] | 193 | bash
|
---|
| 194 | export PATH=$PWD/bin:$PATH &&
|
---|
[2dae8b3d] | 195 | export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
|
---|
[751e96f] | 196 |
|
---|
| 197 | ./configure -prefix /usr \
|
---|
| 198 | -docdir /usr/share/doc/qt \
|
---|
| 199 | -headerdir /usr/include/qt \
|
---|
| 200 | -plugindir /usr/lib/qt/plugins \
|
---|
| 201 | -datadir /usr/share/qt \
|
---|
| 202 | -translationdir /usr/share/qt/translations \
|
---|
| 203 | -sysconfdir /etc/qt \
|
---|
| 204 | -qt-gif \
|
---|
| 205 | -system-zlib \
|
---|
| 206 | -system-libpng \
|
---|
| 207 | -system-libjpeg \
|
---|
| 208 | -system-libmng \
|
---|
| 209 | -plugin-imgfmt-png \
|
---|
| 210 | -plugin-imgfmt-jpeg \
|
---|
| 211 | -plugin-imgfmt-mng \
|
---|
| 212 | -no-exceptions \
|
---|
| 213 | -thread \
|
---|
| 214 | -tablet &&
|
---|
| 215 |
|
---|
[c52af0c] | 216 | make &&
|
---|
| 217 | exit</userinput></screen>
|
---|
[14db7cc] | 218 |
|
---|
[751e96f] | 219 | <para>This package does not come with a test suite.</para>
|
---|
| 220 |
|
---|
[f82c9c69] | 221 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
| 222 | user:</para>
|
---|
[14db7cc] | 223 |
|
---|
[f82c9c69] | 224 | <screen role="root"><userinput>make install &&
|
---|
| 225 | ln -v -sf libqt-mt.so /usr/lib/libqt.so &&
|
---|
[1afe6c26] | 226 | ln -v -snf ../../bin /usr/share/qt/bin &&
|
---|
| 227 | ln -v -snf ../../include/qt /usr/share/qt/include &&
|
---|
| 228 | ln -v -snf ../../lib /usr/share/qt/lib &&
|
---|
[f82c9c69] | 229 | cp -v -r doc/man /usr/share &&
|
---|
| 230 | cp -v -r examples /usr/share/doc/qt</userinput></screen>
|
---|
[14db7cc] | 231 |
|
---|
[f82c9c69] | 232 | </sect3>
|
---|
[972150e7] | 233 |
|
---|
[f82c9c69] | 234 | <sect3>
|
---|
| 235 | <title>Method 2 - Installing in '/opt'</title>
|
---|
[972150e7] | 236 |
|
---|
[f82c9c69] | 237 | <para>This is the method recommended by the <application>Qt</application>
|
---|
| 238 | developers. It has the advantage of keeping all the package files
|
---|
| 239 | consolidated in a dedicated directory hierarchy. By using this method,
|
---|
| 240 | an update can be made without overwriting a previous installation and
|
---|
[884db0e3] | 241 | users can easily revert to a previous version by changing one symbolic
|
---|
| 242 | link.</para>
|
---|
[972150e7] | 243 |
|
---|
[f82c9c69] | 244 | <para>The <application>Qt</application> developers use a default location
|
---|
| 245 | of <filename class='directory'>/usr/local/qt/</filename>, however this
|
---|
| 246 | procedure puts the files in <filename
|
---|
| 247 | class='directory'>/opt/qt-&qt-version;/</filename>
|
---|
| 248 | and then creates a symbolic link to <filename>/opt/qt/</filename>.</para>
|
---|
| 249 |
|
---|
[b276c41] | 250 | <para>A <ulink
|
---|
| 251 | url='http://www.trolltech.com/company/newsroom/announcements/press.2007-03-30.9172215350'>security
|
---|
| 252 | vulnerability</ulink> has been identified in the
|
---|
| 253 | <application>Qt</application> package. Apply the patch to fix this
|
---|
| 254 | vulnerability with the following command:</para>
|
---|
| 255 |
|
---|
| 256 | <screen><userinput>patch -Np0 -i ../Qt-3.3.8-UTF-8-fix.diff</userinput></screen>
|
---|
| 257 |
|
---|
| 258 | <para>Continue with:</para>
|
---|
| 259 |
|
---|
[f82c9c69] | 260 | <screen><userinput>bash
|
---|
[972150e7] | 261 | export QTDIR=$PWD &&
|
---|
[2dae8b3d] | 262 | export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &&
|
---|
[972150e7] | 263 | export PATH=$PWD/bin:$PATH &&
|
---|
[751e96f] | 264 |
|
---|
| 265 | ./configure -prefix /opt/qt-&qt-version; \
|
---|
| 266 | -sysconfdir /etc/qt \
|
---|
| 267 | -qt-gif \
|
---|
| 268 | -system-zlib \
|
---|
| 269 | -system-libpng \
|
---|
| 270 | -system-libjpeg \
|
---|
| 271 | -system-libmng \
|
---|
| 272 | -plugin-imgfmt-png \
|
---|
| 273 | -plugin-imgfmt-jpeg \
|
---|
| 274 | -plugin-imgfmt-mng \
|
---|
| 275 | -no-exceptions \
|
---|
| 276 | -thread \
|
---|
| 277 | -tablet &&
|
---|
| 278 |
|
---|
[033c86d] | 279 | make &&
|
---|
| 280 | exit</userinput></screen>
|
---|
[f82c9c69] | 281 |
|
---|
[751e96f] | 282 | <para>This package does not come with a test suite.</para>
|
---|
| 283 |
|
---|
[f82c9c69] | 284 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
| 285 | user:</para>
|
---|
| 286 |
|
---|
| 287 | <screen role="root"><userinput>make install &&
|
---|
| 288 | ln -v -sfn qt-&qt-version; /opt/qt &&
|
---|
| 289 | ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &&
|
---|
[d8e2f89b] | 290 | cp -v -r doc/man examples /opt/qt/doc</userinput></screen>
|
---|
[f82c9c69] | 291 |
|
---|
| 292 | </sect3>
|
---|
[972150e7] | 293 |
|
---|
[f82c9c69] | 294 | </sect2>
|
---|
[78d0e3c] | 295 |
|
---|
[f82c9c69] | 296 | <sect2 role="commands">
|
---|
| 297 | <title>Command Explanations</title>
|
---|
[972150e7] | 298 |
|
---|
[1afe6c26] | 299 | <para><command>sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf</command>:
|
---|
| 300 | In Method 1, <application>Qt</application> is being installed into
|
---|
| 301 | the standard system directories. The runtime library search path does not
|
---|
| 302 | need to be set in this case.</para>
|
---|
[972150e7] | 303 |
|
---|
[f82c9c69] | 304 | <para><command>bash</command>: This command enters a sub-shell to isolate
|
---|
| 305 | environment changes.</para>
|
---|
[972150e7] | 306 |
|
---|
[f82c9c69] | 307 | <para><command>export QTDIR=$PWD</command>: This command defines where
|
---|
| 308 | the root of the <application>Qt</application> directory is located.</para>
|
---|
[972150e7] | 309 |
|
---|
[f82c9c69] | 310 | <para><command>export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH</command>:
|
---|
| 311 | This command allows the not yet installed <application>Qt</application>
|
---|
| 312 | libraries to be used by the not yet installed <application>Qt</application>
|
---|
| 313 | programs.</para>
|
---|
[972150e7] | 314 |
|
---|
[f82c9c69] | 315 | <para><command>export PATH=$PWD/bin:$PATH</command>: This command
|
---|
| 316 | allows the build process to find supporting executables.</para>
|
---|
[972150e7] | 317 |
|
---|
[f82c9c69] | 318 | <para><parameter>-qt-gif</parameter>: This switch adds support for
|
---|
| 319 | <filename>gif</filename> files to the libraries.</para>
|
---|
[972150e7] | 320 |
|
---|
[751e96f] | 321 | <para><parameter>-system-zlib -system-libpng -system-libjpeg
|
---|
| 322 | -system-mng</parameter>: These switches force the build instructions to use
|
---|
| 323 | the shared libraries that are on your system instead of creating a custom
|
---|
| 324 | set of support libraries for these functions.</para>
|
---|
[972150e7] | 325 |
|
---|
[751e96f] | 326 | <para><parameter>-plugin-imgfmt-png -plugin-imgfmt-jpeg
|
---|
| 327 | -plugin-imgfmt-mng</parameter>: These switches enable run-time linking of
|
---|
| 328 | the referenced libraries.</para>
|
---|
[972150e7] | 329 |
|
---|
[b276c41] | 330 | <para>If you pass the
|
---|
| 331 | <option>-plugin-sql-<replaceable><driver></replaceable></option> or
|
---|
| 332 | <option>-qt-sql-<replaceable><driver></replaceable></option> switch
|
---|
| 333 | to the <command>configure</command> command, you must also pass
|
---|
| 334 | <option>-I<replaceable></path/to/sql/headers></replaceable></option>
|
---|
| 335 | so <command>make</command> can find the appropriate header files. For
|
---|
| 336 | instance, building in <application>MySQL</application> support (as opposed
|
---|
| 337 | to building the plugin) will need to use <option>-I/usr/include/mysql
|
---|
| 338 | -qt-sql-mysql</option>.</para>
|
---|
[cc25f73] | 339 |
|
---|
[b276c41] | 340 | <note>
|
---|
[cc25f73] | 341 | <para>To check if <application>mysql</application> is autotetected
|
---|
| 342 | properly, examine the output of <command>./configure -I/usr/include/mysql
|
---|
| 343 | -help</command>. Other database support will require similar
|
---|
| 344 | <command>configure</command> parameters.</para>
|
---|
| 345 | </note>
|
---|
| 346 |
|
---|
[f82c9c69] | 347 | <para><parameter>-no-exceptions</parameter>: This switch disables
|
---|
| 348 | the exceptions coding generated by the <application>C++</application>
|
---|
| 349 | compiler.</para>
|
---|
[fac11e8] | 350 |
|
---|
[f82c9c69] | 351 | <para><parameter>-thread</parameter>: This switch adds
|
---|
| 352 | support for multi-threading.</para>
|
---|
[972150e7] | 353 |
|
---|
[1afe6c26] | 354 | <para><command>ln -v -sf libqt-mt.so /usr/lib/libqt.so</command>: This
|
---|
[f82c9c69] | 355 | command allows <command>configure</command> scripts to find a working
|
---|
| 356 | <application>Qt</application> installation.</para>
|
---|
[972150e7] | 357 |
|
---|
[1afe6c26] | 358 | <para><command>ln -v -snf ../../bin /usr/share/qt/bin</command>: This
|
---|
| 359 | command and the following two allow the
|
---|
| 360 | <filename class="directory">/usr</filename> style installation to mimic
|
---|
| 361 | the <filename class="directory">/opt</filename> style installation by
|
---|
| 362 | making all binaries, headers and libraries available from a single
|
---|
| 363 | directory, <filename class="directory">/usr/share/qt</filename>.</para>
|
---|
| 364 |
|
---|
[d8e2f89b] | 365 | <para><command>cp -v -r doc/man examples /usr/share (or
|
---|
| 366 | /opt/qt/doc)</command>:
|
---|
| 367 | This command installs the man pages and examples which are missed by
|
---|
[f82c9c69] | 368 | <command>make install</command>.</para>
|
---|
[972150e7] | 369 |
|
---|
[f82c9c69] | 370 | <para><command>exit</command>: This command returns to the parent shell
|
---|
[d8e2f89b] | 371 | and eliminates the environment variables set earlier.</para>
|
---|
[972150e7] | 372 |
|
---|
[f82c9c69] | 373 | </sect2>
|
---|
[972150e7] | 374 |
|
---|
[f82c9c69] | 375 | <sect2 role="configuration">
|
---|
| 376 | <title>Configuring Qt</title>
|
---|
[78d0e3c] | 377 |
|
---|
[f82c9c69] | 378 | <sect3 id='qt-config'>
|
---|
| 379 | <title>Configuration Information</title>
|
---|
[972150e7] | 380 |
|
---|
[f82c9c69] | 381 | <para>The <envar>QTDIR</envar> environment variable needs to be set when
|
---|
| 382 | building packages that depend on <application>Qt</application>. Add the
|
---|
| 383 | following to the <filename>.bash_profile</filename> initialization script
|
---|
| 384 | for each user that builds packages using the <application>Qt</application>
|
---|
| 385 | libraries. Alternatively, the variable can be set in the system wide
|
---|
| 386 | <filename>/etc/profile</filename> file.</para>
|
---|
[14db7cc] | 387 |
|
---|
[c52af0c] | 388 | <para>For Method 1 (This is optional, only set this if an application is
|
---|
[1afe6c26] | 389 | unable to find the installed libraries or headers):</para>
|
---|
[14db7cc] | 390 |
|
---|
[1afe6c26] | 391 | <screen><literal>export QTDIR=/usr/share/qt</literal></screen>
|
---|
[14db7cc] | 392 |
|
---|
[f82c9c69] | 393 | <para>or for Method 2:</para>
|
---|
[14db7cc] | 394 |
|
---|
[f82c9c69] | 395 | <screen><literal>export QTDIR=/opt/qt</literal></screen>
|
---|
[78d0e3c] | 396 |
|
---|
[f82c9c69] | 397 | <para>If you installed <application>Qt</application> using Method 2,
|
---|
| 398 | you also need to update the following configuration files so that
|
---|
| 399 | <application>Qt</application> is correctly found by other packages
|
---|
| 400 | and system processes.</para>
|
---|
[78d0e3c] | 401 |
|
---|
[f82c9c69] | 402 | <para>Update the <filename>/etc/ld.so.conf</filename> and
|
---|
[58c6057] | 403 | <filename>/etc/man_db.conf</filename> files:</para>
|
---|
[f82c9c69] | 404 |
|
---|
| 405 | <screen role="root"><userinput>cat >> /etc/ld.so.conf << "EOF" &&
|
---|
| 406 | <literal># Begin qt addition to /etc/ld.so.conf
|
---|
[78d0e3c] | 407 |
|
---|
| 408 | /opt/qt/lib
|
---|
| 409 |
|
---|
[f82c9c69] | 410 | # End qt addition</literal>
|
---|
[78d0e3c] | 411 | EOF
|
---|
[f82c9c69] | 412 | ldconfig &&
|
---|
[58c6057] | 413 | cat >> /etc/man_db.conf << "EOF"
|
---|
| 414 | <literal># Begin qt addition to man_db.conf
|
---|
[78d0e3c] | 415 |
|
---|
[c5c2654] | 416 | MANDATORY_MANPATH /opt/qt/doc/man
|
---|
[78d0e3c] | 417 |
|
---|
[58c6057] | 418 | # End qt addition to man_db.conf</literal>
|
---|
[f82c9c69] | 419 | EOF</userinput></screen>
|
---|
| 420 |
|
---|
| 421 | <indexterm zone="qt qt-config">
|
---|
| 422 | <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
|
---|
| 423 | </indexterm>
|
---|
| 424 |
|
---|
| 425 | <indexterm zone="qt qt-config">
|
---|
[58c6057] | 426 | <primary sortas="e-etc-man_db.conf">/etc/man_db.conf</primary>
|
---|
[f82c9c69] | 427 | </indexterm>
|
---|
| 428 |
|
---|
| 429 | <indexterm zone="qt qt-config">
|
---|
| 430 | <primary sortas="e-etc-profile">/etc/profile</primary>
|
---|
| 431 | </indexterm>
|
---|
| 432 |
|
---|
| 433 | <indexterm zone="qt qt-config">
|
---|
| 434 | <primary sortas="e-AA.bash_profile">~/.bash_profile</primary>
|
---|
| 435 | </indexterm>
|
---|
| 436 |
|
---|
| 437 | <para>Update the <envar>PKG_CONFIG_PATH</envar> environment variable
|
---|
| 438 | in your <filename>~/.bash_profile</filename> or
|
---|
| 439 | <filename>/etc/profile</filename> with the following:</para>
|
---|
| 440 |
|
---|
| 441 | <screen><literal>PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig</literal></screen>
|
---|
| 442 |
|
---|
| 443 | <para>If you want the <application>Qt</application> executables in your
|
---|
| 444 | shell search path, update the <envar>PATH</envar> environment variable
|
---|
| 445 | in your <filename>~/.bash_profile</filename> or
|
---|
| 446 | <filename>/etc/profile</filename> to include
|
---|
| 447 | <filename class='directory'>/opt/qt/bin</filename>.</para>
|
---|
| 448 |
|
---|
| 449 | <para>As with most libraries, there is no explicit configuration to do.
|
---|
| 450 | After updating <filename>/etc/ld.so.conf</filename> as explained above,
|
---|
| 451 | run <command>/sbin/ldconfig</command> so that <command>ldd</command>
|
---|
| 452 | can find the shared libraries.</para>
|
---|
| 453 |
|
---|
| 454 | </sect3>
|
---|
| 455 |
|
---|
| 456 | </sect2>
|
---|
| 457 |
|
---|
| 458 | <sect2 role="content">
|
---|
| 459 | <title>Contents</title>
|
---|
| 460 |
|
---|
| 461 | <segmentedlist>
|
---|
| 462 | <segtitle>Installed Programs</segtitle>
|
---|
| 463 | <segtitle>Installed Libraries</segtitle>
|
---|
| 464 | <segtitle>Installed Directories</segtitle>
|
---|
| 465 |
|
---|
| 466 | <seglistitem>
|
---|
| 467 | <seg>assistant, designer, linguist, lrelease, lupdate, moc,
|
---|
| 468 | qm2ts, qmake, qtconfig, and uic</seg>
|
---|
| 469 | <seg>libqt-mt.so, libqt.so libqui.so, libdesignercore.a,
|
---|
| 470 | libeditor.a, and libqassistantclient.a</seg>
|
---|
| 471 | <seg>/opt/qt-&qt-version; or /usr/lib/qt, /usr/share/qt,
|
---|
| 472 | /usr/share/doc/qt, /usr/include/qt, and /etc/qt</seg>
|
---|
| 473 | </seglistitem>
|
---|
| 474 | </segmentedlist>
|
---|
| 475 |
|
---|
| 476 | <variablelist>
|
---|
| 477 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 478 | <?dbfo list-presentation="list"?>
|
---|
| 479 | <?dbhtml list-presentation="table"?>
|
---|
| 480 |
|
---|
| 481 | <varlistentry id="assistant">
|
---|
| 482 | <term><command>assistant</command></term>
|
---|
| 483 | <listitem>
|
---|
| 484 | <para>is a tool for presenting on-line documentation.</para>
|
---|
| 485 | <indexterm zone="qt assistant">
|
---|
| 486 | <primary sortas="b-assistant">assistant</primary>
|
---|
| 487 | </indexterm>
|
---|
| 488 | </listitem>
|
---|
| 489 | </varlistentry>
|
---|
| 490 |
|
---|
| 491 | <varlistentry id="designer">
|
---|
| 492 | <term><command>designer</command></term>
|
---|
| 493 | <listitem>
|
---|
| 494 | <para>is a full-fledged GUI builder. It includes
|
---|
| 495 | powerful features such as preview mode, automatic widget
|
---|
| 496 | layout, support for custom widgets, and an advanced
|
---|
| 497 | property editor.</para>
|
---|
| 498 | <indexterm zone="qt designer">
|
---|
| 499 | <primary sortas="b-designer">designer</primary>
|
---|
| 500 | </indexterm>
|
---|
| 501 | </listitem>
|
---|
| 502 | </varlistentry>
|
---|
| 503 |
|
---|
| 504 | <varlistentry id="linguist">
|
---|
| 505 | <term><command>linguist</command></term>
|
---|
| 506 | <listitem>
|
---|
| 507 | <para>provides support for translating applications into
|
---|
| 508 | local languages. </para>
|
---|
| 509 | <indexterm zone="qt linguist">
|
---|
| 510 | <primary sortas="b-linguist">linguist</primary>
|
---|
| 511 | </indexterm>
|
---|
| 512 | </listitem>
|
---|
| 513 | </varlistentry>
|
---|
| 514 |
|
---|
| 515 | <varlistentry id="lrelease">
|
---|
| 516 | <term><command>lrelease</command></term>
|
---|
| 517 | <listitem>
|
---|
| 518 | <para>is a simple command line tool. It reads a Qt project
|
---|
| 519 | file and produces message files used by the application.</para>
|
---|
| 520 | <indexterm zone="qt lrelease">
|
---|
| 521 | <primary sortas="b-lrelease">lrelease</primary>
|
---|
| 522 | </indexterm>
|
---|
| 523 | </listitem>
|
---|
| 524 | </varlistentry>
|
---|
| 525 |
|
---|
| 526 | <varlistentry id="lupdate">
|
---|
| 527 | <term><command>lupdate</command></term>
|
---|
| 528 | <listitem>
|
---|
| 529 | <para>reads a Qt project file, finds the translatable
|
---|
| 530 | strings in the specified source, header and Qt Designer
|
---|
| 531 | interface files, and produces or updates the translation
|
---|
| 532 | files listed in the project file.</para>
|
---|
| 533 | <indexterm zone="qt lupdate">
|
---|
| 534 | <primary sortas="b-lupdate">lupdate</primary>
|
---|
| 535 | </indexterm>
|
---|
| 536 | </listitem>
|
---|
| 537 | </varlistentry>
|
---|
| 538 |
|
---|
| 539 | <varlistentry id="moc">
|
---|
| 540 | <term><command>moc</command></term>
|
---|
| 541 | <listitem>
|
---|
| 542 | <para>generates Qt meta object support code.</para>
|
---|
| 543 | <indexterm zone="qt moc">
|
---|
| 544 | <primary sortas="b-moc">moc</primary>
|
---|
| 545 | </indexterm>
|
---|
| 546 | </listitem>
|
---|
| 547 | </varlistentry>
|
---|
| 548 |
|
---|
| 549 | <varlistentry id="qm2ts">
|
---|
| 550 | <term><command>qm2ts</command></term>
|
---|
| 551 | <listitem>
|
---|
| 552 | <para>is a tool for converting Qt message file formats.</para>
|
---|
| 553 | <indexterm zone="qt qm2ts">
|
---|
| 554 | <primary sortas="b-qm2ts">qm2ts</primary>
|
---|
| 555 | </indexterm>
|
---|
| 556 | </listitem>
|
---|
| 557 | </varlistentry>
|
---|
| 558 |
|
---|
| 559 | <varlistentry id="qmake">
|
---|
| 560 | <term><command>qmake</command></term>
|
---|
| 561 | <listitem>
|
---|
| 562 | <para>qmake uses information stored in project files to
|
---|
| 563 | determine what should go in the makefiles it generates.</para>
|
---|
| 564 | <indexterm zone="qt qmake">
|
---|
| 565 | <primary sortas="b-qmake">qmake</primary>
|
---|
| 566 | </indexterm>
|
---|
| 567 | </listitem>
|
---|
| 568 | </varlistentry>
|
---|
| 569 |
|
---|
| 570 | <varlistentry id="qtconfig">
|
---|
| 571 | <term><command>qtconfig</command></term>
|
---|
| 572 | <listitem>
|
---|
| 573 | <para>is used to customize the appearance of Qt applications.</para>
|
---|
| 574 | <indexterm zone="qt qtconfig">
|
---|
| 575 | <primary sortas="b-qtconfig">qtconfig</primary>
|
---|
| 576 | </indexterm>
|
---|
| 577 | </listitem>
|
---|
| 578 | </varlistentry>
|
---|
| 579 |
|
---|
| 580 | <varlistentry id="uic">
|
---|
| 581 | <term><command>uic</command></term>
|
---|
| 582 | <listitem>
|
---|
| 583 | <para>is a Qt user interface compiler.</para>
|
---|
| 584 | <indexterm zone="qt uic">
|
---|
| 585 | <primary sortas="b-uic">uic</primary>
|
---|
| 586 | </indexterm>
|
---|
| 587 | </listitem>
|
---|
| 588 | </varlistentry>
|
---|
| 589 |
|
---|
| 590 | </variablelist>
|
---|
| 591 |
|
---|
| 592 | </sect2>
|
---|
| 593 |
|
---|
[972150e7] | 594 | </sect1>
|
---|