source: trunk/doc/src/installation.qdoc@ 348

Last change on this file since 348 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 28.2 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the documentation of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/****************************************************************************
43** Please remember to update the corresponding INSTALL files.
44****************************************************************************/
45
46/*!
47\group installation
48\title Installation
49\ingroup buildsystem
50\ingroup topics
51\brief Installing Qt on supported platforms.
52
53The installation procedure is different on each Qt platform.
54Please follow the instructions for your platform from the following list.
55
56\generatelist{related}
57*/
58
59/*! \page install-x11.html
60\title Installing Qt on X11 Platforms
61\ingroup installation
62\brief How to install Qt on platforms with X11.
63\previouspage Installation
64
65\note Qt for X11 has some requirements that are given in more detail
66in the \l{Qt for X11 Requirements} document.
67
68\list 1
69\o If you have the commercial edition of Qt, install your license
70 file as \c{$HOME/.qt-license}.
71
72 For the open source version you do not need a license file.
73
74\o Unpack the archive if you have not done so already. For example,
75 if you have the \c{qt-x11-opensource-desktop-4.5.1.tar.gz}
76 package, type the following commands at a command line prompt:
77
78\snippet doc/src/snippets/code/doc_src_installation.qdoc 0
79
80 This creates the directory \c{/tmp/qt-x11-opensource-desktop-4.5.1}
81 containing the files from the archive. We only support the GNU version of
82 the tar archiving utility. Note that on some systems it is called gtar.
83
84\o Building
85
86 To configure the Qt library for your machine type, run the
87 \c{./configure} script in the package directory.
88
89 By default, Qt is configured for installation in the
90 \c{/usr/local/Trolltech/Qt-4.5.1} directory, but this can be
91 changed by using the \c{-prefix} option.
92
93\snippet doc/src/snippets/code/doc_src_installation.qdoc 1
94
95 Type \c{./configure -help} to get a list of all available options.
96
97 To create the library and compile all the demos, examples, tools,
98 and tutorials, type:
99
100\snippet doc/src/snippets/code/doc_src_installation.qdoc 2
101
102 If \c{-prefix} is outside the build directory, you need to install
103 the library, demos, examples, tools, and tutorials in the appropriate
104 place. To do this, type:
105
106\snippet doc/src/snippets/code/doc_src_installation.qdoc 3
107
108 , as root if necessary.
109
110 Note that on some systems the make utility is named differently,
111 e.g. gmake. The configure script tells you which make utility to
112 use.
113
114 \bold{Note:} If you later need to reconfigure and rebuild Qt from the
115 same location, ensure that all traces of the previous configuration are
116 removed by entering the build directory and typing \c{make confclean}
117 before running \c configure again.
118
119\o Environment variables
120
121 In order to use Qt, some environment variables needs to be
122 extended.
123
124\snippet doc/src/snippets/code/doc_src_installation.qdoc 4
125
126 This is done like this:
127
128 In \c{.profile} (if your shell is bash, ksh, zsh or sh), add the
129 following lines:
130
131\snippet doc/src/snippets/code/doc_src_installation.qdoc 5
132
133 In \c{.login} (in case your shell is csh or tcsh), add the following line:
134
135\snippet doc/src/snippets/code/doc_src_installation.qdoc 6
136
137 If you use a different shell, please modify your environment
138 variables accordingly.
139
140 For compilers that do not support rpath you must also extended the
141 \c LD_LIBRARY_PATH environment variable to include
142 \c{/usr/local/Trolltech/Qt-4.5.1/lib}. On Linux with GCC this step
143 is not needed.
144
145\o That's all. Qt is now installed.
146
147 If you are new to Qt, we suggest that you take a look at the demos
148 and examples to see Qt in action. Run the Qt Examples and Demos
149 either by typing \c qtdemo on the command line or through the
150 desktop's Main menu.
151
152 You might also want to try the following links:
153
154 \list
155 \o \l{Configuring Qt}
156 \o \l{How to Learn Qt}
157 \o \l{Tutorials}
158 \o \l{Developer Zone}
159 \o \l{Deploying Qt Applications}
160 \endlist
161\endlist
162
163 We hope you will enjoy using Qt. Good luck!
164
165*/
166
167/*!
168\page install-win.html
169\title Installing Qt on Windows
170\ingroup installation
171\brief How to install Qt on Windows.
172\previouspage Installation
173
174\note Qt for Windows has some requirements that are given in more detail
175in the \l{Qt for Windows Requirements} document.
176
177\table
178\row \o \bold{Notes:}
179\list
180\o If you have obtained a binary package for this platform,
181consult the installation instructions provided instead of the ones in
182this document.
183\o \l{Open Source Versions of Qt} is not officially supported for use with
184any version of Visual Studio. Integration with Visual Studio is available
185as part of the \l{Qt Commercial Editions}.
186
187\endlist
188\endtable
189
190\list 1
191\o If you have the commercial edition of Qt, copy the license file
192 from your account on dist.trolltech.com into your home directory
193 (this may be known as the \c userprofile environment variable) and
194 rename it to \c{.qt-license}. This renaming process must be done
195 using a \e{command prompt} on Windows, \bold{not} with Windows Explorer.
196 For example on Windows 2000, \c{%USERPROFILE%} should be something
197 like \c{C:\Documents and Settings\username}
198
199 For the open source version you do not need a license file.
200
201\o Uncompress the files into the directory you want Qt installed;
202 e.g. \c{C:\Qt\4.5.1}.
203
204 \note The install path must not contain any spaces or Windows specific
205 file system characters.
206
207\o Environment variables
208
209 In order to build and use Qt, the \c PATH environment variable needs to be
210 extended:
211
212\snippet doc/src/snippets/code/doc_src_installation.qdoc 7
213
214 This is done by adding \c{c:\Qt\4.5.1\bin} to the \c PATH variable.
215
216 For newer versions of Windows, \c PATH can be extended through
217 the \menu{Control Panel|System|Advanced|Environment variables} menu.
218
219 You may also need to ensure that the locations of your compiler and
220 other build tools are listed in the \c PATH variable. This will depend
221 on your choice of software development environment.
222
223 \bold{Note}: If you don't use the configured shells, which is
224 available in the application menu, in the \l{Open Source Versions of Qt},
225 \c configure requires that \c sh.exe is not in the path
226 or that it is run from \c msys. This also goes for mingw32-make.
227
228\o Building
229
230 To configure the Qt library for your machine, type the following command
231 in a \bold{Visual Studio} command prompt:
232
233\snippet doc/src/snippets/code/doc_src_installation.qdoc 8
234
235 Type \c{configure -help} to get a list of all available options.
236
237 If you have multiple compilers installed, and want to build the Qt library
238 using a specific compiler, you must specify a \c qmake specification.
239 This is done by pasing \c{-platform <spec>} to configure; for example:
240
241\snippet doc/src/snippets/code/doc_src_installation.qdoc 9
242
243 In some cases you need to set up the compilation environment before running
244 configure in order to use the right compiler. For instance, you need to do this
245 if you have Visual Studio 2005 installed and want to compile Qt using the x64
246 compiler because the 32-bit and 64-bit compiler both use the same
247 \c qmake specification file.
248 This is usually done by selecting
249 \menu{Microsoft Visual Studio 2005|Visual Studio Tools|<Command Prompt>}
250 from the \gui Start menu.
251
252 The actual commands needed to build Qt depends on your development
253 system. For Microsoft Visual Studio to create the library and
254 compile all the demos, examples, tools and tutorials type:
255
256\snippet doc/src/snippets/code/doc_src_installation.qdoc 10
257
258 \note If you later need to reconfigure and rebuild Qt from the
259 same location, ensure that all traces of the previous configuration are
260 removed by entering the build directory and typing \c{nmake distclean}
261 before running \c configure again.
262
263\o That's all. Qt is now installed.
264
265 If you are new to Qt, we suggest that you take a look at the demos
266 and examples to see Qt in action. Run the Qt Examples and Demos
267 either by typing \c qtdemo on the command line or through the
268 desktop's Start menu.
269
270 You might also want to try the following links:
271
272 \list
273 \o \l{How to Learn Qt}
274 \o \l{Tutorials}
275 \o \l{Developer Zone}
276 \o \l{Deploying Qt Applications}
277 \endlist
278
279\endlist
280
281 We hope you will enjoy using Qt. Good luck!
282
283*/
284
285/*! \page install-mac.html
286\title Installing Qt on Mac OS X
287\ingroup installation
288\brief How to install Qt on Mac OS X.
289\previouspage Installation
290
291\note Qt for Mac OS X has some requirements that are given in more detail
292in the \l{Qt for Mac OS X Requirements} document.
293
294\bold{Note for the binary package}: If you have the binary package, simply double-click on the Qt.mpkg
295and follow the instructions to install Qt. You can later run the \c{uninstall-qt.py}
296script to uninstall the binary package. The script is located in /Developer/Tools and
297must be run as root.
298
299The following instructions describe how to install Qt from the source package.
300
301\list 1
302\o If you have the commercial edition of Qt, install your license
303 file as \c{$HOME/.qt-license}.
304
305 For the open source version you do not need a license file.
306
307\o Unpack the archive if you have not done so already. For example,
308 if you have the \c{qt-mac-opensource-desktop-4.5.1.tar.gz}
309 package, type the following commands at a command line prompt:
310
311\snippet doc/src/snippets/code/doc_src_installation.qdoc 11
312
313 This creates the directory \c{/tmp/qt-mac-opensource-desktop-4.5.1}
314 containing the files from the archive.
315
316\o Building
317
318 To configure the Qt library for your machine type, run the
319 \c{./configure} script in the package directory.
320
321 By default, Qt is configured for installation in the
322 \c{/usr/local/Trolltech/Qt-4.5.1} directory, but this can be
323 changed by using the \c{-prefix} option.
324
325\snippet doc/src/snippets/code/doc_src_installation.qdoc 12
326
327 Type \c{./configure -help} to get a list of all available options.
328
329 Note that you will need to specify \c{-universal} if you want to
330 build universal binaries, and also supply a path to the \c{-sdk}
331 option if your development machine has a PowerPC CPU. By default,
332 Qt is built as a framework, but you can built it as a set of
333 dynamic libraries (dylibs) by specifying the \c{-no-framework}
334 option.
335
336 Qt can also be configured to be built with debugging symbols. This
337 process is described in detail in the \l{Debugging Techniques}
338 document.
339
340 To create the library and compile all the demos, examples, tools,
341 and tutorials, type:
342
343\snippet doc/src/snippets/code/doc_src_installation.qdoc 13
344
345 If \c{-prefix} is outside the build directory, you need to install
346 the library, demos, examples, tools, and tutorials in the appropriate
347 place. To do this, type:
348
349\snippet doc/src/snippets/code/doc_src_installation.qdoc 14
350
351 as root, if neccessary (note that this requires that you have administrator access
352 to your machine).
353
354 There is a potential race condition when running make install with multiple
355 jobs. It is best to only run one make job (-j1) for the install.
356
357 \bold{Note:} If you later need to reconfigure and rebuild Qt from the
358 same location, ensure that all traces of the previous configuration are
359 removed by entering the build directory and typing \c{make confclean}
360 before running \c configure again.
361
362\o Environment variables
363
364 In order to use Qt, some environment variables need to be
365 extended.
366
367\snippet doc/src/snippets/code/doc_src_installation.qdoc 15
368
369 This is done like this:
370
371 In \c{.profile} (if your shell is bash), add the following lines:
372
373\snippet doc/src/snippets/code/doc_src_installation.qdoc 16