diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-07-19 17:57:48 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-07-20 16:02:24 +0000 |
commit | cb958a58d9d5335588cf393c2d1bfe3ad9fe6276 (patch) | |
tree | 7c671b2aa9f4391e5200f871678076f46a36d6d5 | |
parent | 1ba4cceafa1c33207c88d6e897b841680b1f4754 (diff) | |
download | qbs-cb958a58d9d5335588cf393c2d1bfe3ad9fe6276.tar.gz |
xcode: Fix Xcode 12.0 support
The *.xcspec files for macOS were moved into the *.ideplugin directory
similar to how it is done for iOS/tvOS/etc.
Fixes: QBS-1582
Change-Id: I478742c4b52b08f7feee4108272da7bf2b12a744
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | share/qbs/modules/bundle/BundleModule.qbs | 4 | ||||
-rw-r--r-- | share/qbs/modules/bundle/bundle.js | 13 | ||||
-rw-r--r-- | share/qbs/modules/xcode/xcode.js | 4 |
3 files changed, 19 insertions, 2 deletions
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index f285c6e61..bf2555fa3 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -52,6 +52,7 @@ Module { property bool useXcodeBuildSpecs: _useXcodeBuildSpecs property bool isMacOs: qbs.targetOS.contains("macos") property bool xcodePresent: xcode.present + property string xcodeVersion: xcode.version // Note that we include several settings pointing to properties which reference the output // of this probe (WRAPPER_NAME, WRAPPER_EXTENSION, etc.). This is to ensure that derived @@ -83,8 +84,7 @@ Module { var specsPath = path; var specsSeparator = "-"; if (xcodeDeveloperPath && useXcodeBuildSpecs) { - specsPath = xcodeDeveloperPath - + "/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications"; + specsPath = Bundle.macOSSpecsPath(xcodeVersion, xcodeDeveloperPath); specsSeparator = " "; } diff --git a/share/qbs/modules/bundle/bundle.js b/share/qbs/modules/bundle/bundle.js index 2354d88b5..6d9305702 100644 --- a/share/qbs/modules/bundle/bundle.js +++ b/share/qbs/modules/bundle/bundle.js @@ -28,9 +28,11 @@ ** ****************************************************************************/ +var FileInfo = require("qbs.FileInfo"); var DarwinTools = require("qbs.DarwinTools"); var ModUtils = require("qbs.ModUtils"); var Process = require("qbs.Process"); +var Utilities = require("qbs.Utilities"); // HACK: Workaround until the PropertyList extension is supported cross-platform var TextFile = require("qbs.TextFile"); @@ -147,6 +149,17 @@ function _assign(target, source) { } } +function macOSSpecsPath(version, developerPath) { + if (Utilities.versionCompare(version, "12") >= 0) { + return FileInfo.joinPaths( + developerPath, "Platforms", "MacOSX.platform", "Developer", "Library", "Xcode", + "PrivatePlugIns", "IDEOSXSupportCore.ideplugin", "Contents", "Resources"); + } + return FileInfo.joinPaths( + developerPath, "Platforms", "MacOSX.platform", "Developer", "Library", "Xcode", + "Specifications"); +} + var XcodeBuildSpecsReader = (function () { function XcodeBuildSpecsReader(specsPath, separator, additionalSettings, useShallowBundles) { this._additionalSettings = additionalSettings; diff --git a/share/qbs/modules/xcode/xcode.js b/share/qbs/modules/xcode/xcode.js index 48cf3d772..9c87e09dc 100644 --- a/share/qbs/modules/xcode/xcode.js +++ b/share/qbs/modules/xcode/xcode.js @@ -183,6 +183,10 @@ function provisioningProfilePlistContents(filePath) { function archsSpecsPath(version, targetOS, platformType, platformPath, devicePlatformPath) { var _specsPluginBaseName; + if (Utilities.versionCompare(version, "12") >= 0) { + if (targetOS.contains("macos")) + _specsPluginBaseName = "OSX"; + } if (Utilities.versionCompare(version, "7") >= 0) { if (targetOS.contains("ios")) _specsPluginBaseName = "iOSPlatform"; |