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:46:01 UTC
[cordova-windows] 09/26: move method
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-msbuild_cleanup
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit d6a8e7b11ceba7b2b82c27ba4bbe6c8ba94d3078
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 14 19:30:31 2018 +0100
move method
---
template/cordova/lib/MSBuildTools.js | 51 ++++++++++++++++++------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/template/cordova/lib/MSBuildTools.js b/template/cordova/lib/MSBuildTools.js
index 5d9fe2c..43dcf25 100644
--- a/template/cordova/lib/MSBuildTools.js
+++ b/template/cordova/lib/MSBuildTools.js
@@ -184,31 +184,6 @@ function checkMSBuildVersion (version) {
});
}
-// returns an array of available UAP Versions
-// prepare.js
-module.exports.getAvailableUAPVersions = function () {
- var programFilesFolder = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
- // No Program Files folder found, so we won't be able to find UAP SDK
- if (!programFilesFolder) return [];
-
- var uapFolderPath = path.join(programFilesFolder, 'Windows Kits', '10', 'Platforms', 'UAP');
- if (!shell.test('-e', uapFolderPath)) {
- return []; // No UAP SDK exists on this machine
- }
-
- var result = [];
- shell.ls(uapFolderPath).filter(function (uapDir) {
- return shell.test('-d', path.join(uapFolderPath, uapDir));
- }).map(function (folder) {
- return Version.tryParse(folder);
- }).forEach(function (version, index) {
- if (version) {
- result.push(version);
- }
- });
-
- return result;
-};
// gets the latest MSBuild version from a list of versions
module.exports.getLatestMSBuild = function () {
@@ -354,3 +329,29 @@ module.exports.getWillowInstallations = function () {
});
return installations;
};
+
+// returns an array of available UAP Versions
+// prepare.js
+module.exports.getAvailableUAPVersions = function () {
+ var programFilesFolder = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
+ // No Program Files folder found, so we won't be able to find UAP SDK
+ if (!programFilesFolder) return [];
+
+ var uapFolderPath = path.join(programFilesFolder, 'Windows Kits', '10', 'Platforms', 'UAP');
+ if (!shell.test('-e', uapFolderPath)) {
+ return []; // No UAP SDK exists on this machine
+ }
+
+ var result = [];
+ shell.ls(uapFolderPath).filter(function (uapDir) {
+ return shell.test('-d', path.join(uapFolderPath, uapDir));
+ }).map(function (folder) {
+ return Version.tryParse(folder);
+ }).forEach(function (version, index) {
+ if (version) {
+ result.push(version);
+ }
+ });
+
+ return result;
+};
\ No newline at end of file
--
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