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