You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/12/06 02:30:31 UTC
[02/16] git commit: Added check for awv_interface.jar existance.
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/62fd958a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/62fd958a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/62fd958a
Branch: refs/heads/master
Commit: 62fd958a7ed93129025b5743e19d075ccf116a0b
Parents: 16a3003
Author: Archana Naik <na...@lab126.com>
Authored: Fri Nov 15 12:41:57 2013 -0800
Committer: Archana Naik <na...@lab126.com>
Committed: Fri Nov 15 12:41:57 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/62fd958a/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);