source: x/lib/qt.xml@ 9f12e36

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

Removed 'keywordset' blocks and extra spaces from the XML files (note this was by accident as I meant to do just in the gnome directory but I was in the root of BOOK when I ran the script, but this was going to happen anyway so I don't think it is a big deal)

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