diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/qbs.qdoc | 69 | ||||
-rw-r--r-- | doc/reference/cli/cli-options.qdocinc | 1 | ||||
-rw-r--r-- | doc/reference/items/probe/sdcc-probe.qdoc | 93 | ||||
-rw-r--r-- | doc/reference/modules/android-ndk-module.qdoc | 15 | ||||
-rw-r--r-- | doc/reference/modules/android-sdk-module.qdoc | 40 | ||||
-rw-r--r-- | doc/reference/modules/protobufcpp-module.qdoc | 19 | ||||
-rw-r--r-- | doc/reference/modules/qbs-module.qdoc | 87 | ||||
-rw-r--r-- | doc/reference/modules/qt-android_support-module.qdoc | 9 |
8 files changed, 305 insertions, 28 deletions
diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc index 1eb1d2bec..297687403 100644 --- a/doc/qbs.qdoc +++ b/doc/qbs.qdoc @@ -450,7 +450,7 @@ To build \QBS from the source, you need: \list - \li Qt 5.9, or later + \li Qt 5.11, or later \li Windows: MinGW with GCC 4.9 or Microsoft Visual Studio 2015, or later \li Linux: GCC 4.9, or later, or Clang 3.9.0, or later @@ -470,7 +470,7 @@ Regenerating the man page requires the \c help2man tool. - \section1 Building + \section1 Building \QBS with QMake To build \QBS, enter the following command: @@ -488,7 +488,7 @@ make install INSTALL_ROOT=$INSTALL_DIRECTORY \endcode - \section1 Configure Options + \section2 QMake Configure Options \QBS recognizes the following qmake CONFIG options to customize the build: @@ -510,6 +510,46 @@ before running qmake to specify a custom location for \QBS to look for its system-level settings. + \section1 Building \QBS with \QBS + + It is also possible to build \QBS with the previously installed \QBS version. + To build \QBS, enter the following command in the source directory: + \code + qbs + \endcode + This will use the \c defaultProfile or pick up the Qt version and the toolchain from the \c PATH + if the \c defaultProfile is not set. See \l {Configuring Profiles and Preferences} for details + about profiles. + + To run automatic tests, the \c autotest-runner product should be built: + \code + qbs build -p autotest-runner + \endcode + \QBS will use an empty profile when running tests which means it will try to autodetect + toolchains, Qt versions and other things based on the system environment. + It is possible to specify which profile should be used during the test-run by passing the + \c QBS_AUTOTEST_PROFILE environment variable. + This variable should be set prior to building \QBS itself; otherwise the \c resolve command + should be used to update the environment stored in the buildgraph: + \code + export QBS_AUTOTEST_PROFILE=qt + qbs resolve + qbs build -p autotest-runner + \endcode + + It is also possible to set up a separate profile for a particular testsuite. + A profile for the \c tst_blackbox_android suite can be set up as follows: + \code + qbs setup-android pie + export QBS_AUTOTEST_PROFILE_BLACKBOX_ANDROID=pie + \endcode + + It might be useful to set up the directory with the \QBS settings to isolate the test + environment: + \code + export QBS_AUTOTEST_SETTINGS_DIR=~/path/to/qbs/settings + \endcode + \section1 Using Docker A set of Docker images for developing \QBS (which are maintained by the \QBS team) is available @@ -523,8 +563,16 @@ The easiest way to get started is to build \QBS using a Linux container. These types of containers are supported out of the box on all the supported host platforms: Windows, macOS, - and Linux. Run the following to download the \QBS development image based on Debian 9 - \e Stretch: + and Linux. + + The images provide everything that is necessary to build and test \QBS: + + \list + \li Qt SDK for building \QBS with \c qmake + \li Latest stable release of \QBS for building \QBS with \QBS + \endlist + + Run the following command to download the \QBS development image based on Debian 9 \e Stretch: \code docker pull qbsbuild/qbsdev:stretch @@ -534,16 +582,19 @@ machine's file system, by running: \code - docker run -it -v $PWD:/qbs -w /qbs qbsbuild/qbsdev:stretch + docker run -it -v ${PWD}:/qbs -w /qbs qbsbuild/qbsdev:stretch \endcode - Or with a slightly different syntax for Windows: + You will now be in an interactive Linux shell where you can develop and build \QBS. + + For convenience, you can also run \c docker-compose from the project root directory: \code - docker run -it -v %CD%:/qbs -w /qbs qbsbuild/qbsdev:stretch + docker-compose run --rm stretch \endcode - You will now be in an interactive Linux shell where you can develop and build \QBS. + This will download and run the container in one go and mount the project root directory + to \c /qbs in the container. \section2 Windows Containers diff --git a/doc/reference/cli/cli-options.qdocinc b/doc/reference/cli/cli-options.qdocinc index 2d35bea61..d4c3280a2 100644 --- a/doc/reference/cli/cli-options.qdocinc +++ b/doc/reference/cli/cli-options.qdocinc @@ -496,6 +496,7 @@ \li \c msvc \li \c iar \li \c keil + \li \c sdcc \endlist //! [type] diff --git a/doc/reference/items/probe/sdcc-probe.qdoc b/doc/reference/items/probe/sdcc-probe.qdoc new file mode 100644 index 000000000..1353eb736 --- /dev/null +++ b/doc/reference/items/probe/sdcc-probe.qdoc @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2019 Denis Shienkov <denis.shienkov@gmail.com> +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qbs. +** +** $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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ +/*! + \contentspage list-of-probes.html + \qmltype SdccProbe + \ingroup list-of-probes + \ingroup list-of-items + \keyword QML.SdccProbe + \inherits PathProbe + \brief Collects SDCC toolchain compiler information. + \since Qbs 1.14 + \internal + + Detects the version, supported architecture and the platform + endianness of the specified compiler executable file from the + \l{http://sdcc.sourceforge.net/}{SDCC} toolchain. +*/ + +/*! + \qmlproperty string SdccProbe::compilerFilePath + + An input property which is a full path to the SDCC compiler executable file. + + \nodefaultvalue +*/ + +/*! + \qmlproperty string SdccProbe::architecture + + Detected architecture of the target platform's processor. + + The possible values are \c "mcs51". + + \nodefaultvalue +*/ + +/*! + \qmlproperty string SdccProbe::endianness + + Detected endianness of the target platform's processor architecture. + + The possible values are \c "little". + + \nodefaultvalue +*/ + +/*! + \qmlproperty int SdccProbe::versionMajor + + Detected major compiler version. + + \nodefaultvalue +*/ + +/*! + \qmlproperty int SdccProbe::versionMinor + + Detected minor compiler version. + + \nodefaultvalue +*/ + +/*! + \qmlproperty int SdccProbe::versionPatch + + Detected patch compiler version. + + \nodefaultvalue +*/ diff --git a/doc/reference/modules/android-ndk-module.qdoc b/doc/reference/modules/android-ndk-module.qdoc index 8113a7c68..e3a7ca22d 100644 --- a/doc/reference/modules/android-ndk-module.qdoc +++ b/doc/reference/modules/android-ndk-module.qdoc @@ -47,7 +47,7 @@ CppApplication { name: "HelloJni" Android.sdk.packageName: "com.example.hellojni" - qbs.architectures: ["mips", "x86"] + qbs.architectures: ["arm", "x86"] files: "app/src/main/jni/hello-jni.c" } \endcode @@ -86,16 +86,9 @@ \list \li \c "c++_shared" \li \c "c++_static" - \li \c "gabi++_shared" (until r17) - \li \c "gabi++_static" (until r17) - \li \c "gnustl_shared" (until r17) - \li \c "gnustl_static" (until r17) - \li \c "stlport_shared" (until r17) - \li \c "stlport_static" (until r17) - \li \c "system" \endlist - \defaultvalue \c{"system"} + \defaultvalue \c{"c++_shared"} */ /*! @@ -111,5 +104,7 @@ The versioned platform name. - \defaultvalue \c{"android-9"} + \defaultvalue \c{"android-16"} for 32 bit arm ABIs + and \c{"android-21"} for all 64 bit ABIs and x86. + x86 ABI has broken wstring support in android-16 to android-19. */ diff --git a/doc/reference/modules/android-sdk-module.qdoc b/doc/reference/modules/android-sdk-module.qdoc index a9e06ae17..7733ae75d 100644 --- a/doc/reference/modules/android-sdk-module.qdoc +++ b/doc/reference/modules/android-sdk-module.qdoc @@ -161,6 +161,46 @@ */ /*! + \qmlproperty string Android.sdk::versionCode + + The Android Manifest version code of the respective product. The \c android:versionCode + attribute in the manifest file will be set to this value if not undefined. + + In the following example we provide an architecture-specific value + for \c android:versionCode: + + \code + // ... + property int _version: 1 + property int _patchVersion: 0 + Android.sdk.versionCode: { + switch (Android.ndk.abi) { + case "armeabi-v7a": + return 132000000 | _version * 10 + _patchVersion; + case "arm64-v8a": + return 164000000 | _version * 10 + _patchVersion; + case "x86": + return 232000000 | _version * 10 + _patchVersion; + case "x86_64": + return 264000000 | _version * 10 + _patchVersion; + } + throw "Unknown architecture"; + } + \endcode + + \defaultvalue \c undefined +*/ + +/*! + \qmlproperty string Android.sdk::versionName + + The Android Manifest version name of the respective product. The \c android:versionName + attribute in the manifest file will be set to this value if not undefined. + + \defaultvalue \c undefined +*/ + +/*! \qmlproperty string Android.sdk::resourcesDir The base directory for Android resources in the respective product. diff --git a/doc/reference/modules/protobufcpp-module.qdoc b/doc/reference/modules/protobufcpp-module.qdoc index 688f1d9e2..63c56c6ca 100644 --- a/doc/reference/modules/protobufcpp-module.qdoc +++ b/doc/reference/modules/protobufcpp-module.qdoc @@ -36,6 +36,25 @@ The \c protobuf.cpp module provides support for generating C++ headers and sources from proto definition files using the \l protoc tool. + A simple qbs file that uses protobuf can be written as follows: + \code + CppApplication { + Depends { name: "protobuf.cpp" } + files: ["foo.proto", "main.cpp"] + } + \endcode + A generated header now can be included in the C++ sources: + \code + #include <foo.pb.h> + + int main(int argc, char* argv[]) { + Foo bar; + bar.set_answer(42); + google::protobuf::ShutdownProtobufLibrary(); + return 0; + } + \endcode + \section2 Relevant File Tags \table diff --git a/doc/reference/modules/qbs-module.qdoc b/doc/reference/modules/qbs-module.qdoc index eea67688b..31e0e6ffe 100644 --- a/doc/reference/modules/qbs-module.qdoc +++ b/doc/reference/modules/qbs-module.qdoc @@ -209,32 +209,81 @@ qbs.targetOS.contains("linux") && !qbs.targetOS.contains("android") \endcode - The possible values include one or more of the following: - - \list + \section2 Relation between targetPlatform and targetOS + + This table describes the possible values and matching between the \c targetPlatform + and the \l{qbs::}{targetOS} properties: + \table + \header + \li Target Platform + \li Target OS + \row \li \c{"aix"} + \li \c{["aix", "unix"]} + \row \li \c{"android"} + \li \c{["android", "linux", "unix"]} + \row \li \c{"freebsd"} + \li \c{["freebsd", "bsd", "unix"]} + \row \li \c{"haiku"} + \li \c{["haiku"]} + \row \li \c{"hpux"} + \li \c{["hpux", "unix"]} + \row \li \c{"hurd"} + \li \c{["hurd", "unix"]} + \row \li \c{"integrity"} + \li \c{["integrity", "unix"]} + \row \li \c{"ios"} + \li \c{["ios", "darwin", "bsd", "unix"]} + \row \li \c{"ios-simulator"} + \li \c{["ios-simulator", "ios", "darwin", "bsd", "unix"]} + \row \li \c{"linux"} + \li \c{["linux", "unix"]} + \row \li \c{"lynx"} + \li \c{["lynx"]} + \row \li \c{"macos"} + \li \c{["macos", "darwin", "bsd", "unix"]} + \row \li \c{"netbsd"} + \li \c{["netbsd", "bsd", "unix"]} + \row \li \c{"openbsd"} + \li \c{["openbsd", "bsd", "unix"]} + \row \li \c{"qnx"} + \li \c{["qnx", "unix"]} + \row \li \c{"solaris"} + \li \c{["solaris", "unix"]} + \row \li \c{"tvos"} + \li \c{["tvos", "darwin", "bsd", "unix"]} + \row \li \c{"tvos-simulator"} + \li \c{["tvos-simulator", "tvos", "darwin", "bsd", "unix"]} + \row \li \c{"vxworks"} + \li \c{["vxworks"]} + \row \li \c{"watchos"} + \li \c{["watchos", "darwin", "bsd", "unix"]} + \row \li \c{"watchos-simulator"} + \li \c{["watchos-simulator", "watchos", "darwin", "bsd", "unix"]} + \row \li \c{"windows"} - \endlist + \li \c{["windows"]} + \endtable \nodefaultvalue */ @@ -433,14 +482,34 @@ /*! \qmlproperty stringList qbs::targetOS + \readonly - Specifies the OS you want to build the project for. + Contains the list of string values describing the OS and OS family that is + used to build a project. - Use this property to test for a particular OS or OS family in conditionals. - Do not use \l{qbs::}{targetPlatform} for this purpose. + This property is calculated based on the \l{qbs::}{targetPlatform} property and is typically + used to test for a particular OS or OS family in conditionals: + \code + Group { + // Includes all Unix-like platforms, such as: Linux, BSD, Apple platforms and others. + condition: qbs.targetOS.contains("unix") + files: ... + } + Group { + // Includes all Apple platforms, such as macOS, iOS, and iOS Simulator. + condition: qbs.targetOS.contains("darwin") + files: ... + } + Group { + // Includes only macOS + condition: qbs.targetOS.contains("macos") + files: ... + } + \endcode + Avoid using \l{qbs::}{targetPlatform} for this purpose. - Possible values include one or more of \c{"bsd"}, \c{"darwin"}, and - \c{"unix"}, in addition to the possible values of \l{qbs::}{targetPlatform}. + For the complete list of possible values, see + \l{Relation between targetPlatform and targetOS}. \nodefaultvalue */ diff --git a/doc/reference/modules/qt-android_support-module.qdoc b/doc/reference/modules/qt-android_support-module.qdoc index f7ec595e3..995f73ba5 100644 --- a/doc/reference/modules/qt-android_support-module.qdoc +++ b/doc/reference/modules/qt-android_support-module.qdoc @@ -77,6 +77,15 @@ */ /*! + \qmlproperty stringList Qt.android_support::extraLibs + + Additional libs to be packaged and loaded on start-up (mind the order). + Corresponds to qmake's ANDROID_EXTRA_LIBS. + + \defaultvalue \c undefined +*/ + +/*! \qmlproperty bool Qt.android_support::verboseAndroidDeployQt Enable this property if you want verbose output from the |