aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yml43
-rw-r--r--.github/workflows/release.yml176
-rw-r--r--CMakeLists.txt3
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--changelogs/changes-1.18.0.md84
-rw-r--r--cmake/QbsAPI.cmake17
-rw-r--r--doc/CMakeLists.txt84
-rw-r--r--doc/appendix/json-api.qdoc4
-rw-r--r--doc/doc.qbs6
-rw-r--r--doc/qbs.qdoc38
-rw-r--r--doc/reference/modules/bundle-module.qdoc12
-rwxr-xr-xscripts/build-qbs-with-cmake.sh13
-rw-r--r--share/CMakeLists.txt30
-rw-r--r--share/qbs/imports/qbs/PathTools/path-tools.js2
-rw-r--r--share/qbs/imports/qbs/base/Library.qbs2
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js3
-rw-r--r--share/qbs/module-providers/Qt/templates/android_support.qbs34
-rw-r--r--share/qbs/module-providers/Qt/templates/core.qbs3
-rw-r--r--share/qbs/modules/Android/sdk/sdk.qbs1
-rw-r--r--share/qbs/modules/cpp/CppModule.qbs1
-rw-r--r--share/qbs/modules/cpp/android-gcc.qbs14
-rw-r--r--share/qbs/modules/cpp/sdcc.js1
-rw-r--r--share/qbs/modules/ib/ib.js2
-rw-r--r--share/qbs/modules/protobuf/cpp/protobufcpp.qbs16
-rw-r--r--share/qbs/modules/protobuf/nanopb/nanopb.qbs32
-rw-r--r--share/qbs/modules/protobuf/protobuf.js7
-rw-r--r--src/app/qbs-setup-toolchains/probe.cpp6
-rw-r--r--src/lib/corelib/api/project.cpp2
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/100.pngbin0 -> 6652 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/114.pngbin0 -> 7757 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/120.pngbin0 -> 7734 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/128.pngbin0 -> 8774 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/144.pngbin0 -> 9498 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/152.pngbin0 -> 10734 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/16.pngbin0 -> 811 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/167.pngbin0 -> 11990 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/172.pngbin0 -> 12179 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/180.pngbin0 -> 12444 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/196.pngbin0 -> 14143 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/20.pngbin0 -> 1012 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/216.pngbin0 -> 15831 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/256.pngbin0 -> 18825 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/29.pngbin0 -> 1644 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/32.pngbin0 -> 1835 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/40.pngbin0 -> 2484 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/48.pngbin0 -> 2746 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/50.pngbin0 -> 3075 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/512.pngbin0 -> 41488 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/55.pngbin0 -> 3418 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/57.pngbin0 -> 3532 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/58.pngbin0 -> 3543 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/60.pngbin0 -> 3679 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/64.pngbin0 -> 3984 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/72.pngbin0 -> 4525 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/76.pngbin0 -> 4785 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/80.pngbin0 -> 5180 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/87.pngbin0 -> 5632 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/88.pngbin0 -> 5784 bytes
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/Contents.json299
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/appiconset.qbs10
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/appiconset/main.c1
-rw-r--r--tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs3
-rw-r--r--tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.options3
-rw-r--r--tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs2
-rw-r--r--tests/auto/blackbox/testdata/protobuf/main_nanopb.cpp4
-rw-r--r--tests/auto/blackbox/tst_blackboxapple.cpp30
-rw-r--r--tests/auto/blackbox/tst_blackboxapple.h1
67 files changed, 847 insertions, 144 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d286fcc22..d7be93f07 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -218,49 +218,6 @@ jobs:
name: qbs-windows-${{ github.run_id }}.zip
path: release/qbs-windows-${{ github.run_id }}.zip
- build-windows-with-docker:
- name: Build on Windows (Docker)
- runs-on: windows-latest
- timeout-minutes: 45
- env:
- WITH_TESTS: 0
- QT_ASSUME_STDERR_HAS_CONSOLE: 1
- CLCACHE_DIR: C:\.ccache
- steps:
- - uses: actions/checkout@v1
- - name: Create .ccache dir
- run: mkdir -p ~/.ccache
- shell: bash
- - name: prepare timestamp
- id: get-timestamp
- run: echo ::set-output name=timestamp::$(date -u +"%Y-%m-%dT%H:%M:%SZ")
- shell: bash
- - name: clcache cache files
- uses: actions/cache@v2
- with:
- path: ~/.ccache
- key: ${{ runner.os }}-msvc-docker-clcache-${{ steps.get-timestamp.outputs.timestamp }}
- restore-keys: ${{ runner.os }}-msvc-docker-clcache-
- - name: Pull the Windows Image
- run: docker-compose pull windows
- - name: Print clcache stats
- run: docker-compose run --rm windows clcache -s
- - name: Build Qbs
- run: >
- docker-compose run --rm windows qbs build
- -p dist
- qbs.buildVariant:release
- modules.cpp.compilerWrapper:clcache
- modules.qbsbuildconfig.enableBundledQt:true
- modules.qbsbuildconfig.enableProjectFileUpdates:true
- modules.qbsbuildconfig.enableUnitTests:true
- modules.cpp.treatWarningsAsErrors:true
- project.withDocumentation:true
- config:release-64 profile:qt64
- config:release profile:qt
- - name: Print clcache stats
- run: docker-compose run --rm windows clcache -s
-
test-linux:
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 000000000..7ede39d7c
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,176 @@
+name: Build release packages
+
+on:
+ push:
+ branches-ignore:
+ - 'gerrit/*'
+ tags:
+ - 'v*'
+
+jobs:
+ build-linux:
+ name: ${{ matrix.config.name }}
+ runs-on: ubuntu-latest
+ timeout-minutes: 45
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - {
+ name: 'Build on Linux (gcc)',
+ options: 'modules.cpp.compilerWrapper:ccache
+ modules.qbs.debugInformation:true
+ modules.qbsbuildconfig.enableAddressSanitizer:false
+ modules.qbsbuildconfig.enableUnitTests:false
+ modules.qbsbuildconfig.enableBundledQt:true',
+ script: './scripts/build-qbs-with-qbs.sh',
+ cacheid: 'gcc-release',
+ }
+ env:
+ BUILD_OPTIONS: ${{ matrix.config.options }}
+ WITH_TESTS: 0
+ steps:
+ - uses: actions/checkout@v1
+ - name: Create .ccache dir
+ run: mkdir -p ~/.ccache
+ - name: test
+ run: echo ${{ github.ref }}
+ - name: prepare timestamp
+ id: get-timestamp
+ run: echo ::set-output name=timestamp::$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+ - name: ccache cache files
+ uses: actions/cache@v2
+ with:
+ path: ~/.ccache
+ key: ${{ runner.os }}-${{ matrix.config.cacheid }}-ccache-${{ steps.get-timestamp.outputs.timestamp }}
+ restore-keys: ${{ runner.os }}-${{ matrix.config.cacheid }}-ccache-
+ - name: Pull the Focal Image
+ run: docker-compose pull focal
+ - name: Print ccache stats
+ run: docker-compose run focal ccache -s
+ - name: Build Qbs
+ run: docker-compose run focal ${{ matrix.config.script }}
+ - name: Print ccache stats
+ run: docker-compose run focal ccache -s
+ - name: Get archive name
+ id: get-archive-name
+ run: echo ::set-output name=archive-name::$(git describe)
+ - name: Upload artifacts
+ uses: 'actions/upload-artifact@v2'
+ with:
+ name: qbs-linux-${{ steps.get-archive-name.outputs.archive-name }}.tar.gz
+ path: release/qbs-linux-*.tar.gz
+
+ build-macos:
+ name: Build on macOS
+ runs-on: macos-latest
+ timeout-minutes: 45
+ env:
+ BUILD_OPTIONS: |
+ modules.cpp.compilerWrapper:ccache
+ modules.qbs.debugInformation:true
+ modules.qbsbuildconfig.enableUnitTests:false
+ modules.qbsbuildconfig.enableAddressSanitizer:false
+ modules.qbsbuildconfig.enableBundledQt:true
+ WITH_TESTS: 0
+ steps:
+ - uses: actions/checkout@v1
+ - name: Create .ccache dir
+ run: mkdir -p ~/.ccache
+ - name: prepare timestamp
+ id: get-timestamp
+ run: echo ::set-output name=timestamp::$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+ - name: ccache cache files
+ uses: actions/cache@v2
+ with:
+ path: ~/.ccache
+ key: ${{ runner.os }}-release-ccache-${{ steps.get-timestamp.outputs.timestamp }}
+ restore-keys: ${{ runner.os }}-release-ccache-
+ - name: Install required packages
+ run: |
+ brew install ccache p7zip
+ python3 -m pip install --user beautifulsoup4 lxml
+ - name: Install Qt
+ uses: ./.github/actions/download-qt
+ with:
+ toolchain: clang_64
+ - name: Install Qt Creator
+ uses: ./.github/actions/download-qtc
+ with:
+ version: 4.13.2
+ - name: Setup Qbs
+ run: |
+ qbs setup-toolchains --detect
+ qbs setup-qt --detect
+ qbs config profiles.qt.baseProfile xcode-macosx-x86_64
+ qbs config defaultProfile qt
+ qbs config --list
+ - name: Print ccache stats
+ run: ccache -s
+ - name: Build Qbs
+ run: scripts/build-qbs-with-qbs.sh
+ - name: Print ccache stats
+ run: ccache -s
+ - name: Get archive name
+ id: get-archive-name
+ run: echo ::set-output name=archive-name::$(git describe)
+ - name: Upload artifacts
+ uses: 'actions/upload-artifact@v2'
+ with:
+ name: qbs-macos-${{ steps.get-archive-name.outputs.archive-name }}.tar.gz
+ path: release/qbs-macos-*.tar.gz
+
+ build-windows-with-docker:
+ name: Build on Windows (Docker)
+ runs-on: windows-latest
+ timeout-minutes: 45
+ env:
+ WITH_TESTS: 0
+ QT_ASSUME_STDERR_HAS_CONSOLE: 1
+ CLCACHE_DIR: C:\.ccache
+ steps:
+ - uses: actions/checkout@v1
+ - name: Create .ccache dir
+ run: mkdir -p ~/.ccache
+ shell: bash
+ - name: prepare timestamp
+ id: get-timestamp
+ run: echo ::set-output name=timestamp::$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+ shell: bash
+ - name: clcache cache files
+ uses: actions/cache@v2
+ with:
+ path: ~/.ccache
+ key: ${{ runner.os }}-release-msvc-docker-clcache-${{ steps.get-timestamp.outputs.timestamp }}
+ restore-keys: ${{ runner.os }}-release-msvc-docker-clcache-
+ - name: Pull the Windows Image
+ run: docker-compose pull windows
+ - name: Print clcache stats
+ run: docker-compose run --rm windows clcache -s
+ - name: Build Qbs
+ run: >
+ docker-compose run --rm windows qbs build
+ -p dist
+ qbs.buildVariant:release
+ modules.cpp.compilerWrapper:clcache
+ modules.qbsbuildconfig.enableBundledQt:true
+ modules.qbsbuildconfig.enableProjectFileUpdates:true
+ modules.qbsbuildconfig.enableUnitTests:false
+ modules.cpp.treatWarningsAsErrors:true
+ project.withDocumentation:true
+ config:release-64 profile:qt64
+ config:release profile:qt
+ - name: Print clcache stats
+ run: docker-compose run --rm windows clcache -s
+ - name: Get archive name
+ id: get-archive-name
+ run: echo ::set-output name=archive-name::$(git describe)
+ shell: bash
+ - name: Upload artifacts
+ uses: 'actions/upload-artifact@v2'
+ with:
+ name: qbs-windows-${{ steps.get-archive-name.outputs.archive-name }}.zip
+ path: |
+ release/qbs.*.nupkg
+ release/qbs-windows-*.zip
+ release-64/qbs-windows-*.zip
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18b8c7fc7..d23ddf8cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,8 @@ option(WITH_TESTS "Build Tests" ON)
option(WITH_UNIT_TESTS "Build Unit Tests" OFF)
option(WITH_PROJECT_FILE_UPDATES "Enable project file updates support" OFF)
option(INSTALL_PUBLIC_HEADERS "Whether to install public headers" ON)
+option(QBS_INSTALL_HTML_DOCS "Whether to install HTML Documentation" OFF)
+option(QBS_INSTALL_QCH_DOCS "Whether to install QCH Documentation" OFF)
if(WITH_TESTS)
enable_testing()
@@ -39,6 +41,7 @@ find_package(Qt5
)
add_subdirectory(src)
+add_subdirectory(doc)
add_subdirectory(share)
if(WITH_TESTS)
add_subdirectory(tests)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 86c2de06f..1a8a8877b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -44,7 +44,7 @@ git remote add gerrit ssh://<gerrit-username>@codereview.qt-project.org:29418/qb
Install the hook generating Commit-Id files into your top level project directory:
```
-gitdir=$(git rev-parse --git-dir); scp -P 29418 codereview.qt-project.org:hooks/commit-msg ${gitdir}/hooks/
+gitdir=$(git rev-parse --git-dir); scp -p -P 29418 codereview.qt-project.org:hooks/commit-msg "${gitdir}/hooks/"
```
This hook automatically adds a "Change-Id: …" line to the commit message. Change-Id is used
diff --git a/changelogs/changes-1.18.0.md b/changelogs/changes-1.18.0.md
new file mode 100644
index 000000000..38fb9afb7
--- /dev/null
+++ b/changelogs/changes-1.18.0.md
@@ -0,0 +1,84 @@
+# General
+
+* capnp: The outputDir property is now public and read-only.
+* setup-toochains: Include the Xcode version into the profile name
+ profile when auto-detection an Xcode installation.
+* innosetup module: Add support for InnoSetup v6
+* JSON API: Use the full display name of multiplexed products
+ in the dependencies array. This allows clients to for example to
+ properly update the search path for multiplexed dynamic libraries.
+
+
+# Language
+
+* Deprecate the product variable inside Export items in favor of a new
+ exportingProduct variable. It will be removed in Qbs 1.20 (QBS-1576).
+* Qbs now checks string and stringList values according to the
+ allowedValues property in the PropertyOptions item.
+
+
+# Protocol Buffers Support (Protobuf Module)
+
+* The deprecated protocBinary property has been removed. Use compilerPath
+ instead.
+* A nanopb submodule has been added.
+* The outputDir property is now public and read-only.
+
+# C/C++ Support
+
+* baremetal: cpp.generateCompilerListingFiles has been implemented for
+ KEIL ARM Clang
+* baremetal: cpp.enableDefinesByLanguage does now work with SDCC as well.
+
+
+# Qt Support
+
+* Moc is now disabled when building aggregate products.
+
+
+# Android Support
+
+* Support for the new directory layout of Qt6 has been added (QBS-1609).
+* Input file generation for androiddeployqt has been improved (QBS-1613).
+* Debugging experience of multi-architecture Android projects with Qbs and
+ Qt Creator has been improved. Binaries are now generated in a directory
+ layout that Qt Creator expects and debug information is no longer stripped
+ away.
+
+# Documentation
+
+* baremetal: A new WiFi access point example for the ESP8266 MCU using the
+ GCC toolchain has been added.
+* baremetal: A new example for Nordic's pca10001 board has been
+ added. It supports GCC, KEIL and IAR.
+* baremetal: The stm32f103 example supports IAR as well.
+* A howto has been added showing how to easily disable compiler
+ warnings.
+* Instructions for building Qbs with CMake have been added (QBS-1618).
+
+# Important Bug Fixes
+
+* Qt modules could not be used in Export item when building for Android
+ (QBS-1576).
+* Variable substitution in Info.plist files was broken for
+ '@VAR@' syntax (QBS-1601).
+* CppApplication failed to build for Android when using Qt > 5.14.0
+ and multiplexing over multiple architectures (QBS-1608).
+* Moc output was broken when including Boost project header files (QBS-1621).
+
+# Contributors
+
+* Alberto Mardegan
+* André Pönitz
+* Christian Kandeler
+* Christian Stenger
+* Cristian Adam
+* Denis Shienkov
+* Eike Ziller
+* Ivan Komissarov
+* Jochen Ulrich
+* Kai Dohmen
+* Mitch Curtis
+* Orgad Shaneh
+* Raphaël Cotty
+* Richard Weickelt
diff --git a/cmake/QbsAPI.cmake b/cmake/QbsAPI.cmake
index d8847e683..2856b2d0f 100644
--- a/cmake/QbsAPI.cmake
+++ b/cmake/QbsAPI.cmake
@@ -1,3 +1,4 @@
+set(QBS_APP_INSTALL_DIR "bin" CACHE STRING "Relative install location for Qbs binaries.")
# default paths
set(QBS_LIBDIR_NAME "lib")
if(WIN32)
@@ -10,13 +11,13 @@ endif()
# path options
set(QBS_OUTPUT_PREFIX "" CACHE STRING "Qbs build output location relative to CMAKE_BINARY_DIR.")
-set(QBS_APP_INSTALL_DIR "bin" CACHE STRING "Relative install location for Qbs binaries.")
set(QBS_LIB_INSTALL_DIR "${_DEFAULT_LIB_INSTALL_DIR}" CACHE STRING "Relative install location for Qbs libraries.")
set(QBS_DLL_INSTALL_DIR "${QBS_LIB_INSTALL_DIR}" CACHE STRING "Relative install location for Qbs DLLs.")
set(QBS_LIBEXEC_INSTALL_DIR "${_DEFAULT_LIBEXEC_INSTALL_DIR}" CACHE STRING "Relative install location for Qbs libexec.")
set(QBS_PLUGINS_INSTALL_BASE "${QBS_LIBDIR_NAME}" CACHE STRING "Relative install location for Qbs plugins.")
set(QBS_RESOURCES_INSTALL_BASE "." CACHE STRING "Relative install location for Qbs resources.")
set(QBS_HEADERS_INSTALL_DIR "include/qbs" CACHE STRING "Relative install location for Qbs headers.")
+set(QBS_DOC_INSTALL_DIR "${QBS_RESOURCES_INSTALL_BASE}/share/doc/qbs/html" CACHE STRING "Relative install location for Qbs documentation.")
set(QBS_PLUGINS_INSTALL_DIR "${QBS_PLUGINS_INSTALL_BASE}/qbs/plugins")
set(QBS_RESOURCES_INSTALL_DIR "${QBS_RESOURCES_INSTALL_BASE}/share")
@@ -42,6 +43,20 @@ else()
set(QBS_PLUGINS_RPATH "\$ORIGIN/${QBS_RELATIVE_PLUGINS_RPATH}")
endif()
+function(get_update_path_command var)
+ if(WIN32)
+ get_target_property(_QTCORE_LIBRARY Qt5::Core IMPORTED_LOCATION_RELEASE)
+ if(NOT _QTCORE_LIBRARY)
+ get_target_property(_QTCORE_LIBRARY Qt5::Core IMPORTED_LOCATION_DEBUG)
+ endif()
+ get_filename_component(_QT_LIBRARY_PATH "${_QTCORE_LIBRARY}" DIRECTORY)
+ get_target_property(_QBS_LIBRARY_PATH qbscore LIBRARY_OUTPUT_DIRECTORY)
+ set(${var} "PATH=${_QT_LIBRARY_PATH}\;${_QBS_LIBRARY_PATH}\;%PATH%" PARENT_SCOPE)
+ else()
+ set(${var} "")
+ endif()
+endfunction()
+
if(WITH_UNIT_TESTS)
set(QBS_UNIT_TESTS_DEFINES "QBS_ENABLE_UNIT_TESTS")
else()
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 000000000..74d71f4dc
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,84 @@
+if (QBS_INSTALL_HTML_DOCS OR QBS_INSTALL_QCH_DOCS)
+
+ find_package(Python3 COMPONENTS Interpreter)
+
+ function(find_python_module module)
+ string(TOUPPER ${module} module_upper)
+ if (NOT PY_${module_upper})
+ if (ARGC GREATER 1 AND ARGV1 STREQUAL "REQUIRED")
+ set(${module}_FIND_REQUIRED TRUE)
+ endif()
+ # A module's location is usually a directory, but for binary modules
+ # it's a .so file.
+ execute_process(COMMAND "${Python3_EXECUTABLE}" "-c"
+ "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
+ RESULT_VARIABLE _${module}_status
+ OUTPUT_VARIABLE _${module}_location
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if (NOT _${module}_status)
+ set(PY_${module_upper} ${_${module}_location} CACHE STRING
+ "Location of Python module ${module}")
+ endif()
+ endif()
+ find_package_handle_standard_args(PY_${module} DEFAULT_MSG PY_${module_upper})
+ endfunction()
+
+ if (Python3_Interpreter_FOUND)
+ find_python_module(lxml)
+ find_python_module(bs4)
+ if (PY_LXML AND PY_BS4)
+
+ get_target_property(_QBS_OUTPUT_DIR qbs RUNTIME_OUTPUT_DIRECTORY)
+
+ if (QBS_INSTALL_HTML_DOCS)
+ set(_INSTALL_HTML_DOCS true)
+ else()
+ set(_INSTALL_HTML_DOCS false)
+ endif()
+
+ if (QBS_INSTALL_QCH_DOCS)
+ set(_INSTALL_QCH_DOCS true)
+ else()
+ set(_INSTALL_QCH_DOCS false)
+ endif()
+
+ get_target_property(_QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
+ get_update_path_command(UPDATE_PATH_COMMAND)
+ add_custom_target(
+ BuildQbsDocumentation ALL
+ COMMAND ${UPDATE_PATH_COMMAND}
+ COMMAND ${_QBS_OUTPUT_DIR}/qbs
+ resolve
+ --settings-dir ${PROJECT_BINARY_DIR}/settings
+ -f ${PROJECT_SOURCE_DIR}/qbs.qbs
+ -d ${PROJECT_BINARY_DIR}/
+ config:doc-build
+ qbs.installPrefix:undefined
+ qbs.buildVariant:release
+ project.withCode:false
+ project.withDocumentation:true
+ profile:none
+ "products.qbs documentation.pythonPath:${Python3_EXECUTABLE}"
+ modules.qbsbuildconfig.installHtml:${_INSTALL_HTML_DOCS}
+ modules.qbsbuildconfig.installQch:${_INSTALL_QCH_DOCS}
+ moduleProviders.Qt.qmakeFilePaths:${_QT_QMAKE_EXECUTABLE}
+ COMMAND ${_QBS_OUTPUT_DIR}/qbs
+ build
+ --settings-dir ${PROJECT_BINARY_DIR}/settings
+ -f ${PROJECT_SOURCE_DIR}/qbs.qbs
+ -d ${PROJECT_BINARY_DIR}/
+ config:doc-build
+ -p "qbs documentation"
+ DEPENDS qbs copy-runtime-files-qbs qbs_processlauncher
+ )
+ install(
+ DIRECTORY ${PROJECT_BINARY_DIR}/doc-build/install-root/share/doc/qbs/html/
+ DESTINATION "${QBS_DOC_INSTALL_DIR}"
+ )
+ else()
+ message(WARNING "Cannot import lxml and bs4 python modules. Qbs documentation will not be built.")
+ endif()
+ else()
+ message(WARNING "Cannot find python3 binary. Qbs documentation will not be built.")
+ endif()
+endif()
diff --git a/doc/appendix/json-api.qdoc b/doc/appendix/json-api.qdoc
index 959b30bb7..78e359017 100644
--- a/doc/appendix/json-api.qdoc
+++ b/doc/appendix/json-api.qdoc
@@ -628,8 +628,8 @@
\row \li version \li string
\endtable
- The \c dependencies are the names of products that occur in the (enabled)
- \l Depends items of this product.
+ The elements of the \c dependencies array correspond to the full-display-name
+ properties of the products that this product has pulled in via \l Depends items.
The \c generated-artifacts are files that are created by the \l{Rule}{rules}
in this product.
diff --git a/doc/doc.qbs b/doc/doc.qbs
index 8d7da8d04..8ab6cfdb9 100644
--- a/doc/doc.qbs
+++ b/doc/doc.qbs
@@ -21,7 +21,7 @@ Project {
id: pythonProbe
names: ["python3", "python"] // on Windows, there's no python3
}
- property string _pythonExe: pythonProbe.found ? pythonProbe.filePath : undefined
+ property string pythonPath: pythonProbe.found ? pythonProbe.filePath : undefined
files: [
"../README.md",
@@ -66,11 +66,11 @@ Project {
outputFileTags: ["qdoc-html", "qbsdoc.dummy"] // TODO: Hack. Rule injection to the rescue?
outputArtifacts: [{filePath: "dummy", fileTags: ["qbsdoc.dummy"]}]
prepare: {
- if (!product._pythonExe)
+ if (!product.pythonPath)
throw "Python executable was not found";
var scriptPath = explicitlyDependsOn["qbsdoc.fiximports"][0].filePath;
var htmlDir = FileInfo.path(FileInfo.path(inputs["qdoc-png"][0].filePath));
- var fixCmd = new Command(product._pythonExe, [scriptPath, htmlDir]);
+ var fixCmd = new Command(product.pythonPath, [scriptPath, htmlDir]);
fixCmd.description = "fixing bogus QML import statements";
return [fixCmd];
}
diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc
index 217e41e7c..656a1245d 100644
--- a/doc/qbs.qdoc
+++ b/doc/qbs.qdoc
@@ -299,25 +299,39 @@
\section2 IDE Integration
\QBS can be used not only from the command line, but also in combination
- with an IDE, such as Qt Creator, Microsoft Visual Studio, or Xcode.
- Qt Creator directly supports \QBS projects. Visual Studio and Xcode users
- can use \QBS to generate Microsoft Visual Studio and Xcode projects.
- For more information, see \l {Generators}.
+ with an IDE, such as Qt Creator or Visual Studio Code. These IDEs directly
+ support \QBS projects using the new \QBS
+ {https://doc.qt.io/qbs/cli-session.html}{session} feature. Thus, these IDEs
+ can retrieve all the information required to build a single file or project
+ through a session's JSON protocol {https://doc.qt.io/qbs/json-api.html}{API}.
+
+ In addition, \QBS can generate projects for Visual Studio, IAR EW, and
+ Keil uVision, but it still is an experimental option. For more information,
+ see \l {Generators}.
\section3 Qt Creator
- \l{http://doc.qt.io/qtcreator/index.html}{Qt Creator} uses the same \QBS
- library as the \QBS command line tools. Therefore, it can retrieve all the
- information required to build a single file or project through a defined
- public API. Qt Creator provides accurate information about the build
- progress and displays a project tree that reflects the logical structure of
- the project, instead of presenting low-level information, such as the file
- system structure. Adding or removing source files keeps the existing project
- file structure intact.
+ \l{http://doc.qt.io/qtcreator/index.html}{Qt Creator} provides accurate
+ information about the build progress and displays a project tree that
+ reflects the logical structure of the project, instead of presenting low-level
+ information, such as the file system structure. Adding or removing source
+ files keeps the existing project file structure intact.
For more information about using \QBS to build projects from Qt Creator, see
\l{http://doc.qt.io/qtcreator/creator-project-qbs.html}{Setting Up Qbs}.
+ \section3 Visual Studio Code
+
+ \l{https://code.visualstudio.com/}{Visual Studio Code} provides the
+ {https://marketplace.visualstudio.com/items?itemName=qbs-community.qbs-tools}
+ {qbs-community} plugin that provides accurate information about the build progress
+ and displays a project tree that reflects the logical structure of the project.
+ Also, it can provide low-level information, such as the file system structure.
+
+ For more information about using \QBS to build projects from Visual Studio Code,
+ see \l{https://github.com/denis-shienkov/vscode-qbs/blob/master/docs/how-to.md}
+ {How To}.
+
\section1 Build Process
\image qbs-build-process.png
diff --git a/doc/reference/modules/bundle-module.qdoc b/doc/reference/modules/bundle-module.qdoc
index e3c21cd3c..4184672b4 100644
--- a/doc/reference/modules/bundle-module.qdoc
+++ b/doc/reference/modules/bundle-module.qdoc
@@ -96,8 +96,9 @@
A prefix for the product's bundle identifier. If \l{bundle::}{identifier}
is left unset, the bundle identifier will be a concatenation of this value
- and the \l{bundle::}{identifier} property, separated by a period (.). This
- corresponds to the organization identifier in Xcode.
+ and the \l{Product::targetName}{Product.targetName} property formatted as
+ an RFC-1034 identifier, separated by a period (.). This corresponds to the
+ organization identifier in Xcode.
\defaultvalue \c{org.example}
*/
@@ -106,8 +107,9 @@
\qmlproperty string bundle::identifier
The bundle's identifier. If left unset, the bundle identifier will be a
- concatenation of this value and the \l{bundle::}{identifierPrefix} property,
- separated by a period (.).
+ concatenation of the \l{bundle::}{identifierPrefix} value and the
+ \l{Product::targetName}{Product.targetName} propertyy formatted as an
+ RFC-1034 identifier, separated by a period (.).
\defaultvalue A combination of \l{bundle::}{identifierPrefix} and the
product's target name formatted as an RFC-1034 identifier.
@@ -204,7 +206,7 @@
*/
/*!
- \qmlproperty bool bundle::resources
+ \qmlproperty pathList bundle::resources
A list of resources to copy to a bundle's \c Resources subdirectory. Files
will automatically be copied into \c lproj subdirectories corresponding to
diff --git a/scripts/build-qbs-with-cmake.sh b/scripts/build-qbs-with-cmake.sh
index 73ba353b8..c4c954fd6 100755
--- a/scripts/build-qbs-with-cmake.sh
+++ b/scripts/build-qbs-with-cmake.sh
@@ -45,7 +45,15 @@ set -e
#
export QBS_AUTOTEST_SETTINGS_DIR="${QBS_AUTOTEST_SETTINGS_DIR:-/tmp/qbs-settings}"
-BUILD_OPTIONS="-DWITH_UNIT_TESTS=1 -DWITH_PROJECT_FILE_UPDATES=1 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${BUILD_OPTIONS}"
+BUILD_OPTIONS="\
+ -DWITH_UNIT_TESTS=1 \
+ -DWITH_PROJECT_FILE_UPDATES=1 \
+ -DQBS_INSTALL_HTML_DOCS=1 \
+ -DQBS_INSTALL_QCH_DOCS=1 \
+ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
+ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+ ${BUILD_OPTIONS} \
+"
QMAKE_PATH="${QMAKE_PATH:-$(which qmake)}"
QT_DIR=$(dirname ${QMAKE_PATH})/../
@@ -58,7 +66,8 @@ pushd build
# Build all default products of Qbs
#
cmake -GNinja -DQt5_DIR=${QT_DIR}/lib/cmake/Qt5/ ${BUILD_OPTIONS} ..
-ninja
+cmake --build .
+cmake --install . --prefix "install-root"
#
# Set up profiles for the freshly built Qbs if not
diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt
index bfc657b6f..f607e0a85 100644
--- a/share/CMakeLists.txt
+++ b/share/CMakeLists.txt
@@ -32,41 +32,37 @@ install(
DESTINATION "${QBS_RESOURCES_INSTALL_DIR}/qbs"
)
-if(WIN32)
- get_target_property(_QTCORE_LIBRARY Qt5::Core IMPORTED_LOCATION_RELEASE)
- if(NOT _QTCORE_LIBRARY)
- get_target_property(_QTCORE_LIBRARY Qt5::Core IMPORTED_LOCATION_DEBUG)
- endif()
- get_filename_component(_QT_LIBRARY_PATH "${_QTCORE_LIBRARY}" DIRECTORY)
- get_target_property(_QBS_LIBRARY_PATH qbscore LIBRARY_OUTPUT_DIRECTORY)
- set(UPDATE_PATH_COMMAND set "PATH=${_QT_LIBRARY_PATH}\;${_QBS_LIBRARY_PATH}\;%PATH%")
-else()
- set(UPDATE_PATH_COMMAND "")
-endif()
-
+get_update_path_command(UPDATE_PATH_COMMAND)
get_target_property(_QBS_OUTPUT_DIR qbs RUNTIME_OUTPUT_DIRECTORY)
add_custom_target(
BuildQbsResources ALL
COMMAND ${UPDATE_PATH_COMMAND}
COMMAND ${_QBS_OUTPUT_DIR}/qbs
- build
+ resolve
--settings-dir ${PROJECT_BINARY_DIR}/settings
-f ${PROJECT_SOURCE_DIR}/qbs.qbs
-d ${PROJECT_BINARY_DIR}/
- -p "qbs resources"
+ config:resources-build
qbs.installPrefix:undefined
project.withCode:false
project.withDocumentation:false
profile:none
- DEPENDS qbs copy-runtime-files-qbs
+ COMMAND ${_QBS_OUTPUT_DIR}/qbs
+ build
+ --settings-dir ${PROJECT_BINARY_DIR}/settings
+ -f ${PROJECT_SOURCE_DIR}/qbs.qbs
+ -d ${PROJECT_BINARY_DIR}/
+ config:resources-build
+ -p "qbs resources"
+ DEPENDS qbs copy-runtime-files-qbs qbs_processlauncher
)
install(
- DIRECTORY ${PROJECT_BINARY_DIR}/default/install-root/share/qbs/qml-type-descriptions
+ DIRECTORY ${PROJECT_BINARY_DIR}/resources-build/install-root/share/qbs/qml-type-descriptions
DESTINATION "${QBS_RESOURCES_INSTALL_DIR}/qbs"
)
install(
- DIRECTORY ${PROJECT_BINARY_DIR}/default/install-root/share/qbs/qml-type-descriptions
+ DIRECTORY ${PROJECT_BINARY_DIR}/resources-build/install-root/share/qbs/qml-type-descriptions
DESTINATION "${QBS_RESOURCES_INSTALL_DIR}/qbs"
)
diff --git a/share/qbs/imports/qbs/PathTools/path-tools.js b/share/qbs/imports/qbs/PathTools/path-tools.js
index b2cb63e39..a857a7139 100644
--- a/share/qbs/imports/qbs/PathTools/path-tools.js
+++ b/share/qbs/imports/qbs/PathTools/path-tools.js
@@ -107,6 +107,8 @@ function dynamicLibraryFilePath(product, variantSuffix, version, maxParts) {
version = undefined;
}
+ fileName += product.moduleProperty("cpp", "archSuffix");
+
// Append the suffix (i.e. libqbs.1.0.0.dylib, libqbs.so, qbs.dll)
fileName += product.moduleProperty("cpp", "dynamicLibrarySuffix");
diff --git a/share/qbs/imports/qbs/base/Library.qbs b/share/qbs/imports/qbs/base/Library.qbs
index 62e5f9d30..c8a114624 100644
--- a/share/qbs/imports/qbs/base/Library.qbs
+++ b/share/qbs/imports/qbs/base/Library.qbs
@@ -60,6 +60,8 @@ NativeBinary {
return ["dynamiclibrary", "dynamiclibrary_symlink"];
if (isStaticLibrary)
return ["staticlibrary"];
+ if (isLoadableModule)
+ return ["loadablemodule"];
return [];
}
qbs.install: true
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index a50770b18..a67f79d89 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -246,7 +246,8 @@ function getQtProperties(qmakeFilePath, qbs) {
qtProps.includePath = pathQueryValue(queryResult, "QT_INSTALL_HEADERS");
qtProps.libraryPath = pathQueryValue(queryResult, "QT_INSTALL_LIBS");
qtProps.hostLibraryPath = pathQueryValue(queryResult, "QT_HOST_LIBS");
- qtProps.binaryPath = pathQueryValue(queryResult, "QT_HOST_BINS");
+ qtProps.binaryPath = pathQueryValue(queryResult, "QT_HOST_BINS")
+ || pathQueryValue(queryResult, "QT_INSTALL_BINS");
qtProps.installPath = pathQueryValue(queryResult, "QT_INSTALL_BINS");
qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS");
qtProps.pluginPath = pathQueryValue(queryResult, "QT_INSTALL_PLUGINS");
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs
index bdbb0e43b..3790037f3 100644
--- a/share/qbs/module-providers/Qt/templates/android_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/android_support.qbs
@@ -68,7 +68,6 @@ Module {
}
Properties {
condition: _enableSdkSupport
- Android.sdk._archInName: _multiAbi
Android.sdk._bundledInAssets: _multiAbi
}
Properties {
@@ -79,6 +78,7 @@ Module {
condition: _enableSdkSupport && Utilities.versionCompare(version, "6.0") >= 0
Android.sdk.minimumVersion: "23"
}
+ cpp.archSuffix: _multiAbi ? "_" + Android.ndk.abi : ""
Rule {
condition: _enableSdkSupport
@@ -324,10 +324,8 @@ Module {
var input = inputs["android.nativelibrary"][i];
File.copy(input.filePath,
FileInfo.joinPaths(product.Qt.android_support._deployQtOutDir,
- "libs",
- input.Android.ndk.abi,
- input.baseName + "_" + input.Android.ndk.abi +
- ".so"));
+ "libs", input.Android.ndk.abi,
+ input.fileName));
}
}
};
@@ -396,31 +394,7 @@ Module {
File.remove(oldLibs[i]);
}
};
-
- // androiddeployqt doesn't strip the deployed libraries anymore so it has to done here
- var stripLibsCmd = new JavaScriptCommand();
- stripLibsCmd.description = "Stripping unneeded symbols from deployed qt libraries";
- stripLibsCmd.sourceCode = function() {
- var stripArgs = ["--strip-all"];
- var architectures = [];
- for (var i in inputs["android.nativelibrary"])
- architectures.push(inputs["android.nativelibrary"][i].Android.ndk.abi);
- for (var i in architectures) {
- var abiDirPath = FileInfo.joinPaths(product.Android.sdk.packageContentsDir,
- "lib", architectures[i]);
- var files = File.directoryEntries(abiDirPath, File.Files);
- for (var i = 0; i < files.length; ++i) {
- var filePath = FileInfo.joinPaths(abiDirPath, files[i]);
- if (FileInfo.suffix(filePath) == "so") {
- stripArgs.push(filePath);
- }
- }
- }
- var process = new Process();
- process.exec(product.cpp.stripPath, stripArgs, false);
- }
-
- return [copyCmd, androidDeployQtCmd, moveCmd, stripLibsCmd];
+ return [copyCmd, androidDeployQtCmd, moveCmd];
}
}
diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs
index 691e4b50c..8f0b0e2df 100644
--- a/share/qbs/module-providers/Qt/templates/core.qbs
+++ b/share/qbs/module-providers/Qt/templates/core.qbs
@@ -190,7 +190,8 @@ Module {
return undefined;
return frameworks;
}
- cpp.rpaths: qbs.targetOS.contains('linux') ? [libPath] : undefined
+ cpp.rpaths: qbs.targetOS.contains('linux') && !qbs.targetOS.contains("android") ? [libPath] :
+ undefined
cpp.runtimeLibrary: qbs.toolchain.contains("msvc")
? config.contains("static_runtime") ? "static" : "dynamic"
: original
diff --git a/share/qbs/modules/Android/sdk/sdk.qbs b/share/qbs/modules/Android/sdk/sdk.qbs
index b3f977689..f0e727caf 100644
--- a/share/qbs/modules/Android/sdk/sdk.qbs
+++ b/share/qbs/modules/Android/sdk/sdk.qbs
@@ -96,7 +96,6 @@ Module {
property bool _enableRules: !product.multiplexConfigurationId && !!packageName
- property bool _archInName: false
property bool _bundledInAssets: true
Group {
diff --git a/share/qbs/modules/cpp/CppModule.qbs b/share/qbs/modules/cpp/CppModule.qbs
index 8ee8e2698..ca89bbd63 100644
--- a/share/qbs/modules/cpp/CppModule.qbs
+++ b/share/qbs/modules/cpp/CppModule.qbs
@@ -179,6 +179,7 @@ Module {
property string executablePrefix: ""
property string staticLibrarySuffix: ""
property string dynamicLibrarySuffix: ""
+ property string archSuffix: ""
property string loadableModuleSuffix: ""
property string executableSuffix: ""
property string debugInfoSuffix: ""
diff --git a/share/qbs/modules/cpp/android-gcc.qbs b/share/qbs/modules/cpp/android-gcc.qbs
index bd58cbcca..5759606aa 100644
--- a/share/qbs/modules/cpp/android-gcc.qbs
+++ b/share/qbs/modules/cpp/android-gcc.qbs
@@ -41,7 +41,7 @@ LinuxGCC {
condition: qbs.targetOS.contains("android") && qbs.toolchain && qbs.toolchain.contains("llvm")
priority: 2
- rpaths: [rpathOrigin]
+ rpaths: []
cxxLanguageVersion: "c++14"
property string cxxStlBaseDir: FileInfo.joinPaths(Android.ndk.ndkDir, "sources", "cxx-stl")
@@ -128,12 +128,7 @@ LinuxGCC {
return includes;
}
- defines: {
- var list = ["ANDROID"];
- // Might be superseded by an -mandroid-version or similar Clang compiler flag in future
- list.push("__ANDROID_API__=" + Android.ndk.platformVersion);
- return list;
- }
+ defines: ["ANDROID", "__ANDROID__"]
binutilsPath: FileInfo.joinPaths(Android.ndk.ndkDir, "toolchains", "llvm", "prebuilt",
Android.ndk.hostArch, "bin");
@@ -158,9 +153,10 @@ LinuxGCC {
}
}
- targetVendor: "none"
+ target: [targetArch, targetSystem, targetAbi].join("-")
targetSystem: "linux"
- targetAbi: "android" + (["armeabi", "armeabi-v7a"].contains(Android.ndk.abi) ? "eabi" : "")
+ targetAbi: "android" + (["armeabi", "armeabi-v7a"].contains(Android.ndk.abi) ? "eabi" : "") +
+ Android.ndk.platformVersion
endianness: "little"
diff --git a/share/qbs/modules/cpp/sdcc.js b/share/qbs/modules/cpp/sdcc.js
index 4a144b466..36454031e 100644
--- a/share/qbs/modules/cpp/sdcc.js
+++ b/share/qbs/modules/cpp/sdcc.js
@@ -404,6 +404,7 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) {
}
// Misc flags.
+ escapablePreprocessorFlags = escapablePreprocessorFlags.uniqueConcat(input.cpp.cppFlags);
var escapedPreprocessorFlags = escapePreprocessorFlags(escapablePreprocessorFlags);
if (escapedPreprocessorFlags)
Array.prototype.push.apply(args, escapedPreprocessorFlags);
diff --git a/share/qbs/modules/ib/ib.js b/share/qbs/modules/ib/ib.js
index 40bd1dc23..ebb615e8e 100644
--- a/share/qbs/modules/ib/ib.js
+++ b/share/qbs/modules/ib/ib.js
@@ -173,7 +173,7 @@ function ibtooldArguments(product, inputs, input, outputs, overrideOutput) {
// --target-device and -output-partial-info-plist were introduced in Xcode 6.0 for ibtool
if (ModUtils.moduleProperty(product, "ibtoolVersionMajor") >= 6 || inputs.assetcatalog) {
args.push("--output-partial-info-plist", (outputs && outputs.partial_infoplist)
- ? outputs.partial_infoplist[0].filePath
+ ? outputs.partial_infoplist[outputs.partial_infoplist.length - 1].filePath
: "/dev/null");
// For iOS, we'd normally only output the devices specified in TARGETED_DEVICE_FAMILY
diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
index 9f2dbc7af..47d1a60c1 100644
--- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
+++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs
@@ -15,6 +15,13 @@ ProtobufBase {
property string grpcIncludePath: grpcIncludeProbe.path
property string grpcLibraryPath: grpcLibraryProbe.path
+ readonly property string _libraryName: {
+ var libraryName = FileInfo.baseName(libraryProbe.fileName);
+ if (libraryName.startsWith("lib"))
+ libraryName = libraryName.substring(3);
+ return libraryName;
+ }
+
Depends { name: "cpp" }
property path grpcPluginPath: grpcPluginProbe.filePath
@@ -34,7 +41,9 @@ ProtobufBase {
return result;
}
cpp.dynamicLibraries: {
- var result = ["protobuf"];
+ var result = [];
+ if (_libraryName)
+ result.push(_libraryName)
if (qbs.targetOS.contains("unix"))
result.push("pthread");
if (useGrpc)
@@ -89,7 +98,10 @@ ProtobufBase {
Probes.LibraryProbe {
id: libraryProbe
- names: "protobuf"
+ names: [
+ "protobuf",
+ "protobufd",
+ ]
}
Probes.IncludeProbe {
diff --git a/share/qbs/modules/protobuf/nanopb/nanopb.qbs b/share/qbs/modules/protobuf/nanopb/nanopb.qbs
index fdf95e2fd..ae87b1ca1 100644
--- a/share/qbs/modules/protobuf/nanopb/nanopb.qbs
+++ b/share/qbs/modules/protobuf/nanopb/nanopb.qbs
@@ -9,9 +9,15 @@ import "../protobuf.js" as HelperFunctions
ProtobufBase {
property string includePath: includeProbe.path
property string libraryPath: libraryProbe.path
- property string pluginPath: pluginProbe.path
- property string _plugin: "protoc-gen-nanopb=" +
- FileInfo.joinPaths(pluginPath, "protoc-gen-nanopb")
+ property string pluginPath: pluginProbe.filePath
+ property string pluginName: "protoc-gen-nanopb"
+ readonly property string _plugin: "protoc-gen-nanopb=" + pluginPath
+ readonly property string _libraryName: {
+ var libraryName = FileInfo.baseName(libraryProbe.fileName);
+ if (libraryName.startsWith("lib"))
+ libraryName = libraryName.substring(3);
+ return libraryName;
+ }
Depends { name: "cpp" }
@@ -21,7 +27,12 @@ ProtobufBase {
result.push(libraryPath);
return result;
}
- cpp.dynamicLibraries: "protobuf-nanopb"
+ cpp.dynamicLibraries: {
+ var result = [];
+ if (_libraryName)
+ result.push(_libraryName);
+ return result;
+ }
cpp.includePaths: {
var result = [outputDir];
if (includePath)
@@ -44,9 +55,13 @@ ProtobufBase {
}
prepare: {
+ var options = input.protobuf.nanopb.importPaths.map(function (path) {
+ return "-I" + path;
+ })
+
var result = HelperFunctions.doPrepare(
input.protobuf.nanopb, product, input, outputs, "nanopb",
- input.protobuf.nanopb._plugin);
+ input.protobuf.nanopb._plugin, options);
return result;
}
}
@@ -58,12 +73,15 @@ ProtobufBase {
Probes.LibraryProbe {
id: libraryProbe
- names: "protobuf-nanopb"
+ names: [
+ "protobuf-nanopb",
+ "protobuf-nanopbd",
+ ]
}
Probes.BinaryProbe {
id: pluginProbe
- names: "protoc-gen-nanopb"
+ names: pluginName
}
validate: {
diff --git a/share/qbs/modules/protobuf/protobuf.js b/share/qbs/modules/protobuf/protobuf.js
index 0fd89856b..abc2c2c4d 100644
--- a/share/qbs/modules/protobuf/protobuf.js
+++ b/share/qbs/modules/protobuf/protobuf.js
@@ -86,13 +86,14 @@ function objcArtifact(outputDir, input, tags, suffix) {
filePath: FileInfo.joinPaths(
outputDir, toCamelCase(FileInfo.baseName(input.fileName)) + suffix),
cpp: {
+ automaticReferenceCounting: false,
includePaths: [].concat(input.cpp.includePaths, outputDir),
warningLevel: "none",
}
}
}
-function doPrepare(module, product, input, outputs, generator, plugin)
+function doPrepare(module, product, input, outputs, generator, plugin, generatorOptions)
{
var outputDir = module.outputDir;
var args = [];
@@ -101,6 +102,10 @@ function doPrepare(module, product, input, outputs, generator, plugin)
args.push("--plugin=" + plugin)
args.push("--" + generator + "_out", outputDir);
+ if (!!generatorOptions) {
+ for (var i = 0; i < generatorOptions.length; ++i)
+ args.push("--" + generator + "_opt=" + generatorOptions[i])
+ }
var importPaths = module.importPaths;
if (importPaths.length === 0)
diff --git a/src/app/qbs-setup-toolchains/probe.cpp b/src/app/qbs-setup-toolchains/probe.cpp
index add7ba05c..efa5d9b78 100644
--- a/src/app/qbs-setup-toolchains/probe.cpp
+++ b/src/app/qbs-setup-toolchains/probe.cpp
@@ -163,10 +163,10 @@ void createProfile(const QString &profileName, const QString &toolchainType,
: toolchainTypeFromCompilerName(compiler.fileName());
const QStringList toolchain = canonicalToolchain(realToolchainType);
- if (toolchain.contains(QLatin1String("msvc")))
- createMsvcProfile(compiler, settings, profileName);
- else if (toolchain.contains(QLatin1String("clang-cl")))
+ if (toolchain.contains(QLatin1String("clang-cl")))
createClangClProfile(compiler, settings, profileName);
+ else if (toolchain.contains(QLatin1String("msvc")))
+ createMsvcProfile(compiler, settings, profileName);
else if (toolchain.contains(QLatin1String("gcc")))
createGccProfile(compiler, settings, realToolchainType, profileName);
else if (toolchain.contains(QLatin1String("iar")))
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp
index e6caf1b2b..65b9b4efa 100644
--- a/src/lib/corelib/api/project.cpp
+++ b/src/lib/corelib/api/project.cpp
@@ -697,7 +697,7 @@ void ProjectPrivate::retrieveProjectData(ProjectData &projectData,
}
for (const ResolvedProductPtr &resolvedDependentProduct
: qAsConst(resolvedProduct->dependencies)) {
- product.d->dependencies << resolvedDependentProduct->name; // FIXME: Shouldn't this be a unique name?
+ product.d->dependencies << resolvedDependentProduct->fullDisplayName();
}
std::sort(product.d->type.begin(), product.d->type.end());
std::sort(product.d->groups.begin(), product.d->groups.end());
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/100.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/100.png
new file mode 100644
index 000000000..98f8eaeb7
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/100.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/114.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/114.png
new file mode 100644
index 000000000..a14be545e
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/114.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/120.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/120.png
new file mode 100644
index 000000000..b910f96df
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/120.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/128.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/128.png
new file mode 100644
index 000000000..7cf0327dc
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/128.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/144.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/144.png
new file mode 100644
index 000000000..c7f18cda1
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/144.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/152.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/152.png
new file mode 100644
index 000000000..af411d7e3
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/152.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/16.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/16.png
new file mode 100644
index 000000000..be3743a22
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/16.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/167.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/167.png
new file mode 100644
index 000000000..855952774
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/167.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/172.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/172.png
new file mode 100644
index 000000000..a410f8bb2
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/172.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/180.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/180.png
new file mode 100644
index 000000000..fcef493f4
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/180.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/196.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/196.png
new file mode 100644
index 000000000..c974bf14a
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/196.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/20.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/20.png
new file mode 100644
index 000000000..25897fc42
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/20.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/216.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/216.png
new file mode 100644
index 000000000..ea0703112
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/216.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/256.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/256.png
new file mode 100644
index 000000000..f1a3ef352
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/256.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/29.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/29.png
new file mode 100644
index 000000000..1f9ef0678
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/29.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/32.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/32.png
new file mode 100644
index 000000000..d969ed1df
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/32.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/40.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/40.png
new file mode 100644
index 000000000..1f76c0b09
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/40.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/48.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/48.png
new file mode 100644
index 000000000..5279cb807
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/48.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/50.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/50.png
new file mode 100644
index 000000000..8045e514d
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/50.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/512.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/512.png
new file mode 100644
index 000000000..c8f3cb758
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/512.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/55.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/55.png
new file mode 100644
index 000000000..c3d8811f6
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/55.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/57.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/57.png
new file mode 100644
index 000000000..5abf4b377
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/57.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/58.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/58.png
new file mode 100644
index 000000000..fc8cf5df5
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/58.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/60.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/60.png
new file mode 100644
index 000000000..ddc66846c
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/60.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/64.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/64.png
new file mode 100644
index 000000000..ad87d2af1
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/64.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/72.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/72.png
new file mode 100644
index 000000000..b78c47708
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/72.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/76.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/76.png
new file mode 100644
index 000000000..50bab502d
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/76.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/80.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/80.png
new file mode 100644
index 000000000..6a3a31fa6
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/80.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/87.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/87.png
new file mode 100644
index 000000000..13fb01fef
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/87.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/88.png b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/88.png
new file mode 100644
index 000000000..8eb955ca8
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/88.png
Binary files differ
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/Contents.json b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 000000000..87ae131b9
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/AppIconSet.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,299 @@
+{
+ "images" : [
+ {
+ "filename" : "40.png",
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "20x20"
+ },
+ {
+ "filename" : "60.png",
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "20x20"
+ },
+ {
+ "filename" : "29.png",
+ "idiom" : "iphone",
+ "scale" : "1x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "58.png",
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "87.png",
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "80.png",
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "40x40"
+ },
+ {
+ "filename" : "120.png",
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "40x40"
+ },
+ {
+ "filename" : "57.png",
+ "idiom" : "iphone",
+ "scale" : "1x",
+ "size" : "57x57"
+ },
+ {
+ "filename" : "114.png",
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "57x57"
+ },
+ {
+ "filename" : "120.png",
+ "idiom" : "iphone",
+ "scale" : "2x",
+ "size" : "60x60"
+ },
+ {
+ "filename" : "180.png",
+ "idiom" : "iphone",
+ "scale" : "3x",
+ "size" : "60x60"
+ },
+ {
+ "filename" : "20.png",
+ "idiom" : "ipad",
+ "scale" : "1x",
+ "size" : "20x20"
+ },
+ {
+ "filename" : "40.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "20x20"
+ },
+ {
+ "filename" : "29.png",
+ "idiom" : "ipad",
+ "scale" : "1x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "58.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "40.png",
+ "idiom" : "ipad",
+ "scale" : "1x",
+ "size" : "40x40"
+ },
+ {
+ "filename" : "80.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "40x40"
+ },
+ {
+ "filename" : "50.png",
+ "idiom" : "ipad",
+ "scale" : "1x",
+ "size" : "50x50"
+ },
+ {
+ "filename" : "100.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "50x50"
+ },
+ {
+ "filename" : "72.png",
+ "idiom" : "ipad",
+ "scale" : "1x",
+ "size" : "72x72"
+ },
+ {
+ "filename" : "144.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "72x72"
+ },
+ {
+ "filename" : "76.png",
+ "idiom" : "ipad",
+ "scale" : "1x",
+ "size" : "76x76"
+ },
+ {
+ "filename" : "152.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "76x76"
+ },
+ {
+ "filename" : "167.png",
+ "idiom" : "ipad",
+ "scale" : "2x",
+ "size" : "83.5x83.5"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "scale" : "1x",
+ "size" : "1024x1024"
+ },
+ {
+ "filename" : "48.png",
+ "idiom" : "watch",
+ "role" : "notificationCenter",
+ "scale" : "2x",
+ "size" : "24x24",
+ "subtype" : "38mm"
+ },
+ {
+ "filename" : "55.png",
+ "idiom" : "watch",
+ "role" : "notificationCenter",
+ "scale" : "2x",
+ "size" : "27.5x27.5",
+ "subtype" : "42mm"
+ },
+ {
+ "filename" : "58.png",
+ "idiom" : "watch",
+ "role" : "companionSettings",
+ "scale" : "2x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "87.png",
+ "idiom" : "watch",
+ "role" : "companionSettings",
+ "scale" : "3x",
+ "size" : "29x29"
+ },
+ {
+ "filename" : "80.png",
+ "idiom" : "watch",
+ "role" : "appLauncher",
+ "scale" : "2x",
+ "size" : "40x40",
+ "subtype" : "38mm"
+ },
+ {
+ "filename" : "88.png",
+ "idiom" : "watch",
+ "role" : "appLauncher",
+ "scale" : "2x",
+ "size" : "44x44",
+ "subtype" : "40mm"
+ },
+ {
+ "filename" : "100.png",
+ "idiom" : "watch",
+ "role" : "appLauncher",
+ "scale" : "2x",
+ "size" : "50x50",
+ "subtype" : "44mm"
+ },
+ {
+ "filename" : "172.png",
+ "idiom" : "watch",
+ "role" : "quickLook",
+ "scale" : "2x",
+ "size" : "86x86",
+ "subtype" : "38mm"
+ },
+ {
+ "filename" : "196.png",
+ "idiom" : "watch",
+ "role" : "quickLook",
+ "scale" : "2x",
+ "size" : "98x98",
+ "subtype" : "42mm"
+ },
+ {
+ "filename" : "216.png",
+ "idiom" : "watch",
+ "role" : "quickLook",
+ "scale" : "2x",
+ "size" : "108x108",
+ "subtype" : "44mm"
+ },
+ {
+ "idiom" : "watch-marketing",
+ "scale" : "1x",
+ "size" : "1024x1024"
+ },
+ {
+ "filename" : "16.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "16x16"
+ },
+ {
+ "filename" : "32.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "16x16"
+ },
+ {
+ "filename" : "32.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "32x32"
+ },
+ {
+ "filename" : "64.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "32x32"
+ },
+ {
+ "filename" : "128.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "128x128"
+ },
+ {
+ "filename" : "256.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "128x128"
+ },
+ {
+ "filename" : "256.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "256x256"
+ },
+ {
+ "filename" : "512.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "256x256"
+ },
+ {
+ "filename" : "512.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "512x512"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "512x512"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/appiconset.qbs b/tests/auto/blackbox/testdata-apple/ib/appiconset/appiconset.qbs
new file mode 100644
index 000000000..2015032ea
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/appiconset.qbs
@@ -0,0 +1,10 @@
+CppApplication {
+ Depends { name: "ib" }
+ Depends { name: "bundle" }
+ property bool isShallow: {
+ console.info("bundle.isShallow: " + bundle.isShallow);
+ return bundle.isShallow;
+ }
+ files: ["main.c", "AppIconSet.xcassets"]
+ ib.appIconName: "AppIcon"
+}
diff --git a/tests/auto/blackbox/testdata-apple/ib/appiconset/main.c b/tests/auto/blackbox/testdata-apple/ib/appiconset/main.c
new file mode 100644
index 000000000..76e819701
--- /dev/null
+++ b/tests/auto/blackbox/testdata-apple/ib/appiconset/main.c
@@ -0,0 +1 @@
+int main() { return 0; }
diff --git a/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs b/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs
index 94361f34d..6e999adda 100644
--- a/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs
+++ b/tests/auto/blackbox/testdata-apple/ib/assetcatalog/assetcatalogempty.qbs
@@ -17,7 +17,8 @@ Project {
filez.push("empty.xcassets/empty.iconset");
else if (Utilities.versionCompare(xcode.version, "5") >= 0)
filez.push("empty.xcassets");
- if (qbs.hostOSVersionMinor >= 10 // need macOS 10.10 to build SBs
+ if ((qbs.hostOSVersionMajor >= 11
+ || qbs.hostOSVersionMinor >= 10) // need macOS 10.10 or higher to build SBs
&& cpp.minimumMacosVersion !== undefined
&& Utilities.versionCompare(cpp.minimumMacosVersion, "10.10") >= 0)
filez.push("Storyboard.storyboard");
diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.options b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.options
new file mode 100644
index 000000000..60726de93
--- /dev/null
+++ b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.options
@@ -0,0 +1,3 @@
+tutorial.Person.name max_size:128
+tutorial.Person.email max_size:256
+tutorial.Person.phones max_count:16
diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs
index c5bc6d2e3..9640bb888 100644
--- a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs
+++ b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs
@@ -19,9 +19,11 @@ CppApplication {
console.info("has protobuf: " + protobuf.nanopb.present);
return protobuf.nanopb.present;
}
+ protobuf.nanopb.importPaths: product.sourceDirectory
files: [
"addressbook_nanopb.proto",
+ "addressbook_nanopb.options",
"main_nanopb.cpp",
]
}
diff --git a/tests/auto/blackbox/testdata/protobuf/main_nanopb.cpp b/tests/auto/blackbox/testdata/protobuf/main_nanopb.cpp
index d6fa0c73d..76fa03fca 100644
--- a/tests/auto/blackbox/testdata/protobuf/main_nanopb.cpp
+++ b/tests/auto/blackbox/testdata/protobuf/main_nanopb.cpp
@@ -34,6 +34,10 @@
#include "addressbook_nanopb.pb.h"
+static_assert(std::is_array<decltype(std::declval<tutorial_Person>().name)>::value, "");
+static_assert(std::is_array<decltype(std::declval<tutorial_Person>().email)>::value, "");
+static_assert(std::is_array<decltype(std::declval<tutorial_Person>().phones)>::value, "");
+
bool writeString(pb_ostream_t *stream, const pb_field_t *field, void *const *)
{
constexpr auto str = "0123456789";
diff --git a/tests/auto/blackbox/tst_blackboxapple.cpp b/tests/auto/blackbox/tst_blackboxapple.cpp
index 79dbab58f..adde389ec 100644
--- a/tests/auto/blackbox/tst_blackboxapple.cpp
+++ b/tests/auto/blackbox/tst_blackboxapple.cpp
@@ -292,6 +292,36 @@ void TestBlackboxApple::aggregateDependencyLinking()
QVERIFY2(QString::fromUtf8(m_qbsStdout).contains(fatLibPath), m_qbsStdout);
}
+void TestBlackboxApple::appiconset()
+{
+ QDir::setCurrent(testDataDir + QLatin1String("/ib/appiconset"));
+
+ QbsRunParameters params;
+ params.arguments = QStringList() << "-f" << "appiconset.qbs";
+ QCOMPARE(runQbs(params), 0);
+
+ const auto infoPlistPath = getInfoPlistPath(
+ relativeProductBuildDir("appiconset") + "/appiconset.app");
+ QVERIFY(QFile::exists(infoPlistPath));
+ const auto content = readInfoPlistFile(infoPlistPath);
+ QVERIFY(!content.isEmpty());
+
+ if (m_qbsStdout.contains("bundle.isShallow: false")) {
+ QCOMPARE(content.value(QStringLiteral("CFBundleIconFile")), QStringLiteral("AppIcon"));
+ QCOMPARE(content.value(QStringLiteral("CFBundleIconName")), QStringLiteral("AppIcon"));
+ QVERIFY(regularFileExists(relativeProductBuildDir("appiconset")
+ + "/appiconset.app/Contents/Resources/AppIcon.icns"));
+ } else if (m_qbsStdout.contains("bundle.isShallow: true")) {
+ const auto icons = content.value(QStringLiteral("CFBundleIcons")).toMap();
+ QVERIFY2(!icons.isEmpty(), "Info.plist doesn't contain CFBundleIcons key");
+ const auto primaryIcon = icons.value(QStringLiteral("CFBundlePrimaryIcon")).toMap();
+ QVERIFY2(!primaryIcon.isEmpty(), "Info.plist doesn't contain CFBundlePrimaryIcon key");
+ QCOMPARE(primaryIcon.value(QStringLiteral("CFBundleIconName")), QStringLiteral("AppIcon"));
+ } else {
+ QVERIFY2(false, "Cannot determine bundle type");
+ }
+}
+
void TestBlackboxApple::assetCatalog()
{
QFETCH(bool, flatten);
diff --git a/tests/auto/blackbox/tst_blackboxapple.h b/tests/auto/blackbox/tst_blackboxapple.h
index 2a399ad7a..eeaa28d2f 100644
--- a/tests/auto/blackbox/tst_blackboxapple.h
+++ b/tests/auto/blackbox/tst_blackboxapple.h
@@ -48,6 +48,7 @@ public slots:
private slots:
void appleMultiConfig();
void aggregateDependencyLinking();
+ void appiconset();
void assetCatalog();
void assetCatalog_data();
void assetCatalogsEmpty();