/****************************************************************************
**
** Copyright (c) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator
**
**
** GNU Free Documentation License
**
** 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.
**
**
****************************************************************************/

/*!
    \contentspage {Qt Creator Manual}
    \previouspage creator-project-cmake.html
    \page creator-project-qbs.html
    \nextpage creator-projects-autotools.html

    \title Setting Up a Qbs Project

    The Qt Build Suite (Qbs) and the Qbs plugin are still experimental, and
    therefore, you must first enable the plugin manually. If you build \QC
    yourself from our Git repository, you also need to fetch the Qbs submodule
    to get Qbs support.

    To use Qbs to build a project, you must create a .qbs file for the project.
    For more information, see the
    \l{http://qt-project.org/doc/qbs/index.html}{Qbs Manual}.

    \section1 Enabling the Qbs Plugin

    If you use a \QC binary release, you need to enable the plugin by
    selecting \gui Help > \gui {About Plugins} > \gui {Build Systems}
    > \gui {QbsProjectManager} and restarting \QC.

    \section1 Building Qbs

    To build the Qbs plugin yourself from the \QC git repository:

    \list 1

        \li Fetch the Qbs submodule in your \QC git checkout with
            \c {git submodule update --init}.

        \li Use Qbs or qmake and make to build \QC again.

        \li Enable the Qbs plugin as described above.

    \endlist

    \section1 Building Applications with Qbs

    To build your application with Qbs:

    \list 1

        \li Select \gui File > \gui {New File or Project} > \gui {Plain C
            Project (Qbs Build)} or \gui {Plain C++ Project (Qbs Build)} >
            \gui Choose, and follow the instructions of the wizard to create a
            Qbs project.

            \image creator-qbs-project.png

        \li Edit the .qbs file for you project. Usually, you must add the
            \c Depends item for a Qt application. For examples, see the
            \c {examples} directory in the qbs repository.

        \li Select \gui Projects to specify \gui {Build Settings} for the
            project.

        \li Select \gui {Build Steps} > \gui Details to specify build steps:

            \image creator-qbs-build-app.png

            \list 1

                \li In the \gui {Build variant} field, select \gui Debug to
                    include debug symbols in the build for debugging the
                    application and \gui Release to create the final
                    installation file.

                \li In the \gui {Parallel jobs} field, specify the number of
                    parallel jobs to use for building.

                \li Select the \gui {Enable QML debugging} check box to debug
                    Qt Quick application projects.

                    \note Debugging requires opening a socket at a well-known
                    port, which presents a security risk. Anyone on the Internet
                    could connect to the application that you are debugging and
                    execute any JavaScript functions. Therefore, you must make
                    sure that the port is properly protected by a firewall.

                \li In the \gui Properties field, specify the properties to pass
                    to the project. Use colons (:) to separate keys from values.
                    For more information, see
                    \l{http://qt-project.org/doc/qbs/language-introduction.html}
                    {Modules} in the Qbs Manual.

                \li In the \gui Flags field:

                    \list

                        \li Select \gui {Dry run} to test building without
                            executing commands or making permanent
                            changes to the build graph.

                        \li Select \gui {Keep going} to continue building when
                            errors occur, if possible.

                        \li Select \gui {Check timestamps} to retrieve the
                            timestamps from the file system instead of using the
                            ones stored in the build graph. You only need this
                            option if you made changes to the build directory
                            manually, which is not recommended.

                    \endlist

            \endlist

            The \gui {Equivalent command line} field displays the build command
            that is constructed based on the selected options.

        \li Select \gui {Clean Steps} > \gui Details to specify flags for the
            cleaning step.

            \image creator-qbs-build-clean.png

            \list

                \li Select \gui {Clean all artifacts} to remove all build
                    artifacts.

                \li Select \gui {Dry run} to test cleaning without executing
                    commands or making permanent changes to the build graph.

                \li Select \gui {Keep going} to continue cleaning when errors
                    occur, if possible.

            \endlist

            The \gui {Equivalent command line} field displays the clean command
            that is constructed based on the selected options.

        \li Select \gui Build > \gui {Build Project} to build the application.

        \li Click the
            \inlineimage qtcreator-run.png
            (\gui Run) button to deploy and run the application.
        \endlist

*/
