You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2013/11/26 03:02:16 UTC
[04/16] git commit: Update appxmanifest properties' DisplayName and
PublisherName
Update appxmanifest properties' DisplayName and PublisherName
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/02162b40
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/02162b40
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/02162b40
Branch: refs/heads/master
Commit: 02162b40bb24c106202cd832fc422110cc0e8dbb
Parents: 912e012
Author: SomaticIT <co...@somatic.fr>
Authored: Fri Nov 15 16:51:02 2013 +0100
Committer: SomaticIT <co...@somatic.fr>
Committed: Fri Nov 15 16:51:02 2013 +0100
----------------------------------------------------------------------
src/metadata/windows8_parser.js | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/02162b40/src/metadata/windows8_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/windows8_parser.js b/src/metadata/windows8_parser.js
index d0bf4ed..ef6f771 100644
--- a/src/metadata/windows8_parser.js
+++ b/src/metadata/windows8_parser.js
@@ -82,6 +82,7 @@ module.exports.prototype = {
var version = this.fixConfigVersion(config);
var name = config.name();
var pkgName = config.packageName();
+ var author = config.author();
var identityNode = manifest.find('.//Identity');
if(identityNode) {
@@ -126,14 +127,31 @@ module.exports.prototype = {
' with a <Application> node');
}
+ // Update properties
+ var properties = manifest.find('.//Properties');
+ if (properties) {
+ var displayNameElement = properties.find('.//DisplayName');
+ if (displayNameElement) {
+ var displayName = displayNameElement.text;
+ if (displayName != name) {
+ displayNameElement.text = name;
+ }
+ }
+ var publisherNameElement = properties.find('.//PublisherDisplayName');
+ if (publisherNameElement) {
+ var publisherName = publisherNameElement.text;
+ if (publisherName != author) {
+ publisherNameElement.text = author;
+ }
+ }
+ }
+ // Update content (start page) element
+ this.config.content(config.content());
- // Update content (start page) element
- this.config.content(config.content());
-
- //Write out manifest
- fs.writeFileSync(this.manifest_path, manifest.write({indent: 4}), 'utf-8');
+ //Write out manifest
+ fs.writeFileSync(this.manifest_path, manifest.write({indent: 4}), 'utf-8');
},
// Returns the platform-specific www directory.