Changeset 846 for trunk/doc/src/development/developing-on-mac.qdoc
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/doc/src/development/developing-on-mac.qdoc
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 7 7 ** This file is part of the documentation of the Qt Toolkit. 8 8 ** 9 ** $QT_BEGIN_LICENSE: LGPL$9 ** $QT_BEGIN_LICENSE:FDL$ 10 10 ** Commercial Usage 11 11 ** Licensees holding valid Qt Commercial licenses may use this file in 12 12 ** accordance with the Qt Commercial License Agreement provided with the 13 ** Software or, alternatively, in accordance with the terms contained in 14 ** a written agreement between you and Nokia. 15 ** 16 ** GNU Lesser General Public License Usage 17 ** Alternatively, this file may be used under the terms of the GNU Lesser 18 ** General Public License version 2.1 as published by the Free Software 19 ** Foundation and appearing in the file LICENSE.LGPL included in the 20 ** packaging of this file. Please review the following information to 21 ** ensure the GNU Lesser General Public License version 2.1 requirements 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 23 ** 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this 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. 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. 35 21 ** 36 22 ** If you have questions regarding the use of this file, please contact … … 42 28 /*! 43 29 \page developing-on-mac.html 44 \title Developing Qt Applications on Mac OS X 45 \brief A overview of items to be aware of when developing Qt applications 46 on Mac OS X 30 \title Developing Qt Applications for Mac OS X 31 \brief Information for developing Qt applications for Mac OS X 47 32 \ingroup platform-specific 48 33 … … 61 46 \section1 What Versions of Mac OS X are Supported? 62 47 63 As of Qt 4. 6, Qt supports Mac OS X versions 10.4 and up. It is usually in48 As of Qt 4.7, Qt supports Mac OS X versions 10.4 and up. It is usually in 64 49 the best interest of the developer and user to be running the latest 65 50 updates to any version. We test internally against Mac OS X 10.4.11 as well … … 68 53 \section2 Carbon or Cocoa? 69 54 70 Historically, Qt has used the Carbon toolkit, which supports 32-bit 71 applications on Mac OS X 10.4 and up. Qt 4.5 and up has support for the Cocoa 72 toolkit, which requires 10.5 and provides 64-bit support. 73 74 This detail is typically not important to Qt application developers. Qt is 75 cross-platform across Carbon and Cocoa, and Qt applications behave 76 the same way when configured for either one. Eventually, the Carbon 77 version will be discontinued. This is something to keep in mind when you 78 consider writing code directly against native APIs. 79 80 The current binary for Qt is built in two flavors, 32-bit Carbon and full 81 universal Cocoa (32-bit and 64-bit). If you want a different setup for 82 Qt will use, you must build from scratch. Carbon or Cocoa is chosen when 83 configuring the package for building. The configure process selects Carbon 84 by default, to specify Cocoa use the \c{-cocoa} flag. configure for a 85 64-bit architecture using one of the \c{-arch} flags (see \l{universal 86 binaries}{Universal Binaries}). 55 Qt supports building in two flavors, using either the Carbon or Cocoa API. 56 Using the Cocoa API, Qt requires 10.5 and provides both 32-bit and 64-bit support. With 57 Carbon, Qt can be developed on and deployed to 10.4, but there is no 64-bit 58 support. 59 60 Note: There is no accessibility support in the Cocoa version. This is planned 61 for Qt 4.8. 62 63 With Qt 4.7 we recommend using the Cocoa version of Qt for development, 64 unless you want to target the 10.4 platform. Qt uses Cocoa by default, 65 both for the binary package and when configuring Qt from source (using the \c{configure} 66 script). To build Qt for Carbon, specify the \c{-carbon} flag to configure. 67 68 There are two versions of the Qt binary, one with x86 and x86_64 69 Cocoa and another with x86 and ppc Carbon. If you want a different setup 70 you must build Qt yourself using the source package. To explicitly configure 71 Qt to build for 34-bit or 64-bit architectures (or both), use 72 the \c{-arch} flags (see \l{universal binaries}{Universal Binaries}). 73 For the Cocoa version, 64 bit is chosen by default. 87 74 88 75 Currently, Apple's default GCC compiler is used by default (GCC 4.0.1 on … … 148 135 Carbon and Cocoa both have their advantages and disadvantages. Probably the 149 136 easiest way to determine is to look at the version of Mac OS X you are 150 targetting. If you are starting a new application and can target 10.5 and 151 up, then please consider Cocoa only. If you have an existing application or 152 need to target earlier versions of the operating system and do not need 153 access to 64-bit or newer Apple technologies, then Carbon is a good fit. If 154 your needs fall in between, you can go with a 64-bit Cocoa and 32-bit 155 Carbon universal application with the appropriate checks in your code to 156 choose the right path based on where you are running the application. 137 targetting. If your application can target 10.5 and up, then we recommend 138 using Cocoa. If you need to target earlier versions of the operating system 139 and do not need access to 64-bit or newer Apple technologies, then Carbon 140 is a good fit. If your needs fall in between, you can go with a 64-bit Cocoa and 32-bit 141 Carbon universal application. 157 142 158 143 For Mac OS X 10.6, Apple has started recommending developers to build their … … 163 148 to follow this advice, there is only one choice, 64-bit Cocoa. 164 149 150 151 \section2 Building Qt statically 152 153 We recommend building Qt as shared frameworks. Static builds are only partially 154 supported, meaning that you can build most of Qt statically, but some modules, 155 like web-kit and Designer, will fail. You can specify which modules to build 156 from configure (e.g. -no-webkit -nomake tools). For Cocoa configurations, both 157 static and no-framework builds requires manually copying the 158 'src/gui/mac/qt_menu.nib/ directory into the " Resources" directory in 159 the application bundle. 160 165 161 \target universal binaries 166 162 \section1 Universal Binaries … … 197 193 \endtable 198 194 199 If there are no \c{-arch} flags specified, configure builds for the 32-bit 200 architecture, if you are currently on one. Universal binaries were initially 195 If there are no \c{-arch} flags specified, configure builds Qt for a 32-bit 196 architecture when using Carbon, and a 64-bit architecture when using Cocoa. Universal 197 binaries were initially 201 198 used to simplify the PPC to Intel migration. You can use \c{-universal} to 202 199 build for both the 32-bit Intel and PPC architectures. … … 211 208 \endcode 212 209 210 \section2 Working with several versions of Qt 211 You can only install one version of Qt at a time when using the binary 212 package. The reason for this is that a binary installation will install different parts of Qt 213 (frameworks, documentation, examples, tools, etc) to different 214 predefined locations on the OS, as described by Apple. If you want 215 to work against other versions at the same time, you need 216 to build the other versions explicitly from source. When doing so, you can 217 provide \c{-prefix} to configure to set install location. 218 The binary package will install Qt to the following locations: 219 220 \table 221 \header 222 \o Qt 223 \o Location 224 \row 225 \o Designer, Linguist ... 226 \o /Developer/Applications/Qt 227 \row 228 \o Documentation 229 \o /Developer/Documentation/Qt 230 \row 231 \o Examples 232 \o /Developer/Examples/Qt 233 \row 234 \o Plugins 235 \o /Developer/Applications/Qt/Plugins 236 \row 237 \o Frameworks 238 \o /Library/Frameworks 239 \row 240 \o Libraries 241 \o /usr/lib 242 \row 243 \o qmake, moc, uic ... 244 \o /Developer/Tools/Qt (symlink to /usr/bin) 245 \row 246 \o uninstall-qt.py, uninstall-qtsdk.py 247 \o /Developer/Tools 248 \endtable 213 249 214 250 \section1 Day-to-Day Application Development on OS X
Note:
See TracChangeset
for help on using the changeset viewer.