source: x/lib/qt.xml@ b6a2a0e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 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 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b6a2a0e was b6a2a0e, checked in by Bruce Dubbs <bdubbs@…>, 13 years ago

Updated to gobject-introspection-1.29.17

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

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