cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zasp...@apache.org
Subject [04/10] cordova-ubuntu git commit: build: misc fix
Date Thu, 23 Jul 2015 11:18:06 GMT
build: misc fix


Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/84c68f69
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/84c68f69
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/84c68f69

Branch: refs/heads/master
Commit: 84c68f69bf1afddf4ddff36cbf8900c6a18f0e74
Parents: e6cfbb8
Author: Maxim Ermilov <maxim.ermilov@canonical.com>
Authored: Mon Jan 19 17:31:57 2015 +0300
Committer: Maxim Ermilov <maxim.ermilov@canonical.com>
Committed: Thu Jul 23 11:03:13 2015 +0300

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/manifest.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/84c68f69/bin/templates/project/cordova/lib/manifest.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/manifest.js b/bin/templates/project/cordova/lib/manifest.js
index 9afa3ad..99f18d0 100644
--- a/bin/templates/project/cordova/lib/manifest.js
+++ b/bin/templates/project/cordova/lib/manifest.js
@@ -21,6 +21,7 @@ var ConfigParser = require('./config_parser');
 var path         = require('path');
 var fs           = require('fs');
 var logger       = require('./logger');
+var Utils        = require('./utils');
 
 function sanitize(str) {
     return str.replace(/\n/g, ' ').replace(/^\s+|\s+$/g, '');
@@ -30,6 +31,12 @@ module.exports = {
     generate: function(path, outDir) {
         var config = new ConfigParser(path);
 
+
+        if (!config.author()) {
+            logger.error("\nconfig.xml should contain author");
+            process.exit(1);
+        }
+
         this.generateDesktopFile(config, outDir);
         this.generateManifest(config, outDir);
         this.generateApparmorProfile(config, outDir);
@@ -39,7 +46,9 @@ module.exports = {
         var name = sanitize(config.name()); //FIXME: escaping
         var content = '[Desktop Entry]\nName=' + name + '\nExec=./cordova-ubuntu www/\nTerminal=false\nType=Application\nX-Ubuntu-Touch=true';
 
-        if (config.icon() && fs.existsSync(path.join(dir, 'www', config.icon())))
{
+        if (config.icon() && fs.existsSync(path.join(dir, '../..', config.icon())))
{
+            Utils.cp(path.join(dir, '../..', config.icon()), path.join(dir, 'www'));
+
             content += '\nIcon=www/' + config.icon();
         } else {
             logger.error("Missing icon");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message