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/27 12:43:41 UTC
[cordova-windows] 23/26: no more `win10tools` param
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch janpio-win10only
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit a19e37bd94aec504e1b1fe1ade364aef0c5a1778
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Fri Feb 16 13:54:57 2018 +0100
no more `win10tools` param
---
template/cordova/lib/deployment.js | 10 ++++++----
template/cordova/lib/package.js | 10 ++--------
template/cordova/lib/run.js | 1 -
template/cordova/lib/utils.js | 5 ++---
4 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/template/cordova/lib/deployment.js b/template/cordova/lib/deployment.js
index 6ae6b31..5394e74 100644
--- a/template/cordova/lib/deployment.js
+++ b/template/cordova/lib/deployment.js
@@ -93,8 +93,8 @@ DeploymentTool.prototype.launchApp = function (packageInfo, targetDevice) {
* Gets a DeploymentTool to deploy to devices or emulators.
* @param targetOsVersion {String} The version of the
*/
-DeploymentTool.getDeploymentTool = function (targetOsVersion) {
- return new WinAppDeployCmdTool(targetOsVersion);
+DeploymentTool.getDeploymentTool = function () {
+ return new WinAppDeployCmdTool();
};
// DeviceInfo is an opaque object passed to install/uninstall.
@@ -200,11 +200,13 @@ AppDeployCmdTool.prototype.launchApp = function (packageInfo, targetDevice) {
return spawn(this.path, ['/launch', packageInfo, '/targetdevice:' + targetDevice.__shorthand]);
};
-function WinAppDeployCmdTool (targetOsVersion) {
+// Deploy to Desktop
+
+function WinAppDeployCmdTool () {
if (!(this instanceof WinAppDeployCmdTool)) { throw new ReferenceError('Only create a WinAppDeployCmdTool as an instance object.'); }
DeploymentTool.call(this);
- this.targetOsVersion = targetOsVersion;
+ this.targetOsVersion = '10.0';
var programFilesPath = process.env['ProgramFiles(x86)'] || process.env['ProgramFiles'];
this.path = path.join(programFilesPath, 'Windows Kits', '10', 'bin', 'x86', 'WinAppDeployCmd.exe');
}
diff --git a/template/cordova/lib/package.js b/template/cordova/lib/package.js
index f938fc3..84a1f6e 100644
--- a/template/cordova/lib/package.js
+++ b/template/cordova/lib/package.js
@@ -184,14 +184,8 @@ function uninstallAppFromPhone (appDeployUtils, pkg, target) {
}
// deploys specified phone package to device/emulator and launches it
-module.exports.deployToPhone = function (pkg, deployTarget, targetWindows10, deploymentTool) {
- var deployment;
- if (deploymentTool) {
- deployment = Q(deploymentTool);
- } else {
- deployment = utils.getAppDeployUtils(targetWindows10);
- }
-
+module.exports.deployToPhone = function (pkg, deployTarget, deploymentTool) {
+ var deployment = utils.getAppDeployUtils();
return deployment.then(function (deploymentTool) {
return module.exports.findDevice(deploymentTool, deployTarget).then(function (target) {
return uninstallAppFromPhone(deploymentTool, pkg, target)
diff --git a/template/cordova/lib/run.js b/template/cordova/lib/run.js
index bfec351..2d7b869 100644
--- a/template/cordova/lib/run.js
+++ b/template/cordova/lib/run.js
@@ -43,7 +43,6 @@ module.exports.run = function (options) {
'archs': [String],
'phone': Boolean,
'win': Boolean,
- 'win10tools': Boolean
}, {'r': '--release'}, options.argv, 0);
// Validate args
diff --git a/template/cordova/lib/utils.js b/template/cordova/lib/utils.js
index b4f04d8..d766e35 100644
--- a/template/cordova/lib/utils.js
+++ b/template/cordova/lib/utils.js
@@ -35,9 +35,8 @@ module.exports.getAppStoreUtils = function () {
};
// returns path to AppDeploy util from Windows Phone 8.1 SDK
-module.exports.getAppDeployUtils = function (targetWin10) {
- var version = targetWin10 ? '10.0' : '8.1';
- var tool = DeploymentTool.getDeploymentTool(version);
+module.exports.getAppDeployUtils = function () {
+ var tool = DeploymentTool.getDeploymentTool();
if (!tool.isAvailable()) {
return Q.reject('App deployment utilities: "' + tool.path + '", not found. Ensure the Windows SDK is installed.');
--
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