source: archive/qt4.xml

trunk
Last change on this file was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 17 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

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