source: x/lib/qt.xml@ d8e2f89b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 d8e2f89b was d8e2f89b, checked in by Randy McMurchy <randy@…>, 17 years ago

Updated to Qt-3.3.8

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

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