You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/15 14:41:11 UTC

[cordova-windows] branch janpio-requirements_checks created (now 129b988)

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a change to branch janpio-requirements_checks
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git.


      at 129b988  new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line

This branch includes the following new commits:

     new 06fae9f  better output in `cordova requirements` when VS is chosen because of VSINSTALLDIR
     new 75bc2f0  default script `check_reqs` to building 10.0 apps so it can actually return something instead of crashing
     new 129b988  new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

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


[cordova-windows] 03/03: new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-requirements_checks
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit 129b988f37de1a05d47bc733ddf4dd7862001774
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 14 18:54:27 2018 +0100

    new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line
---
 bin/check_all         | 34 ++++++++++++++++++++++++++++++++++
 bin/check_all.bat     | 25 +++++++++++++++++++++++++
 bin/lib/check_reqs.js | 11 +++++++++--
 3 files changed, 68 insertions(+), 2 deletions(-)

diff --git a/bin/check_all b/bin/check_all
new file mode 100644
index 0000000..84c9c97
--- /dev/null
+++ b/bin/check_all
@@ -0,0 +1,34 @@
+#!/usr/bin/env node
+
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+
+var check_reqs = require('./lib/check_reqs');
+
+// check for help flag
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
+    check_reqs.help();
+} else {
+  check_reqs.check_all().done(function success(result) {
+      console.log('check_all', result);
+  }, function (err) {
+      console.error('Error: ' + err);
+      process.exit(2);
+  });
+}
diff --git a/bin/check_all.bat b/bin/check_all.bat
new file mode 100644
index 0000000..4a7557d
--- /dev/null
+++ b/bin/check_all.bat
@@ -0,0 +1,25 @@
+:: Licensed to the Apache Software Foundation (ASF) under one
+:: or more contributor license agreements.  See the NOTICE file
+:: distributed with this work for additional information
+:: regarding copyright ownership.  The ASF licenses this file
+:: to you under the Apache License, Version 2.0 (the
+:: "License"); you may not use this file except in compliance
+:: with the License.  You may obtain a copy of the License at
+:: 
+:: http://www.apache.org/licenses/LICENSE-2.0
+:: 
+:: Unless required by applicable law or agreed to in writing,
+:: software distributed under the License is distributed on an
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+:: KIND, either express or implied.  See the License for the
+:: specific language governing permissions and limitations
+:: under the License
+@ECHO OFF
+SET script_path="%~dp0check_all"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'check_all' script in 'bin' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 99d0878..bd57bef 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -388,8 +388,15 @@ function getConfig () {
         config = config || new ConfigParser(path.join(__dirname, '../../config.xml'));
         return Q(config);
     } catch (e) {
-        return Q.reject(new CordovaError('Can\'t check requirements for Windows platform.' +
-            'The config.xml file is either missing or malformed.'));
+        // try again to cover case of being called from command line
+        try {
+            config = config || new ConfigParser(path.join(__dirname, '../../template/config.xml'));
+            return Q(config);
+        } catch (e) {
+            // yeah, really no config.xml
+            return Q.reject(new CordovaError('Can\'t check requirements for Windows platform.' +
+                'The config.xml file is either missing or malformed.'));
+        }
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

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


[cordova-windows] 01/03: better output in `cordova requirements` when VS is chosen because of VSINSTALLDIR

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-requirements_checks
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit 06fae9f21fba7350f17fb9091a8d7d31ae7116a6
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 14 18:46:51 2018 +0100

    better output in `cordova requirements` when VS is chosen because of VSINSTALLDIR
---
 bin/lib/check_reqs.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 9b76e39..b2eb148 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -287,7 +287,7 @@ var checkVS = function (windowsTargetVersion, windowsPhoneTargetVersion) {
     var vsRequiredVersion = getMinimalRequiredVersionFor('visualstudio', windowsTargetVersion, windowsPhoneTargetVersion);
 
     if (process.env.VSINSTALLDIR) {
-        return Q('(user-specified)');
+        return Q('(user-specified via VSINSTALLDIR)');
     }
     return getInstalledVSVersions()
         .then(function (installedVersions) {

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

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


[cordova-windows] 02/03: default script `check_reqs` to building 10.0 apps so it can actually return something instead of crashing

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch janpio-requirements_checks
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit 75bc2f0c3f418cb817c7d8eabda5c3ccad78e35a
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 14 18:47:35 2018 +0100

    default script `check_reqs` to building 10.0 apps so it can actually return something instead of crashing
---
 bin/lib/check_reqs.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index b2eb148..99d0878 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -339,7 +339,7 @@ var checkPhoneSdk = function (windowsTargetVersion, windowsPhoneTargetVersion) {
 };
 
 module.exports.run = function () {
-    return checkOS().then(function () {
+    return checkOS('10.0', '10.0').then(function () {
         return MSBuildTools.findAvailableVersion();
     });
 };

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

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