source: x/lib/qt.xml@ e77976f

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 e77976f was e77976f, checked in by Randy McMurchy <randy@…>, 18 years ago

Changed all the references to X Window System links to a common entity displayed as 'X Window System' - now if there is ever an addition or removal of one of the X packages, an update in only one place will be required

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