cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [12/16] git commit: Added check for awv_interface.jar existance.
Date Fri, 06 Dec 2013 01:30:41 GMT
Added check for awv_interface.jar existance.


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

Branch: refs/heads/master
Commit: 90866b7dc5214ef05ccd74d71630aae2b320ec81
Parents: 4722c3f
Author: Archana Naik <naika@lab126.com>
Authored: Fri Nov 15 12:41:57 2013 -0800
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Thu Dec 5 17:07:27 2013 -0800

----------------------------------------------------------------------
 src/metadata/amazon_fireos_parser.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/90866b7d/src/metadata/amazon_fireos_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/amazon_fireos_parser.js b/src/metadata/amazon_fireos_parser.js
index 555826e..dbbfcbc 100644
--- a/src/metadata/amazon_fireos_parser.js
+++ b/src/metadata/amazon_fireos_parser.js
@@ -27,6 +27,8 @@ var fs            = require('fs'),
     Q             = require('q'),
     config_parser = require('../config_parser');
 
+var awv_interface='awv_interface.jar';
+
 var default_prefs = {
     "useBrowserHistory":"true",
     "exit-on-suspend":"false"
@@ -71,7 +73,13 @@ module.exports.check_requirements = function(project_root) {
                     if (err) {
                         d2.reject(new Error('Error updating the Cordova library to work with
your Android environment. Command run: "' + cmd + '", output: ' + output));
                     } else {
-                        d2.resolve();
+                        events.emit('log', 'Checking if ' + awv_interface + ' exists... in
framework/libs folder');
+                        var awv_interface_expected_path=path.join(framework_path,'libs');
+                        if (!fs.existsSync(path.join(awv_interface_expected_path,awv_interface)))
{
+                            d2.reject(new Error('awv_interface.jar not found in ' + awv_interface_expected_path
+' folder. \nPlease download the AmazonWebView SDK from http://developer.amazon.com/sdk/fire/IntegratingAWV.html#installawv
and copy the awv_interface.jar file to this folder:' + awv_interface_expected_path + ' and
re-run cordova platform add amazon-fireos command.'));
+                        } else {
+                            d2.resolve();
+                        }
                     }
                 });
                 d.resolve(d2.promise);


Mime
View raw message