/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.  For licensing terms and
** conditions see http://qt.digia.com/licensing.  For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file.  Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \page developing-on-mac.html
    \title Developing Qt Applications for Mac OS X
    \brief Information for developing Qt applications for Mac OS X

    \tableofcontents

    Mac OS X is a UNIX platform and behaves similar to other Unix-like
    platforms. The main difference is X11 is not used as the primary windowing
    system. Instead, Mac OS X uses its own native windowing system that is
    accessible through the Cocoa API. Application development on Mac OS X is
    done using Xcode, available from the Mac App store.

    After installing Xcode you need to download the command line tools.
    This is done in the Preferences dialog under the Downloads section.
    After installing, "clang" should be available on the command line.

    You can also download the command line tools directly and skip the
    code download. Log on to developer.apple.com and look for
    "Command Line Tools for Xcode" in the download area.

    \section1 What Versions of Mac OS X are Supported?

    Qt 5 supports Mac OS X versions 10.6 (Snow Leopard) and up. It is usually in
    the best interest of the developer and user to be running the latest
    updates to any version. We test internally against Mac OS X 10.6 and 10.7.

    \section2 Carbon or Cocoa?

    Qt 5 uses Cocoa. Building for Carbon is not possible.

    \section2 32-bit or 64-bit

    Qt can be built for either x86 or x86_64. 64-bit is used by default.
    To select a 32-bit build, use the macx-clang-32 (or macx-g++32) mkspec.
    This is selectable at configure time: ./configure -platform macx-clang-32

    The Qt build system does not support building unversal binaries directly.
    Instead, use the "lipo" tool to glue two Qt builds together.

    \section2 Building Qt statically

    Static builds are not tested.

    \section1 Day-to-Day Application Development on OS X

    On the command-line, applications can be built using \c qmake and \c make.
    Optionally, \c qmake can generate project files for Xcode with
    \c{-spec macx-xcode}. If you are using the binary package, \c qmake
    generates Xcode projects by default; use \c{-spec macx-gcc} to generate
    makefiles.

    The result of the build process is an application bundle, which is a
    directory structure that contains the actual application executable. The
    application can be launched by double-clicking it in Finder, or by
    referring directly to its executable from the command line, i. e.
    \c{myApp.app/Contents/MacOS/myApp}.

    If you wish to have a command-line tool that does not use the GUI (e.g.,
    \c moc, \c uic or \c ls), you can tell \c qmake not to execute the bundle
    creating steps by removing it from the \c{CONFIG} in your \c{.pro} file:

    \code
    CONFIG -= app_bundle
    \endcode

    \section1 Deployment - "Compile once, deploy everywhere"

    In general, Qt supports building on one Mac OS X version and deploying on
    all others, both forward and backwards. You can build on 10.7 Lion and run
    the same binary on 10.6 and up. The recommended way is to build on the
    latest OS version and deploy backwards.

    Mac applications are typically deployed as self-contained application
    bundles. The application bundle contains the application executable as well
    as dependencies such as the Qt libraries, plugins, translations and other
    resources you may need. Third party libraries like Qt are normally not
    installed system-wide; each application provides its own copy.

    A common way to distribute applications is to provide a compressed
    disk image (.dmg file) that the user can mount in Finder. The Mac
    deployment tool (macdeployqt) can be used to create the self-contained bundles, and
    optionally also create a .dmg archive. See the
    \l{Deploying an Application on Mac OS X}{Mac deployment guide} for more
    information about deployment.

    Applications can also be distributed through the Mac App store. Qt 5 aims
    to stay within the app store sandbox rules. macdeployqt (qttools/src/macdeployqt)
    can be used as a starting point for app store deployment.
*/
