source: x/lib/qt.xml@ d9c80e1

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d9c80e1 was d9c80e1, checked in by Randy McMurchy <randy@…>, 18 years ago

Removed excess EOL whitespace from all package instructions in the 'x' chapters

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5727 af4574ff-66df-0310-9fd7-8a98e5e911e0

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