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>
This commit is contained in:
Andrew Knight 2014-04-29 09:47:24 +03:00 committed by The Qt Project
parent 0edb21df15
commit 7c12cd0ebb
3 changed files with 23 additions and 1 deletions

View File

@ -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}\"

View File

@ -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)

View File

@ -2411,6 +2411,9 @@
\li capabilities_device
\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.
@ -2437,6 +2440,10 @@
\li identity
\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.