diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-06-17 15:09:26 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-06-27 16:57:35 +0000 |
commit | 33e9cd462a6c7b6dc552669361f4321ffdb22ff3 (patch) | |
tree | 2b81a986c4e6c7f3094a8e5ed959bf2a8fcd057a /share/qbs/modules/qbs/common.qbs | |
parent | 0b0832aaf4cc26bee202207c8cbe64650ee2d2fd (diff) |
Do the OS X to macOS rename.v1.5.2
[ChangeLog] The "osx" value in qbs.hostOS and qbs.targetOS has been
replaced with "macos". For backwards compatibility, qbs.hostOS will
still contain "osx" in addition to "macos", and an error will be printed
if qbs.targetOS contains "osx" but not "macos". Specifying "macos"
without "osx" is allowed. These checks are subject to be removed in a
future version of qbs, so update your hostOS and targetOS checks
accordingly.
[ChangeLog] cpp.minimumOsxVersion has been deprecated and replaced with
cpp.minimumMacosVersion. cpp.minimumOsxVersion is subject to be removed
in a future version of qbs, so update your projects accordingly.
Change-Id: I479891829dff6eb6750cb2a04e1395f085896f63
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'share/qbs/modules/qbs/common.qbs')
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs index 3732b91a7..9891cf407 100644 --- a/share/qbs/modules/qbs/common.qbs +++ b/share/qbs/modules/qbs/common.qbs @@ -42,7 +42,7 @@ Module { property string optimization: (buildVariant == "debug" ? "none" : "fast") readonly property stringList hostOS: undefined // set internally property string hostOSVersion: { - if (hostOS && hostOS.contains("osx")) { + if (hostOS && hostOS.contains("macos")) { return Utilities.getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductVersion") || Utilities.getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductVersion"); } else if (hostOS && hostOS.contains("windows")) { @@ -52,7 +52,7 @@ Module { } property string hostOSBuildVersion: { - if (hostOS.contains("osx")) { + if (hostOS.contains("macos")) { return Utilities.getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductBuildVersion") || Utilities.getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductBuildVersion"); } else if (hostOS.contains("windows")) { @@ -96,7 +96,13 @@ Module { var validator = new ModUtils.PropertyValidator("qbs"); validator.setRequiredProperty("hostOS", hostOS); validator.setRequiredProperty("targetOS", targetOS); - if (hostOS && (hostOS.contains("windows") || hostOS.contains("osx"))) { + validator.addCustomValidator("targetOS", targetOS, function (value) { + if (!value || (value.contains("osx") && !value.contains("macos"))) + return false; + return true; + }, "the value 'osx' has been replaced by 'macos'; use that instead and update " + + "hostOS and targetOS condition checks in your project accordingly"); + if (hostOS && (hostOS.contains("windows") || hostOS.contains("macos"))) { validator.setRequiredProperty("hostOSVersion", hostOSVersion, "could not detect host operating system version; " + "verify that system files and registry keys have not " + |