summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2014-11-03 17:44:50 +0100
committerMaurice Kalinowski <maurice.kalinowski@theqtcompany.com>2014-11-07 11:13:02 +0100
commit2f7d0838b8fd338b20eb7059caf6bc5fba6e5266 (patch)
tree468cab8726bcaeab7e9b1dffb2ac18b85c068fd3 /mkspecs
parent7a593e0d00abd0d8930fd7cdd8334a42fca7da6d (diff)
WinRT: Add missing manifest specifier for rotation
Add WINRT_MANIFEST.rotation_preference as description which orientation is allowed or preferred by the app. Valid values for Windows Phone are portrait, landscape, landscapeFlipped. WinRT also allows portraitFlipped Task-number: QTBUG-40830 Change-Id: I6b11afcdb72c2c158dadddafc5d90c1d18ab9d8b Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in2
-rw-r--r--mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in2
-rw-r--r--mkspecs/features/winrt/package_manifest.prf15
3 files changed, 17 insertions, 2 deletions
diff --git a/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in
index 97d3407403..a6fc9697f4 100644
--- a/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in
+++ b/mkspecs/common/winrt_winphone/manifests/8.1/AppxManifest.xml.in
@@ -34,7 +34,7 @@
<m2:ShowOn Tile=\"square150x150Logo\" />
</m2:ShowNameOnTiles>
</m2:DefaultTile>
- <m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_splash}\" />
+ <m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_splash}\" />$${WINRT_MANIFEST.rotation_preference}
</m2:VisualElements>
</Application>
</Applications>$${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies}
diff --git a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
index cf18a4dc79..b75570ad4e 100644
--- a/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
+++ b/mkspecs/common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
@@ -37,7 +37,7 @@
<m3:ShowOn Tile=\"square150x150Logo\" />
</m3:ShowNameOnTiles>
</m3:DefaultTile>
- <m3:SplashScreen Image=\"$${WINRT_MANIFEST.logo_480x800}\" />
+ <m3:SplashScreen Image=\"$${WINRT_MANIFEST.logo_480x800}\" />$${WINRT_MANIFEST.rotation_preference}
</m3:VisualElements>
</Application>
</Applications>$${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies}
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index b4242bfdaa..2ccb5db963 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -24,6 +24,7 @@
# WINRT_MANIFEST.logo_medium: Medium logo image file. Default provided by the mkspec.
# WINRT_MANIFEST.logo_large: Large logo image file. Default provided by the mkspec.
# WINRT_MANIFEST.splash_screen: Splash screen image file. Default provided by the mkspec.
+# WINRT_MANIFEST.rotation_preference: Orientation specification. Default is empty. (portrait, landscape, landscapeFlipped)
# WINRT_MANIFEST.iconic_tile_icon: Image file for the "iconic" tile template icon. Default provided by the mkspec.
# WINRT_MANIFEST.iconic_tile_small: Image file for the small "iconic" tile template logo. Default provided by the mkspec.
# WINRT_MANIFEST.default_language: Specifies the default language of the application
@@ -87,6 +88,20 @@
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
+ INDENT = "$$escape_expand(\\r\\n) "
+
+ VS_XML_NAMESPACE = "m2"
+ winphone: VS_XML_NAMESPACE = "m3"
+ WINRT_MANIFEST.rotation_preference = $$unique(WINRT_MANIFEST.rotation_preference)
+ !isEmpty(WINRT_MANIFEST.rotation_preference) {
+ MANIFEST_ROTATION += "<$${VS_XML_NAMESPACE}:InitialRotationPreference>"
+ for(ROTATION, WINRT_MANIFEST.rotation_preference): \
+ MANIFEST_ROTATION += " <$${VS_XML_NAMESPACE}:Rotation Preference=\"$$ROTATION\" />"
+ MANIFEST_ROTATION += "</$${VS_XML_NAMESPACE}:InitialRotationPreference>"
+
+ WINRT_MANIFEST.rotation_preference = $$join(MANIFEST_ROTATION, $$INDENT, $$INDENT)
+ }
+
INDENT = "$$escape_expand(\\r\\n) "
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)