You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2015/07/23 13:18:12 UTC

[10/10] cordova-ubuntu git commit: add default icon

add default icon


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

Branch: refs/heads/master
Commit: e312e20b847166d7ebe9d13c15f5942c3d19f7cf
Parents: 49bbb5a
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jul 23 11:35:49 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:35:49 2015 +0300

----------------------------------------------------------------------
 bin/templates/project/cordova/lib/manifest.js |   6 +++---
 default_icon.png                              | Bin 0 -> 35964 bytes
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/e312e20b/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 abb976e..bdc49ca 100644
--- a/bin/templates/project/cordova/lib/manifest.js
+++ b/bin/templates/project/cordova/lib/manifest.js
@@ -45,14 +45,14 @@ module.exports = {
     generateDesktopFile: function(config, dir) {
         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, '../..', config.icon()))) {
             Utils.cp(path.join(dir, '../..', config.icon()), path.join(dir, 'www'));
 
             content += '\nIcon=www/' + path.basename(config.icon());
         } else {
-            logger.error("Missing icon");
-            process.exit(1);
+            Utils.cp(path.join(dir, 'build', 'default_icon.png'), path.join(dir, 'www'));
+
+            content += '\nIcon=www/default_icon.png';
         }
 
         fs.writeFileSync(path.join(dir, 'cordova.desktop'), content);

http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/e312e20b/default_icon.png
----------------------------------------------------------------------
diff --git a/default_icon.png b/default_icon.png
new file mode 100644
index 0000000..72331a3
Binary files /dev/null and b/default_icon.png differ


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