summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mkspecs/common/winrt_winphone/manifests/8.0/WMAppManifest.xml.in2
-rw-r--r--mkspecs/features/winrt/package_manifest.prf15
-rw-r--r--qmake/doc/src/qmake-manual.qdoc7
3 files changed, 23 insertions, 1 deletions
diff --git a/mkspecs/common/winrt_winphone/manifests/8.0/WMAppManifest.xml.in b/mkspecs/common/winrt_winphone/manifests/8.0/WMAppManifest.xml.in
index 5efb9c7b06..18d37cf7fc 100644
--- a/mkspecs/common/winrt_winphone/manifests/8.0/WMAppManifest.xml.in
+++ b/mkspecs/common/winrt_winphone/manifests/8.0/WMAppManifest.xml.in
@@ -1,6 +1,6 @@
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<Deployment xmlns=\"http://schemas.microsoft.com/windowsphone/2012/deployment\" AppPlatformVersion=\"8.0\">
- <DefaultLanguage xmlns=\"\" code=\"en-US\" />
+ <DefaultLanguage xmlns=\"\" code=\"$${WINRT_MANIFEST.default_language}\" />$${WINRT_MANIFEST.languages}
<App xmlns=\"\"
ProductID=\"$${WINRT_MANIFEST.identity}\"
Title=\"$${WINRT_MANIFEST.name}\"
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)
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 91629ec9dd..8032b08d6f 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -2412,6 +2412,9 @@
\li Specifies device capabilities to add to the capability list
(location, webcam, and so on). This option is not available on Windows Phone.
\row
+ \li default_language
+ \li The default language code of the application. Defaults to "en".
+ \row
\li dependencies
\li Specifies dependencies required by the package.
\row
@@ -2438,6 +2441,10 @@
\li The unique ID of the app. Defaults to reusing the existing generated
manifest's UUID, or generates a new UUID if none is present.
\row
+ \li languages
+ \li A list of additional language codes supported by the application. This list
+ is empty by default.
+ \row
\li logo_large
\li Large logo image file. Default provided by the mkspec.
\row