Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 31D02182FD for ; Thu, 23 Jul 2015 11:18:04 +0000 (UTC) Received: (qmail 39368 invoked by uid 500); 23 Jul 2015 11:18:04 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 39313 invoked by uid 500); 23 Jul 2015 11:18:04 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 39095 invoked by uid 99); 23 Jul 2015 11:18:03 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jul 2015 11:18:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AE62AE3C3B; Thu, 23 Jul 2015 11:18:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zaspire@apache.org To: commits@cordova.apache.org Date: Thu, 23 Jul 2015 11:18:06 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [04/10] cordova-ubuntu git commit: build: misc fix 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 Authored: Mon Jan 19 17:31:57 2015 +0300 Committer: Maxim Ermilov 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