diff options
authorMaurice Kalinowski <>2016-08-22 16:06:02 +0200
committerMaurice Kalinowski <>2016-08-25 13:27:22 +0000
commitf4b2115b511ef95f921460d70957788ab496b70b (patch)
parent3525ede0a5a17ca01b9b92d72df0a1a6b7e77e5d (diff)
winrt: Add support for version requirements for MSVC2015
Previously we hardcoded the minimum windows version to the initial Windows 10 release. However features have been added which require a higher SDK version (eg drag and drop). Deploying such a package might fail during distribution to consumer devices. Hence introduce WINRT_MANIFEST.minVersion and WINRT_MANIFEST.maxVersionTested as variables for the manifest file. If nothing is specified, both values will be set to the UCRTVersion environment variable, implying the development setup from which qmake has been invoked. Change-Id: I1dcf1e75c67c4ab2fd5a3fdcc32c8783a336e6ff Reviewed-by: Oliver Wolff <> Reviewed-by: Oswald Buddenhagen <>
3 files changed, 17 insertions, 1 deletions
diff --git a/mkspecs/common/winrt_winphone/manifests/10.0/ b/mkspecs/common/winrt_winphone/manifests/10.0/
index fc6bfcebcf..9c25feb43f 100644
--- a/mkspecs/common/winrt_winphone/manifests/10.0/
+++ b/mkspecs/common/winrt_winphone/manifests/10.0/
@@ -22,7 +22,9 @@
- <TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10586.0\" MaxVersionTested=\"10.0.10586.0\" />$${WINRT_MANIFEST.dependencies}
+ <TargetDeviceFamily Name=\"Windows.Universal\"
+ MinVersion=\"$${WINRT_MANIFEST.minVersion}\"
+ MaxVersionTested=\"$${WINRT_MANIFEST.maxVersionTested}\" />$${WINRT_MANIFEST.dependencies}
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index 291ebec6e9..e17bda3c8e 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -31,6 +31,8 @@
# WINRT_MANIFEST.capabilities: Specifies capabilities to add to the capability list.
# WINRT_MANIFEST.capabilities_device: Specifies device capabilities to add to the capability list. (location, webcam...)
# WINRT_MANIFEST.dependencies: Specifies dependencies required by the package.
+# WINRT_MANIFEST.minVersion: Specifies the minimum required Windows version to run the package. Defaults to %UCRTVersion%
+# WINRT_MANIFEST.maxVersionTested: Specifies the maximum Windows version the package has been tested against. Defaults to WINRT_MANIFEST.minVersion
# The manifest is generated for each build pass for normal apps, and only once for vcapps.
# - Normal apps have their package root directory in the same place as the target (one for each build pass).
@@ -91,6 +93,11 @@
isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
+ *-msvc2015 {
+ isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion)
+ isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment."))
+ isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion
+ }
INDENT = "$$escape_expand(\\r\\n) "
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index ea400c5faf..7386af881e 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -2693,6 +2693,13 @@
\li version
\li The version number of the package. Defaults to \c{}.
+ \row
+ \li minVersion
+ \li The minimum required Windows version to run the package. Defaults to the environment variable \c UCRTVersion.
+ \row
+ \li maxVersionTested
+ \li The maximum Windows version the package has been tested against. Defaults to \c WINRT_MANIFEST.minVersion
You can use any combination of those values.