summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2014-04-29 09:47:24 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-30 08:48:15 +0200
commit7c12cd0ebb465b6d0714a22d5630872e600be654 (patch)
tree13b1e4c1aef05f82de7a63f2b0214ca073791424 /mkspecs/features
parent0edb21df154cd2469ba91ea95c8c6464d1140c8d (diff)
Windows Phone: add language control to the package manifest
This allows the developer to provide a list of languages to the manifest by listing them in WINRT_MANIFEST.languages. It also allows setting the default language with WINRT_MANIFEST.default_language. Task-number: QTBUG-38557 Change-Id: I5cb94c9f45146e3068d0833b9e669dc17dca14b2 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/winrt/package_manifest.prf15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index fda4fb5e8f..444b8b873e 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -27,6 +27,8 @@
# WINRT_MANIFEST.splash_screen: Splash screen image file. Default provided by the mkspec.
# 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
+# WINRT_MANIFEST.languages: Specifies the languages the application supports
# 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.
@@ -90,10 +92,23 @@
isEmpty(WINRT_MANIFEST.genre): WINRT_MANIFEST.genre = apps.normal
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
winphone: INDENT = "$$escape_expand(\\r\\n) "
else: INDENT = "$$escape_expand(\\r\\n) "
+ # Languages are given as a string list
+ WINRT_MANIFEST.languages = $$unique(WINRT_MANIFEST.languages)
+ winphone:equals(WINSDK_VER, 8.0):!isEmpty(WINRT_MANIFEST.languages) {
+ for(LANGUAGE, WINRT_MANIFEST.languages): \
+ MANIFEST_LANGUAGES += "<Language code=\"$$LANGUAGE\" />"
+
+ WINRT_MANIFEST.languages = \
+ $$join(MANIFEST_LANGUAGES, $$INDENT, \
+ "$$escape_expand(\\r\\n) <Languages xmlns=\"\">$$INDENT", \
+ "$$escape_expand(\\r\\n) </Languages>")
+ }
+
# Capabilities are given as a string list and may change with the configuration (network, sensors, etc.)
WINRT_MANIFEST.capabilities = $$unique(WINRT_MANIFEST.capabilities)
WINRT_MANIFEST.capabilities_device = $$unique(WINRT_MANIFEST.capabilities_device)