cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [04/11] git commit: Fixes 2 issues while adding amazon-fireos platform after fresh cordova install. 1. create.js updated to create "libs" folder before copying it to the project's platform folder. 2. check_reqs.js updated to report error and abort if awv
Date Tue, 06 May 2014 20:59:14 GMT
Fixes 2 issues while adding amazon-fireos platform after fresh cordova install.
1. create.js updated to create "libs" folder before copying it to the project's platform folder.
2. check_reqs.js updated to report error and abort if awv_interface.jar is missing from libs
folder.


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/09b340fd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/09b340fd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/09b340fd

Branch: refs/heads/master
Commit: 09b340fd9090f1ff08dfd2153e009ba9d37f6341
Parents: 037f775
Author: Archana Naik <naika@lab126.com>
Authored: Wed Apr 2 13:06:51 2014 -0700
Committer: Archana Naik <naika@lab126.com>
Committed: Tue May 6 13:58:46 2014 -0700

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 7 ++++++-
 bin/lib/create.js     | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/09b340fd/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index b15a9b6..3525aa8 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -79,7 +79,12 @@ module.exports.check_android = function() {
     return d.promise.then(function(output) {
         if (!output.match(valid_target)) {
             return Q.reject(new Error('Please install Android target ' + valid_target.split('-')[1]
+ ' (the Android newest SDK). Make sure you have the latest Android tools installed as well.
Run \"android\" from your command-line to install/update any missing SDKs or tools.'));
-        } 
+        } else {
+            var awv_interface_expected_path=path.join(ROOT, 'framework','libs');
+            if (!fs.existsSync(path.join(awv_interface_expected_path,awv_interface))) {
+                return Q.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.'));
+                }
+        }
         return Q();
     }, function(stderr) {
         if (stderr.match(/command\snot\sfound/)) {

http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/09b340fd/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 1eacdfb..42911e7 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -69,6 +69,7 @@ function copyJsAndLibrary(projectPath, shared, projectName) {
     });
     if (!shared) {
         shell.mkdir('-p', nestedCordovaLibPath);
+        shell.mkdir('-p', path.join(ROOT, 'framework', 'libs'));
         shell.cp('-f', path.join(ROOT, 'framework', 'AndroidManifest.xml'), nestedCordovaLibPath);
         shell.cp('-f', path.join(ROOT, 'framework', 'project.properties'), nestedCordovaLibPath);
         shell.cp('-r', path.join(ROOT, 'framework', 'src'), nestedCordovaLibPath);


Mime
View raw message