aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/reference/items/application.qdoc19
-rw-r--r--doc/reference/items/product.qdoc3
-rw-r--r--doc/reference/modules/bundle-module.qdoc381
-rw-r--r--doc/reference/modules/cpp-module.qdoc67
-rw-r--r--examples/app-and-lib/app/app.qbs1
-rw-r--r--examples/cocoa-application/CocoaApplication.qbs3
-rw-r--r--examples/cocoa-touch-application/CocoaTouchApplication.qbs3
-rw-r--r--examples/code-generator/code-generator.qbs2
-rw-r--r--qbs-resources/imports/QbsAutotest.qbs1
-rw-r--r--qbs-resources/imports/QbsLibrary.qbs2
-rw-r--r--share/qbs/imports/qbs/BundleTools/bundle-tools.js371
-rw-r--r--share/qbs/imports/qbs/PathTools/path-tools.js18
-rw-r--r--share/qbs/imports/qbs/UnixUtils/unix-utils.js5
-rw-r--r--share/qbs/imports/qbs/base/Application.qbs4
-rw-r--r--share/qbs/imports/qbs/base/Library.qbs1
-rw-r--r--share/qbs/modules/bundle/BundleModule.qbs463
-rw-r--r--share/qbs/modules/cpp/CppModule.qbs10
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs341
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs23
-rw-r--r--share/qbs/modules/cpp/gcc.js44
-rw-r--r--share/qbs/modules/cpp/ios-gcc.qbs5
-rw-r--r--share/qbs/modules/ib/IBModule.qbs22
-rw-r--r--src/lib/corelib/api/project.cpp54
-rw-r--r--src/lib/corelib/api/projectdata.cpp4
-rw-r--r--src/lib/corelib/language/testdata/profilevaluesandoverriddenvalues.qbs1
-rw-r--r--src/lib/corelib/language/testdata/rfc1034identifier.qbs2
-rw-r--r--src/plugins/scanner/scannerplugin.qbs1
-rw-r--r--tests/auto/api/testdata/app-without-sources/project.qbs2
-rw-r--r--tests/auto/api/testdata/base-properties/imports/Foo.qbs1
-rw-r--r--tests/auto/api/testdata/build-properties-source/project.qbs1
-rw-r--r--tests/auto/api/testdata/change-dependent-lib/change-dependent-lib.qbs1
-rw-r--r--tests/auto/api/testdata/codegen/project.qbs1
-rw-r--r--tests/auto/api/testdata/disabled_install_group/project.qbs1
-rw-r--r--tests/auto/api/testdata/dynamic-libs/link_dynamiclib.qbs4
-rw-r--r--tests/auto/api/testdata/export-simple/project.qbs1
-rw-r--r--tests/auto/api/testdata/file-tagger/moc_cpp.qbs1
-rw-r--r--tests/auto/api/testdata/filetagsfilter_override/InstalledApp.qbs1
-rw-r--r--tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs3
-rw-r--r--tests/auto/api/testdata/inherit-qbs-search-paths/imports/Foo.qbs1
-rw-r--r--tests/auto/api/testdata/installed-artifact/installed_artifact.qbs1
-rw-r--r--tests/auto/api/testdata/is-runnable/project.qbs1
-rw-r--r--tests/auto/api/testdata/lib-same-source/project.qbs1
-rw-r--r--tests/auto/api/testdata/link-static-lib/project.qbs1
-rw-r--r--tests/auto/api/testdata/lots-of-dots/project.qbs1
-rw-r--r--tests/auto/api/testdata/moc-cpp/project.qbs1
-rw-r--r--tests/auto/api/testdata/moc-hpp-included/project.qbs1
-rw-r--r--tests/auto/api/testdata/moc-hpp/project.qbs1
-rw-r--r--tests/auto/api/testdata/new-output-artifact-in-dependency/project.qbs1
-rw-r--r--tests/auto/api/testdata/precompiled-header/project.qbs1
-rw-r--r--tests/auto/api/testdata/productNameWithDots/project.qbs2
-rw-r--r--tests/auto/api/testdata/properties-blocks/propertiesblocks.qbs1
-rw-r--r--tests/auto/api/testdata/qt5-plugin/project.qbs1
-rw-r--r--tests/auto/api/testdata/rc/rc.qbs1
-rw-r--r--tests/auto/api/testdata/rename-product/rename.qbs1
-rw-r--r--tests/auto/api/testdata/rename-target-artifact/rename.qbs1
-rw-r--r--tests/auto/api/testdata/same-base-name/project.qbs1
-rw-r--r--tests/auto/api/testdata/simple-probe/project.qbs1
-rw-r--r--tests/auto/api/testdata/static-lib-deps/project.qbs1
-rw-r--r--tests/auto/api/testdata/transformers/transformers.qbs1
-rw-r--r--tests/auto/api/testdata/uic/uic.qbs1
-rw-r--r--tests/auto/blackbox/testdata/changed-files/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/clean/clean.qbs3
-rw-r--r--tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs1
-rw-r--r--tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs1
-rw-r--r--tests/auto/blackbox/testdata/embedInfoPlist/embedInfoPlist.qbs4
-rw-r--r--tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs1
-rw-r--r--tests/auto/blackbox/testdata/installed-source-files/project.qbs2
-rw-r--r--tests/auto/blackbox/testdata/installed_artifact/installed_artifact.qbs1
-rw-r--r--tests/auto/blackbox/testdata/non-broken-files-in-broken-product/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/non-default-product/project.qbs4
-rw-r--r--tests/auto/blackbox/testdata/objc-arc/objc-arc.qbs1
-rw-r--r--tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs1
-rw-r--r--tests/auto/blackbox/testdata/overrideProjectProperties/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs2
-rw-r--r--tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs12
-rw-r--r--tests/auto/blackbox/testdata/productproperties/app.qbs1
-rw-r--r--tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs1
-rw-r--r--tests/auto/blackbox/testdata/propertyChanges/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/qml-debugging/project.qbs2
-rw-r--r--tests/auto/blackbox/testdata/qrc/i.qbs1
-rw-r--r--tests/auto/blackbox/testdata/ruleConditions/templates/zorduct.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackAddFile/after/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackAddFile/before/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/after/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/before/project.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackProducts/after/product3.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackProducts/before/product1.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackProducts/before/product2.qbs1
-rw-r--r--tests/auto/blackbox/testdata/trackQObjChange/i.qbs1
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp2
-rw-r--r--tests/manual/configure/configure.qbs1
-rw-r--r--tests/manual/includeLookup/includeLookup.qbs1
-rw-r--r--tests/manual/localDeployment/localDeployment.qbs1
-rw-r--r--tests/manual/minimumSystemVersion/minimumSystemVersion.qbs10
94 files changed, 1088 insertions, 869 deletions
diff --git a/doc/reference/items/application.qdoc b/doc/reference/items/application.qdoc
index d7ed04fd1..720be8355 100644
--- a/doc/reference/items/application.qdoc
+++ b/doc/reference/items/application.qdoc
@@ -38,22 +38,5 @@
\brief Represents a product of application type.
An \c Application item is a \c Product that has its type set to "application"
- (or "applicationbundle" on Darwin platforms such as OS X and iOS). It exists for the convenience
- of project file authors.
-
- \section1 Application Properties
- The following properties are available in addition to the ones inherited from \c Product.
-
- \table
- \header
- \li Property
- \li Type
- \li Default
- \li Description
- \row
- \li bundleExtension
- \li string
- \li empty
- \li The extension to use for the product's bundle. Only relevant on Darwin systems.
- \endtable
+ It exists for the convenience of project file authors.
*/
diff --git a/doc/reference/items/product.qdoc b/doc/reference/items/product.qdoc
index 5a22ee0f3..1b2785d73 100644
--- a/doc/reference/items/product.qdoc
+++ b/doc/reference/items/product.qdoc
@@ -147,6 +147,9 @@
\li linker-dependent
\li If true, a console application is generated. If false, a GUI application is generated.
Only takes effect on Windows.
+ This property also influences the default application type on OS X and iOS.
+ If true, an application bundle is generated. If false, a normal executable is
+ generated.
\row
\li qbsSearchPaths
\li stringList
diff --git a/doc/reference/modules/bundle-module.qdoc b/doc/reference/modules/bundle-module.qdoc
new file mode 100644
index 000000000..d9bcb71e1
--- /dev/null
+++ b/doc/reference/modules/bundle-module.qdoc
@@ -0,0 +1,381 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2015 Jake Petroules.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Build Suite.
+**
+** 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://www.qt.io/licensing. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+/*!
+ \contentspage index.html
+ \page bundle-module.html
+ \ingroup list-of-modules
+
+ \title Module bundle
+ \brief Provides Core Foundation bundle support.
+
+ The \c bundle module contains properties and rules for building and working with
+ Core Foundation bundles on OS X and iOS (commonly known as CFBundles or simply "bundles"),
+ directories with a standardized hierarchical structure that hold executable code and resources.
+ Examples include applications, frameworks, and plugins.
+
+ This module is available on all platforms but is currently only useful on OS X and iOS.
+
+ \note Core Foundation bundles are not to be confused with Mach-O loadable modules, which are
+ also referred to as (loadable) "bundles" in Apple parlance.
+ In \QBS, Core Foundation bundles are referred to as "bundles",
+ while Mach-O loadable bundles are referred to as "loadable modules".
+
+
+ \section1 General Properties
+
+ \section2 isBundle
+
+ \table
+ \row \li \b{Type:} \li \c{bool}
+ \row \li \b{Default:} \li \c{true} for application and dynamic
+ library products on OS X and iOS,
+ \c{false} otherwise
+ \endtable
+
+ Whether the product should actually be packaged as a bundle as opposed to a flat file.
+ This allows a product indirectly dependent on the \c{bundle} module to retain control of
+ whether it should actually be built as a bundle.
+
+ \section2 isShallow
+
+ \table
+ \row \li \b{Type:} \li \c{bool}
+ \row \li \b{Default:} \li \c{true} for iOS applications
+ \endtable
+
+ Whether the bundle directory tree is "shallow", i.e. whether it lacks a Contents
+ subdirectory. This is the default for iOS applications and should normally never be changed.
+
+ \section2 identifierPrefix
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li \c{org.example}
+ \endtable
+
+ Prefix for the product's bundle identifier. If \c{identifier} is left unset, the bundle
+ identifier will be a concatenation of this value and the \c{identifier} property,
+ separated by a '.'. This corresponds to the organization identifier in Xcode.
+
+ \section2 identifier
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li combination of \c{identifierPrefix} and the product's
+ target name formatted as an RFC 1034 identifier
+ \endtable
+
+ The bundle's identifier. If left unset, the bundle
+ identifier will be a concatenation of this value and the \c{identifierPrefix} property,
+ separated by a '.'.
+
+ \section2 extension
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li \c{"app"} for \c{"APPL"} packages,
+ \c{"framework"} for \c{"FMWK"} packages,
+ \c{"bundle"} for \c{"BNDL"} and custom packages
+ \endtable
+
+ The extension of the bundle's wrapper directory (minus the leading '.'). This property
+ should not normally need to be set unless creating a custom bundle type.
+
+ \section2 packageType
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li \c{"APPL"} for applications,
+ \c{"FMWK"} for frameworks
+ \c{"BNDL"} for custom bundles
+ \endtable
+
+ The four-letter file type code of the bundle, specified in the bundle's PkgInfo file and in
+ the bundle's Info.plist as the value for the CFBundlePackageType key.
+ This property should almost never need to be changed, though specifying an
+ alternative package type for custom bundles is allowed.
+
+ \section2 signature
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li \c{"????"}
+ \endtable
+
+ The four-letter signature specific to the bundle, also known as the creator code, specified
+ in the bundle's PkgInfo file and in the bundle's Info.plist as the value for the CFBundleSignature key.
+ This property should normally never need to be set.
+
+ \section2 bundleName
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li combination of the product's \c{targetName} and bundle's \c{extension}
+ \endtable
+
+ The file name of the bundle's wrapper directory.
+ This property should not normally need to be changed.
+
+ \section2 frameworkVersion
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Default:} \li \c{"A"}
+ \endtable
+
+ For framework bundles, the version of the framework. Unused for other package types.
+
+ \section2 publicHeaders
+
+ \table
+ \row \li \b{Type:} \li \c{pathList}
+ \row \li \b{Default:} \li \c{undefined}
+ \endtable
+
+ List of public header files to copy to a framework bundle's Headers subdirectory.
+
+ \section2 privateHeaders
+
+ \table
+ \row \li \b{Type:} \li \c{pathList}
+ \row \li \b{Default:} \li \c{undefined}
+ \endtable
+
+ List of private header files to copy to a framework bundle's PrivateHeaders subdirectory.
+
+ \section2 resources
+
+ \table
+ \row \li \b{Type:} \li \c{pathList}
+ \row \li \b{Default:} \li \c{undefined}
+ \endtable
+
+ List of resources to copy to a bundle's Resources subdirectory. Files will automatically
+ be copied into lproj subdirectories corresponding to the input files' paths.
+
+ \section2 infoPlistFile
+
+ \table
+ \row \li \b{Type:} \li \c{path}
+ \row \li \b{Default:} \li \c{undefined}
+ \endtable
+
+ Path to the Info.plist file used by the bundle.
+ The contents of this file will be aggregated with the values in \c{infoPlist}.
+ If \c{infoPlistFile} and \c{infoPlist} contain the same key, the latter will take precedence,
+ but may also be overridden during postprocessing (see \c{processInfoPlist}).
+ If undefined, will not be taken into account.
+
+ \section2 infoPlist
+
+ \table
+ \row \li \b{Type:} \li \c{object}
+ \row \li \b{Default:} \li \c{undefined}
+ \endtable
+
+ Dictionary of key-value pairs to add to the bundle's Info.plist.
+ The contents of this property will be aggregated with the values from \c{infoPlistFile}.
+ If \c{infoPlist} and \c{infoPlistFile} contain the same key, the former will take precedence,
+ but may also be overridden during postprocessing (see \c{processInfoPlist}).
+ If undefined, will not be taken into account.
+
+ \section2 processInfoPlist
+
+ \table
+ \row \li \b{Type:} \li \c{bool}
+ \row \li \b{Default:} \li \c{true}
+ \endtable
+
+ Whether to perform post-processing on the aggregated Info.plist contents.
+ If this property is \c{true}, various post-processing operations will be applied to the
+ bundle's property list dictionary after it has been aggregated from the contents of the file
+ specified by the \c{infoPlistFile} property and the \c{infoPlist} property.
+ First, values from a list of defaults will be added to the dictionary if they were not already
+ present. Then, values from the AdditionalInfo key of the platform SDK's Info.plist file will be
+ added to the dictionary if they were not already present, as well as some other miscellaneous
+ keys, such as BuildMachineOSBuild and UIDeviceFamily (on iOS).
+ Finally, variable expansions will be performed such that substrings of the form $(VAR) or ${VAR}
+ will be replaced with their corresponding environment variables.
+
+ \section2 embedInfoPlist
+
+ \table
+ \row \li \b{Type:} \li \c{bool}
+ \row \li \b{Default:} \li \c{true} if the product is a command line tool,
+ otherwise \c{false}.
+ \endtable
+
+ Whether to create a __TEXT section in the product's executable containing the processed Info.plist.
+ Only applies to command line applications.
+
+ \section2 infoPlistFormat
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \row \li \b{Allowed Values:} \li \c{"xml1"}, \c{"binary1"}, \c{"json"}, \c{"same-as-input"}
+ \row \li \b{Default:} \li \c{"binary1"} for iOS; \c{"same-as-input"} or \c{"xml1"}
+ for OS X depending on whether \c{infoPlistFile} is
+ specified; undefined for all other operating systems.
+ \endtable
+
+ The file format to write the product's resulting Info.plist in.
+
+
+ \section1 Path Specific Properties
+
+ All properties in this section are read-only properties specifying file paths
+ relative to the directory containing the bundle.
+
+ \section2 infoPlistPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path that the Info.plist file will be written to. If \c{embedInfoPlist} is \c{true}, this will
+ point to a file in a temporary directory.
+
+ \section2 infoPlistPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path that the PkgInfo file will be written to.
+
+ \section2 versionPlistPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path that the version.plist file will be written to.
+
+ \section2 executablePath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path that the main executable file will be written to.
+
+ \section2 executableFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where the main exectuable will be written.
+ Not to be confused with \c{executablesFolderPath}.
+
+ \section2 executablesFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where auxiliary executables will be copied.
+ Not to be confused with \c{executableFolderPath}.
+
+ \section2 frameworksFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where internal frameworks will be copied.
+
+ \section2 pluginsFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where plugins will be copied.
+
+ \section2 privateHeadersFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where private header files will be copied.
+
+ \section2 publicHeadersFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where public headers files will be copied.
+
+ \section2 scriptsFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where script files will be copied.
+
+ \section2 sharedFrameworksFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where shared frameworks will be copied.
+
+ \section2 sharedSupportFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where shared support files will be copied.
+
+ \section2 unlocalizedResourcesFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the directory where non-localized resource files will be copied.
+ This is the same as the base resources path.
+
+ \section2 contentsFolderPath
+
+ \table
+ \row \li \b{Type:} \li \c{string}
+ \endtable
+
+ Path of the bundle's Contents subdirectory.
+*/
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc
index 72a6dab99..bb65de93c 100644
--- a/doc/reference/modules/cpp-module.qdoc
+++ b/doc/reference/modules/cpp-module.qdoc
@@ -534,73 +534,6 @@
(OS X and iOS). Typically this should be set to \c{"@rpath"} on modern platforms that
support it, which includes OS X 10.5 and above, and all versions of iOS.
- \section2 infoPlistFile
-
- \table
- \row \li \b{Type:} \li \c{path}
- \row \li \b{Default:} \li \c{undefined}
- \endtable
-
- Path to the Info.plist file used by the bundle.
- The contents of this file will be aggregated with the values in \c{infoPlist}.
- If \c{infoPlistFile} and \c{infoPlist} contain the same key, the latter will take precedence,
- but may also be overridden during postprocessing (see \c{processInfoPlist}).
- If undefined, will not be taken into account.
-
- \section2 infoPlist
-
- \table
- \row \li \b{Type:} \li \c{object}
- \row \li \b{Default:} \li \c{undefined}
- \endtable
-
- Dictionary of key-value pairs to add to the bundle's Info.plist.
- The contents of this property will be aggregated with the values from \c{infoPlistFile}.
- If \c{infoPlist} and \c{infoPlistFile} contain the same key, the former will take precedence,
- but may also be overridden during postprocessing (see \c{processInfoPlist}).
- If undefined, will not be taken into account.
-
- \section2 processInfoPlist
-
- \table
- \row \li \b{Type:} \li \c{bool}
- \row \li \b{Default:} \li \c{true}
- \endtable
-
- Whether to perform post-processing on the aggregated Info.plist contents.
- If this property is \c{true}, various post-processing operations will be applied to the
- bundle's property list dictionary after it has been aggregated from the contents of the file
- specified by the \c{infoPlistFile} property and the \c{infoPlist} property.
- First, values from a list of defaults will be added to the dictionary if they were not already
- present. Then, values from the AdditionalInfo key of the platform SDK's Info.plist file will be
- added to the dictionary if they were not already present, as well as some other miscellaneous
- keys, such as BuildMachineOSBuild and UIDeviceFamily (on iOS).
- Finally, variable expansions will be performed such that substrings of the form $(VAR) or ${VAR}
- will be replaced with their corresponding environment variables.
-
- \section2 embedInfoPlist
-
- \table
- \row \li \b{Type:} \li \c{bool}
- \row \li \b{Default:} \li \c{true} if the product is a command line tool,
- otherwise \c{false}.
- \endtable
-
- Whether to create a __TEXT section in the product's executable containing the processed Info.plist.
- Only applies to command line applications.
-
- \section2 infoPlistFormat
-
- \table
- \row \li \b{Type:} \li \c{string}
- \row \li \b{Allowed Values:} \li \c{"xml1"}, \c{"binary1"}, \c{"json"}, \c{"same-as-input"}
- \row \li \b{Default:} \li \c{"binary1"} for iOS; \c{"same-as-input"} or \c{"xml1"}
- for OS X depending on whether \c{infoPlistFile} is
- specified; undefined for all other operating systems.
- \endtable
-
- The file format to write the product's resulting Info.plist in.
-
\section2 automaticReferenceCounting
\table
diff --git a/examples/app-and-lib/app/app.qbs b/examples/app-and-lib/app/app.qbs
index 7e42e6bf6..83c75beb7 100644
--- a/examples/app-and-lib/app/app.qbs
+++ b/examples/app-and-lib/app/app.qbs
@@ -39,6 +39,7 @@ import qbs 1.0
Product {
type: "application"
+ consoleApplication: true
name : "app-and-lib-app"
files : [ "main.cpp" ]
Depends { name: "cpp" }
diff --git a/examples/cocoa-application/CocoaApplication.qbs b/examples/cocoa-application/CocoaApplication.qbs
index 9d7814b35..e81af4a13 100644
--- a/examples/cocoa-application/CocoaApplication.qbs
+++ b/examples/cocoa-application/CocoaApplication.qbs
@@ -41,12 +41,11 @@ import qbs 1.0
CppApplication {
Depends { condition: product.condition; name: "ib" }
condition: qbs.targetOS.contains("osx")
- type: "applicationbundle"
name: "Cocoa Application"
cpp.precompiledHeader: "CocoaApplication/CocoaApplication-Prefix.pch"
- cpp.infoPlistFile: "CocoaApplication/CocoaApplication-Info.plist"
+ bundle.infoPlistFile: "CocoaApplication/CocoaApplication-Info.plist"
cpp.frameworks: ["Cocoa"]
diff --git a/examples/cocoa-touch-application/CocoaTouchApplication.qbs b/examples/cocoa-touch-application/CocoaTouchApplication.qbs
index 4ae8b29d2..49064cab5 100644
--- a/examples/cocoa-touch-application/CocoaTouchApplication.qbs
+++ b/examples/cocoa-touch-application/CocoaTouchApplication.qbs
@@ -41,12 +41,11 @@ import qbs 1.0
CppApplication {
Depends { condition: product.condition; name: "ib" }
condition: qbs.targetOS.contains("ios")
- type: "applicationbundle"
name: "Cocoa Touch Application"
cpp.precompiledHeader: "CocoaTouchApplication/CocoaTouchApplication-Prefix.pch"
- cpp.infoPlistFile: "CocoaTouchApplication/CocoaTouchApplication-Info.plist"
+ bundle.infoPlistFile: "CocoaTouchApplication/CocoaTouchApplication-Info.plist"
cpp.frameworks: [ "UIKit", "Foundation", "CoreGraphics" ]
diff --git a/examples/code-generator/code-generator.qbs b/examples/code-generator/code-generator.qbs
index c2783421f..ae28c5c1d 100644
--- a/examples/code-generator/code-generator.qbs
+++ b/examples/code-generator/code-generator.qbs
@@ -40,7 +40,6 @@ Project {
// A code generator that outputs a "Hello World" C++ program.
Product {
name: "hwgen"
- type: ["application"]
Depends { name: "cpp" }
files: ["hwgen.cpp"]
}
@@ -48,7 +47,6 @@ Project {
// Generate and build a hello-world application.
Product {
name: "hello-world"
- type: ["application"]
Depends { name: "cpp" }
Depends { name: "hwgen" }
Rule {
diff --git a/qbs-resources/imports/QbsAutotest.qbs b/qbs-resources/imports/QbsAutotest.qbs
index 85b31872b..43db835a9 100644
--- a/qbs-resources/imports/QbsAutotest.qbs
+++ b/qbs-resources/imports/QbsAutotest.qbs
@@ -2,6 +2,7 @@ import qbs
QtApplication {
type: ["application", "autotest"]
+ consoleApplication: true
property string testName
name: "tst_" + testName
Depends { name: "Qt.test" }
diff --git a/qbs-resources/imports/QbsLibrary.qbs b/qbs-resources/imports/QbsLibrary.qbs
index 4b5d0f34a..02c7fef66 100644
--- a/qbs-resources/imports/QbsLibrary.qbs
+++ b/qbs-resources/imports/QbsLibrary.qbs
@@ -3,6 +3,7 @@ import QbsFunctions
QbsProduct {
Depends { name: "cpp" }
+ Depends { name: "bundle" }
version: QbsFunctions.qbsVersion()
type: Qt.core.staticBuild ? "staticlibrary" : "dynamiclibrary"
targetName: (qbs.enableDebugCode && qbs.targetOS.contains("windows")) ? (name + 'd') : name
@@ -11,6 +12,7 @@ QbsProduct {
cpp.installNamePrefix: "@rpath"
cpp.visibility: "minimal"
cpp.cxxLanguageVersion: "c++11"
+ bundle.isBundle: false
property string headerInstallPrefix: "/include/qbs"
Group {
fileTagsFilter: product.type.concat("dynamiclibrary_symlink")
diff --git a/share/qbs/imports/qbs/BundleTools/bundle-tools.js b/share/qbs/imports/qbs/BundleTools/bundle-tools.js
index 52de0ff7c..d2c4ffa33 100644
--- a/share/qbs/imports/qbs/BundleTools/bundle-tools.js
+++ b/share/qbs/imports/qbs/BundleTools/bundle-tools.js
@@ -1,27 +1,56 @@
-// NOTE: QBS and Xcode's "target" and "product" names are reversed
-
+var FileInfo = loadExtension("qbs.FileInfo");
var PropertyList = loadExtension("qbs.PropertyList");
-function isBundleProduct(product) {
- return product.type.contains("applicationbundle")
- || product.type.contains("frameworkbundle")
- || product.type.contains("bundle")
- || product.type.contains("inapppurchase");
+function destinationDirectoryForResource(product, input) {
+ var path = product.destinationDirectory;
+ var inputFilePath = FileInfo.joinPaths(input.baseDir, input.fileName);
+ var key = DarwinTools.localizationKey(inputFilePath);
+ if (key) {
+ path = FileInfo.joinPaths(path, localizedResourcesFolderPath(product, key));
+ var subPath = DarwinTools.relativeResourcePath(inputFilePath);
+ if (subPath && subPath !== '.')
+ path = FileInfo.joinPaths(path, subPath);
+ } else {
+ path = FileInfo.joinPaths(path, product.moduleProperty("bundle", "unlocalizedResourcesFolderPath"), input.baseDir);
+ }
+ return path;
+}
+
+function localizedResourcesFolderPath(product, key) {
+ return FileInfo.joinPaths(product.moduleProperty("bundle", "unlocalizedResourcesFolderPath"), key + product.moduleProperty("bundle", "localizedResourcesFolderSuffix"));
}
-/**
- * Returns the package creator code for the given product based on its type.
- */
-function packageType(product) {
- if (product.type.contains("application") || product.type.contains("applicationbundle"))
- return "APPL";
- else if (product.type.contains("frameworkbundle"))
- return "FMWK";
- else if (product.type.contains("bundle"))
- return "BNDL";
+// duplicated in gcc.js
+function frameworkSymlinkCreateCommands(bundlePath, targetName, frameworkVersion) {
+ var cmd, commands = [];
+
+ cmd = new JavaScriptCommand();
+ cmd.description = "creating framework " + targetName;
+ cmd.highlight = "codegen";
+ cmd.sourceCode = function() { };
+ commands.push(cmd);
+
+ cmd = new Command("ln", ["-sfn", frameworkVersion, "Current"]);
+ cmd.workingDirectory = FileInfo.joinPaths(bundlePath, "Versions");
+ cmd.silent = true;
+ commands.push(cmd);
+
+ cmd = new Command("ln", ["-sfn", "Versions/Current/Headers", "Headers"]);
+ cmd.workingDirectory = bundlePath;
+ cmd.silent = true;
+ commands.push(cmd);
+
+ cmd = new Command("ln", ["-sfn", "Versions/Current/Resources", "Resources"]);
+ cmd.workingDirectory = bundlePath;
+ cmd.silent = true;
+ commands.push(cmd);
- throw ("Unsupported product type " + product.type + ". "
- + "Must be in {application, applicationbundle, frameworkbundle, bundle}.");
+ cmd = new Command("ln", ["-sf", FileInfo.joinPaths("Versions", "Current", targetName), targetName]);
+ cmd.workingDirectory = bundlePath;
+ cmd.silent = true;
+ commands.push(cmd);
+
+ return commands;
}
function infoPlistContents(infoPlistFilePath) {
@@ -49,307 +78,3 @@ function infoPlistFormat(infoPlistFilePath) {
plist.clear();
}
}
-
-/**
- * Returns the main bundle directory.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: CONTENTS_FOLDER_PATH
- */
-function contentsFolderPath(product, version) {
- var path = wrapperName(product);
-
- if (product.type.contains("frameworkbundle"))
- path += "/Versions/" + (version || frameworkVersion(product));
- else if (!isShallowBundle(product))
- path += "/Contents";
-
- return path;
-}
-
-/**
- * Returns the directory for documentation files.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: DOCUMENTATION_FOLDER_PATH
- */
-function documentationFolderPath(product, localizationName, version) {
- var path = localizedResourcesFolderPath(product, localizationName, version);
- if (!product.type.contains("inapppurchase"))
- path += "/Documentation";
- return path;
-}
-
-/**
- * Returns the destination directory for auxiliary executables.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: EXECUTABLES_FOLDER_PATH
- */
-function executablesFolderPath(product, localizationName, version) {
- if (product.type.contains("frameworkbundle"))
- return localizedResourcesFolderPath(product, localizationName, version);
- else
- return _contentsFolderSubDirPath(product, "Executables", version);
-}
-
-/**
- * Returns the destination directory for the primary executable.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: EXECUTABLE_FOLDER_PATH
- */
-function executableFolderPath(product, version) {
- var path = contentsFolderPath(product, version);
- if (!isShallowBundle(product)
- && !product.type.contains("frameworkbundle")
- && !product.type.contains("inapppurchase"))
- path += "/MacOS";
-
- return path;
-}
-
-/**
- * Returns the path to the bundle's primary executable file.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: EXECUTABLE_PATH
- */
-function executablePath(product, version) {
- return executableFolderPath(product, version) + "/" + productName(product);
-}
-
-/**
- * Returns the major version number or letter corresponding to the bundle version.
- * @note Xcode equivalent: FRAMEWORK_VERSION
- */
-function frameworkVersion(product) {
- if (!product.type.contains("frameworkbundle"))
- throw "Product type must be a frameworkbundle, was " + product.type;
-
- var n = parseInt(product.version, 10);
- return isNaN(n) ? 'A' : n;
-}
-
-/**
- * Returns the directory containing frameworks used by the bundle's executables.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: FRAMEWORKS_FOLDER_PATH
- */
-function frameworksFolderPath(product, version) {
- return _contentsFolderSubDirPath(product, "Frameworks", version);
-}
-
-/**
- * Returns the path to the bundle's main information property list.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: INFOPLIST_PATH
- */
-function infoPlistPath(product, version) {
- var path;
- if (product.type.contains("application"))
- path = ".tmp/" + product.name;
- else if (product.type.contains("frameworkbundle"))
- path = unlocalizedResourcesFolderPath(product, version);
- else if (product.type.contains("inapppurchase"))
- path = wrapperName(product);
- else
- path = contentsFolderPath(product, version);
-
- return path + "/" + _infoFileNames(product)[0];
-}
-
-/**
- * Returns the path to the strings file corresponding to the bundle's main information property list.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: INFOSTRINGS_PATH
- */
-function infoStringsPath(product, localizationName, version) {
- return localizedResourcesFolderPath(product, localizationName, version) + "/" + _infoFileNames(product)[1];
-}
-
-/**
- * Returns the path to the bundle's resources directory for the given localization.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: LOCALIZED_RESOURCES_FOLDER_PATH
- */
-function localizedResourcesFolderPath(product, localizationName, version) {
- if (typeof localizationName !== "string")
- throw("'" + localizationName + "' is not a valid localization name");
-
- return unlocalizedResourcesFolderPath(product, version) + "/" + localizationName + ".lproj";
-}
-
-/**
- * Returns the path to the bundle's PkgInfo (package info) file.
- * @note Xcode equivalent: PKGINFO_PATH
- */
-function pkgInfoPath(product) {
- var path = (product.type.contains("frameworkbundle"))
- ? wrapperName(product)
- : contentsFolderPath(product);
- return path + "/PkgInfo";
-}
-
-/**
- * Returns the directory containing plugins used by the bundle's executables.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: PLUGINS_FOLDER_PATH
- */
-function pluginsFolderPath(product, version) {
- if (product.type.contains("frameworkbundle"))
- return unlocalizedResourcesFolderPath(product, version);
-
- return _contentsFolderSubDirPath(product, "PlugIns", version);
-}
-
-/**
- * Returns the directory containing private header files for the framework.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: PRIVATE_HEADERS_FOLDER_PATH
- */
-function privateHeadersFolderPath(product, version) {
- return _contentsFolderSubDirPath(product, "PrivateHeaders", version);
-}
-
-/**
- * Returns the name of the product (in Xcode terms) which corresponds to the target name in Qbs terms.
- * @note Xcode equivalent: PRODUCT_NAME
- */
-function productName(product) {
- return product.targetName;
-}
-
-/**
- * Returns the directory containing public header files for the framework.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: PUBLIC_HEADERS_FOLDER_PATH
- */
-function publicHeadersFolderPath(product, version) {
- return _contentsFolderSubDirPath(product, "Headers", version);
-}
-
-/**
- * Returns the directory containing script files associated with the bundle.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: SCRIPTS_FOLDER_PATH
- */
-function scriptsFolderPath(product, version) {
- return unlocalizedResourcesFolderPath(product, version) + "/Scripts";
-}
-
-/**
- * Returns whether the bundle is a shallow bundle.
- * This controls the presence or absence of the Contents, MacOS and Resources folders.
- * iOS tends to store the majority of files in its bundles in the main directory.
- * @note Xcode equivalent: SHALLOW_BUNDLE
- */
-function isShallowBundle(product) {
- return product.moduleProperty("qbs", "targetOS").contains("ios")
- && product.type.contains("applicationbundle");
-}
-
-/**
- * Returns the directory containing sub-frameworks that may be shared with other applications.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: SHARED_FRAMEWORKS_FOLDER_PATH
- */
-function sharedFrameworksFolderPath(product, version) {
- return _contentsFolderSubDirPath(product, "SharedFrameworks", version);
-}
-
-/**
- * Returns the directory containing supporting files that may be shared with other applications.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: SHARED_SUPPORT_FOLDER_PATH
- */
-function sharedSupportFolderPath(product, version) {
- if (product.type.contains("frameworkbundle"))
- return unlocalizedResourcesFolderPath(product, version);
-
- return _contentsFolderSubDirPath(product, "SharedSupport", version);
-}
-
-/**
- * Returns the directory containing resource files that are not specific to any given localization.
- * @note Xcode equivalent: UNLOCALIZED_RESOURCES_FOLDER_PATH
- */
-function unlocalizedResourcesFolderPath(product, version) {
- if (isShallowBundle(product))
- return contentsFolderPath(product, version);
-
- return _contentsFolderSubDirPath(product, "Resources", version);
-}
-
-/**
- * Returns the path to the bundle's version.plist file.
- * @param version only used for framework bundles.
- * @note Xcode equivalent: VERSIONPLIST_PATH
- */
-function versionPlistPath(product, version) {
- var path = (product.type.contains("frameworkbundle"))
- ? unlocalizedResourcesFolderPath(product, version)
- : contentsFolderPath(product, version);
- return path + "/version.plist";
-}
-
-/**
- * Returns the file extension of the bundle directory - app, framework, bundle, etc.
- * @note Xcode equivalent: WRAPPER_EXTENSION
- */
-function wrapperExtension(product) {
- if (product.type.contains("applicationbundle")) {
- return "app";
- } else if (product.type.contains("frameworkbundle")) {
- return "framework";
- } else if (product.type.contains("inapppurchase")) {
- return "";
- } else if (product.type.contains("bundle")) {
- // Potentially: kext, prefPane, qlgenerator, saver, mdimporter, or a custom extension
- var bundleExtension = ModUtils.moduleProperty(product, "bundleExtension");
-
- // default to bundle if none was specified by the user
- return bundleExtension || "bundle";
- } else {
- throw ("Unsupported bundle product type " + product.type + ". "
- + "Must be in {applicationbundle, frameworkbundle, bundle, inapppurchase}.");
- }
-}
-
-/**
- * Returns the name of the bundle directory - the product name plus the bundle extension.
- * @note Xcode equivalent: WRAPPER_NAME
- */
-function wrapperName(product) {
- return productName(product) + wrapperSuffix(product);
-}
-
-/**
- * Returns the suffix of the bundle directory, that is, its extension prefixed with a '.',
- * or an empty string if the extension is also an empty string.
- * @note Xcode equivalent: WRAPPER_SUFFIX
- */
-function wrapperSuffix(product) {
- var ext = wrapperExtension(product);
- return ext ? ("." + ext) : "";
-}
-
-// Private helper functions
-
-/**
- * In-App purchase content bundles use virtually no subfolders of Contents;
- * this is a convenience method to avoid repeating that logic everywhere.
- * @param version only used for framework bundles.
- */
-function _contentsFolderSubDirPath(product, subdirectoryName, version) {
- var path = contentsFolderPath(product, version);
- if (!product.type.contains("inapppurchase"))
- path += "/" + subdirectoryName;
- return path;
-}
-
-/**
- * Returns a list containing the filename of the bundle's main information
- * property list and filename of the corresponding strings file.
- */
-function _infoFileNames(product) {
- if (product.type.contains("inapppurchase"))
- return ["ContentInfo.plist", "ContentInfo.strings"];
- else
- return ["Info.plist", "InfoPlist.strings"];
-}
diff --git a/share/qbs/imports/qbs/PathTools/path-tools.js b/share/qbs/imports/qbs/PathTools/path-tools.js
index b6c25a555..b7db8bf8a 100644
--- a/share/qbs/imports/qbs/PathTools/path-tools.js
+++ b/share/qbs/imports/qbs/PathTools/path-tools.js
@@ -1,5 +1,3 @@
-var BundleTools = loadExtension("qbs.BundleTools");
-
function applicationFileName(product) {
return product.moduleProperty("cpp", "executablePrefix")
+ product.targetName
@@ -7,8 +5,8 @@ function applicationFileName(product) {
}
function applicationFilePath(product) {
- if (BundleTools.isBundleProduct(product))
- return BundleTools.executablePath(product);
+ if (product.moduleProperty("bundle", "isBundle"))
+ return product.moduleProperty("bundle", "executablePath");
else
return applicationFileName(product);
}
@@ -20,8 +18,8 @@ function staticLibraryFileName(product) {
}
function staticLibraryFilePath(product) {
- if (BundleTools.isBundleProduct(product))
- return BundleTools.executablePath(product);
+ if (product.moduleProperty("bundle", "isBundle"))
+ return product.moduleProperty("bundle", "executablePath");
else
return staticLibraryFileName(product);
}
@@ -63,8 +61,8 @@ function dynamicLibraryFileName(product, version, maxParts) {
}
function dynamicLibraryFilePath(product, version, maxParts) {
- if (BundleTools.isBundleProduct(product))
- return BundleTools.executablePath(product, version);
+ if (product.moduleProperty("bundle", "isBundle"))
+ return product.moduleProperty("bundle", "executablePath");
else
return dynamicLibraryFileName(product, version, maxParts);
}
@@ -78,8 +76,8 @@ function importLibraryFilePath(product) {
// DWARF_DSYM_FILE_NAME
// Filename of the target's corresponding dSYM file
function dwarfDsymFileName(product) {
- if (BundleTools.isBundleProduct(product))
- return BundleTools.wrapperName(product) + ".dSYM";
+ if (product.moduleProperty("bundle", "isBundle"))
+ return product.moduleProperty("bundle", "bundleName") + ".dSYM";
else if (product.type.contains("application"))
return applicationFileName(product) + ".dSYM";
else if (product.type.contains("dynamiclibrary"))
diff --git a/share/qbs/imports/qbs/UnixUtils/unix-utils.js b/share/qbs/imports/qbs/UnixUtils/unix-utils.js
index 9a085b0dc..a7c22c5cd 100644
--- a/share/qbs/imports/qbs/UnixUtils/unix-utils.js
+++ b/share/qbs/imports/qbs/UnixUtils/unix-utils.js
@@ -1,10 +1,9 @@
-var BundleTools = loadExtension("qbs.BundleTools");
var FileInfo = loadExtension("qbs.FileInfo");
function soname(product, outputFileName) {
if (product.moduleProperty("qbs", "targetOS").contains("darwin")) {
- if (BundleTools.isBundleProduct(product))
- outputFileName = BundleTools.executablePath(product);
+ if (product.moduleProperty("bundle", "isBundle"))
+ outputFileName = product.moduleProperty("bundle", "executablePath");
var prefix = product.moduleProperty("cpp", "installNamePrefix");
if (prefix)
outputFileName = FileInfo.joinPaths(prefix, outputFileName);
diff --git a/share/qbs/imports/qbs/base/Application.qbs b/share/qbs/imports/qbs/base/Application.qbs
index cf57289df..ee9a3e970 100644
--- a/share/qbs/imports/qbs/base/Application.qbs
+++ b/share/qbs/imports/qbs/base/Application.qbs
@@ -1,4 +1,4 @@
Product {
- property string bundleExtension
- type: qbs.targetOS.contains("darwin") ? ["applicationbundle"] : ["application"]
+ type: ["application"]
+ Depends { name: "bundle" }
}
diff --git a/share/qbs/imports/qbs/base/Library.qbs b/share/qbs/imports/qbs/base/Library.qbs
index f03d9e374..855fbabb2 100644
--- a/share/qbs/imports/qbs/base/Library.qbs
+++ b/share/qbs/imports/qbs/base/Library.qbs
@@ -9,6 +9,7 @@ Product {
property stringList architectures: isForAndroid ? ["armeabi"] : undefined
Depends { name: "Android.ndk"; condition: isForAndroid }
+ Depends { name: "bundle" }
Depends { name: "cpp"; condition: isForAndroid }
profiles: isForAndroid
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs
new file mode 100644
index 000000000..42bb661a7
--- /dev/null
+++ b/share/qbs/modules/bundle/BundleModule.qbs
@@ -0,0 +1,463 @@
+import qbs
+import qbs.BundleTools
+import qbs.DarwinTools
+import qbs.File
+import qbs.FileInfo
+import qbs.ModUtils
+import qbs.PropertyList
+import qbs.TextFile
+
+Module {
+ additionalProductTypes: ["bundle"]
+
+ property bool isBundle: qbs.targetOS.contains("darwin")
+ && (product.type.contains("application")
+ || product.type.contains("dynamiclibrary")
+ || product.type.contains("loadablemodule"))
+ && !product.consoleApplication
+ property bool isShallow: qbs.targetOS.contains("ios") && product.type.contains("application")
+
+ property string identifierPrefix: "org.example"
+ property string identifier: [identifierPrefix, qbs.rfc1034Identifier(product.targetName)].join(".")
+
+ property string extension: {
+ if (packageType === undefined) {
+ return "";
+ } else if (packageType === "APPL") {
+ return "app";
+ } else if (packageType === "FMWK") {
+ return "framework";
+ } else{
+ return "bundle";
+ }
+
+ // Also: kext, prefPane, qlgenerator, saver, mdimporter, or a custom extension
+ }
+
+ property string packageType: {
+ if (product.type.contains("inapppurchase"))
+ return undefined;
+ if (product.type.contains("application"))
+ return "APPL";
+ if (product.type.contains("dynamiclibrary") || product.type.contains("staticlibrary"))
+ return "FMWK";
+ return "BNDL";
+ }
+
+ property string signature: "????" // legacy creator code in Mac OS Classic (CFBundleSignature), can be ignored
+
+ property string bundleName: product.targetName + (extension ? ("." + extension) : "")
+
+ property string frameworkVersion: {
+ if (packageType === "FMWK") {
+ var n = parseInt(product.version, 10);
+ return isNaN(n) ? 'A' : n;
+ }
+ }
+
+ property pathList publicHeaders
+ property pathList privateHeaders
+ property pathList resources
+
+ property path infoPlistFile
+ property var infoPlist
+ property bool processInfoPlist: true
+ property bool embedInfoPlist: product.type.contains("application") && !isBundle
+ property string infoPlistFormat: {
+ if (qbs.targetOS.contains("osx"))
+ return infoPlistFile ? "same-as-input" : "xml1";
+ else if (qbs.targetOS.contains("ios"))
+ return "binary1";
+ }
+
+ property string localizedResourcesFolderSuffix: ".lproj"
+
+ // all paths are relative to the directory containing the bundle
+ readonly property string infoPlistPath: {
+ var path;
+ if (!isBundle)
+ path = FileInfo.joinPaths(".tmp", product.name);
+ else if (packageType === "FMWK")
+ path = unlocalizedResourcesFolderPath;
+ else if (product.type.contains("inapppurchase"))
+ path = bundleName;
+ else
+ path = contentsFolderPath;
+
+ return FileInfo.joinPaths(path, product.type.contains("inapppurchase") ? "ContentInfo.plist" : "Info.plist");
+ }
+
+ readonly property string pkgInfoPath: FileInfo.joinPaths(packageType === "FMWK" ? bundleName : contentsFolderPath, "PkgInfo")
+ readonly property string versionPlistPath: FileInfo.joinPaths(packageType === "FMWK" ? unlocalizedResourcesFolderPath : contentsFolderPath, "version.plist")
+
+ readonly property string executablePath: FileInfo.joinPaths(executableFolderPath, product.targetName)
+
+ readonly property string executableFolderPath: (!isShallow && packageType !== "FMWK" && !isShallowContents) ? FileInfo.joinPaths(contentsFolderPath, "MacOS") : contentsFolderPath
+ readonly property string executablesFolderPath: packageType === "FMWK" ? unlocalizedResourcesFolderPath : FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "Executables" : "")
+ readonly property string frameworksFolderPath: FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "Frameworks" : "")
+ readonly property string pluginsFolderPath: packageType === "FMWK" ? unlocalizedResourcesFolderPath : FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "PlugIns" : "")
+ readonly property string privateHeadersFolderPath: FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "PrivateHeaders" : "")
+ readonly property string publicHeadersFolderPath: FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "Headers" : "")
+ readonly property string scriptsFolderPath: FileInfo.joinPaths(unlocalizedResourcesFolderPath, "Scripts")
+ readonly property string sharedFrameworksFolderPath: FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "SharedFrameworks" : "")
+ readonly property string sharedSupportFolderPath: packageType === "FMWK" ? unlocalizedResourcesFolderPath : FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "SharedSupport" : "")
+ readonly property string unlocalizedResourcesFolderPath: isShallow ? contentsFolderPath : FileInfo.joinPaths(contentsFolderPath, !isShallowContents ? "Resources" : "")
+
+ readonly property string contentsFolderPath: {
+ if (packageType === "FMWK")
+ return FileInfo.joinPaths(bundleName, "Versions", frameworkVersion);
+ else if (!isShallow)
+ return FileInfo.joinPaths(bundleName, "Contents");
+ return bundleName;
+ }
+
+ // private properties
+ readonly property bool isShallowContents: product.type.contains("inapppurchase")
+
+ readonly property var qmakeEnv: {
+ return {
+ "BUNDLEIDENTIFIER": identifier,
+ "EXECUTABLE": product.targetName,
+ "FULL_VERSION": product.version || "1.0", // CFBundleVersion
+ "ICON": product.targetName, // ### QBS-73
+ "LIBRARY": product.targetName,
+ "SHORT_VERSION": product.version || "1.0", // CFBundleShortVersionString
+ "TYPEINFO": signature // CFBundleSignature
+ };
+ }
+
+ readonly property var defaultInfoPlist: {
+ return {
+ CFBundleDevelopmentRegion: "en", // default localization
+ CFBundleDisplayName: product.targetName, // localizable
+ CFBundleExecutable: product.targetName,
+ CFBundleIdentifier: identifier,
+ CFBundleInfoDictionaryVersion: "6.0",
+ CFBundleName: product.targetName, // short display name of the bundle, localizable
+ CFBundlePackageType: packageType,
+ CFBundleShortVersionString: product.version || "1.0", // "release" version number, localizable
+ CFBundleSignature: signature, // legacy creator code in Mac OS Classic, can be ignored
+ CFBundleVersion: product.version || "1.0.0" // build version number, must be 3 octets
+ };
+ }
+
+ Rule {
+ condition: qbs.targetOS.contains("darwin")
+ multiplex: true
+ inputs: ["qbs", "partial_infoplist"]
+
+ outputFileTags: ["infoplist"]
+ outputArtifacts: {
+ var artifacts = [];
+ if (ModUtils.moduleProperty(product, "isBundle") || ModUtils.moduleProperty(product, "embedInfoPlist")) {
+ artifacts.push({
+ filePath: FileInfo.joinPaths(product.destinationDirectory, ModUtils.moduleProperty(product, "infoPlistPath")),
+ fileTags: ["infoplist"]
+ });
+ }
+ return artifacts;
+ }
+
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.description = "generating Info.plist for " + product.name;
+ cmd.highlight = "codegen";
+ cmd.partialInfoPlistFiles = inputs.partial_infoplist;
+ cmd.infoPlistFile = ModUtils.moduleProperty(product, "infoPlistFile");
+ cmd.infoPlist = ModUtils.moduleProperty(product, "infoPlist") || {};
+ cmd.processInfoPlist = ModUtils.moduleProperty(product, "processInfoPlist");
+ cmd.infoPlistFormat = ModUtils.moduleProperty(product, "infoPlistFormat");
+ cmd.qmakeEnv = ModUtils.moduleProperty(product, "qmakeEnv");
+
+ cmd.platformPath = product.moduleProperty("cpp", "platformPath");
+ cmd.toolchainInstallPath = product.moduleProperty("cpp", "toolchainInstallPath");
+ cmd.buildEnv = product.moduleProperty("cpp", "buildEnv");
+ cmd.defines = product.moduleProperty("cpp", "defines");
+ cmd.platformDefines = product.moduleProperty("cpp", "platformDefines");
+ cmd.compilerDefines = product.moduleProperty("cpp", "compilerDefines");
+ cmd.allDefines = [].concat(cmd.defines || []).concat(cmd.platformDefines || []).concat(cmd.compilerDefines || []);
+
+ cmd.platformInfoPlist = product.moduleProperty("cpp", "platformInfoPlist");
+ cmd.sdkSettingsPlist = product.moduleProperty("cpp", "sdkSettingsPlist");
+ cmd.toolchainInfoPlist = product.moduleProperty("cpp", "toolchainInfoPlist");
+
+ cmd.sysroot = product.moduleProperty("qbs", "sysroot");
+ cmd.osBuildVersion = product.moduleProperty("qbs", "hostOSBuildVersion");
+
+ cmd.sourceCode = function() {
+ var plist, process, key, i;
+
+ // Contains the combination of default, file, and in-source keys and values
+ // Start out with the contents of this file as the "base", if given
+ var aggregatePlist = BundleTools.infoPlistContents(infoPlistFile) || {};
+
+ // Add local key-value pairs (overrides equivalent keys specified in the file if
+ // one was given)
+ for (key in infoPlist) {
+ if (infoPlist.hasOwnProperty(key))
+ aggregatePlist[key] = infoPlist[key];
+ }
+
+ // Do some postprocessing if desired
+ if (processInfoPlist) {
+ // Add default values to the aggregate plist if the corresponding keys
+ // for those values are not already present
+ var defaultValues = ModUtils.moduleProperty(product, "defaultInfoPlist");
+ for (key in defaultValues) {
+ if (defaultValues.hasOwnProperty(key) && !(key in aggregatePlist))
+ aggregatePlist[key] = defaultValues[key];
+ }
+
+ var defaultValues = product.moduleProperty("cpp", "defaultInfoPlist");
+ for (key in defaultValues) {
+ if (defaultValues.hasOwnProperty(key) && !(key in aggregatePlist))
+ aggregatePlist[key] = defaultValues[key];
+ }
+
+ // Add keys from platform's Info.plist if not already present
+ var platformInfo = {};
+ if (platformPath) {
+ if (File.exists(platformInfoPlist)) {
+ plist = new PropertyList();
+ try {
+ plist.readFromFile(platformInfoPlist);
+ platformInfo = plist.toObject();
+ } finally {
+ plist.clear();
+ }
+
+ var additionalProps = platformInfo["AdditionalInfo"];
+ for (key in additionalProps) {
+ if (additionalProps.hasOwnProperty(key) && !(key in aggregatePlist)) // override infoPlist?
+ aggregatePlist[key] = defaultValues[key];
+ }
+ props = platformInfo['OverrideProperties'];
+ for (key in props) {
+ aggregatePlist[key] = props[key];
+ }
+
+ if (product.moduleProperty("qbs", "targetOS").contains("ios")) {
+ key = "UIDeviceFamily";
+ if (key in platformInfo && !(key in aggregatePlist))
+ aggregatePlist[key] = platformInfo[key];
+ }
+ } else {
+ print("warning: platform path given but no platform Info.plist found");
+ }
+ } else {
+ print("no platform path specified");
+ }
+
+ var sdkSettings = {};
+ if (sysroot) {
+ if (File.exists(sdkSettingsPlist)) {
+ plist = new PropertyList();
+ try {
+ plist.readFromFile(sdkSettingsPlist);
+ sdkSettings = plist.toObject();
+ } finally {
+ plist.clear();
+ }
+ } else {
+ print("warning: sysroot (SDK path) given but no SDKSettings.plist found");
+ }
+ } else {
+ print("no sysroot (SDK path) specified");
+ }
+
+ var toolchainInfo = {};
+ if (toolchainInstallPath && File.exists(toolchainInfoPlist)) {
+ plist = new PropertyList();
+ try {
+ plist.readFromFile(toolchainInfoPlist);
+ toolchainInfo = plist.toObject();
+ } finally {
+ plist.clear();
+ }
+ } else {
+ print("could not find a ToolchainInfo.plist near the toolchain install path");
+ }
+
+ aggregatePlist["BuildMachineOSBuild"] = osBuildVersion;
+
+ // setup env
+ env = {
+ "SDK_NAME": sdkSettings["CanonicalName"],
+ "XCODE_VERSION_ACTUAL": toolchainInfo["DTXcode"],
+ "SDK_PRODUCT_BUILD_VERSION": toolchainInfo["DTPlatformBuild"],
+ "GCC_VERSION": platformInfo["DTCompiler"],
+ "XCODE_PRODUCT_BUILD_VERSION": platformInfo["DTPlatformBuild"],
+ "PLATFORM_PRODUCT_BUILD_VERSION": platformInfo["ProductBuildVersion"],
+ }
+ env["MAC_OS_X_PRODUCT_BUILD_VERSION"] = osBuildVersion;
+
+ for (key in buildEnv)
+ env[key] = buildEnv[key];
+
+ for (key in qmakeEnv)
+ env[key] = qmakeEnv[key];
+
+ for (i = 0; i < allDefines.length; ++i) {
+ var parts = allDefines[i].split('=');
+ env[parts[0]] = parts[1];
+ }
+
+ DarwinTools.expandPlistEnvironmentVariables(aggregatePlist, env, true);
+
+ // Add keys from partial Info.plists from asset catalogs, XIBs, and storyboards
+ for (i in partialInfoPlistFiles) {
+ var partialInfoPlist = BundleTools.infoPlistContents(partialInfoPlistFiles[i].filePath) || {};
+ for (key in partialInfoPlist) {
+ if (partialInfoPlist.hasOwnProperty(key))
+ aggregatePlist[key] = partialInfoPlist[key];
+ }
+ }
+ }
+
+ // Anything with an undefined or otherwise empty value should be removed
+ // Only JSON-formatted plists can have null values, other formats error out
+ // This also follows Xcode behavior
+ DarwinTools.cleanPropertyList(aggregatePlist);
+
+ if (infoPlistFormat === "same-as-input" && infoPlistFile)
+ infoPlistFormat = BundleTools.infoPlistFormat(infoPlistFile);
+
+ var validFormats = [ "xml1", "binary1", "json" ];
+ if (!validFormats.contains(infoPlistFormat))
+ throw("Invalid Info.plist format " + infoPlistFormat + ". " +
+ "Must be in [xml1, binary1, json].");
+
+ // Write the plist contents in the format appropriate for the current platform
+ plist = new PropertyList();
+ try {
+ plist.readFromObject(aggregatePlist);
+ plist.writeToFile(outputs.infoplist[0].filePath, infoPlistFormat);
+ } finally {
+ plist.clear();
+ }
+ }
+ return cmd;
+ }
+ }
+
+ Rule {
+ condition: qbs.targetOS.contains("darwin")
+ multiplex: true
+ inputs: ["infoplist"]
+
+ outputFileTags: ["pkginfo"]
+ outputArtifacts: {
+ var artifacts = [];
+ if (ModUtils.moduleProperty(product, "isBundle")) {
+ artifacts.push({
+ filePath: FileInfo.joinPaths(product.destinationDirectory, ModUtils.moduleProperty(product, "pkgInfoPath")),
+ fileTags: ["pkginfo"]
+ });
+ }
+ return artifacts;
+ }
+
+ prepare: {
+ var cmd = new JavaScriptCommand();
+ cmd.description = "generating PkgInfo for " + product.name;
+ cmd.highlight = "codegen";
+ cmd.sourceCode = function() {
+ var infoPlist = BundleTools.infoPlistContents(inputs.infoplist[0].filePath);
+
+ var pkgType = infoPlist['CFBundlePackageType'];
+ if (!pkgType)
+ throw("CFBundlePackageType not found in Info.plist; this should not happen");
+
+ var pkgSign = infoPlist['CFBundleSignature'];
+ if (!pkgSign)
+ throw("CFBundleSignature not found in Info.plist; this should not happen");
+
+ var pkginfo = new TextFile(outputs.pkginfo[0].filePath, TextFile.WriteOnly);
+ pkginfo.write(pkgType + pkgSign);
+ pkginfo.close();
+ }
+ return cmd;
+ }
+ }
+
+ Rule {
+ condition: qbs.targetOS.contains("darwin")
+ multiplex: true
+ inputs: ["infoplist", "pkginfo",
+ "icns", "resourcerules", "ipa",
+ "compiled_nib", "compiled_storyboard", "compiled_assetcatalog"]
+ auxiliaryInputs: ["hpp"]
+
+ outputFileTags: ["bundle"]
+ outputArtifacts: {
+ var artifacts = [];
+ if (ModUtils.moduleProperty(product, "isBundle")) {
+ artifacts.push({
+ filePath: FileInfo.joinPaths(product.destinationDirectory, ModUtils.moduleProperty(product, "bundleName")),
+ fileTags: ["bundle"]
+ });
+ }
+ return artifacts;
+ }
+
+ prepare: {
+ var commands = [];
+
+ // This command is intentionally empty
+ var cmd = new JavaScriptCommand();
+ cmd.silent = true;
+ commands.push(cmd);
+
+ var packageType = ModUtils.moduleProperty(product, "packageType");
+ if (packageType === "FMWK") {
+ commands = commands.concat(BundleTools.frameworkSymlinkCreateCommands(output.filePath,
+ product.targetName,
+ ModUtils.moduleProperty(product, "frameworkVersion")));
+ }
+
+ cmd = new JavaScriptCommand();
+ cmd.description = "copying public headers";
+ cmd.highlight = "filegen";
+ cmd.sources = ModUtils.moduleProperties(product, "publicHeaders");
+ cmd.destination = ModUtils.moduleProperty(product, "publicHeadersFolderPath");
+ cmd.sourceCode = function() {
+ var i;
+ for (var i in sources) {
+ File.copy(sources[i], FileInfo.joinPaths(destination, FileInfo.fileName(sources[i])));
+ }
+ };
+ if (cmd.sources && cmd.sources.length)
+ commands.push(cmd);
+
+ cmd = new JavaScriptCommand();
+ cmd.description = "copying private headers";
+ cmd.highlight = "filegen";
+ cmd.sources = ModUtils.moduleProperties(product, "privateHeaders");
+ cmd.destination = ModUtils.moduleProperty(product, "privateHeadersFolderPath");
+ cmd.sourceCode = function() {
+ var i;
+ for (var i in sources) {
+ File.copy(sources[i], FileInfo.joinPaths(destination, FileInfo.fileName(sources[i])));
+ }
+ };
+ if (cmd.sources && cmd.sources.length)
+ commands.push(cmd);
+
+ cmd = new JavaScriptCommand();
+ cmd.description = "copying resources";
+ cmd.highlight = "filegen";
+ cmd.sources = ModUtils.moduleProperties(product, "resources");
+ cmd.sourceCode = function() {
+ var i;
+ for (var i in sources) {
+ var destination = BundleTools.destinationDirectoryForResource(product, {baseDir: FileInfo.path(sources[i]), fileName: FileInfo.fileName(sources[i])});
+ File.copy(sources[i], FileInfo.joinPaths(destination, FileInfo.fileName(sources[i])));
+ }
+ };
+ if (cmd.sources && cmd.sources.length)
+ commands.push(cmd);
+
+ return commands;
+ }
+ }
+}
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs
index 00ccfcbc9..5adff7355 100644
--- a/share/qbs/modules/cpp/CppModule.qbs
+++ b/share/qbs/modules/cpp/CppModule.qbs
@@ -205,16 +205,6 @@ Module {
property stringList platformLinkerFlags
// OS X and iOS properties
- property path infoPlistFile
- property var infoPlist
- property bool processInfoPlist: true
- property bool embedInfoPlist: product.type.contains("application")
- property string infoPlistFormat: {
- if (qbs.targetOS.contains("osx"))
- return infoPlistFile ? "same-as-input" : "xml1"
- else if (qbs.targetOS.contains("ios"))
- return "binary1"
- }
property bool buildDsym: qbs.buildVariant === "release"
property bool buildIpa: !qbs.targetOS.contains('ios-simulator')
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index 8cd16cdec..a72c6b5d3 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -1,11 +1,4 @@
-import qbs 1.0
-import qbs.BundleTools
-import qbs.DarwinTools
-import qbs.File
-import qbs.PathTools
-import qbs.Process
-import qbs.PropertyList
-import qbs.TextFile
+import qbs
import qbs.ModUtils
UnixGCC {
@@ -63,50 +56,8 @@ UnixGCC {
}
}
- // private properties
- readonly property var buildEnv: {
- var env = {
- "EXECUTABLE_NAME": product.targetName,
- "LANG": "en_US.US-ASCII",
- "PRODUCT_NAME": product.name
- }
- if (qbs.targetOS.contains("ios") && minimumIosVersion)
- env["IPHONEOS_DEPLOYMENT_TARGET"] = minimumIosVersion;
- if (qbs.targetOS.contains("osx") && minimumOsxVersion)
- env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
- return env;
- }
-
- readonly property var qmakeEnv: {
- return {
- "BUNDLEIDENTIFIER": "org.example." + qbs.rfc1034Identifier(product.targetName),
- "EXECUTABLE": product.targetName,
- "FULL_VERSION": product.version || "1.0", // CFBundleVersion
- "ICON": product.targetName, // ### QBS-73
- "LIBRARY": product.targetName,
- "SHORT_VERSION": product.version || "1.0", // CFBundleShortVersionString
- "TYPEINFO": "????" // CFBundleSignature
- };
- }
-
- readonly property var defaultInfoPlist: {
- // Not a product type which uses Info.plists
- if (!product.type.contains("application") && !product.type.contains("applicationbundle") &&
- !product.type.contains("frameworkbundle") && !product.type.contains("bundle"))
- return undefined;
-
- var dict = {
- CFBundleDevelopmentRegion: "en", // default localization
- CFBundleDisplayName: product.targetName, // localizable
- CFBundleExecutable: product.targetName,
- CFBundleIdentifier: "org.example." + qbs.rfc1034Identifier(product.targetName),
- CFBundleInfoDictionaryVersion: "6.0",
- CFBundleName: product.targetName, // short display name of the bundle, localizable
- CFBundlePackageType: BundleTools.packageType(product),
- CFBundleShortVersionString: product.version || "1.0", // "release" version number, localizable
- CFBundleSignature: "????", // legacy creator code in Mac OS Classic, can be ignored
- CFBundleVersion: product.version || "1.0.0" // build version number, must be 3 octets
- };
+ property var defaultInfoPlist: {
+ var dict = {};
if (qbs.targetOS.contains("osx")) {
dict["NSPrincipalClass"] = "NSApplication"; // needed for Retina display support
@@ -137,226 +88,6 @@ UnixGCC {
return dict;
}
- readonly property path platformInfoPlist: platformPath ? [platformPath, "Info.plist"].join("/") : undefined
- readonly property path sdkSettingsPlist: sysroot ? [sysroot, "SDKSettings.plist"].join("/") : undefined
- readonly property path toolchainInfoPlist: toolchainInstallPath ? [toolchainInstallPath, "../../ToolchainInfo.plist"].join("/") : undefined
-
- Rule {
- multiplex: true
- inputs: ["infoplist"]
-
- Artifact {
- filePath: product.destinationDirectory + "/" + BundleTools.pkgInfoPath(product)
- fileTags: ["pkginfo"]
- }
-
- prepare: {
- var cmd = new JavaScriptCommand();
- cmd.description = "generating PkgInfo for " + product.name;
- cmd.highlight = "codegen";
- cmd.sourceCode = function() {
- var infoPlist = BundleTools.infoPlistContents(inputs.infoplist[0].filePath);
-
- var pkgType = infoPlist['CFBundlePackageType'];
- if (!pkgType)
- throw("CFBundlePackageType not found in Info.plist; this should not happen");
-
- var pkgSign = infoPlist['CFBundleSignature'];
- if (!pkgSign)
- throw("CFBundleSignature not found in Info.plist; this should not happen");
-
- var pkginfo = new TextFile(outputs.pkginfo[0].filePath, TextFile.WriteOnly);
- pkginfo.write(pkgType + pkgSign);
- pkginfo.close();
- }
- return cmd;
- }
- }
-
- Rule {
- multiplex: true
- inputs: ["qbs", "partial_infoplist"]
-
- Artifact {
- filePath: product.destinationDirectory + "/" + BundleTools.infoPlistPath(product)
- fileTags: ["infoplist"]
- }
-
- prepare: {
- var cmd = new JavaScriptCommand();
- cmd.description = "generating Info.plist for " + product.name;
- cmd.highlight = "codegen";
- cmd.partialInfoPlistFiles = inputs.partial_infoplist;
- cmd.infoPlistFile = ModUtils.moduleProperty(product, "infoPlistFile");
- cmd.infoPlist = ModUtils.moduleProperty(product, "infoPlist") || {};
- cmd.processInfoPlist = ModUtils.moduleProperty(product, "processInfoPlist");
- cmd.infoPlistFormat = ModUtils.moduleProperty(product, "infoPlistFormat");
- cmd.platformPath = product.moduleProperty("cpp", "platformPath");
- cmd.toolchainInstallPath = product.moduleProperty("cpp", "toolchainInstallPath");
- cmd.sysroot = product.moduleProperty("qbs", "sysroot");
- cmd.buildEnv = product.moduleProperty("cpp", "buildEnv");
- cmd.qmakeEnv = product.moduleProperty("cpp", "qmakeEnv");
- cmd.defines = product.moduleProperty("cpp", "defines");
- cmd.platformDefines = product.moduleProperty("cpp", "platformDefines");
- cmd.compilerDefines = product.moduleProperty("cpp", "compilerDefines");
- cmd.allDefines = cmd.defines.concat(cmd.platformDefines).concat(cmd.compilerDefines);
-
- cmd.platformInfoPlist = product.moduleProperty("cpp", "platformInfoPlist");
- cmd.sdkSettingsPlist = product.moduleProperty("cpp", "sdkSettingsPlist");
- cmd.toolchainInfoPlist = product.moduleProperty("cpp", "toolchainInfoPlist");
-
- cmd.osBuildVersion = product.moduleProperty("qbs", "hostOSBuildVersion");
-
- cmd.sourceCode = function() {
- var plist, process, key, i;
-
- // Contains the combination of default, file, and in-source keys and values
- // Start out with the contents of this file as the "base", if given
- var aggregatePlist = BundleTools.infoPlistContents(infoPlistFile) || {};
-
- // Add local key-value pairs (overrides equivalent keys specified in the file if
- // one was given)
- for (key in infoPlist) {
- if (infoPlist.hasOwnProperty(key))
- aggregatePlist[key] = infoPlist[key];
- }
-
- // Do some postprocessing if desired
- if (processInfoPlist) {
- // Add default values to the aggregate plist if the corresponding keys
- // for those values are not already present
- var defaultValues = ModUtils.moduleProperty(product, "defaultInfoPlist");
- for (key in defaultValues) {
- if (defaultValues.hasOwnProperty(key) && !(key in aggregatePlist))
- aggregatePlist[key] = defaultValues[key];
- }
-
- // Add keys from platform's Info.plist if not already present
- var platformInfo = {};
- if (platformPath) {
- if (File.exists(platformInfoPlist)) {
- plist = new PropertyList();
- try {
- plist.readFromFile(platformInfoPlist);
- platformInfo = plist.toObject();
- } finally {
- plist.clear();
- }
-
- var additionalProps = platformInfo["AdditionalInfo"];
- for (key in additionalProps) {
- if (additionalProps.hasOwnProperty(key) && !(key in aggregatePlist)) // override infoPlist?
- aggregatePlist[key] = defaultValues[key];
- }
- props = platformInfo['OverrideProperties'];
- for (key in props) {
- aggregatePlist[key] = props[key];
- }
-
- if (product.moduleProperty("qbs", "targetOS").contains("ios")) {
- key = "UIDeviceFamily";
- if (key in platformInfo && !(key in aggregatePlist))
- aggregatePlist[key] = platformInfo[key];
- }
- } else {
- print("warning: platform path given but no platform Info.plist found");
- }
- } else {
- print("no platform path specified");
- }
-
- var sdkSettings = {};
- if (sysroot) {
- if (File.exists(sdkSettingsPlist)) {
- plist = new PropertyList();
- try {
- plist.readFromFile(sdkSettingsPlist);
- sdkSettings = plist.toObject();
- } finally {
- plist.clear();
- }
- } else {
- print("warning: sysroot (SDK path) given but no SDKSettings.plist found");
- }
- } else {
- print("no sysroot (SDK path) specified");
- }
-
- var toolchainInfo = {};
- if (toolchainInstallPath && File.exists(toolchainInfoPlist)) {
- plist = new PropertyList();
- try {
- plist.readFromFile(toolchainInfoPlist);
- toolchainInfo = plist.toObject();
- } finally {
- plist.clear();
- }
- } else {
- print("could not find a ToolchainInfo.plist near the toolchain install path");
- }
-
- aggregatePlist["BuildMachineOSBuild"] = osBuildVersion;
-
- // setup env
- env = {
- "SDK_NAME": sdkSettings["CanonicalName"],
- "XCODE_VERSION_ACTUAL": toolchainInfo["DTXcode"],
- "SDK_PRODUCT_BUILD_VERSION": toolchainInfo["DTPlatformBuild"],
- "GCC_VERSION": platformInfo["DTCompiler"],
- "XCODE_PRODUCT_BUILD_VERSION": platformInfo["DTPlatformBuild"],
- "PLATFORM_PRODUCT_BUILD_VERSION": platformInfo["ProductBuildVersion"],
- }
- env["MAC_OS_X_PRODUCT_BUILD_VERSION"] = osBuildVersion;
-
- for (key in buildEnv)
- env[key] = buildEnv[key];
-
- for (key in qmakeEnv)
- env[key] = qmakeEnv[key];
-
- for (i = 0; i < allDefines.length; ++i) {
- var parts = allDefines[i].split('=');
- env[parts[0]] = parts[1];
- }
-
- DarwinTools.expandPlistEnvironmentVariables(aggregatePlist, env, true);
-
- // Add keys from partial Info.plists from asset catalogs, XIBs, and storyboards
- for (i in partialInfoPlistFiles) {
- var partialInfoPlist = BundleTools.infoPlistContents(partialInfoPlistFiles[i].filePath) || {};
- for (key in partialInfoPlist) {
- if (partialInfoPlist.hasOwnProperty(key))
- aggregatePlist[key] = partialInfoPlist[key];
- }
- }
- }
-
- // Anything with an undefined or otherwise empty value should be removed
- // Only JSON-formatted plists can have null values, other formats error out
- // This also follows Xcode behavior
- DarwinTools.cleanPropertyList(aggregatePlist);
-
- if (infoPlistFormat === "same-as-input" && infoPlistFile)
- infoPlistFormat = BundleTools.infoPlistFormat(infoPlistFile);
-
- var validFormats = [ "xml1", "binary1", "json" ];
- if (!validFormats.contains(infoPlistFormat))
- throw("Invalid Info.plist format " + infoPlistFormat + ". " +
- "Must be in [xml1, binary1, json].");
-
- // Write the plist contents in the format appropriate for the current platform
- plist = new PropertyList();
- try {
- plist.readFromObject(aggregatePlist);
- plist.writeToFile(outputs.infoplist[0].filePath, infoPlistFormat);
- } finally {
- plist.clear();
- }
- }
- return cmd;
- }
- }
-
Rule {
condition: product.moduleProperty("cpp", "buildDsym")
inputs: ["application"]
@@ -377,59 +108,21 @@ UnixGCC {
}
}
- Rule {
- multiplex: true
- inputs: ["application", "infoplist", "pkginfo", "icns", "application_dsym",
- "compiled_nib", "compiled_storyboard", "compiled_assetcatalog",
- "resourcerules", "ipa"]
-
- Artifact {
- filePath: product.destinationDirectory + "/" + BundleTools.wrapperName(product)
- fileTags: ["applicationbundle"]
- }
-
- prepare: {
- // This command is intentionally empty; it just lets the user know a bundle has been made
- var cmd = new JavaScriptCommand();
- cmd.description = "creating app bundle";
- cmd.highlight = "codegen";
- return cmd;
+ // private properties
+ readonly property var buildEnv: {
+ var env = {
+ "EXECUTABLE_NAME": product.targetName,
+ "LANG": "en_US.US-ASCII",
+ "PRODUCT_NAME": product.name
}
+ if (qbs.targetOS.contains("ios") && minimumIosVersion)
+ env["IPHONEOS_DEPLOYMENT_TARGET"] = minimumIosVersion;
+ if (qbs.targetOS.contains("osx") && minimumOsxVersion)
+ env["MACOSX_DEPLOYMENT_TARGET"] = minimumOsxVersion;
+ return env;
}
- Rule {
- multiplex: true
- inputs: ["dynamiclibrary", "infoplist", "pkginfo", "icns", "dynamiclibrary_dsym",
- "compiled_nib", "compiled_storyboard", "compiled_assetcatalog"]
-
- Artifact {
- filePath: product.destinationDirectory + "/" + BundleTools.wrapperName(product)
- fileTags: ["frameworkbundle"]
- }
-
- prepare: {
- var commands = [];
- var cmd = new Command("ln", ["-sfn", BundleTools.frameworkVersion(product), "Current"]);
- cmd.workingDirectory = output.filePath + "/Versions";
- cmd.description = "creating framework " + product.targetName;
- cmd.highlight = "codegen";
- commands.push(cmd);
-
- cmd = new Command("ln", ["-sfn", "Versions/Current/Headers", "Headers"]);
- cmd.workingDirectory = output.filePath;
- cmd.silent = true;
- commands.push(cmd);
-
- cmd = new Command("ln", ["-sfn", "Versions/Current/Resources", "Resources"]);
- cmd.workingDirectory = output.filePath;
- cmd.silent = true;
- commands.push(cmd);
-
- cmd = new Command("ln", ["-sf", "Versions/Current/" + product.targetName, product.targetName]);
- cmd.workingDirectory = output.filePath;
- cmd.silent = true;
- commands.push(cmd);
- return commands;
- }
- }
+ readonly property path platformInfoPlist: platformPath ? [platformPath, "Info.plist"].join("/") : undefined
+ readonly property path sdkSettingsPlist: sysroot ? [sysroot, "SDKSettings.plist"].join("/") : undefined
+ readonly property path toolchainInfoPlist: toolchainInstallPath ? [toolchainInstallPath, "../../ToolchainInfo.plist"].join("/") : undefined
}
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 82705f64c..3a390f53d 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -49,8 +49,7 @@ CppModule {
property string stripPath: toolchainPathPrefix + stripName
readonly property bool shouldCreateSymlinks: {
- return createSymlinks && internalVersion &&
- !product.type.contains("frameworkbundle") && qbs.targetOS.contains("unix");
+ return createSymlinks && internalVersion && qbs.targetOS.contains("unix");
}
readonly property string internalVersion: {
@@ -76,10 +75,10 @@ CppModule {
id: dynamicLibraryLinker
multiplex: true
inputs: ["obj"]
- inputsFromDependencies: ["dynamiclibrary_copy", "staticlibrary", "frameworkbundle"]
+ inputsFromDependencies: ["dynamiclibrary_copy", "framework_copy", "staticlibrary"]
outputFileTags: ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_copy",
- "debuginfo"]
+ "framework_copy", "debuginfo"]
outputArtifacts: {
var lib = {
filePath: product.destinationDirectory + "/"
@@ -95,7 +94,15 @@ CppModule {
cpp: { transitiveSOs: Gcc.collectTransitiveSos(inputs) }
};
var artifacts = [lib, libCopy];
- if (ModUtils.moduleProperty(product, "shouldCreateSymlinks")) {
+
+ if (product.moduleProperty("bundle", "isBundle")) {
+ artifacts.push({
+ filePath: FileInfo.joinPaths(product.destinationDirectory, ".socopy", product.moduleProperty("bundle", "bundleName")),
+ fileTags: ["framework_copy"]
+ });
+ }
+
+ if (ModUtils.moduleProperty(product, "shouldCreateSymlinks") && !product.moduleProperty("bundle", "isBundle")) {
for (var i = 0; i < 3; ++i) {
var symlink = {
filePath: product.destinationDirectory + "/"
@@ -126,7 +133,7 @@ CppModule {
id: staticLibraryLinker
multiplex: true
inputs: ["obj"]
- inputsFromDependencies: ["dynamiclibrary", "staticlibrary", "frameworkbundle"]
+ inputsFromDependencies: ["dynamiclibrary", "staticlibrary"]
Artifact {
filePath: product.destinationDirectory + "/" + PathTools.staticLibraryFilePath(product)
@@ -168,11 +175,11 @@ CppModule {
var tags = ["obj"];
if (product.type.contains("application") &&
product.moduleProperty("qbs", "targetOS").contains("darwin") &&
- product.moduleProperty("cpp", "embedInfoPlist"))
+ product.moduleProperty("bundle", "embedInfoPlist"))
tags.push("infoplist");
return tags;
}
- inputsFromDependencies: ["dynamiclibrary_copy", "staticlibrary", "frameworkbundle"]
+ inputsFromDependencies: ["dynamiclibrary_copy", "framework_copy", "staticlibrary"]
outputFileTags: ["application", "debuginfo"]
outputArtifacts: {
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index 0eba343cf..05aa5e177 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -1,6 +1,35 @@
+var BundleTools = loadExtension("qbs.BundleTools");
var File = loadExtension("qbs.File");
var WindowsUtils = loadExtension("qbs.WindowsUtils");
+// duplicated from bundle-tools.js
+// otherwise, "Can't find variable: JavaScriptCommand"
+function frameworkSymlinkCreateCommands(bundlePath, targetName, frameworkVersion) {
+ var cmd, commands = [];
+
+ cmd = new Command("ln", ["-sfn", frameworkVersion, "Current"]);
+ cmd.workingDirectory = FileInfo.joinPaths(bundlePath, "Versions");
+ cmd.silent = true;
+ commands.push(cmd);
+
+ cmd = new Command("ln", ["-sfn", "Versions/Current/Headers", "Headers"]);
+ cmd.workingDirectory = bundlePath;
+ cmd.silent = true;
+ commands.push(cmd);
+
+ cmd = new Command("ln", ["-sfn", "Versions/Current/Resources", "Resources"]);
+ cmd.workingDirectory = bundlePath;
+ cmd.silent = true;
+ commands.push(cmd);
+
+ cmd = new Command("ln", ["-sf", FileInfo.joinPaths("Versions", "Current", targetName), targetName]);
+ cmd.workingDirectory = bundlePath;
+ cmd.silent = true;
+ commands.push(cmd);
+
+ return commands;
+}
+
function linkerFlags(product, inputs) {
var libraryPaths = ModUtils.moduleProperties(product, 'libraryPaths');
var dynamicLibraries = ModUtils.moduleProperties(product, "dynamicLibraries");
@@ -144,8 +173,8 @@ function additionalCompilerFlags(product, input, output) {
var EffectiveTypeEnum = { UNKNOWN: 0, LIB: 1, APP: 2 };
var effectiveType = EffectiveTypeEnum.UNKNOWN;
- var libTypes = {staticlibrary : 1, dynamiclibrary : 1, frameworkbundle : 1};
- var appTypes = {application : 1, applicationbundle : 1};
+ var libTypes = {staticlibrary : 1, dynamiclibrary : 1};
+ var appTypes = {application : 1};
var i;
for (i = product.type.length; --i >= 0;) {
if (libTypes.hasOwnProperty(product.type[i]) !== -1) {
@@ -552,6 +581,17 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
}
commands.push(cmd);
+ // Create framework structure for the copied library
+ // Is this a framework? Create structure
+ var libCopy = outputs.dynamiclibrary_copy[0];
+ var fmwkCopy = (outputs.framework_copy || {})[0];
+ if (fmwkCopy && product.moduleProperty("bundle", "isBundle")) {
+ var ver = product.moduleProperty("bundle", "frameworkVersion");
+ commands = commands.concat(frameworkSymlinkCreateCommands(fmwkCopy.filePath,
+ libCopy.fileName,
+ ver));
+ }
+
// Create symlinks from {libfoo, libfoo.1, libfoo.1.0} to libfoo.1.0.0
var links = outputs["dynamiclibrary_symlink"];
var symlinkCount = links ? links.length : 0;
diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs
index 597039ed4..fbbab778e 100644
--- a/share/qbs/modules/cpp/ios-gcc.qbs
+++ b/share/qbs/modules/cpp/ios-gcc.qbs
@@ -1,5 +1,4 @@
import qbs 1.0
-import qbs.BundleTools
import qbs.DarwinTools
import qbs.File
import qbs.ModUtils
@@ -29,7 +28,7 @@ DarwinGCC {
Artifact {
filePath: product.destinationDirectory + "/"
- + BundleTools.contentsFolderPath(product)
+ + product.moduleProperty("bundle", "contentsFolderPath")
+ "/ResourceRules.plist"
fileTags: ["resourcerules"]
}
@@ -68,7 +67,7 @@ DarwinGCC {
"cpp.provisioningProfile in order to build an IPA package.";
var args = ["-sdk", product.moduleProperty("cpp", "xcodeSdkName"), "PackageApplication",
- "-v", product.buildDirectory + "/" + BundleTools.wrapperName(product),
+ "-v", product.buildDirectory + "/" + product.moduleProperty("bundle", "bundleName"),
"-o", outputs.ipa[0].filePath, "--sign", signingIdentity,
"--embed", provisioningProfile];
diff --git a/share/qbs/modules/ib/IBModule.qbs b/share/qbs/modules/ib/IBModule.qbs
index 85856f144..5ac027a92 100644
--- a/share/qbs/modules/ib/IBModule.qbs
+++ b/share/qbs/modules/ib/IBModule.qbs
@@ -87,9 +87,9 @@ Module {
Artifact {
filePath: {
var outputDirectory = product.destinationDirectory;
- if (BundleTools.isBundleProduct(product)) {
+ if (product.moduleProperty("bundle", "isBundle")) {
outputDirectory = FileInfo.joinPaths(outputDirectory,
- BundleTools.unlocalizedResourcesFolderPath(product));
+ product.moduleProperty("bundle", "unlocalizedResourcesFolderPath"));
}
return FileInfo.joinPaths(outputDirectory, input.completeBaseName + ModUtils.moduleProperty(product, "appleIconSuffix"))
}
@@ -112,19 +112,7 @@ Module {
]
outputArtifacts: {
// When the flatten property is true, this artifact will be a FILE, otherwise it will be a DIRECTORY
- var path = product.destinationDirectory;
- var inputFilePath = input.baseDir + '/' + input.fileName;
- var key = DarwinTools.localizationKey(inputFilePath);
- if (key) {
- path += '/' + BundleTools.localizedResourcesFolderPath(product, key);
- var subPath = DarwinTools.relativeResourcePath(inputFilePath);
- if (subPath && subPath !== '.')
- path += '/' + subPath;
- } else {
- path += '/' + BundleTools.unlocalizedResourcesFolderPath(product);
- path += '/' + input.baseDir;
- }
-
+ var path = BundleTools.destinationDirectoryForResource(product, input);
var suffix = "";
if (input.fileTags.contains("nib"))
suffix = ModUtils.moduleProperty(product, "compiledNibSuffix");
@@ -180,9 +168,9 @@ Module {
// through use of --output-format xml1
outputArtifacts: {
var outputDirectory = product.destinationDirectory;
- if (BundleTools.isBundleProduct(product)) {
+ if (product.moduleProperty("bundle", "isBundle")) {
outputDirectory = FileInfo.joinPaths(outputDirectory,
- BundleTools.unlocalizedResourcesFolderPath(product));
+ product.moduleProperty("bundle", "unlocalizedResourcesFolderPath"));
}
// Chicken and egg... create a fake outputs dictionary for building actool args list
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp
index 6f990f077..44208a8a3 100644
--- a/src/lib/corelib/api/project.cpp
+++ b/src/lib/corelib/api/project.cpp
@@ -73,10 +73,6 @@
#include <QRegExp>
#include <QSharedData>
-#ifdef Q_OS_MAC
-#include <CoreFoundation/CoreFoundation.h>
-#endif
-
namespace qbs {
namespace Internal {
@@ -672,10 +668,7 @@ RuleCommandList ProjectPrivate::ruleCommands(const ProductData &product,
static bool productIsRunnable(const ResolvedProductConstPtr &product)
{
- return product->fileTags.contains("application")
- || (product->fileTags.contains("applicationbundle")
- && product->moduleProperties->qbsPropertyValue(QLatin1String("targetOS"))
- .toStringList().contains(QLatin1String("darwin")));
+ return product->fileTags.contains("application");
}
void ProjectPrivate::retrieveProjectData(ProjectData &projectData,
@@ -824,47 +817,6 @@ ProjectData Project::projectData() const
return d->projectData();
}
-QString bundleExecutablePath(const QString &qbundlePath, const QString &defaultValue)
-{
-#ifdef Q_OS_MAC
- QString qexecutablePath = defaultValue;
- CFStringRef bundlePath = qbundlePath.toCFString();
- CFURLRef bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, bundlePath,
- kCFURLPOSIXPathStyle, true);
- CFRelease(bundlePath);
- CFBundleRef bundle = CFBundleCreate(kCFAllocatorDefault, bundleURL);
- if (bundle) {
- CFURLRef executableURL = CFBundleCopyExecutableURL(bundle);
- if (executableURL) {
- CFURLRef absoluteExecutableURL = CFURLCopyAbsoluteURL(executableURL);
- if (absoluteExecutableURL) {
- CFStringRef executablePath = CFURLCopyFileSystemPath(absoluteExecutableURL,
- kCFURLPOSIXPathStyle);
- if (executablePath) {
- qexecutablePath = QString::fromCFString(executablePath);
- CFRelease(executablePath);
- }
- CFRelease(absoluteExecutableURL);
- }
- CFRelease(executableURL);
- }
- CFRelease(bundle);
- }
- CFRelease(bundleURL);
- return qexecutablePath;
-#else
- Q_UNUSED(qbundlePath);
- return defaultValue;
-#endif
-}
-
-static QString completeExecutableFilePath(const TargetArtifact &executableArtifact,
- const QString &targetFilePath)
-{
- return executableArtifact.fileTags().contains("applicationbundle")
- ? bundleExecutablePath(targetFilePath, targetFilePath) : targetFilePath;
-}
-
/*!
* \brief Returns the file path of the executable associated with the given product.
* If the product is not an application, an empty string is returned.
@@ -883,9 +835,9 @@ QString Project::targetExecutable(const ProductData &product,
= installableFilesForProduct(product, installOptions);
foreach (const InstallableFile &file, installables) {
if (file.sourceFilePath() == ta.filePath())
- return completeExecutableFilePath(ta, file.targetFilePath());
+ return file.targetFilePath();
}
- return completeExecutableFilePath(ta, ta.filePath());
+ return ta.filePath();
}
}
return QString();
diff --git a/src/lib/corelib/api/projectdata.cpp b/src/lib/corelib/api/projectdata.cpp
index 3ec27a540..0ff03511a 100644
--- a/src/lib/corelib/api/projectdata.cpp
+++ b/src/lib/corelib/api/projectdata.cpp
@@ -222,7 +222,6 @@ QStringList TargetArtifact::fileTags() const
bool TargetArtifact::isExecutable() const
{
return d->fileTags.contains(QLatin1String("application"))
- || d->fileTags.contains(QLatin1String("applicationbundle"))
|| d->fileTags.contains(QLatin1String("msi"));
}
@@ -323,8 +322,7 @@ QStringList InstallableFile::fileTags() const
*/
bool InstallableFile::isExecutable() const
{
- return d->fileTags.contains(QLatin1String("application"))
- || d->fileTags.contains(QLatin1String("applicationbundle"));
+ return d->fileTags.contains(QLatin1String("application"));
}
bool operator==(const InstallableFile &file1, const InstallableFile &file2)
diff --git a/src/lib/corelib/language/testdata/profilevaluesandoverriddenvalues.qbs b/src/lib/corelib/language/testdata/profilevaluesandoverriddenvalues.qbs
index 0ba76c6f6..156f9f1bb 100644
--- a/src/lib/corelib/language/testdata/profilevaluesandoverriddenvalues.qbs
+++ b/src/lib/corelib/language/testdata/profilevaluesandoverriddenvalues.qbs
@@ -12,6 +12,7 @@ Project {
throw new Error("dummy.defines: Array type expected.");
return "application";
}
+ consoleApplication: true
Depends { name: "dummy" }
// dummy.cxxFlags is set via profile and is not overridden
dummy.defines: ["IN_FILE"] // set in profile, overridden in file
diff --git a/src/lib/corelib/language/testdata/rfc1034identifier.qbs b/src/lib/corelib/language/testdata/rfc1034identifier.qbs
index 1d49be736..b9f26b46c 100644
--- a/src/lib/corelib/language/testdata/rfc1034identifier.qbs
+++ b/src/lib/corelib/language/testdata/rfc1034identifier.qbs
@@ -2,5 +2,5 @@ import qbs
CppApplication {
name: qbs.rfc1034Identifier("this!has@special#characters$uh-oh,Undersc0r3s_Are.Bad")
- cpp.infoPlist: { return {"CFBundleIdentifier": "$(PRODUCT_NAME:rfc1034identifier)"}; }
+ bundle.infoPlist: { return {"CFBundleIdentifier": "$(PRODUCT_NAME:rfc1034identifier)"}; }
}
diff --git a/src/plugins/scanner/scannerplugin.qbs b/src/plugins/scanner/scannerplugin.qbs
index 9428741e8..440a9b0e3 100644
--- a/src/plugins/scanner/scannerplugin.qbs
+++ b/src/plugins/scanner/scannerplugin.qbs
@@ -9,4 +9,5 @@ DynamicLibrary {
qbs.install: true
qbs.installDir: project.pluginsInstallDir + "/qbs/plugins"
}
+ bundle.isBundle: false
}
diff --git a/tests/auto/api/testdata/app-without-sources/project.qbs b/tests/auto/api/testdata/app-without-sources/project.qbs
index 882e4d311..726726337 100644
--- a/tests/auto/api/testdata/app-without-sources/project.qbs
+++ b/tests/auto/api/testdata/app-without-sources/project.qbs
@@ -24,7 +24,6 @@ Project {
CppApplication {
name: "appWithoutSources"
- type: ["application"]
// HACK: cpp.entryPoint currently not working 100% with gcc
Properties {
@@ -32,6 +31,7 @@ Project {
cpp.entryPoint: "main"
}
cpp.entryPoint: undefined
+ bundle.isBundle: false
Depends { name: "a" }
Depends { name: "b" }
diff --git a/tests/auto/api/testdata/base-properties/imports/Foo.qbs b/tests/auto/api/testdata/base-properties/imports/Foo.qbs
index 563992434..f177a17c3 100644
--- a/tests/auto/api/testdata/base-properties/imports/Foo.qbs
+++ b/tests/auto/api/testdata/base-properties/imports/Foo.qbs
@@ -2,6 +2,7 @@ import qbs 1.0
Bar {
type: "application"
+ consoleApplication: true
cpp.defines: base.concat(["FROM_FOO"])
}
diff --git a/tests/auto/api/testdata/build-properties-source/project.qbs b/tests/auto/api/testdata/build-properties-source/project.qbs
index df7649625..49f565b29 100644
--- a/tests/auto/api/testdata/build-properties-source/project.qbs
+++ b/tests/auto/api/testdata/build-properties-source/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "HelloWorld"
Depends { name: 'cpp' }
diff --git a/tests/auto/api/testdata/change-dependent-lib/change-dependent-lib.qbs b/tests/auto/api/testdata/change-dependent-lib/change-dependent-lib.qbs
index ac5778134..4037ae869 100644
--- a/tests/auto/api/testdata/change-dependent-lib/change-dependent-lib.qbs
+++ b/tests/auto/api/testdata/change-dependent-lib/change-dependent-lib.qbs
@@ -18,6 +18,7 @@ Project {
}
Depends { name: "cpp" }
cpp.defines: ["XXXX"]
+ bundle.isBundle: false
}
}
diff --git a/tests/auto/api/testdata/codegen/project.qbs b/tests/auto/api/testdata/codegen/project.qbs
index 4b440fc51..282ee4a7f 100644
--- a/tests/auto/api/testdata/codegen/project.qbs
+++ b/tests/auto/api/testdata/codegen/project.qbs
@@ -7,6 +7,7 @@ Project {
Product {
type: 'application'
+ consoleApplication: true
name: project.name
property var replacements: ({
NUMBERTYPE: "int",
diff --git a/tests/auto/api/testdata/disabled_install_group/project.qbs b/tests/auto/api/testdata/disabled_install_group/project.qbs
index 19df87928..6364506b4 100644
--- a/tests/auto/api/testdata/disabled_install_group/project.qbs
+++ b/tests/auto/api/testdata/disabled_install_group/project.qbs
@@ -7,4 +7,5 @@ CppApplication {
qbs.install: true
fileTagsFilter: product.type
}
+ bundle.isBundle: false
}
diff --git a/tests/auto/api/testdata/dynamic-libs/link_dynamiclib.qbs b/tests/auto/api/testdata/dynamic-libs/link_dynamiclib.qbs
index 53cebc4a9..0235234e2 100644
--- a/tests/auto/api/testdata/dynamic-libs/link_dynamiclib.qbs
+++ b/tests/auto/api/testdata/dynamic-libs/link_dynamiclib.qbs
@@ -20,6 +20,7 @@ Project {
}
Depends { name: "cpp" }
Depends { name: "lib2" }
+ bundle.isBundle: false
}
DynamicLibrary {
@@ -31,6 +32,7 @@ Project {
}
Depends { name: "cpp" }
Depends { name: "lib3" }
+ bundle.isBundle: false
}
DynamicLibrary {
@@ -41,6 +43,7 @@ Project {
files : [ "lib3.cpp" ]
}
Depends { name: "cpp" }
+ bundle.isBundle: false
}
DynamicLibrary {
@@ -52,6 +55,7 @@ Project {
files : [ "lib4.h", "lib4.cpp" ]
}
Depends { name: "cpp" }
+ bundle.isBundle: false
Export {
Depends { name: "cpp" }
diff --git a/tests/auto/api/testdata/export-simple/project.qbs b/tests/auto/api/testdata/export-simple/project.qbs
index 96244671a..6eca71e89 100644
--- a/tests/auto/api/testdata/export-simple/project.qbs
+++ b/tests/auto/api/testdata/export-simple/project.qbs
@@ -44,6 +44,7 @@ Project {
files : [ "lib1.cpp" ]
}
Depends { name: "cpp" }
+ bundle.isBundle: false
}
}
diff --git a/tests/auto/api/testdata/file-tagger/moc_cpp.qbs b/tests/auto/api/testdata/file-tagger/moc_cpp.qbs
index ce7970f20..fd07730dc 100644
--- a/tests/auto/api/testdata/file-tagger/moc_cpp.qbs
+++ b/tests/auto/api/testdata/file-tagger/moc_cpp.qbs
@@ -5,6 +5,7 @@ import qbs.FileInfo
Project {
Product {
type: "application"
+ consoleApplication: true
name: "moc_cpp"
Depends {
diff --git a/tests/auto/api/testdata/filetagsfilter_override/InstalledApp.qbs b/tests/auto/api/testdata/filetagsfilter_override/InstalledApp.qbs
index 0aabaf063..633410c3c 100644
--- a/tests/auto/api/testdata/filetagsfilter_override/InstalledApp.qbs
+++ b/tests/auto/api/testdata/filetagsfilter_override/InstalledApp.qbs
@@ -2,6 +2,7 @@ import qbs
CppApplication {
type: "application"
+ consoleApplication: true
Group {
fileTagsFilter: product.type
qbs.install: true
diff --git a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
index 2df24d6b6..d441f58a5 100644
--- a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
+++ b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
@@ -2,7 +2,8 @@ import qbs
Project {
QtApplication {
- type: "application" // suppress bundle generation
+ type: "application"
+ consoleApplication: true // suppress bundle generation
files: "main.cpp"
name: "infinite-loop"
}
diff --git a/tests/auto/api/testdata/inherit-qbs-search-paths/imports/Foo.qbs b/tests/auto/api/testdata/inherit-qbs-search-paths/imports/Foo.qbs
index f6c1733b5..9493b04b5 100644
--- a/tests/auto/api/testdata/inherit-qbs-search-paths/imports/Foo.qbs
+++ b/tests/auto/api/testdata/inherit-qbs-search-paths/imports/Foo.qbs
@@ -2,6 +2,7 @@ import qbs 1.0
Product {
type: "application"
+ consoleApplication: true
Depends { name: 'bli' }
}
diff --git a/tests/auto/api/testdata/installed-artifact/installed_artifact.qbs b/tests/auto/api/testdata/installed-artifact/installed_artifact.qbs
index 81562a70b..d1f9f54ea 100644
--- a/tests/auto/api/testdata/installed-artifact/installed_artifact.qbs
+++ b/tests/auto/api/testdata/installed-artifact/installed_artifact.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Application {
name: "installedApp"
type: "application"
+ consoleApplication: true
Depends { name: "cpp" }
Group {
files: "main.cpp"
diff --git a/tests/auto/api/testdata/is-runnable/project.qbs b/tests/auto/api/testdata/is-runnable/project.qbs
index 02200fff2..47e217a6a 100644
--- a/tests/auto/api/testdata/is-runnable/project.qbs
+++ b/tests/auto/api/testdata/is-runnable/project.qbs
@@ -6,5 +6,6 @@ Project {
}
DynamicLibrary {
name: "lib"
+ bundle.isBundle: false
}
}
diff --git a/tests/auto/api/testdata/lib-same-source/project.qbs b/tests/auto/api/testdata/lib-same-source/project.qbs
index 063684b40..dc5785e98 100644
--- a/tests/auto/api/testdata/lib-same-source/project.qbs
+++ b/tests/auto/api/testdata/lib-same-source/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name : "HelloWorldApp"
Depends { name: 'cpp' }
Group {
diff --git a/tests/auto/api/testdata/link-static-lib/project.qbs b/tests/auto/api/testdata/link-static-lib/project.qbs
index be12e01aa..2ae327caa 100644
--- a/tests/auto/api/testdata/link-static-lib/project.qbs
+++ b/tests/auto/api/testdata/link-static-lib/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "HelloWorld"
files : [ "main.cpp" ]
Depends { name: "cpp" }
diff --git a/tests/auto/api/testdata/lots-of-dots/project.qbs b/tests/auto/api/testdata/lots-of-dots/project.qbs
index 9654100fc..5e033bd36 100644
--- a/tests/auto/api/testdata/lots-of-dots/project.qbs
+++ b/tests/auto/api/testdata/lots-of-dots/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
QtGuiApplication {
type: "application"
+ consoleApplication: true
name: "lots.of.dots"
files : [
diff --git a/tests/auto/api/testdata/moc-cpp/project.qbs b/tests/auto/api/testdata/moc-cpp/project.qbs
index 311d7c490..f8ee0736b 100644
--- a/tests/auto/api/testdata/moc-cpp/project.qbs
+++ b/tests/auto/api/testdata/moc-cpp/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "moc_cpp"
Depends {
diff --git a/tests/auto/api/testdata/moc-hpp-included/project.qbs b/tests/auto/api/testdata/moc-hpp-included/project.qbs
index b144fb672..d78493b2f 100644
--- a/tests/auto/api/testdata/moc-hpp-included/project.qbs
+++ b/tests/auto/api/testdata/moc-hpp-included/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "moc_hpp_included"
Depends { name: "Qt.core" }
diff --git a/tests/auto/api/testdata/moc-hpp/project.qbs b/tests/auto/api/testdata/moc-hpp/project.qbs
index 87ddfc335..54451a509 100644
--- a/tests/auto/api/testdata/moc-hpp/project.qbs
+++ b/tests/auto/api/testdata/moc-hpp/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "moc_hpp"
Depends { name: "Qt.core" }
diff --git a/tests/auto/api/testdata/new-output-artifact-in-dependency/project.qbs b/tests/auto/api/testdata/new-output-artifact-in-dependency/project.qbs
index 2fc85e9a9..ed08e8315 100644
--- a/tests/auto/api/testdata/new-output-artifact-in-dependency/project.qbs
+++ b/tests/auto/api/testdata/new-output-artifact-in-dependency/project.qbs
@@ -6,6 +6,7 @@ Project {
//Depends { name: "Qt.core" }
name: "lib"
files: "lib.cpp"
+ bundle.isBundle: false
}
CppApplication {
diff --git a/tests/auto/api/testdata/precompiled-header/project.qbs b/tests/auto/api/testdata/precompiled-header/project.qbs
index de65b9330..5f7b4b616 100644
--- a/tests/auto/api/testdata/precompiled-header/project.qbs
+++ b/tests/auto/api/testdata/precompiled-header/project.qbs
@@ -2,6 +2,7 @@ import qbs 1.0
Product {
type: "application"
+ consoleApplication: true
name: "MyApp"
files: ["stable.h",
"myobject.h",
diff --git a/tests/auto/api/testdata/productNameWithDots/project.qbs b/tests/auto/api/testdata/productNameWithDots/project.qbs
index 3ca97c41a..f0cf5813c 100644
--- a/tests/auto/api/testdata/productNameWithDots/project.qbs
+++ b/tests/auto/api/testdata/productNameWithDots/project.qbs
@@ -2,10 +2,12 @@ import qbs
Project {
Product {
Depends { name: "cpp" }
+ Depends { name: "bundle" }
type: ["application"]
name: "myapp"
Depends { name: "foo.bar.bla" }
files: ["app.cpp"]
+ bundle.isBundle: false
}
StaticLibrary {
Depends { name: "cpp" }
diff --git a/tests/auto/api/testdata/properties-blocks/propertiesblocks.qbs b/tests/auto/api/testdata/properties-blocks/propertiesblocks.qbs
index 5fe02a103..1b4c3680a 100644
--- a/tests/auto/api/testdata/properties-blocks/propertiesblocks.qbs
+++ b/tests/auto/api/testdata/properties-blocks/propertiesblocks.qbs
@@ -6,6 +6,7 @@ Product {
Properties {
condition: true
type: 'application'
+ consoleApplication: true
name: 'HelloWorld'
}
diff --git a/tests/auto/api/testdata/qt5-plugin/project.qbs b/tests/auto/api/testdata/qt5-plugin/project.qbs
index 2944198f3..3e0dd1c6a 100644
--- a/tests/auto/api/testdata/qt5-plugin/project.qbs
+++ b/tests/auto/api/testdata/qt5-plugin/project.qbs
@@ -7,6 +7,7 @@ DynamicLibrary {
Depends { name: "Qt.core" }
Depends { name: "cpp" }
+ bundle.isBundle: false
Group {
condition: Qt.core.versionMajor >= 5
diff --git a/tests/auto/api/testdata/rc/rc.qbs b/tests/auto/api/testdata/rc/rc.qbs
index 75502cf88..418ac2744 100644
--- a/tests/auto/api/testdata/rc/rc.qbs
+++ b/tests/auto/api/testdata/rc/rc.qbs
@@ -2,6 +2,7 @@ import qbs 1.0
Application {
type: "application"
+ consoleApplication: true
name: "rc"
Depends { name: 'cpp' }
diff --git a/tests/auto/api/testdata/rename-product/rename.qbs b/tests/auto/api/testdata/rename-product/rename.qbs
index a2fe2e22f..c7811059a 100644
--- a/tests/auto/api/testdata/rename-product/rename.qbs
+++ b/tests/auto/api/testdata/rename-product/rename.qbs
@@ -13,5 +13,6 @@ Project {
Depends { name: "Qt.core" }
cpp.defines: "MY_EXPORT=Q_DECL_EXPORT"
files: "lib.cpp"
+ bundle.isBundle: false
}
}
diff --git a/tests/auto/api/testdata/rename-target-artifact/rename.qbs b/tests/auto/api/testdata/rename-target-artifact/rename.qbs
index 5a8c765e4..e94cc7b45 100644
--- a/tests/auto/api/testdata/rename-target-artifact/rename.qbs
+++ b/tests/auto/api/testdata/rename-target-artifact/rename.qbs
@@ -14,5 +14,6 @@ Project {
Depends { name: "Qt.core" }
cpp.defines: "MY_EXPORT=Q_DECL_EXPORT"
files: "lib.cpp"
+ bundle.isBundle: false
}
}
diff --git a/tests/auto/api/testdata/same-base-name/project.qbs b/tests/auto/api/testdata/same-base-name/project.qbs
index e9b4ba7a6..c6a7a6fa3 100644
--- a/tests/auto/api/testdata/same-base-name/project.qbs
+++ b/tests/auto/api/testdata/same-base-name/project.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
CppApplication {
type: "application"
+ consoleApplication: true
Depends { name: "basenamelib" }
name: "basename"
files: "main.c"
diff --git a/tests/auto/api/testdata/simple-probe/project.qbs b/tests/auto/api/testdata/simple-probe/project.qbs
index b409c7cc6..9a869c3de 100644
--- a/tests/auto/api/testdata/simple-probe/project.qbs
+++ b/tests/auto/api/testdata/simple-probe/project.qbs
@@ -26,6 +26,7 @@ CppApplication {
throw "probe1.someString expected to be \"one\"."
return "application"
}
+ consoleApplication: true
files: ["main.cpp"]
}
diff --git a/tests/auto/api/testdata/static-lib-deps/project.qbs b/tests/auto/api/testdata/static-lib-deps/project.qbs
index f7d4a98b0..2d2022c54 100644
--- a/tests/auto/api/testdata/static-lib-deps/project.qbs
+++ b/tests/auto/api/testdata/static-lib-deps/project.qbs
@@ -59,6 +59,7 @@ Project {
CppApplication {
name: "staticLibDeps"
type: "application"
+ consoleApplication: true
Depends { name: "e" }
diff --git a/tests/auto/api/testdata/transformers/transformers.qbs b/tests/auto/api/testdata/transformers/transformers.qbs
index a0b1d70b0..b0884ffa6 100644
--- a/tests/auto/api/testdata/transformers/transformers.qbs
+++ b/tests/auto/api/testdata/transformers/transformers.qbs
@@ -8,6 +8,7 @@ Project {
Product {
name: "HelloWorld"
type: "application"
+ consoleApplication: true
files: ["main.cpp"]
Depends { name: "cpp" }
diff --git a/tests/auto/api/testdata/uic/uic.qbs b/tests/auto/api/testdata/uic/uic.qbs
index a216b86a9..301cdad44 100644
--- a/tests/auto/api/testdata/uic/uic.qbs
+++ b/tests/auto/api/testdata/uic/uic.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
QtGuiApplication {
type: "application"
+ consoleApplication: true
name: "ui"
files: [
diff --git a/tests/auto/blackbox/testdata/changed-files/project.qbs b/tests/auto/blackbox/testdata/changed-files/project.qbs
index 82411a659..dd222479f 100644
--- a/tests/auto/blackbox/testdata/changed-files/project.qbs
+++ b/tests/auto/blackbox/testdata/changed-files/project.qbs
@@ -3,6 +3,7 @@ import qbs.TextFile
CppApplication {
type: ["application", "stuff"]
+ consoleApplication: true
files: ["file1.cpp", "file2.cpp", "main.cpp"]
Rule {
diff --git a/tests/auto/blackbox/testdata/clean/clean.qbs b/tests/auto/blackbox/testdata/clean/clean.qbs
index 26684160f..cf16e7c85 100644
--- a/tests/auto/blackbox/testdata/clean/clean.qbs
+++ b/tests/auto/blackbox/testdata/clean/clean.qbs
@@ -7,10 +7,11 @@ Project {
version: "1.1.0"
name: "dep"
files: "dep.cpp"
+ bundle.isBundle: false
}
CppApplication {
- type: "application"
+ consoleApplication: true
name: "app"
Depends { name: "dep" }
files: "main.cpp"
diff --git a/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs b/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs
index 836463379..d924e73ff 100644
--- a/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs
+++ b/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs
@@ -29,6 +29,7 @@ Project {
}
Product {
type: "application"
+ consoleApplication: true
name: "product2"
property string narf: "zort"
Depends { name: "cpp" }
diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs
index 9fe553cb3..560ee25f7 100644
--- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs
+++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs
@@ -45,6 +45,7 @@ Project {
Product {
name: "genlexer"
type: "application"
+ consoleApplication: true
Depends { name: "cpp" }
Group {
files: ["numbers.l"]
diff --git a/tests/auto/blackbox/testdata/embedInfoPlist/embedInfoPlist.qbs b/tests/auto/blackbox/testdata/embedInfoPlist/embedInfoPlist.qbs
index 32f7f7292..83ed4b220 100644
--- a/tests/auto/blackbox/testdata/embedInfoPlist/embedInfoPlist.qbs
+++ b/tests/auto/blackbox/testdata/embedInfoPlist/embedInfoPlist.qbs
@@ -2,10 +2,10 @@ import qbs
CppApplication {
condition: qbs.targetOS.contains("darwin")
- type: ["application"]
+ bundle.isBundle: false
files: ["main.m"]
cpp.frameworks: ["Foundation"]
- cpp.infoPlist: {
+ bundle.infoPlist: {
return {
"QBS": "org.qt-project.qbs.testdata.embedInfoPlist"
};
diff --git a/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs b/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs
index 0fc6590cc..662879ccb 100644
--- a/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs
+++ b/tests/auto/blackbox/testdata/fileDependencies/fileDependencies.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "myapp"
Depends { name: "cpp" }
cpp.includePaths: ["awesomelib"]
diff --git a/tests/auto/blackbox/testdata/installed-source-files/project.qbs b/tests/auto/blackbox/testdata/installed-source-files/project.qbs
index 3a26c3818..1aa564553 100644
--- a/tests/auto/blackbox/testdata/installed-source-files/project.qbs
+++ b/tests/auto/blackbox/testdata/installed-source-files/project.qbs
@@ -1,7 +1,7 @@
import qbs
CppApplication {
- type: ["application"]
+ consoleApplication: true
files: ["main.cpp"]
Group {
fileTagsFilter: ["cpp"]
diff --git a/tests/auto/blackbox/testdata/installed_artifact/installed_artifact.qbs b/tests/auto/blackbox/testdata/installed_artifact/installed_artifact.qbs
index 81562a70b..d1f9f54ea 100644
--- a/tests/auto/blackbox/testdata/installed_artifact/installed_artifact.qbs
+++ b/tests/auto/blackbox/testdata/installed_artifact/installed_artifact.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Application {
name: "installedApp"
type: "application"
+ consoleApplication: true
Depends { name: "cpp" }
Group {
files: "main.cpp"
diff --git a/tests/auto/blackbox/testdata/non-broken-files-in-broken-product/project.qbs b/tests/auto/blackbox/testdata/non-broken-files-in-broken-product/project.qbs
index 97f1e9897..1ec764dfa 100644
--- a/tests/auto/blackbox/testdata/non-broken-files-in-broken-product/project.qbs
+++ b/tests/auto/blackbox/testdata/non-broken-files-in-broken-product/project.qbs
@@ -1,5 +1,6 @@
import qbs
CppApplication {
+ consoleApplication: true
files: ["fine.cpp", "broken.cpp"]
}
diff --git a/tests/auto/blackbox/testdata/non-default-product/project.qbs b/tests/auto/blackbox/testdata/non-default-product/project.qbs
index 2cba9314b..03ee83b6f 100644
--- a/tests/auto/blackbox/testdata/non-default-product/project.qbs
+++ b/tests/auto/blackbox/testdata/non-default-product/project.qbs
@@ -3,13 +3,13 @@ import qbs
Project {
CppApplication {
name: "default app"
- type: ["application"]
+ consoleApplication: true
files: "main.cpp"
}
CppApplication {
name: "non-default app"
- type: ["application"]
+ consoleApplication: true
builtByDefault: false
files: "main.cpp"
}
diff --git a/tests/auto/blackbox/testdata/objc-arc/objc-arc.qbs b/tests/auto/blackbox/testdata/objc-arc/objc-arc.qbs
index 9498714ea..ee2cf6f6b 100644
--- a/tests/auto/blackbox/testdata/objc-arc/objc-arc.qbs
+++ b/tests/auto/blackbox/testdata/objc-arc/objc-arc.qbs
@@ -2,6 +2,7 @@ import qbs
Product {
Depends { name: "cpp" }
+ consoleApplication: true
type: ["application"]
condition: qbs.targetOS.contains("darwin")
diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs b/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs
index 9b14bd42a..16c68064e 100644
--- a/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs
+++ b/tests/auto/blackbox/testdata/overrideProjectProperties/helper_lib.qbs
@@ -4,4 +4,5 @@ DynamicLibrary {
name: "helperLib"
files: "helperlib.cpp"
Depends { name: "cpp" }
+ bundle.isBundle: false
}
diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/project.qbs b/tests/auto/blackbox/testdata/overrideProjectProperties/project.qbs
index acfceec85..a0e934a21 100644
--- a/tests/auto/blackbox/testdata/overrideProjectProperties/project.qbs
+++ b/tests/auto/blackbox/testdata/overrideProjectProperties/project.qbs
@@ -6,6 +6,7 @@ Project {
property int someInt
property stringList someStringList
Product {
+ consoleApplication: true
type: "application"
property string mainFile: ""
name: "MyApp" + nameSuffix
diff --git a/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs b/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs
index c1b4482f1..c61716e6e 100644
--- a/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs
+++ b/tests/auto/blackbox/testdata/overrideProjectProperties/project_using_helper_lib.qbs
@@ -4,7 +4,7 @@ Project {
property bool linkSuccessfully: false
references: linkSuccessfully ? ["helper_lib.qbs"] : []
CppApplication {
- type: "application"
+ consoleApplication: true
Depends {
condition: project.linkSuccessfully
name: "helperLib"
diff --git a/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs b/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs
index f3df47e10..ebfc45d3f 100644
--- a/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs
+++ b/tests/auto/blackbox/testdata/product-dependencies-by-type/project.qbs
@@ -3,24 +3,24 @@ import qbs.TextFile
Project {
CppApplication {
- type: "application"
+ consoleApplication: true
name: "no-match"
files: "main.cpp"
}
Project {
CppApplication {
- type: "application"
+ consoleApplication: true
name: "app1"
files: "main.cpp"
}
CppApplication {
- type: "application"
+ consoleApplication: true
name: "app2"
files: "main.cpp"
}
CppApplication {
- type: "application"
+ consoleApplication: true
name: "app3"
files: "main.cpp"
}
@@ -29,10 +29,12 @@ Project {
Depends { name: "cpp" }
name: "lib-product"
files: "main.cpp"
+ bundle.isBundle: false
}
CppApplication {
- type: ["application", "app-list"]
+ type: base.concat(["app-list"])
+ consoleApplication: true
name: "app list"
Depends {
productTypes: ["application"]
diff --git a/tests/auto/blackbox/testdata/productproperties/app.qbs b/tests/auto/blackbox/testdata/productproperties/app.qbs
index 08334e791..405d08adb 100644
--- a/tests/auto/blackbox/testdata/productproperties/app.qbs
+++ b/tests/auto/blackbox/testdata/productproperties/app.qbs
@@ -1,6 +1,7 @@
import qbs 1.0
Product {
+ consoleApplication: true
type: "application"
name: "blubb_user"
diff --git a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
index c1db3c1b2..7f716996f 100644
--- a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
+++ b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "Hello World"
files : [ "main.cpp" ]
Depends { name: "cpp" }
diff --git a/tests/auto/blackbox/testdata/propertyChanges/project.qbs b/tests/auto/blackbox/testdata/propertyChanges/project.qbs
index 02c9633db..a2a96d417 100644
--- a/tests/auto/blackbox/testdata/propertyChanges/project.qbs
+++ b/tests/auto/blackbox/testdata/propertyChanges/project.qbs
@@ -24,6 +24,7 @@ Project {
name: "library"
Depends { name: "Qt.core" }
files: "lib.cpp"
+ bundle.isBundle: false
}
Product {
diff --git a/tests/auto/blackbox/testdata/qml-debugging/project.qbs b/tests/auto/blackbox/testdata/qml-debugging/project.qbs
index 317dd940d..3606b4aa3 100644
--- a/tests/auto/blackbox/testdata/qml-debugging/project.qbs
+++ b/tests/auto/blackbox/testdata/qml-debugging/project.qbs
@@ -2,7 +2,7 @@ import qbs
QtApplication {
name: "debuggable-app"
- type: "application"
+ consoleApplication: true
Depends { name: "Qt.quick" }
Qt.quick.qmlDebugging: true
files: "main.cpp"
diff --git a/tests/auto/blackbox/testdata/qrc/i.qbs b/tests/auto/blackbox/testdata/qrc/i.qbs
index 46414a066..67b836dd4 100644
--- a/tests/auto/blackbox/testdata/qrc/i.qbs
+++ b/tests/auto/blackbox/testdata/qrc/i.qbs
@@ -2,6 +2,7 @@ import qbs 1.0
Project {
Product {
+ consoleApplication: true
type: "application"
name: "i"
diff --git a/tests/auto/blackbox/testdata/ruleConditions/templates/zorduct.qbs b/tests/auto/blackbox/testdata/ruleConditions/templates/zorduct.qbs
index c36e00850..8f19a5a6d 100644
--- a/tests/auto/blackbox/testdata/ruleConditions/templates/zorduct.qbs
+++ b/tests/auto/blackbox/testdata/ruleConditions/templates/zorduct.qbs
@@ -2,6 +2,7 @@ import qbs 1.0
Product {
type: ["application", "zort"]
+ consoleApplication: true
Depends { name: "cpp" }
Depends { name: "narfzort" }
files: [
diff --git a/tests/auto/blackbox/testdata/trackAddFile/after/project.qbs b/tests/auto/blackbox/testdata/trackAddFile/after/project.qbs
index 747669d90..469aff097 100644
--- a/tests/auto/blackbox/testdata/trackAddFile/after/project.qbs
+++ b/tests/auto/blackbox/testdata/trackAddFile/after/project.qbs
@@ -4,6 +4,7 @@ Project {
Product {
name: 'someapp'
type: 'application'
+ consoleApplication: true
Depends { name: 'cpp' }
files: [
"main.cpp",
diff --git a/tests/auto/blackbox/testdata/trackAddFile/before/project.qbs b/tests/auto/blackbox/testdata/trackAddFile/before/project.qbs
index 0233020c2..fc647cdbe 100644
--- a/tests/auto/blackbox/testdata/trackAddFile/before/project.qbs
+++ b/tests/auto/blackbox/testdata/trackAddFile/before/project.qbs
@@ -4,6 +4,7 @@ Project {
Product {
name: 'someapp'
type: 'application'
+ consoleApplication: true
Depends { name: 'cpp' }
files: [ "main.cpp", "narf.h", "narf.cpp" ]
}
diff --git a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs
index e173d5fb2..c0e5c4715 100644
--- a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs
+++ b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs
@@ -5,6 +5,7 @@ Project {
Product {
name: 'someapp'
type: 'application'
+ consoleApplication: true
Depends { name: 'cpp' }
Group {
files: [ "main.cpp" ]
diff --git a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs
index 521bf528d..7ac895c5f 100644
--- a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs
+++ b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs
@@ -5,6 +5,7 @@ Project {
Product {
name: 'someapp'
type: 'application'
+ consoleApplication: true
Depends { name: 'cpp' }
Group {
files: [ "main.cpp" ]
diff --git a/tests/auto/blackbox/testdata/trackProducts/after/product3.qbs b/tests/auto/blackbox/testdata/trackProducts/after/product3.qbs
index cee4a5923..4dac755c0 100644
--- a/tests/auto/blackbox/testdata/trackProducts/after/product3.qbs
+++ b/tests/auto/blackbox/testdata/trackProducts/after/product3.qbs
@@ -3,5 +3,6 @@ import qbs 1.0
Product {
Depends { name: "cpp" }
type: "application"
+ consoleApplication: true
files: ["zoo.cpp"]
}
diff --git a/tests/auto/blackbox/testdata/trackProducts/before/product1.qbs b/tests/auto/blackbox/testdata/trackProducts/before/product1.qbs
index 876c08dfa..60e8b0924 100644
--- a/tests/auto/blackbox/testdata/trackProducts/before/product1.qbs
+++ b/tests/auto/blackbox/testdata/trackProducts/before/product1.qbs
@@ -3,5 +3,6 @@ import qbs 1.0
Product {
Depends { name: "cpp" }
type: "application"
+ consoleApplication: true
files: ["foo.cpp"]
}
diff --git a/tests/auto/blackbox/testdata/trackProducts/before/product2.qbs b/tests/auto/blackbox/testdata/trackProducts/before/product2.qbs
index 810f9969d..5490b8844 100644
--- a/tests/auto/blackbox/testdata/trackProducts/before/product2.qbs
+++ b/tests/auto/blackbox/testdata/trackProducts/before/product2.qbs
@@ -3,5 +3,6 @@ import qbs 1.0
Product {
Depends { name: "cpp" }
type: "application"
+ consoleApplication: true
files: ["bar.cpp"]
}
diff --git a/tests/auto/blackbox/testdata/trackQObjChange/i.qbs b/tests/auto/blackbox/testdata/trackQObjChange/i.qbs
index 381c63bcf..c18fab086 100644
--- a/tests/auto/blackbox/testdata/trackQObjChange/i.qbs
+++ b/tests/auto/blackbox/testdata/trackQObjChange/i.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: "application"
+ consoleApplication: true
name: "i"
Depends {
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index e8ffb3f72..1b3370cad 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1814,7 +1814,7 @@ void TestBlackbox::testEmbedInfoPlist()
params.command = QLatin1String("run");
QCOMPARE(runQbs(params), 0);
- params.arguments = QStringList(QLatin1String("cpp.embedInfoPlist:false"));
+ params.arguments = QStringList(QLatin1String("bundle.embedInfoPlist:false"));
params.expectFailure = true;
QVERIFY(runQbs(params) != 0);
}
diff --git a/tests/manual/configure/configure.qbs b/tests/manual/configure/configure.qbs
index acb257a3e..1a3c02bb5 100644
--- a/tests/manual/configure/configure.qbs
+++ b/tests/manual/configure/configure.qbs
@@ -6,6 +6,7 @@ Project {
qbsSearchPaths: '.'
Product {
type: 'application'
+ consoleApplication: true
name: project.name
files: 'main.cpp'
Depends { name: 'cpp' }
diff --git a/tests/manual/includeLookup/includeLookup.qbs b/tests/manual/includeLookup/includeLookup.qbs
index 61af93ade..452e4b5bd 100644
--- a/tests/manual/includeLookup/includeLookup.qbs
+++ b/tests/manual/includeLookup/includeLookup.qbs
@@ -6,6 +6,7 @@ Project {
qbsSearchPaths: '.'
Product {
type: 'application'
+ consoleApplication: true
name: project.name
files: 'main.cpp'
Depends { name: 'cpp' }
diff --git a/tests/manual/localDeployment/localDeployment.qbs b/tests/manual/localDeployment/localDeployment.qbs
index 6d5e7eb3e..83f02120b 100644
--- a/tests/manual/localDeployment/localDeployment.qbs
+++ b/tests/manual/localDeployment/localDeployment.qbs
@@ -3,6 +3,7 @@ import qbs 1.0
Project {
Product {
type: ["application"]
+ consoleApplication: true
name: "HelloWorld"
destinationDirectory: "bin"
diff --git a/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs b/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs
index fbb592cc9..177022381 100644
--- a/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs
+++ b/tests/manual/minimumSystemVersion/minimumSystemVersion.qbs
@@ -3,9 +3,9 @@ import qbs 1.0
Project {
// no minimum versions are specified so the profile defaults will be used
QtApplication {
- type: "application"
name: "unspecified"
files: "main.cpp"
+ consoleApplication: true
Properties {
condition: qbs.targetOS.contains("darwin")
@@ -16,9 +16,9 @@ Project {
// no minimum versions are specified, and explicitly set to undefined in
// case the profile has set it
QtApplication {
- type: "application"
name: "unspecified-forced"
files: "main.cpp"
+ consoleApplication: true
cpp.minimumWindowsVersion: undefined
cpp.minimumOsxVersion: undefined
cpp.minimumIosVersion: undefined
@@ -34,10 +34,10 @@ Project {
// when the application is run its output should confirm
// that the given values took effect
QtApplication {
- type: "application"
condition: qbs.targetOS.contains("windows") || qbs.targetOS.contains("osx")
name: "specific"
files: "main.cpp"
+ consoleApplication: true
Properties {
condition: qbs.targetOS.contains("windows")
@@ -55,10 +55,10 @@ Project {
// (but will still compile and link since we avoid passing a
// bad value to the linker)
QtApplication {
- type: "application"
condition: qbs.targetOS.contains("windows")
name: "fakewindows"
files: "main.cpp"
+ consoleApplication: true
cpp.minimumWindowsVersion: "5.3"
}
@@ -66,10 +66,10 @@ Project {
// this only affects the value of __MAC_OS_X_VERSION_MIN_REQUIRED,
// not the actual LC_VERSION_MIN_MACOSX command which is limited to two
QtApplication {
- type: "application"
condition: qbs.targetOS.contains("osx")
name: "macappstore"
files: "main.cpp"
+ consoleApplication: true
cpp.frameworks: "Foundation"
cpp.minimumOsxVersion: "10.6.8"
}