source: x/lib/qt.xml@ 8b972cf

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 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8b972cf was 76b19ad, checked in by Randy McMurchy <randy@…>, 19 years ago

Changed external links to unixODBC to internal links in various package instructions

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

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