source: x/lib/qt.xml@ 4e82a189

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.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 4e82a189 was 4e82a189, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Added missing sect2 role attributes.

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

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