source: x/lib/qt.xml@ 394cd759

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 394cd759 was 033c86d, checked in by Tushar Teredesai <tushar@…>, 19 years ago

Revert qt change

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