Github user TimBarham commented on a diff in the pull request: https://github.com/apache/cordova-wp8/pull/82#discussion_r31070971 --- Diff: bin/lib/check_reqs.js --- @@ -17,17 +17,100 @@ under the License. */ -var Q = require('Q'), - os = require('os'), +var Q = require('Q'); + +var MSBuildTools; +try { MSBuildTools = require('../../template/cordova/lib/MSBuildTools'); +} catch (ex) { + // If previous import fails, we probably running this script + // from installed platform and the module location is different. + MSBuildTools = require('./MSBuildTools'); +} + +/** + * Check if current OS is supports building windows platform + * @return {Promise} Promise either fullfilled or rejected with error message. + */ +var checkOS = function () { + var platform = process.platform; + return (platform === 'win32') ? + Q.resolve(platform): + // Build Universal windows apps available for windows platform only, so we reject on others platforms + Q.reject('Cordova tooling for Windows requires Windows OS to build project'); +}; + +/** + * Checks if MSBuild tools is available. + * @return {Promise} Promise either fullfilled with MSBuild version + * or rejected with error message. + */ +var checkMSBuild = function () { + return MSBuildTools.findAvailableVersion() + .then(function (msbuildTools) { + // return Q.resolve('MSBuild tools v.' + msbuildTools.version + ' found at ' + msbuildTools.path); --- End diff -- Remove commented line.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org