source: archive/qt4.xml

trunk
Last change on this file was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 4 months ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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