diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2014-03-02 02:03:15 -0500 |
---|---|---|
committer | Jake Petroules <jake.petroules@petroules.com> | 2014-03-03 14:26:06 +0100 |
commit | 1c20be2f88f9f539eb0fb8b3e76d03cebeb3f5d2 (patch) | |
tree | 7a00397ddb2c030f93bc0533e200ddb18a80459a /share/qbs/modules/qbs | |
parent | fd5de44814ac91eac96e98495f70745faca7e471 (diff) |
Define hostOSBuildVersion on Windows as well.
This mirrors CoreFoundation's behavior (and makes sense given the name).
Change-Id: I4519978cff507f585378469cf535c2b815172fd4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share/qbs/modules/qbs')
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs index 0d55d86e1..76ec20b9b 100644 --- a/share/qbs/modules/qbs/common.qbs +++ b/share/qbs/modules/qbs/common.qbs @@ -13,8 +13,7 @@ Module { getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductVersion"); } else if (hostOS.contains("windows")) { var version = getNativeSetting("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentVersion"); - var build = getNativeSetting("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentBuildNumber"); - return version + "." + build; + return version + "." + hostOSBuildVersion; } } @@ -22,6 +21,8 @@ Module { if (hostOS.contains("osx")) { return getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductBuildVersion") || getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductBuildVersion"); + } else if (hostOS.contains("windows")) { + return getNativeSetting("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentBuildNumber"); } } @@ -85,9 +86,10 @@ Module { "x.y.z or x.y.z.w where x, y, z and w are positive integers."; } - if (!hostOSBuildVersion && hostOS.contains("osx")) { + if (!hostOSBuildVersion) { throw "Could not detect host operating system build version; " + - "verify that system files have not been tampered with."; + "verify that system files or registry have not been " + + "tampered with."; } } } |