[GitHub] cordova-windows pull request: CB-9565: Build failure for Windows 1...

2015-09-22 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/123

CB-9565: Build failure for Windows 10.  This error is a result of using

This error is a result of using x64 Node and an incompatibility with x64 
msbuild; the .NET Native compiler is x86 only (for where it can run).  As a 
result, when msbuild-x64 tries to use it, it fails.  This works around the 
issue by running x86 instead.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9565

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #123


commit 8ea8a719848e296e2cd54b2c5479160a9467046c
Author: Rob Paveza 
Date:   2015-09-22T17:39:19Z

CB-9565: Build failure for Windows 10.  This error is a result of using
x64 Node and an incompatibility with x64 msbuild; the .NET Native compiler
is x86 only (for where it can run).  As a result, when msbuild-x64 tries
to use it, it fails.  This works around the issue by running x86 instead.




---
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



[GitHub] cordova-windows pull request: Fixed up "resport" to "report"

2015-09-11 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/122

Fixed up "resport" to "report"



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows FixingResport

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/122.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #122


commit b5caa6aeab1f8251ceea4ee739326ae7f1f41843
Author: Rob Paveza 
Date:   2015-09-11T20:34:46Z

Fixed up "resport" to "report"




---
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



[GitHub] cordova-plugin-vibration pull request: CB-9365 Add support for 'vi...

2015-09-03 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-vibration/pull/38#discussion_r38670056
  
--- Diff: src/windows/VibrationProxy.js ---
@@ -60,12 +61,43 @@ if (VibrationDevice) {
 fail(e);
 }
 }, 
-vibrateWithPattern: function(success, fail, args) {
-// TODO: Implement with setTimeout.
-fail('"vibrateWithPattern" is unsupported by this platform.');
+vibrateWithPattern: function (success, fail, args) {
+// Cancel current vibrations first
+module.exports.cancelVibration(function () {
+// Removes the first zero
+if (args[0] && args[0][0] === 0) {
+args[0].shift(0);
+}
+
+patternChainPromise = args[0].reduce(function 
(previousValue, currentValue, index) {
+if (index % 2 === 0) {
+return previousValue.then(function () {
+return new WinJS.Promise(function (complete, 
error) {
+module.exports.vibrate(function () {}, 
function(err) {
+console.error(err);
+error(err);
+}, [currentValue]);
--- End diff --

We make a lot of references to `currentValue`.  Can we just parse it once 
and save the integer form?  Maybe we can opportunistically parse all of them on 
input and if any parse return NaN then we fail fast.


---
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



[GitHub] cordova-plugin-vibration pull request: CB-9365 Add support for 'vi...

2015-09-03 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-vibration/pull/38#discussion_r38669919
  
--- Diff: src/windows/VibrationProxy.js ---
@@ -60,12 +61,43 @@ if (VibrationDevice) {
 fail(e);
 }
 }, 
-vibrateWithPattern: function(success, fail, args) {
-// TODO: Implement with setTimeout.
-fail('"vibrateWithPattern" is unsupported by this platform.');
+vibrateWithPattern: function (success, fail, args) {
+// Cancel current vibrations first
+module.exports.cancelVibration(function () {
+// Removes the first zero
+if (args[0] && args[0][0] === 0) {
+args[0].shift(0);
+}
+
+patternChainPromise = args[0].reduce(function 
(previousValue, currentValue, index) {
+if (index % 2 === 0) {
+return previousValue.then(function () {
+return new WinJS.Promise(function (complete, 
error) {
+module.exports.vibrate(function () {}, 
function(err) {
+console.error(err);
+error(err);
+}, [currentValue]);
+
+setTimeout(function () {
+complete();
+}, parseInt(currentValue, 10));
+});
+});
+} else {
+return previousValue.then(function () {
+return new WinJS.Promise(function (complete) {
+setTimeout(function () {
+complete();
+}, parseInt(currentValue, 10));
+});
+});
+}
+}, WinJS.Promise.as());
+}, fail);
 },
 cancelVibration: function(success, fail, args) {
 try {
+patternChainPromise && patternChainPromise.cancel();
--- End diff --

If you're currently vibrating, will the vibration itself also be cancelled? 
 


---
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



[GitHub] cordova-plugin-vibration pull request: CB-9365 Add support for 'vi...

2015-09-03 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-vibration/pull/38#discussion_r38669813
  
--- Diff: src/windows/VibrationProxy.js ---
@@ -60,12 +61,43 @@ if (VibrationDevice) {
 fail(e);
 }
 }, 
-vibrateWithPattern: function(success, fail, args) {
-// TODO: Implement with setTimeout.
-fail('"vibrateWithPattern" is unsupported by this platform.');
+vibrateWithPattern: function (success, fail, args) {
+// Cancel current vibrations first
+module.exports.cancelVibration(function () {
+// Removes the first zero
+if (args[0] && args[0][0] === 0) {
+args[0].shift(0);
+}
+
+patternChainPromise = args[0].reduce(function 
(previousValue, currentValue, index) {
+if (index % 2 === 0) {
+return previousValue.then(function () {
+return new WinJS.Promise(function (complete, 
error) {
+module.exports.vibrate(function () {}, 
function(err) {
+console.error(err);
+error(err);
+}, [currentValue]);
+
+setTimeout(function () {
+complete();
+}, parseInt(currentValue, 10));
+});
+});
+} else {
+return previousValue.then(function () {
+return new WinJS.Promise(function (complete) {
--- End diff --

Prefer `WinJS.Promise.timeout(parseInt(currentValue, 10))` to `new 
WinJS.Promise( ... setTimeout(...))`.


---
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



[GitHub] cordova-ios pull request: CB-9512 Cordova-ios build/run should fai...

2015-08-19 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-ios/pull/154#discussion_r37478335
  
--- Diff: bin/templates/scripts/cordova/run.bat ---
@@ -15,11 +15,5 @@
 :: specific language governing permissions and limitations
 :: under the License
 @ECHO OFF
-SET script_path="%~dp0run"
-IF EXIST %script_path% (
-node %script_path% %*
-) ELSE (
-ECHO.
-ECHO ERROR: Could not find 'run' script in 'cordova' folder, 
aborting...>&2
-EXIT /B 1
-)
+ECHO ERROR: Running 'ios' platform on Windows is not supported>&2
+EXIT /B 0
--- End diff --

Why are you exiting with a success status?  The previous version exited 
with status code 1.  

Probably should also change build.bat to return status code 1.


---
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



[GitHub] cordova-windows pull request: CB-9499: There is a run failure when...

2015-08-17 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/116#discussion_r37243479
  
--- Diff: template/cordova/lib/package.js ---
@@ -215,13 +215,20 @@ module.exports.deployToDesktop = function (package, 
deployTarget) {
 
 return utils.getAppStoreUtils().then(function(appStoreUtils) {
 return getPackageName(path.join(__dirname, '..', 
'..')).then(function(pkgname) {
+
+var oldArch;
 // uninstalls previous application instance (if exists)
 console.log('Attempt to uninstall previous application 
version...');
 return spawn('powershell', ['-ExecutionPolicy', 
'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Uninstall-App ' + 
pkgname])
 .then(function() {
 console.log('Attempt to install application...');
+oldArch = process.env.PROCESSOR_ARCHITECTURE;
+if (package.arch === 'x64') {
+process.env.PROCESSOR_ARCHITECTURE = 'AMD64';
+}
 return spawn('powershell', ['-ExecutionPolicy', 
'RemoteSigned', 'Import-Module "' + appStoreUtils + '"; Install-App', 
utils.quote(package.script)]);
--- End diff --

Addressed by update.  Thx.


---
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



[GitHub] cordova-windows pull request: CB-9499: There is a run failure when...

2015-08-17 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/116

CB-9499: There is a run failure when trying to deploy an x64 app when…

… running on an x86 version of Node.  This change addresses the problem 
by modifying the run process by detecting an x64 app package as the primary, 
and setting the environment architecture to x64 before invoking PowerShell.

Also, small build item to point to the correct location of WinJS.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9499

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/116.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #116


commit af880a3629f6e69bae41c671b4fbd1b44b7714ee
Author: Rob Paveza 
Date:   2015-08-17T17:47:11Z

CB-9499: There is a run failure when trying to deploy an x64 app when 
running on an x86 version of Node.  This change addresses the problem by 
modifying the run process by detecting an x64 app package as the primary, and 
setting the environment architecture to x64 before invoking PowerShell.




---
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



[GitHub] cordova-windows pull request: CB-9482: Upon further investigation ...

2015-08-12 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/113#discussion_r36926008
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -194,13 +194,28 @@ AppDeployCmdTool.prototype.enumerateDevices = 
function() {
 });
 };
 
+// Note: To account for CB-9482, we pass an extra parameter when retrying 
the call.  Be forwarned to check for that
+// if additional parameters are added in the future.
 AppDeployCmdTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
 var command = shouldUpdate ? '/update' : '/install';
 if (shouldLaunch) {
 command += 'launch';
 }
 
-return run(this.path, [command, pathToAppxPackage, '/targetdevice:' + 
targetDevice.__shorthand]);
+var that = this;
+var result = run(this.path, [command, pathToAppxPackage, 
'/targetdevice:' + targetDevice.__shorthand]);
+if (targetDevice.type === 'emulator' && arguments.length < 6) {
--- End diff --

In the update, I'll just re-call run().


---
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



[GitHub] cordova-windows pull request: CB-9482: Upon further investigation ...

2015-08-12 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/113#discussion_r36925808
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -194,13 +194,28 @@ AppDeployCmdTool.prototype.enumerateDevices = 
function() {
 });
 };
 
+// Note: To account for CB-9482, we pass an extra parameter when retrying 
the call.  Be forwarned to check for that
+// if additional parameters are added in the future.
 AppDeployCmdTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
 var command = shouldUpdate ? '/update' : '/install';
 if (shouldLaunch) {
 command += 'launch';
 }
 
-return run(this.path, [command, pathToAppxPackage, '/targetdevice:' + 
targetDevice.__shorthand]);
+var that = this;
+var result = run(this.path, [command, pathToAppxPackage, 
'/targetdevice:' + targetDevice.__shorthand]);
+if (targetDevice.type === 'emulator' && arguments.length < 6) {
--- End diff --

It's called out in the comment immediately preceding the function 
definition.  There are 5 formal arguments specified to the function, so when 
the function is called normally, arguments.length = 5.  In that case, we 
compose an error handler onto result; the composed error handler is only called 
if AppDeployCmd fails.  That handler checks the code to see if it's 
`E_INVALIDARG`, and if so, re-calls the function, this time passing an 
additional parameter.


---
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



[GitHub] cordova-windows pull request: CB-9482: Upon further investigation ...

2015-08-12 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/113#discussion_r36925416
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -35,7 +35,7 @@ function run(cmd, args, opt_cwd) {
 child.stderr.on('data', function(s) { stderr += s; });
 child.on('exit', function(code) {
 if (code) {
-d.reject(stderr);
+d.reject({ message: stderr, code: code, toString: 
function() { return stderr; }});
--- End diff --

This isn't logging.  This is providing an object instead of a string to the 
failure case of a promise.


---
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



[GitHub] cordova-windows pull request: CB-9482: Upon further investigation ...

2015-08-12 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/113#discussion_r36925333
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -194,13 +194,28 @@ AppDeployCmdTool.prototype.enumerateDevices = 
function() {
 });
 };
 
+// Note: To account for CB-9482, we pass an extra parameter when retrying 
the call.  Be forwarned to check for that
+// if additional parameters are added in the future.
 AppDeployCmdTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
 var command = shouldUpdate ? '/update' : '/install';
 if (shouldLaunch) {
 command += 'launch';
 }
 
-return run(this.path, [command, pathToAppxPackage, '/targetdevice:' + 
targetDevice.__shorthand]);
+var that = this;
+var result = run(this.path, [command, pathToAppxPackage, 
'/targetdevice:' + targetDevice.__shorthand]);
+if (targetDevice.type === 'emulator' && arguments.length < 6) {
+result = result.then(null, function(e) {
+// CB-9482: AppDeployCmd also reports E_INVALIDARG during this 
process.  If so, try to repeat.
+if (e.code === 2147942487) {
--- End diff --

OK, I'll do so in the updated PR, but I don't see that `var E_INVALIDARG = 
...; if (e.code === E_INVALIDARG)` is necessarily better.


---
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



[GitHub] cordova-windows pull request: CB-9482: Upon further investigation ...

2015-08-12 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/113

CB-9482: Upon further investigation of CI failures, we saw that

AppDeployCmd also failed to install an app when:
 - The emulator had been off previously
 - It had been started with the AppDeployCmd /uninstall command
 - The next command was to then install an app

This change detects the condition (only for emulator targets) and retries
once.  This appears to correct the issue.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9482

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/113.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #113


commit 2edc0031dc6793fab9db81c7de03d1cae5a846d7
Author: Rob Paveza 
Date:   2015-08-12T21:30:50Z

CB-9482: Upon further investigation of CI failures, we saw that
AppDeployCmd also failed to install an app when:
 - The emulator had been off previously
 - It had been started with the AppDeployCmd /uninstall command
 - The next command was to then install an app

This change detects the condition (only for emulator targets) and retries
once.  This appears to correct the issue.




---
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



[GitHub] cordova-windows pull request: CB-9482: Modifies the deployment cod...

2015-08-12 Thread robpaveza
Github user robpaveza closed the pull request at:

https://github.com/apache/cordova-windows/pull/112


---
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



[GitHub] cordova-windows pull request: CB-9482: Modifies the deployment cod...

2015-08-12 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/112#issuecomment-130335077
  
There isn't a way to get a "proper" fix.  The tool doesn't have a mechanism 
to query for the presence of a device (AppDeployCmd /EnumerateDevices always 
lists "0. Device"), nor a way to query for the presence of a particular app.  
The only thing we CAN do is try to uninstall the app, to ensure that it always 
gets uninstalled if it's there, and then to actually install the app.  
(AppDeployCmd does have an "update" option, but it fails if the app isn't 
already installed).

The problem is with the SDK tool, and given that Windows Phone 8.1 is now a 
revision out of date, it's unlikely we'll get a fix.


---
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



[GitHub] cordova-windows pull request: CB-9482: Modifies the deployment cod...

2015-08-11 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/112

CB-9482: Modifies the deployment code to account for problems with

emulators, which are currently blocking the CI from executing.  Modifying
the uninstall function to never fail appears to unblock the CI and allow
installation to emulators to continue unhindered.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9482

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/112.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #112


commit 6a5ff71c472d83275d4e4c8cdab4d99f2c3a2afa
Author: Rob Paveza 
Date:   2015-08-11T23:40:29Z

CB-9482: Modifies the deployment code to account for problems with
emulators, which are currently blocking the CI from executing.  Modifying
the uninstall function to never fail appears to unblock the CI and allow
installation to emulators to continue unhindered.




---
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



[GitHub] cordova-lib pull request: CB-8627: Only update fetch.json when plu...

2015-08-11 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/228#discussion_r36766958
  
--- Diff: cordova-lib/src/cordova/plugin.js ---
@@ -206,10 +178,41 @@ module.exports = function plugin(command, targets, 
opts) {
 }
 }
 
-events.emit('verbose', 'Calling 
plugman.install on plugin "' + dir + '" for platform "' + platform + '" with 
options "' + JSON.stringify(options)  + '"');
-return plugman.raw.install(platform, 
platformRoot, path.basename(dir), pluginsDir, options);
+events.emit('verbose', 'Calling 
plugman.install on plugin "' + result.dest + '" for platform "' + platform + '" 
with options "' + JSON.stringify(options)  + '"');
+return plugman.raw.install(platform, 
platformRoot, path.basename(result.dest), pluginsDir, options);
 });
-}, Q());
+}, Q()).then(function(){
+return Q(result);
+});
+})
+.then(function(result){
+metadata.save_fetch_metadata(pluginsDir, 
result.pinfo.id, { source: result.fetchJsonSource, variables: 
opts.cli_variables, is_top_level: true });
+return Q(result.dest);
+})
+.then(function(dir){
+// save to config.xml
+if(saveToConfigXmlOn(config_json,opts)){
+var pluginInfo =  pluginInfoProvider.get(dir);
+
+var attributes = {};
+attributes.name = pluginInfo.id;
--- End diff --

I'm confused by the dichotomy of `name` and `id`.


---
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



[GitHub] cordova-lib pull request: CB-8627: Only update fetch.json when plu...

2015-08-11 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/228#discussion_r36766838
  
--- Diff: cordova-lib/src/cordova/plugin.js ---
@@ -206,10 +178,41 @@ module.exports = function plugin(command, targets, 
opts) {
 }
 }
 
-events.emit('verbose', 'Calling 
plugman.install on plugin "' + dir + '" for platform "' + platform + '" with 
options "' + JSON.stringify(options)  + '"');
-return plugman.raw.install(platform, 
platformRoot, path.basename(dir), pluginsDir, options);
+events.emit('verbose', 'Calling 
plugman.install on plugin "' + result.dest + '" for platform "' + platform + '" 
with options "' + JSON.stringify(options)  + '"');
+return plugman.raw.install(platform, 
platformRoot, path.basename(result.dest), pluginsDir, options);
 });
-}, Q());
+}, Q()).then(function(){
+return Q(result);
+});
+})
+.then(function(result){
+metadata.save_fetch_metadata(pluginsDir, 
result.pinfo.id, { source: result.fetchJsonSource, variables: 
opts.cli_variables, is_top_level: true });
+return Q(result.dest);
+})
+.then(function(dir){
+// save to config.xml
+if(saveToConfigXmlOn(config_json,opts)){
+var pluginInfo =  pluginInfoProvider.get(dir);
+
+var attributes = {};
+attributes.name = pluginInfo.id;
+
+var src = parseSource(target, opts);
+attributes.spec = src ? src : '^' + 
pluginInfo.version;
+
+var variables = [];
+if (opts.cli_variables) {
+for (var varname in opts.cli_variables) {
--- End diff --

`Object.keys(opts.cli_variables)` rather than `for...in`.


---
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



[GitHub] cordova-lib pull request: CB-8627: Only update fetch.json when plu...

2015-08-11 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/228#discussion_r36766569
  
--- Diff: cordova-lib/src/plugman/fetch.js ---
@@ -146,11 +145,7 @@ function fetchPlugin(plugin_src, plugins_dir, options) 
{
 });
 }).then(function(result){
 checkID(options.expected_id, result.pinfo);
-var data = { source: result.fetchJsonSource };
-data.is_top_level = options.is_top_level; 
-data.variables = options.variables || {};
-metadata.save_fetch_metadata(plugins_dir, result.pinfo.id, data);
-return result.dest;
+return result;
--- End diff --

Function name `checkID` seems to do something and return a result, but you 
don't capture that result, nor do you return anything with that result.  
Because you pass the value of `result.pinfo` by value, `checkID` has no 
opportunity to mutate or modify anything.

What happens if `checkID` "fails", if it can?  If it can't, why is it 
called `check`?


---
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



[GitHub] cordova-lib pull request: CB-8627: Only update fetch.json when plu...

2015-08-11 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/228#discussion_r36766359
  
--- Diff: cordova-lib/src/cordova/plugin.js ---
@@ -206,10 +178,41 @@ module.exports = function plugin(command, targets, 
opts) {
 }
 }
 
-events.emit('verbose', 'Calling 
plugman.install on plugin "' + dir + '" for platform "' + platform + '" with 
options "' + JSON.stringify(options)  + '"');
-return plugman.raw.install(platform, 
platformRoot, path.basename(dir), pluginsDir, options);
+events.emit('verbose', 'Calling 
plugman.install on plugin "' + result.dest + '" for platform "' + platform + '" 
with options "' + JSON.stringify(options)  + '"');
+return plugman.raw.install(platform, 
platformRoot, path.basename(result.dest), pluginsDir, options);
 });
-}, Q());
+}, Q()).then(function(){
+return Q(result);
+});
+})
+.then(function(result){
+metadata.save_fetch_metadata(pluginsDir, 
result.pinfo.id, { source: result.fetchJsonSource, variables: 
opts.cli_variables, is_top_level: true });
--- End diff --

Why not camelCased instead of separated_by_underscore?  


---
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



[GitHub] cordova-lib pull request: CB-8627: Only update fetch.json when plu...

2015-08-11 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-lib/pull/228#discussion_r36766275
  
--- Diff: cordova-lib/src/cordova/plugin.js ---
@@ -206,10 +178,41 @@ module.exports = function plugin(command, targets, 
opts) {
 }
 }
 
-events.emit('verbose', 'Calling 
plugman.install on plugin "' + dir + '" for platform "' + platform + '" with 
options "' + JSON.stringify(options)  + '"');
-return plugman.raw.install(platform, 
platformRoot, path.basename(dir), pluginsDir, options);
+events.emit('verbose', 'Calling 
plugman.install on plugin "' + result.dest + '" for platform "' + platform + '" 
with options "' + JSON.stringify(options)  + '"');
+return plugman.raw.install(platform, 
platformRoot, path.basename(result.dest), pluginsDir, options);
 });
-}, Q());
+}, Q()).then(function(){
+return Q(result);
+});
+})
+.then(function(result){
+metadata.save_fetch_metadata(pluginsDir, 
result.pinfo.id, { source: result.fetchJsonSource, variables: 
opts.cli_variables, is_top_level: true });
+return Q(result.dest);
+})
+.then(function(dir){
+// save to config.xml
+if(saveToConfigXmlOn(config_json,opts)){
--- End diff --

Usage: Function name `saveToConfigXmlOn` implies that it performs the 
saving, but your branch seems to do so.  Perhaps rename to 
`shouldSaveToConfigXml`.


---
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



[GitHub] cordova-plugin-globalization pull request: CB-9476: Mobilespec cra...

2015-08-10 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-plugin-globalization/pull/40

CB-9476: Mobilespec crash on startup when running on Windows 10.

Windows 10 apparently deprecated and removed the navigator.userLanguage
property.  This change addresses the switch to navigator.language.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-plugin-globalization 
CB-9476

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-globalization/pull/40.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #40


commit ca37f40acd3a08eae8fd9f3613a2eabee3303ebb
Author: Rob Paveza 
Date:   2015-08-10T17:24:05Z

CB-9476: Mobilespec crash on startup when running on Windows 10.

Windows 10 apparently deprecated and removed the navigator.userLanguage
property.  This change addresses the switch to navigator.language.




---
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



[GitHub] cordova-windows pull request: CB-9458: Updated the baseline versio...

2015-08-05 Thread robpaveza
Github user robpaveza closed the pull request at:

https://github.com/apache/cordova-windows/pull/110


---
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



[GitHub] cordova-windows pull request: CB-9456 Fixed windows app crash on s...

2015-08-05 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/109#issuecomment-128053464
  
LGTM


---
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



[GitHub] cordova-windows pull request: CB-9455 Fixed requirements check fai...

2015-08-05 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/108#issuecomment-128051522
  
LGTM.


---
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



[GitHub] cordova-windows pull request: CB-8936 Added logging functionality

2015-08-05 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/107#discussion_r36318952
  
--- Diff: template/cordova/lib/log.js ---
@@ -0,0 +1,226 @@
+/*
+   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 path= require('path'),
+et  = require('elementtree'),
+Q   = require('q'),
+cp  = require('child_process'),
+shelljs = require('shelljs');
+
+var appTracingLogInitialState = null,
+adminLogInitialState = null;
+
+/*
+ * Gets windows AppHost/ApplicationTracing and AppHost/Admin logs
+ * and prints them to console
+ */
+module.exports.run = function() {
+
getLogState('Microsoft-Windows-AppHost/ApplicationTracing').then(function 
(state) {
+appTracingLogInitialState = state;
+return getLogState('Microsoft-Windows-AppHost/Admin');
+}).then(function(state) {
+adminLogInitialState = state;
+return enableLogging('Microsoft-Windows-AppHost/Admin');
+}).then(function () {
+return 
enableLogging('Microsoft-Windows-AppHost/ApplicationTracing');
+}).then(function () {
+console.log('Logging enabled, now printing logs. To stop, please 
press Ctrl+C once.');
+startLogging('Microsoft-Windows-AppHost/Admin');
+startLogging('Microsoft-Windows-AppHost/ApplicationTracing');
+}).catch(function (error) {
+console.error(error);
+});
+
+// Disable logs before exiting
+process.on('exit', function () {
+if ((appTracingLogInitialState !== null) && 
!appTracingLogInitialState) {
+disableLogging('Microsoft-Windows-AppHost/ApplicationTracing');
+}
+if ((adminLogInitialState !== null) && !adminLogInitialState) {
+disableLogging('Microsoft-Windows-AppHost/Admin');
+}
+});
+
+// Catch Ctrl+C event and exit gracefully
+process.on('SIGINT', function () {
+process.exit(2);
+});
+
+// Catch uncaught exceptions, print trace, then exit gracefully
+process.on('uncaughtException', function(e) {
+console.log(e.stack);
+process.exit(99);
+});
+};
+
+function startLogging(channel) {
+var startTime = new Date().toISOString();
+setInterval(function() {
+var command = 'wevtutil qe ' + channel + ' /q:"*[System 
[(TimeCreated [@SystemTime>\'' + startTime + '\'])]]" /e:root';
+cp.exec(command, function (error, stdout, stderr) {
+if (error) {
+throw new Error('Failed to run wevtutil command. ' + 
error);
+} else {
+parseEvents(stdout).forEach(function (evt) {
+startTime = evt.timeCreated;
+console.log(stringifyEvent(evt));
+});
+}
+});
+}, 1000);
+}
+
+module.exports.help = function() {
+console.log('Usage: ' + path.join('cordova', 'log'));
--- End diff --

Won't this print out "cordova\log" on Windows?


---
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



[GitHub] cordova-windows pull request: CB-8936 Added logging functionality

2015-08-05 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/107#discussion_r36318858
  
--- Diff: template/cordova/lib/log.js ---
@@ -0,0 +1,226 @@
+/*
+   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 path= require('path'),
+et  = require('elementtree'),
+Q   = require('q'),
+cp  = require('child_process'),
+shelljs = require('shelljs');
+
+var appTracingLogInitialState = null,
+adminLogInitialState = null;
+
+/*
+ * Gets windows AppHost/ApplicationTracing and AppHost/Admin logs
+ * and prints them to console
+ */
+module.exports.run = function() {
+
getLogState('Microsoft-Windows-AppHost/ApplicationTracing').then(function 
(state) {
+appTracingLogInitialState = state;
+return getLogState('Microsoft-Windows-AppHost/Admin');
+}).then(function(state) {
+adminLogInitialState = state;
+return enableLogging('Microsoft-Windows-AppHost/Admin');
+}).then(function () {
+return 
enableLogging('Microsoft-Windows-AppHost/ApplicationTracing');
+}).then(function () {
+console.log('Logging enabled, now printing logs. To stop, please 
press Ctrl+C once.');
+startLogging('Microsoft-Windows-AppHost/Admin');
+startLogging('Microsoft-Windows-AppHost/ApplicationTracing');
+}).catch(function (error) {
+console.error(error);
+});
+
+// Disable logs before exiting
+process.on('exit', function () {
+if ((appTracingLogInitialState !== null) && 
!appTracingLogInitialState) {
+disableLogging('Microsoft-Windows-AppHost/ApplicationTracing');
+}
+if ((adminLogInitialState !== null) && !adminLogInitialState) {
+disableLogging('Microsoft-Windows-AppHost/Admin');
+}
+});
+
+// Catch Ctrl+C event and exit gracefully
+process.on('SIGINT', function () {
+process.exit(2);
+});
+
+// Catch uncaught exceptions, print trace, then exit gracefully
+process.on('uncaughtException', function(e) {
+console.log(e.stack);
+process.exit(99);
+});
+};
+
+function startLogging(channel) {
+var startTime = new Date().toISOString();
+setInterval(function() {
+var command = 'wevtutil qe ' + channel + ' /q:"*[System 
[(TimeCreated [@SystemTime>\'' + startTime + '\'])]]" /e:root';
--- End diff --

Will this run when not running as an administrator?


---
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



[GitHub] cordova-windows pull request: CB-9450: Added a manifest munge step...

2015-08-05 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/111

CB-9450: Added a manifest munge step during build that updates app...

...manifests with build and packaging parameters.  Also added the new
`WindowsStoreIdentityName` preference which adds the ability to set that
publishing property, since the Windows Store app identity is assigned by
the Store.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9450

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/111.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #111


commit eb0d2b09c4c9d66bfcde0c4fe344f1463b3bfccd
Author: Rob Paveza 
Date:   2015-08-04T23:38:16Z

CB-9450: Added a manifest munge step during build that updates app
manifests with build and packaging parameters.  Also added the new
`WindowsStoreIdentityName` preference which adds the ability to set that
publishing property, since the Windows Store app identity is assigned by
the Store.




---
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



[GitHub] cordova-windows pull request: CB-9458: Updated the baseline versio...

2015-08-05 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/110

CB-9458: Updated the baseline version of Universal Windows to 10240.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9458

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #110


commit 7bd7fb2ab2b7224f387ce1a5b2a7372d087342a1
Author: Rob Paveza 
Date:   2015-08-05T15:46:52Z

CB-9458: Updated the baseline version of Universal Windows to 10240.




---
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



[GitHub] cordova-plugin-camera pull request: CB-9443 Pick correct maxResolu...

2015-08-04 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-camera/pull/111#discussion_r36199186
  
--- Diff: src/windows/CameraProxy.js ---
@@ -696,21 +696,22 @@ function 
takePictureFromCameraWindows(successCallback, errorCallback, args) {
 // decide which max pixels should be supported by targetWidth or 
targetHeight.
 var maxRes = null;
 var UIMaxRes = WMCapture.CameraCaptureUIMaxPhotoResolution;
+var totalPixels = targetWidth * targetHeight;
 switch (true) {
-case (targetWidth >= 1280 || targetHeight >= 960) :
-cameraCaptureUI.photoSettings.maxResolution = UIMaxRes.large3M;
+case (totalPixels <= 320 * 240):
+cameraCaptureUI.photoSettings.maxResolution = 
UIMaxRes.verySmallQvga;
 break;
-case (targetWidth >= 1024 || targetHeight >= 768) :
-maxRes = UIMaxRes.mediumXga;
+case (totalPixels <= 640 * 480):
+maxRes = UIMaxRes.smallVga;
 break;
-case(targetWidth >= 800 || targetHeight >= 600) :
+case (totalPixels <= 1024 * 768):
 maxRes = UIMaxRes.mediumXga;
 break;
-case  (targetWidth >= 640 || targetHeight >= 480) :
-maxRes = UIMaxRes.smallVga;
+case (totalPixels <= 3 * 1000 * 1000):
+maxRes = UIMaxRes.large3M;
 break;
-case(targetWidth >= 320 || targetHeight >= 240) :
-maxRes = UIMaxRes.verySmallQvga;
+case (totalPixels <= 5 * 1000 * 1000):
+maxRes = UIMaxRes.veryLarge5M;
 break;
 default :
 maxRes = UIMaxRes.highestAvailable;
--- End diff --

switch(true) would only be faster in the event that your cases were 
constants and you were doing explicit equality checks (e.g., `case 10:`).  
They're not, though, and because you're using greater-than comparisons, you 
lose the ability of the runtime compiler to optimize using jump-tables.  If 
we're really concerned about perf, I'd suggest adding profiling code to order 
the most-common to the least-common cases; but I think this code will run so 
infrequently, it's not a perf-critical path.


---
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



[GitHub] cordova-plugin-camera pull request: CB-9443 Pick correct maxResolu...

2015-08-03 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-camera/pull/111#discussion_r36130435
  
--- Diff: src/windows/CameraProxy.js ---
@@ -696,21 +696,22 @@ function 
takePictureFromCameraWindows(successCallback, errorCallback, args) {
 // decide which max pixels should be supported by targetWidth or 
targetHeight.
 var maxRes = null;
 var UIMaxRes = WMCapture.CameraCaptureUIMaxPhotoResolution;
+var totalPixels = targetWidth * targetHeight;
 switch (true) {
-case (targetWidth >= 1280 || targetHeight >= 960) :
-cameraCaptureUI.photoSettings.maxResolution = UIMaxRes.large3M;
+case (totalPixels <= 320 * 240):
+cameraCaptureUI.photoSettings.maxResolution = 
UIMaxRes.verySmallQvga;
 break;
-case (targetWidth >= 1024 || targetHeight >= 768) :
-maxRes = UIMaxRes.mediumXga;
+case (totalPixels <= 640 * 480):
+maxRes = UIMaxRes.smallVga;
 break;
-case(targetWidth >= 800 || targetHeight >= 600) :
+case (totalPixels <= 1024 * 768):
 maxRes = UIMaxRes.mediumXga;
 break;
-case  (targetWidth >= 640 || targetHeight >= 480) :
-maxRes = UIMaxRes.smallVga;
+case (totalPixels <= 3 * 1000 * 1000):
+maxRes = UIMaxRes.large3M;
 break;
-case(targetWidth >= 320 || targetHeight >= 240) :
-maxRes = UIMaxRes.verySmallQvga;
+case (totalPixels <= 5 * 1000 * 1000):
+maxRes = UIMaxRes.veryLarge5M;
 break;
 default :
 maxRes = UIMaxRes.highestAvailable;
--- End diff --

Add `break;` after this 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



[GitHub] cordova-plugin-camera pull request: CB-9443 Pick correct maxResolu...

2015-08-03 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-camera/pull/111#discussion_r36129853
  
--- Diff: src/windows/CameraProxy.js ---
@@ -696,21 +696,22 @@ function 
takePictureFromCameraWindows(successCallback, errorCallback, args) {
 // decide which max pixels should be supported by targetWidth or 
targetHeight.
 var maxRes = null;
 var UIMaxRes = WMCapture.CameraCaptureUIMaxPhotoResolution;
+var totalPixels = targetWidth * targetHeight;
 switch (true) {
--- End diff --

As long as you're refactoring the numbers, let's also turn this from 
`switch (true)` into `if`/`else`.


---
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



[GitHub] cordova-windows pull request: CB-9410: Added preferences for Windo...

2015-07-30 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/106#issuecomment-126521787
  
I'm game.  Let's make a Jira for it.


---
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



[GitHub] cordova-windows pull request: CB-9410: Added preferences for Windo...

2015-07-30 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/106#issuecomment-126520990
  
It only goes into the case if it's an "old project template."  This change 
is only expected for newer Cordova projects.  
(src/cordova/metadata/windows_parser.js line 73).  In other words, if you have 
an out-of-date cordova-windows, you don't get the updated behavior.


---
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



[GitHub] cordova-docs pull request: CB-9398: Added documentation for Window...

2015-07-30 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-docs/pull/298#discussion_r35931879
  
--- Diff: docs/en/edge/guide/platforms/win8/index.md ---
@@ -272,4 +272,18 @@ command-line tools or the SDK in your workflow. The 
Cordova CLI relies
 on cross-platform source code that routinely overwrites the
 platform-specific files used by the SDK. If you want to use the SDK to
 modify the project, use the lower-level shell tools as an alternative
-to the CLI.
\ No newline at end of file
+to the CLI.
+
+## Supporting Toasts
+
+Windows requires an app manifest capability declaration in order to 
support 
+toast notifications.  When using the `cordova-plugin-local-notifications` 
--- End diff --

Sure, if a plugin is allowed to modify config.xml, then yes.


---
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



[GitHub] cordova-windows pull request: CB-9410: Added preferences for Windo...

2015-07-24 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/106

CB-9410: Added preferences for Windows Store ingestion.

`WindowsStoreDisplayName` and `WindowsStorePublisherName` are the new 
properties.  If they are not provided, we fall back to the defaults provided by 
``.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9410

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/106.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #106


commit a7b5326e3b425b24602a3ad9c4f854acc125478c
Author: Rob Paveza 
Date:   2015-07-25T00:21:43Z

CB-9410: Added preferences for Windows Store ingestion.

`WindowsStoreDisplayName` and `WindowsStorePublisherName` are the new
properties.  If they are not provided, we fall back to the defaults
provided by ``.




---
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



[GitHub] cordova-lib pull request: CB-9408: Added support for `windows-pack...

2015-07-24 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-lib/pull/268

CB-9408: Added support for `windows-packageVersion` on ``.

Corresponds to a similar change on cordova-windows.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-lib CB-9408

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-lib/pull/268.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #268


commit b4a51807f0609612381ff15aa20845076aef3f41
Author: Rob Paveza 
Date:   2015-07-24T17:33:10Z

CB-9408: Added support for `windows-packageVersion` on ``.




---
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



[GitHub] cordova-docs pull request: CB-9408: Documented the new `windows-pa...

2015-07-24 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-docs/pull/300

CB-9408: Documented the new `windows-packageVersion` attribute on

... `` to allow Windows to have an independent binary version than 
its
widget.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-docs CB-9408

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-docs/pull/300.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #300


commit 0e9fe43abc480a70856b62485ac818fb9330ed30
Author: Rob Paveza 
Date:   2015-07-24T17:40:43Z

CB-9408: Documented the new `windows-packageVersion` attribute on
`` to allow Windows to have an independent binary version than its
widget.




---
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



[GitHub] cordova-windows pull request: CB-9408: Added a `windows-packageVer...

2015-07-24 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/105

CB-9408: Added a `windows-packageVersion` attribute to the ``

...element which enables Windows to have a separate, independent binary
version than other platforms.  This attribute corresponds to similar
attributes `android-versionCode` and `ios-CFBundleVersion`.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9408

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/105.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #105


commit faab4a4ce8436f11a542acd47a9b061da594e612
Author: Rob Paveza 
Date:   2015-07-24T17:19:28Z

CB-9408: Added a `windows-packageVersion` attribute to the ``
element which enables Windows to have a separate, independent binary
version than other platforms.  This attribute corresponds to similar
attributes `android-versionCode` and `ios-CFBundleVersion`.




---
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



[GitHub] cordova-windows pull request: CB-8965 Copy cordova-js-src director...

2015-07-22 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/94#issuecomment-123831922
  
Hey @surajpindoria - is this still a valid task?  It seems like cordova-lib 
is responsible for synthesizing cordova-js into a final file upon create.  What 
advantage do we get by having cordova-js-src into the packaged output instead 
of the built cordova.js file?


---
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



[GitHub] cordova-windows pull request: CB-8866: add Windows platforms "Mixe...

2015-07-22 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/67#issuecomment-123830935
  
@brodybits: Have you been unblocked by using the `--archs` parameter?  

In my experience, building Windows apps using a "Mixed Platforms" solution 
platform is almost always undesirable.  Do you think we could close this PR out?

Thanks!


---
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



[GitHub] cordova-docs pull request: CB-9398: Added documentation for Window...

2015-07-22 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-docs/pull/298

CB-9398: Added documentation for WindowsToastCapable to the Windows 

...docs.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-docs CB-9398

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-docs/pull/298.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #298


commit 448410e2621be66d92b45d79d6cac64fd60fec47
Author: Rob Paveza 
Date:   2015-07-22T16:59:03Z

CB-9398: Added documentation for WindowsToastCapable to the Windows 8
central document




---
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



[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-21 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/92#issuecomment-123432180
  
I'm supposing build.spec.js spec.13 fails because it doesn't mock 
`findAllAvailableVersions` (or was also `findAvailableVersions` in your code).  
I wrote a use case for this in #102 in spec.1; take a look at that and ensure 
the right code paths.  Otherwise, the merge of #92 and #102 is pretty 
straightforward.  Before merge, make sure your AppVeyor passes - I think it's a 
problem with check_reqs.


---
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



[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-21 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/92#issuecomment-123430303
  
build.spec.js spec.13 fails.


---
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



[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-21 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/92#issuecomment-123413927
  
When I run this branch on my local, I get an npm test failure for 
check_reqs.spec.js, failing to find config.xml in cordova-windows root.


---
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



[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-21 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/92#issuecomment-123412166
  
I'm checking out how it works with #102 .  


---
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



[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...

2015-07-15 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/102#issuecomment-121792352
  
I don't really have a preference. We could say be consistent with msbuild 
and do a pipe separator but I don't think that is terribly valuable. 

The archs argument is already existing and I don't think a redesign is in 
scope. 


---
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



[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...

2015-07-15 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/102#discussion_r34741242
  
--- Diff: template/cordova/lib/MSBuildTools.js ---
@@ -38,6 +38,13 @@ MSBuildTools.prototype.buildProject = function(projFile, 
buildType, buildarch) {
 '/p:Configuration=' + buildType,
 '/p:Platform=' + buildarch];
 
+if (otherConfigProperties) {
--- End diff --

I'll look into the .targets approach.

However, I don't agree with the IDE-CLI interop dichotomy.  In the IDE, you 
almost always are building a single arch+mode target pair at a time (e.g., 
x86-debug).  In VS, you can generate app package bundles, but you have to go 
through a particular menu to do so, not use the typical MSBuild-invoking 
"Build" step workflow.  The same works here as well.

The change was designed 100% to be just like the "Create App Packages" 
feature, just turned on by default when building arch-specific packages.


---
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



[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...

2015-07-15 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/102

CB-9359: Adds support for .appxbundle creation

.appxbundle files are convenient app packages which can be uploaded to the 
Windows Store.  They contain debug or release (typically release) versions of 
more than one of the x86, x64, and ARM architecture builds.

To enable bundling, simply build for multiple architectures:

cordova build windows -- --archs="x86 x64 arm"

Bundling is disabled if `anycpu` is one of the architectures (or is the 
default architecture).  You can explicitly disable bundling by passing the 
`--no-bundle` flag:

cordova build windows -- --archs="x86 x64 arm" --no-bundle

Bundling is not supported for Windows 8 as the feature is not available for 
that platform in general.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9359

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/102.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #102


commit 97bc543d4983f93223d700aec3aadfaeb4e1e961
Author: Rob Paveza 
Date:   2015-07-13T20:37:45Z

CB-9359: Adds support for .appxbundle creation

.appxbundle files are convenient app packages which can be uploaded to the
Windows Store.  They contain debug or release (typically release) versions
of more than one of the x86, x64, and ARM architecture builds.

To enable bundling, simply build for multiple architectures:

cordova build windows -- --archs="x86 x64 arm"

Bundling is disabled if `anycpu` is one of the architectures (or is the
default architecture).  You can explicitly disable bundling by passing the
`--no-bundle` flag:

cordova build windows -- --archs="x86 x64 arm" --no-bundle

Bundling is not supported for Windows 8 as the feature is not available
for that platform in general.

commit 3ea4cd0561ab66da60dcf65bd59e46152919597b
Author: Rob Paveza 
Date:   2015-07-15T20:44:51Z

Merge branch 'master' of https://github.com/apache/cordova-windows into 
CB-9359

Conflicts:
template/cordova/lib/build.js
template/cordova/lib/run.js




---
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



[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...

2015-07-15 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/101#issuecomment-121745707
  
I see a different history on AppVeyor than on my machine, I'm going to 
close the PR and re-create.


---
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



[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...

2015-07-15 Thread robpaveza
Github user robpaveza closed the pull request at:

https://github.com/apache/cordova-windows/pull/101


---
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



[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...

2015-07-15 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/101

CB-9359: Adds support for .appxbundle creation

.appxbundle files are convenient app packages which can be uploaded to the
Windows Store.  They contain debug or release (typically release) versions
of more than one of the x86, x64, and ARM architecture builds.

To enable bundling, simply build for multiple architectures:

cordova build windows -- --archs="x86 x64 arm"

Bundling is disabled if `anycpu` is one of the architectures (or is the
default architecture).  You can explicitly disable bundling by passing the
`--no-bundle` flag:

cordova build windows -- --archs="x86 x64 arm" --no-bundle

Bundling is not supported for Windows 8 as the feature is not available
for that platform in general.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9359

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/101.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #101


commit 97bc543d4983f93223d700aec3aadfaeb4e1e961
Author: Rob Paveza 
Date:   2015-07-13T20:37:45Z

CB-9359: Adds support for .appxbundle creation

.appxbundle files are convenient app packages which can be uploaded to the
Windows Store.  They contain debug or release (typically release) versions
of more than one of the x86, x64, and ARM architecture builds.

To enable bundling, simply build for multiple architectures:

cordova build windows -- --archs="x86 x64 arm"

Bundling is disabled if `anycpu` is one of the architectures (or is the
default architecture).  You can explicitly disable bundling by passing the
`--no-bundle` flag:

cordova build windows -- --archs="x86 x64 arm" --no-bundle

Bundling is not supported for Windows 8 as the feature is not available
for that platform in general.




---
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



[GitHub] cordova-windows pull request: CB-9239 Fixes issue with windows pre...

2015-07-14 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/99#issuecomment-121325599
  
I like the change overall but I need to still merge it with my latest to 
make sure it functionally works as expected.  


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-07-14 Thread robpaveza
Github user robpaveza commented on the pull request:


https://github.com/apache/cordova-plugin-media/pull/58#issuecomment-121324570
  
Pending my other comments, LGTM.


---
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



[GitHub] cordova-lib pull request: CB-9335: Windows quality-of-life improve...

2015-07-13 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-lib/pull/257

CB-9335: Windows quality-of-life improvements.  To align with the change

To align with the change in Cordova-Windows which removes the Windows 8 
project from the solution
file used by Windows 8.1 and Windows 10, the same is done in the spec.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-lib CB-9335

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-lib/pull/257.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #257


commit 4ff4d14ef4d7900660909f8766799df14efd362d
Author: Rob Paveza 
Date:   2015-07-13T16:24:58Z

CB-9335: Windows quality-of-life improvements.  To align with the change
in Cordova-Windows which removes the Windows 8 project from the solution
file used by Windows 8.1 and Windows 10, the same is done in the spec.




---
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



[GitHub] cordova-windows pull request: CB-9335: Windows quality-of-life imp...

2015-07-13 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/98#issuecomment-120985543
  
@TimBarham We don't require any changes to jsprojManager because this 
change didn't change any .jsprojes, only .slns.  

I'll go ahead and make the corresponding change to cordova-lib, but yes, 
this should be ready to merge then.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-13 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34480922
  
--- Diff: template/cordova/lib/package.js ---
@@ -130,58 +145,47 @@ module.exports.findDevice = function (target) {
 };
 
 // returns array of available devices names
-module.exports.listDevices = function () {
-return utils.getAppDeployUtils().then(function(appDeployUtils) {
-return exec('"' + appDeployUtils + '" 
/enumeratedevices').then(function(output) {
-return Q.resolve(output.split('\n').map(function(line) {
-var match = /\s*(\d)+\s+(.*)/.exec(line);
-return match && match[2];
-}).filter(function (line) {
-return line;
-}));
+module.exports.listDevices = function (deploymentTool) {
+
+return deploymentTool.enumerateDevices().then(function(deviceList) {
+return deviceList.map(function(device) {
+return device.toString();
 });
-});
-};
-
 
-function installAppToPhone(appDeployUtils, package, target, update) {
-// /installlaunch option sometimes fails with 'Error: The parameter is 
incorrect.'
-// so we use separate steps to /install or /update and then /launch
-var cmd = update ? '/update' : '/install';
-console.log('Installing application...');
-return spawn(appDeployUtils, [cmd, package.appx, '/targetdevice:' + 
target]);
-}
+}, function(e) {
+console.warn('Failed to enumerate devices');
+console.warn(e);
 
-function runAppOnPhone(appDeployUtils, target) {
-return Q().then(function() {
-return module.exports.getAppId(path.join(__dirname, '..', '..'));
-}).then(function(appId) {
-console.log('Running application... ');
-return spawn(appDeployUtils, ['/launch', appId, '/targetdevice:' + 
target]);
+throw e;
 });
-}
+};
+
 
 function uninstallAppFromPhone(appDeployUtils, package, target) {
 console.log('Attempting to remove previously installed 
application...');
-return spawn(appDeployUtils, ['/uninstall', package.phoneId, 
'/targetdevice:' + target]);
+return appDeployUtils.uninstallAppPackage(package.phoneId, target);
 }
 
 // deploys specified phone package to device/emulator and launches it
-module.exports.deployToPhone = function (package, deployTarget, 
targetWindows10) {
-var getTarget = deployTarget == 'device' ? Q('de') :
-deployTarget == 'emulator' ? Q('xd') : 
module.exports.findDevice(deployTarget);
-
-return getTarget.then(function(target) {
-return 
utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) {
+module.exports.deployToPhone = function (package, deployTarget, 
targetWindows10, deploymentTool) {
+var deployment;
+if (deploymentTool) {
+deployment = Q(deploymentTool);
+}
+else {
+deployment = utils.getAppDeployUtils(targetWindows10);
+}
 
-return uninstallAppFromPhone(appDeployUtils, package, 
target).then(
+return deployment.then(function(deploymentTool) {
+return module.exports.findDevice(deploymentTool, 
deployTarget).then(function(target) {
+return uninstallAppFromPhone(deploymentTool, package, 
target).then(
 function() {}, function() {}).then(function() {
-return installAppToPhone(appDeployUtils, package, 
target, false);
-}).then(function() {
-return runAppOnPhone(appDeployUtils, target);
-}, function(error) {
+// shouldUpdate = false because we've already 
uninstalled
+return deploymentTool.installAppPackage(package.appx, 
target, true, false);
--- End diff --

Ah, now I understand.  I have pushed a new change that will address this 
feedback.


---
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



[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

2015-07-13 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-geolocation/pull/45#discussion_r34479900
  
--- Diff: src/windows/GeolocationProxy.js ---
@@ -142,8 +143,8 @@ module.exports = {
 Windows.Devices.Geolocation.PositionAccuracy.high :
 Windows.Devices.Geolocation.PositionAccuracy.default;
 
-if (cordova.platformId == 'windows' && WinJS.Utilities.isPhone) {
-// on Windows Phone 8.1 'positionchanged' event fails with 
error below if movementThreshold is not set
+if (cordova.platformId == 'windows' && (WinJS.Utilities.isPhone || 
isWin10)) {
+// on Windows Phone 8.1 and Windows 10 'positionchanged' event 
fails with error below if movementThreshold is not set
--- End diff --

We should just always set the movementThreshold property.  It exists for 
Windows 8 according to the documentation.


---
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



[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

2015-07-13 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-geolocation/pull/45#discussion_r34479855
  
--- Diff: src/windows/GeolocationProxy.js ---
@@ -16,7 +16,8 @@
 
--- End diff --

In ensureLocator you should also call requestAccessAsync:

"Starting in Windows 10 Insider Preview, call the RequestAccessAsync before 
accessing the user’s location. At that time, your app must be in the 
foreground and RequestAccessAsync must be called from the UI thread. Until the 
user grants your app permission to their location, your app can't access 
location data."

var locator = new Windows.Devices.Geolocation.Geolocator();
var loc;
if (typeof 
Windows.Devices.Geolocation.Geolocator.prototype.requestAccessAsync === 
'function')) {
loc = locator.requestAccessAsync().then(function(result) { if 
(result) return locator; });
} else { 
loc = WinJS.Promise.wrap(locator);
}



---
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



[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

2015-07-13 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-geolocation/pull/45#discussion_r34478957
  
--- Diff: src/windows/GeolocationProxy.js ---
@@ -16,7 +16,8 @@
 
 var PositionError = require('./PositionError'),
 ids = {},
-loc;
+loc,
+isWin10 = navigator.appVersion.indexOf('MSAppHost/3.0') !== -1;
--- End diff --

This won't scale post Win10.  Is the API new in Windows Phone 8.1?


---
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



[GitHub] cordova-windows pull request: CB-8674 - activationContext

2015-07-10 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/97#issuecomment-120509743
  
LGTM.


---
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



[GitHub] cordova-windows pull request: CB-9335: Windows quality-of-life imp...

2015-07-10 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/98

CB-9335: Windows quality-of-life improvements.

This change documents the separator between and how to specify multiple 
architectures using the
--archs argument to build and run.

Removed the Windows 8 project from the Visual Studio 2013 solution.  It is 
still possible to use Visual Studio 2013 to work on the Windows 8 project; to 
do so, load the CordovaApp.vs2012.sln into Visual Studio 2013.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9335

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/98.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #98


commit b155279650ea6e7d78dc89f04ff16d0ae63af36a
Author: Rob Paveza 
Date:   2015-07-08T22:08:17Z

CB-9335: Windows quality-of-life improvements.  This change documents the
separator between and how to specify multiple architectures using the
--archs argument to build and run.

Removed the Windows 8 project from the Visual Studio 2013 solution.  It
is still possible to use Visual Studio 2013 to work on the Windows 8
project; to do so, load the CordovaApp.vs2012.sln into Visual Studio 2013.




---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34167364
  
--- Diff: template/cordova/lib/package.js ---
@@ -113,16 +112,32 @@ function getPackageName(platformPath) {
 
 // returns one of available devices which name match with provided string
 // return rejected promise if device with name specified not found
-module.exports.findDevice = function (target) {
+module.exports.findDevice = function (deploymentTool, target) {
 target = target.toLowerCase();
-return module.exports.listDevices().then(function(deviceList) {
+return deploymentTool.enumerateDevices().then(function(deviceList) {
 // CB-7617 since we use partial match shorter names should go 
first,
 // example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 
8.1 WVGA 4 inch']
-var sortedList = deviceList.concat().sort(function (l, r) { return 
l.length > r.length; });
-for (var idx in sortedList){
-if (sortedList[idx].toLowerCase().indexOf(target) > -1) {
-// we should return index based on original list
-return Q.resolve(deviceList.indexOf(sortedList[idx]));
+// In CB-9283, we need to differentiate between emulator, device, 
and target.
+// So, for emulators to honor the above CB-7617, we preserve the 
original behavior.
+// Else, we choose either the target by ID (DeviceInfo.index) or 
if it's just device,
+// we choose the default (aka first) device.
+if (target === 'emulator') {
+var sortedList = deviceList.concat().sort(function (l, r) { 
return l.toString().length > r.toString().length; });
--- End diff --

Heh, that's ActionScript, but since it all comes from ES3 it's still true.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34166300
  
--- Diff: template/cordova/lib/package.js ---
@@ -113,16 +112,32 @@ function getPackageName(platformPath) {
 
 // returns one of available devices which name match with provided string
 // return rejected promise if device with name specified not found
-module.exports.findDevice = function (target) {
+module.exports.findDevice = function (deploymentTool, target) {
 target = target.toLowerCase();
-return module.exports.listDevices().then(function(deviceList) {
+return deploymentTool.enumerateDevices().then(function(deviceList) {
 // CB-7617 since we use partial match shorter names should go 
first,
 // example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 
8.1 WVGA 4 inch']
-var sortedList = deviceList.concat().sort(function (l, r) { return 
l.length > r.length; });
-for (var idx in sortedList){
-if (sortedList[idx].toLowerCase().indexOf(target) > -1) {
-// we should return index based on original list
-return Q.resolve(deviceList.indexOf(sortedList[idx]));
+// In CB-9283, we need to differentiate between emulator, device, 
and target.
+// So, for emulators to honor the above CB-7617, we preserve the 
original behavior.
+// Else, we choose either the target by ID (DeviceInfo.index) or 
if it's just device,
+// we choose the default (aka first) device.
+if (target === 'emulator') {
+var sortedList = deviceList.concat().sort(function (l, r) { 
return l.toString().length > r.toString().length; });
+for (var idx in sortedList){
--- End diff --

Yeah  I didn't want to mess with this code and end up breaking 
something downstream.  It seems to have been working for us up until now.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34166637
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,275 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
--- End diff --

This function is based on spawn.js, modified only to capture stdout/stderr. 
 The comment is a fair question, but I thought I'd preserve consistency in this 
case.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34166452
  
--- Diff: template/cordova/lib/package.js ---
@@ -113,16 +112,32 @@ function getPackageName(platformPath) {
 
 // returns one of available devices which name match with provided string
 // return rejected promise if device with name specified not found
-module.exports.findDevice = function (target) {
+module.exports.findDevice = function (deploymentTool, target) {
 target = target.toLowerCase();
-return module.exports.listDevices().then(function(deviceList) {
+return deploymentTool.enumerateDevices().then(function(deviceList) {
 // CB-7617 since we use partial match shorter names should go 
first,
 // example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 
8.1 WVGA 4 inch']
-var sortedList = deviceList.concat().sort(function (l, r) { return 
l.length > r.length; });
-for (var idx in sortedList){
-if (sortedList[idx].toLowerCase().indexOf(target) > -1) {
-// we should return index based on original list
-return Q.resolve(deviceList.indexOf(sortedList[idx]));
+// In CB-9283, we need to differentiate between emulator, device, 
and target.
+// So, for emulators to honor the above CB-7617, we preserve the 
original behavior.
+// Else, we choose either the target by ID (DeviceInfo.index) or 
if it's just device,
+// we choose the default (aka first) device.
+if (target === 'emulator') {
+var sortedList = deviceList.concat().sort(function (l, r) { 
return l.toString().length > r.toString().length; });
--- End diff --

concat() returns a copy of the original array.  
http://swingpants.com/2009/03/12/fastest-way-to-copy-an-array-concat-or-slice0/


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34165767
  
--- Diff: template/cordova/lib/target-list.js ---
@@ -17,20 +17,21 @@
under the License.
 */
 
-var devices = require('./package'),
+var deploy  = require('./deployment'),
 args = process.argv.slice(2);
 
 // help/usage function
 function help() {
 console.log('');
-console.log('Usage: node target-list.js  [ --emulators | --devices | 
--started_emulators | --all ]');
+console.log('Usage: node target-list.js [--win10] [ --emulators | 
--devices | --started_emulators | --all ]');
+console.log('--win10 : Chooses to list Windows 10 
devices (Windows 8.1 is default).');
 console.log('--emulators : List the possible target 
emulators availible.');
-console.log('--devices   : List the possible target 
devices availible. *NOT IMPLEMENTED YET*');
+console.log('--devices   : List the possible target 
devices availible.');
 console.log('--started_emulators : List any started emulators 
availible. *NOT IMPLEMENTED YET*');
 console.log('--all   : List all available devices');
 console.log('examples:');
 console.log('node target-list.js --emulators');
-console.log('node target-list.js --devices');
+console.log('node target-list.js --win10 --devices');
--- End diff --

Yeah, this is a complicated question, and I'm not sure what the right 
answer is right now.

The Windows 8.1 tool actually enumerates Windows 10 emulators, but it can't 
deploy to them.  Conversely, the Windows 10 tool does not presently enumerate 
Windows 10 emulators (because it also can't deploy to them).  The Windows 8.1 
tool is fast, the Windows 10 tool is slow (it does network probing).  We could 
possibly display both, but most likely we would end up simply having the 
following list, for example:

0. Device (device) [Windows 8.1 tools]
1. Mobile 4 inch 512MB 10.0.10176.0 (emulator) [Windows 8.1 tools]
2. Mobile 4 inch 1GB 10.0.10176.0 (emulator) [Windows 8.1 tools]
3. Mobile 5 inch 1GB 10.0.10176.0 (emulator) [Windows 8.1 tools]
4. Mobile 6 inch 2GB 10.0.10176.0 (emulator) [Windows 8.1 tools]
5. Windows Phone 8.1 4 inch 512MB (emulator) [Windows 8.1 tools]
6. Windows Phone 8.1 4 inch 1GB (emulator) [Windows 8.1 tools]
7. Windows Phone 8.1 5 inch 1GB (emulator) [Windows 8.1 tools]
8. Windows Phone 8.1 6 inch 2GB (emulator) [Windows 8.1 tools]
9. Lumia 1520 (RM-940) (device) [Windows 10 tools]

0 and 9 end up being the same thing, which is problematic.  I just don't 
know which is better: to repeat devices, or to have an option that picks "is my 
target device Windows 8.1 or Windows 10?"  I landed on the option choice, for 
compatibility reasons (opt into the new behavior).


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34164434
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,275 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
+d.reject(e);
+}
+return d.promise;
+}
+
+function DeploymentTool() {
+
+}
+
+/**
+ * Determines whether the requested version of the deployment tool is 
available.
+ * @returns True if the deployment tool can function; false if not.
+ */
+DeploymentTool.prototype.isAvailable = function() {
+return fs.existsSync(this.path);
+};
+
+/**
+ * Enumerates devices attached to the development machine.
+ * @returns A Promise for an array of objects, which should be passed into 
other functions to represent the device.
+ * @remarks The returned objects contain 'index', 'name', and 'type' 
properties indicating basic information about them, 
+ *which is limited to the information provided by the system.  Other 
properties may also be included, but they are 
+ *specific to the deployment tool which created them and are likely 
used internally.
+ */
+DeploymentTool.prototype.enumerateDevices = function() {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Installs an app package to the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param pathToAppxPackage The path to the .appx package to install.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ * @shouldLaunch Indicates whether to launch the app after installing it.
+ * @shouldUpdate Indicates whether to explicitly update the app, or 
install clean.
+ * @pin Optionally provided if the device requires pairing for deployment.
+ */
+DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Uninstalls an app package from the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param packageInfo The app package name or Phone GUID representing the 
app.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ */
+DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, 
targetDevice) {
+return Q.reject('Unable to uninstall any app packages because that 
feature is not supported.');

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34164191
  
--- Diff: template/cordova/lib/run.js ---
@@ -155,7 +155,8 @@ module.exports.help = function () {
 console.log('--appx=<8.1-win|8.1-phone|uap>');
 console.log('  : Overrides windows-target-version to 
build Windows 8.1, ');
 console.log('  Windows Phone 8.1, or 
Windows 10.');
-console.log('');
+console.log('--win10tools  : Uses Windows 10 deployment tools 
(used for a Windows 8.1 app when');
--- End diff --

Because Windows 8.1 tools currently can't deploy to an 8.1 app to a Windows 
10 device.  Hence the parenthetical and the following 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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34164096
  
--- Diff: template/cordova/lib/package.js ---
@@ -130,58 +145,47 @@ module.exports.findDevice = function (target) {
 };
 
 // returns array of available devices names
-module.exports.listDevices = function () {
-return utils.getAppDeployUtils().then(function(appDeployUtils) {
-return exec('"' + appDeployUtils + '" 
/enumeratedevices').then(function(output) {
-return Q.resolve(output.split('\n').map(function(line) {
-var match = /\s*(\d)+\s+(.*)/.exec(line);
-return match && match[2];
-}).filter(function (line) {
-return line;
-}));
+module.exports.listDevices = function (deploymentTool) {
+
+return deploymentTool.enumerateDevices().then(function(deviceList) {
+return deviceList.map(function(device) {
+return device.toString();
 });
-});
-};
-
 
-function installAppToPhone(appDeployUtils, package, target, update) {
-// /installlaunch option sometimes fails with 'Error: The parameter is 
incorrect.'
-// so we use separate steps to /install or /update and then /launch
-var cmd = update ? '/update' : '/install';
-console.log('Installing application...');
-return spawn(appDeployUtils, [cmd, package.appx, '/targetdevice:' + 
target]);
-}
+}, function(e) {
+console.warn('Failed to enumerate devices');
+console.warn(e);
 
-function runAppOnPhone(appDeployUtils, target) {
-return Q().then(function() {
-return module.exports.getAppId(path.join(__dirname, '..', '..'));
-}).then(function(appId) {
-console.log('Running application... ');
-return spawn(appDeployUtils, ['/launch', appId, '/targetdevice:' + 
target]);
+throw e;
 });
-}
+};
+
 
 function uninstallAppFromPhone(appDeployUtils, package, target) {
 console.log('Attempting to remove previously installed 
application...');
-return spawn(appDeployUtils, ['/uninstall', package.phoneId, 
'/targetdevice:' + target]);
+return appDeployUtils.uninstallAppPackage(package.phoneId, target);
 }
 
 // deploys specified phone package to device/emulator and launches it
-module.exports.deployToPhone = function (package, deployTarget, 
targetWindows10) {
-var getTarget = deployTarget == 'device' ? Q('de') :
-deployTarget == 'emulator' ? Q('xd') : 
module.exports.findDevice(deployTarget);
-
-return getTarget.then(function(target) {
-return 
utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) {
+module.exports.deployToPhone = function (package, deployTarget, 
targetWindows10, deploymentTool) {
+var deployment;
+if (deploymentTool) {
+deployment = Q(deploymentTool);
+}
+else {
+deployment = utils.getAppDeployUtils(targetWindows10);
+}
 
-return uninstallAppFromPhone(appDeployUtils, package, 
target).then(
+return deployment.then(function(deploymentTool) {
+return module.exports.findDevice(deploymentTool, 
deployTarget).then(function(target) {
+return uninstallAppFromPhone(deploymentTool, package, 
target).then(
 function() {}, function() {}).then(function() {
-return installAppToPhone(appDeployUtils, package, 
target, false);
-}).then(function() {
-return runAppOnPhone(appDeployUtils, target);
-}, function(error) {
+// shouldUpdate = false because we've already 
uninstalled
+return deploymentTool.installAppPackage(package.appx, 
target, true, false);
--- End diff --

I don't understand this comment.  Code comments should specify why you do 
something when it isn't immediately clear, not just repeat the code in comment 
form.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34163912
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,275 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
+d.reject(e);
+}
+return d.promise;
+}
+
+function DeploymentTool() {
+
+}
+
+/**
+ * Determines whether the requested version of the deployment tool is 
available.
+ * @returns True if the deployment tool can function; false if not.
+ */
+DeploymentTool.prototype.isAvailable = function() {
+return fs.existsSync(this.path);
+};
+
+/**
+ * Enumerates devices attached to the development machine.
+ * @returns A Promise for an array of objects, which should be passed into 
other functions to represent the device.
+ * @remarks The returned objects contain 'index', 'name', and 'type' 
properties indicating basic information about them, 
+ *which is limited to the information provided by the system.  Other 
properties may also be included, but they are 
+ *specific to the deployment tool which created them and are likely 
used internally.
+ */
+DeploymentTool.prototype.enumerateDevices = function() {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Installs an app package to the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param pathToAppxPackage The path to the .appx package to install.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ * @shouldLaunch Indicates whether to launch the app after installing it.
+ * @shouldUpdate Indicates whether to explicitly update the app, or 
install clean.
+ * @pin Optionally provided if the device requires pairing for deployment.
+ */
+DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Uninstalls an app package from the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param packageInfo The app package name or Phone GUID representing the 
app.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ */
+DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, 
targetDevice) {
+return Q.reject('Unable to uninstall any app packages because that 
feature is not supported.');

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-08 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34163428
  
--- Diff: spec/unit/deployment.spec.js ---
@@ -0,0 +1,282 @@
+/**
+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 rewire = require('rewire'),
+deployment = rewire('../../template/cordova/lib/deployment'),
+run= deployment.__get__('run'),
+Q  = require('q'),
+
+AppDeployCmdTool = deployment.__get__('AppDeployCmdTool'),
+WinAppDeployCmdTool = deployment.__get__('WinAppDeployCmdTool');
+
+var TEST_APP_PACKAGE_NAME = '"c:\\testapppackage.appx"',
+TEST_APP_PACKAGE_ID   = '12121212-3434-3434-3434-567856785678';
+
+describe('The correct version of the app deployment tool is obtained.', 
function() {
+
+it('Provides an AppDeployCmdTool when 8.1 is requested.', function() {
+
+var tool = deployment.getDeploymentTool('8.1');
+expect(tool instanceof AppDeployCmdTool).toBe(true);
+
+});
+
+it('Provides a WinAppDeployCmdTool when 10.0 is requested.', 
function() {
+
+var tool = deployment.getDeploymentTool('10.0');
+expect(tool instanceof WinAppDeployCmdTool).toBe(true);
+
+});
+
+});
+
+describe('Windows 10 deployment interacts with the file system as 
expected.', function() {
+
+function runMock(cmd, args, cwd) {
+expect(cmd).toBe('c:\\Program Files (x86)\\Windows 
Kits\\10\\bin\\x86\\WinAppDeployCmd.exe');
+switch (args[0]) {
+case 'devices':
+var output = 'Windows App Deployment Tool\r\nVersion 
10.0.0.0\r\nCopyright (c) Microsoft Corporation. All rights 
reserved.\r\n\r\nDiscovering devices...\r\nIP Address  GUID 
   Model/Name\r\n127.0.0.1   
0015-b21e-0da9--Lumia 1520 (RM-940)\r\n10.120.70.172   
----00155d61953200155D619532\r\n10.120.68.150   
----00155d01176500155D011765\r\nDone.';
+return Q(output);
+
+case 'update':
+case 'install':
+expect(args[2]).toBe(TEST_APP_PACKAGE_NAME);
+expect(args[4]).toBe('127.0.0.1');
+return Q('');
+
+case 'uninstall':
+expect(args[2]).toBe(TEST_APP_PACKAGE_ID);
+expect(args[4]).toBe('10.120.68.150');
+return Q('');
+
+}
+}
+
+var mockedProgramFiles = process.env['ProgramFiles(x86)'];
+beforeEach(function() {
+deployment.__set__('run', runMock);
+process.env['ProgramFiles(x86)'] = 'c:\\Program Files (x86)';
+});
+afterEach(function() {
+deployment.__set__('run', run);
+if (mockedProgramFiles) {
+process.env['ProgramFiles(x86)'] = mockedProgramFiles;
+} else {
+delete process.env['ProgramFiles(x86)'];
+}
+});
+
+it('enumerateDevices returns a valid set of objects', function() {
+var deploymentTool = deployment.getDeploymentTool('10.0');
+var done = false;
+deploymentTool.enumerateDevices().then(function(deviceList) {
+
+expect(deviceList.length).toBe(3);
+expect(deviceList[0].name).toBe('Lumia 1520 (RM-940)');
+expect(deviceList[0].index).toBe(0);
+expect(deviceList[0].type).toBe('device');
+
+   

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/96#issuecomment-119379779
  
The siblings work as expected, although they only support Windows 8.1.  
We'll have to make a decision about how to invoke the Windows 10 equivalent.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34105951
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,272 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks 
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
+d.reject(e);
+}
+return d.promise;
+}
+
+function DeploymentTool() {
+
+}
+
+/**
+ * Determines whether the requested version of the deployment tool is 
available.
+ * @returns True if the deployment tool can function; false if not.
+ */
+DeploymentTool.prototype.isAvailable = function() {
+return fs.existsSync(this.path);
+};
+
+/** 
+ * Enumerates devices attached to the development machine.
+ * @returns A Promise for an array of objects, which should be passed into 
other functions to represent the device.
+ * @remarks The returned objects contain 'index', 'name', and 'type' 
properties indicating basic information about them, 
+ *which is limited to the information provided by the system.  Other 
properties may also be included, but they are 
+ *specific to the deployment tool which created them and are likely 
used internally.
+ */
+DeploymentTool.prototype.enumerateDevices = function() {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Installs an app package to the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param pathToAppxPackage The path to the .appx package to install.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ * @shouldLaunch Indicates whether to launch the app after installing it.
+ * @shouldUpdate Indicates whether to explicitly update the app, or 
install clean.
+ * @pin Optionally provided if the device requires pairing for deployment.
+ */
+DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Uninstalls an app package from the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param packageInfo The app package name or Phone GUID representing the 
app.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ */
+DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, 
targetDevice) {
+return Q.reject('Unable to uninstall any app packages because that 
feature is not supported.');

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34105978
  
--- Diff: template/cordova/lib/target-list.js ---
@@ -17,20 +17,21 @@
under the License.
 */
 
-var devices = require('./package'),
+var deploy  = require('./deployment'),
 args = process.argv.slice(2);
 
 // help/usage function
 function help() {
 console.log('');
-console.log('Usage: node target-list.js  [ --emulators | --devices | 
--started_emulators | --all ]');
+console.log('Usage: node target-list.js [--win10] [ --emulators | 
--devices | --started_emulators | --all ]');
+console.log('--win10 : Chooses to list Windows 10 
devices (Windows 8.1 is default).');
 console.log('--emulators : List the possible target 
emulators availible.');
-console.log('--devices   : List the possible target 
devices availible. *NOT IMPLEMENTED YET*');
+console.log('--devices   : List the possible target 
devices availible.');
 console.log('--started_emulators : List any started emulators 
availible. *NOT IMPLEMENTED YET*');
 console.log('--all   : List all available devices');
 console.log('examples:');
-console.log('node target-list.js --emulators');
-console.log('node target-list.js --devices');
+console.log('node target-list.js --win8.1 --emulators');
--- End diff --

Good catch, it had been dropped.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34105916
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,272 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks 
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
--- End diff --

True.  We could create a separate jira (I don't want to dot out of 
cordova-windows to access superspawn here) to do this refactor.


---
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



[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34104776
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,272 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks 
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
+d.reject(e);
+}
+return d.promise;
+}
+
+function DeploymentTool() {
+
+}
+
+/**
+ * Determines whether the requested version of the deployment tool is 
available.
+ * @returns True if the deployment tool can function; false if not.
+ */
+DeploymentTool.prototype.isAvailable = function() {
+return fs.existsSync(this.path);
+};
+
+/** 
+ * Enumerates devices attached to the development machine.
+ * @returns A Promise for an array of objects, which should be passed into 
other functions to represent the device.
+ * @remarks The returned objects contain 'index', 'name', and 'type' 
properties indicating basic information about them, 
+ *which is limited to the information provided by the system.  Other 
properties may also be included, but they are 
+ *specific to the deployment tool which created them and are likely 
used internally.
+ */
+DeploymentTool.prototype.enumerateDevices = function() {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Installs an app package to the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param pathToAppxPackage The path to the .appx package to install.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ * @shouldLaunch Indicates whether to launch the app after installing it.
+ * @shouldUpdate Indicates whether to explicitly update the app, or 
install clean.
+ * @pin Optionally provided if the device requires pairing for deployment.
+ */
+DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Uninstalls an app package from the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param packageInfo The app package name or Phone GUID representing the 
app.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ */
+DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, 
targetDevice) {
+return Q.reject('Unable to uninstall any app packages because that 
feature is not supported.');

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34104478
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,272 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks 
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
+d.reject(e);
+}
+return d.promise;
+}
+
+function DeploymentTool() {
+
+}
+
+/**
+ * Determines whether the requested version of the deployment tool is 
available.
+ * @returns True if the deployment tool can function; false if not.
+ */
+DeploymentTool.prototype.isAvailable = function() {
+return fs.existsSync(this.path);
+};
+
+/** 
+ * Enumerates devices attached to the development machine.
+ * @returns A Promise for an array of objects, which should be passed into 
other functions to represent the device.
+ * @remarks The returned objects contain 'index', 'name', and 'type' 
properties indicating basic information about them, 
+ *which is limited to the information provided by the system.  Other 
properties may also be included, but they are 
+ *specific to the deployment tool which created them and are likely 
used internally.
+ */
+DeploymentTool.prototype.enumerateDevices = function() {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Installs an app package to the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param pathToAppxPackage The path to the .appx package to install.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ * @shouldLaunch Indicates whether to launch the app after installing it.
+ * @shouldUpdate Indicates whether to explicitly update the app, or 
install clean.
+ * @pin Optionally provided if the device requires pairing for deployment.
+ */
+DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Uninstalls an app package from the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param packageInfo The app package name or Phone GUID representing the 
app.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ */
+DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, 
targetDevice) {
+return Q.reject('Unable to uninstall any app packages because that 
feature is not supported.');

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-07 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/96#discussion_r34089196
  
--- Diff: template/cordova/lib/deployment.js ---
@@ -0,0 +1,272 @@
+/*
+   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 Q = require('q'),
+fs= require('fs'),
+/* jshint ignore:start */ // 'path' only used in ignored blocks 
+path  = require('path'),
+/* jshint ignore:end */
+proc  = require('child_process');
+
+// neither 'exec' nor 'spawn' was sufficient because we need to pass 
arguments via spawn
+// but also need to be able to capture stdout / stderr
+function run(cmd, args, opt_cwd) {
+var d = Q.defer();
+try {
+var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 
1024000});
+var stdout = '', stderr = '';
+child.stdout.on('data', function(s) { stdout += s; });
+child.stderr.on('data', function(s) { stderr += s; });
+child.on('exit', function(code) {
+if (code) {
+d.reject(stderr);
+} else {
+d.resolve(stdout);
+}
+});
+} catch(e) {
+console.error('error caught: ' + e);
+d.reject(e);
+}
+return d.promise;
+}
+
+function DeploymentTool() {
+
+}
+
+/**
+ * Determines whether the requested version of the deployment tool is 
available.
+ * @returns True if the deployment tool can function; false if not.
+ */
+DeploymentTool.prototype.isAvailable = function() {
+return fs.existsSync(this.path);
+};
+
+/** 
+ * Enumerates devices attached to the development machine.
+ * @returns A Promise for an array of objects, which should be passed into 
other functions to represent the device.
+ * @remarks The returned objects contain 'index', 'name', and 'type' 
properties indicating basic information about them, 
+ *which is limited to the information provided by the system.  Other 
properties may also be included, but they are 
+ *specific to the deployment tool which created them and are likely 
used internally.
+ */
+DeploymentTool.prototype.enumerateDevices = function() {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Installs an app package to the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param pathToAppxPackage The path to the .appx package to install.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ * @shouldLaunch Indicates whether to launch the app after installing it.
+ * @shouldUpdate Indicates whether to explicitly update the app, or 
install clean.
+ * @pin Optionally provided if the device requires pairing for deployment.
+ */
+DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, 
targetDevice, shouldLaunch, shouldUpdate, pin) {
+return Q.reject('May not use DeploymentTool directly, instead get an 
instance from DeploymentTool.getDeploymentTool()');
+};
+
+/**
+ * Uninstalls an app package from the target device.
+ * @returns A Promise which will be fulfilled on success or rejected on 
failure.
+ * @param packageInfo The app package name or Phone GUID representing the 
app.
+ * @param targetDevice An object returned from a successful call to 
enumerateDevices.
+ */
+DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, 
targetDevice) {
+return Q.reject('Unable to uninstall any app packages because that 
feature is not supported.');

[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-06 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/92#discussion_r33998489
  
--- Diff: bin/lib/check_reqs.js ---
@@ -19,15 +19,226 @@
 
 /*jshint node:true*/
 
-var Q = require('Q');
+var Q = require('q');
+var os= require('os');
+var path  = require('path');
+var shell = require('shelljs');
 
-var MSBuildTools;
+var ConfigParser, MSBuildTools, Version, exec;
 try {
+ConfigParser = require('../../template/cordova/lib/ConfigParser');
 MSBuildTools = require('../../template/cordova/lib/MSBuildTools');
+exec = require('../../template/cordova/lib/exec');
+Version = require('../../template/cordova/lib/Version');
 } catch (ex) {
 // If previous import fails, we're probably running this script
 // from installed platform and the module location is different.
+ConfigParser = require('./ConfigParser');
 MSBuildTools = require('./MSBuildTools');
+exec = require('./exec');
+Version = require('./Version');
+}
+
+// The constant for VS2013 Upd2 PackageVersion. See MSDN for
+// reference: 
https://msdn.microsoft.com/en-us/library/bb164659(v=vs.120).aspx
+var VS2013_UPDATE2_RC = new Version(12, 0, 30324);
+var REQUIRED_VERSIONS = {
+'8.0': {
+os: '6.1',
+msbuild: '11.0',
+visualstudio: '11.0',
+windowssdk: '8.0'
+},
+'8.1': {
+os: '6.2',
+msbuild: '12.0',
+visualstudio: '12.0',
+windowssdk: '8.1',
+phonesdk: '8.1'
+},
+'10.0': {
+os: '6.2',
+msbuild: '14.0',
+visualstudio: '14.0',
+windowssdk: '10.0',
+phonesdk: '10.0'
+}
+};
+
+function getMinimalRequiredVersionFor (requirement) {
+var config = new ConfigParser(path.join(__dirname, '..', '..', 
'config.xml'));
+
+var windowsTargetVersion = config.getWindowsTargetVersion();
+var windowsPhoneTargetVersion = config.getWindowsPhoneTargetVersion();
+var windowsReqVersion = 
Version.tryParse(REQUIRED_VERSIONS[windowsTargetVersion][requirement]);
+var phoneReqVersion = 
Version.tryParse(REQUIRED_VERSIONS[windowsPhoneTargetVersion][requirement]);
+
+// If we're searching for Windows SDK, we're not
+// interested in Phone's version and and vice versa.
+if (requirement === 'windowssdk') return windowsReqVersion;
+if (requirement === 'phonesdk') return phoneReqVersion;
+
+// If both windowsReqVersion and phoneReqVersion is valid Versions, 
choose the max one
+if (windowsReqVersion && phoneReqVersion) {
+return windowsReqVersion.gt(phoneReqVersion) ?
+windowsReqVersion :
+phoneReqVersion;
+}
+
+// Otherwise return that one which is defined and valid
+return windowsReqVersion || phoneReqVersion;
+}
+
+function getHighestAppropriateVersion (versions, requiredVersion) {
+return versions.map(function (version) {
+return Version.tryParse(version);
+})
+.sort(Version.comparer)
+.filter(function (toolVersion) {
+return toolVersion.gte(requiredVersion);
+})[0];
+}
+
+/**
+ * Return Version object for current Windows version. User 'ver' binary or
+ *   os.release() in case of errors.
+ *
+ * @return  {Version}  Version information for current OS.
+ */
+function getWindowsVersion() {
+return exec('ver').then(function (output) {
+var match = /\[Version (.*)\]\s*$/.exec(output);
+return Version.fromString(match[1]);
+}).fail(function () {
+return Version.fromString(os.release());
+});
+}
+
+/**
+ * Lists all Visual Studio versions insalled. For VS 2013 if it present, 
alao
+ *   checks if Update 2 is installed.
+ *
+ * @return  {String[]}  List of installed Visual Studio versions.
+ */
+function getInstalledVSVersions() {
+// Query all keys with Install value equal to 1, then filter out
+// those, which are not related to VS itself
+return exec('reg query 
HKLM\\SOFTWARE\\Microsoft\\DevDiv\\vs\\Servicing /s /v Install /f 1 /d /e 
/reg:32')
+.fail(function () { return ''; })
+.then(function (output) {
+

[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-06 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/92#discussion_r33998435
  
--- Diff: bin/lib/check_reqs.js ---
@@ -19,15 +19,226 @@
 
 /*jshint node:true*/
 
-var Q = require('Q');
+var Q = require('q');
+var os= require('os');
+var path  = require('path');
+var shell = require('shelljs');
 
-var MSBuildTools;
+var ConfigParser, MSBuildTools, Version, exec;
 try {
+ConfigParser = require('../../template/cordova/lib/ConfigParser');
 MSBuildTools = require('../../template/cordova/lib/MSBuildTools');
+exec = require('../../template/cordova/lib/exec');
+Version = require('../../template/cordova/lib/Version');
 } catch (ex) {
 // If previous import fails, we're probably running this script
 // from installed platform and the module location is different.
+ConfigParser = require('./ConfigParser');
 MSBuildTools = require('./MSBuildTools');
+exec = require('./exec');
+Version = require('./Version');
+}
+
+// The constant for VS2013 Upd2 PackageVersion. See MSDN for
+// reference: 
https://msdn.microsoft.com/en-us/library/bb164659(v=vs.120).aspx
+var VS2013_UPDATE2_RC = new Version(12, 0, 30324);
+var REQUIRED_VERSIONS = {
+'8.0': {
+os: '6.1',
+msbuild: '11.0',
+visualstudio: '11.0',
+windowssdk: '8.0'
+},
+'8.1': {
+os: '6.2',
+msbuild: '12.0',
+visualstudio: '12.0',
+windowssdk: '8.1',
+phonesdk: '8.1'
+},
+'10.0': {
+os: '6.2',
--- End diff --

Also, Windows 8 is not supported for Win10 development.  You need Windows 
8.1.  So it needs to be the set of (6.1, 6.3, 10.0).  I think you'll have to 
change your logic.


---
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



[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-06 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/92#discussion_r33998401
  
--- Diff: bin/lib/check_reqs.js ---
@@ -19,15 +19,226 @@
 
 /*jshint node:true*/
 
-var Q = require('Q');
+var Q = require('q');
+var os= require('os');
+var path  = require('path');
+var shell = require('shelljs');
 
-var MSBuildTools;
+var ConfigParser, MSBuildTools, Version, exec;
 try {
+ConfigParser = require('../../template/cordova/lib/ConfigParser');
 MSBuildTools = require('../../template/cordova/lib/MSBuildTools');
+exec = require('../../template/cordova/lib/exec');
+Version = require('../../template/cordova/lib/Version');
 } catch (ex) {
 // If previous import fails, we're probably running this script
 // from installed platform and the module location is different.
+ConfigParser = require('./ConfigParser');
 MSBuildTools = require('./MSBuildTools');
+exec = require('./exec');
+Version = require('./Version');
+}
+
+// The constant for VS2013 Upd2 PackageVersion. See MSDN for
+// reference: 
https://msdn.microsoft.com/en-us/library/bb164659(v=vs.120).aspx
+var VS2013_UPDATE2_RC = new Version(12, 0, 30324);
+var REQUIRED_VERSIONS = {
+'8.0': {
+os: '6.1',
+msbuild: '11.0',
+visualstudio: '11.0',
+windowssdk: '8.0'
+},
+'8.1': {
+os: '6.2',
+msbuild: '12.0',
+visualstudio: '12.0',
+windowssdk: '8.1',
+phonesdk: '8.1'
+},
+'10.0': {
+os: '6.2',
--- End diff --

I think this is incorrect, I think it's actually 6.1 (Windows 7).


---
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



[GitHub] cordova-windows pull request: CB-9235 Adds more checks based on th...

2015-07-06 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/92#discussion_r33998339
  
--- Diff: bin/lib/check_reqs.js ---
@@ -19,15 +19,226 @@
 
 /*jshint node:true*/
 
-var Q = require('Q');
+var Q = require('q');
+var os= require('os');
+var path  = require('path');
+var shell = require('shelljs');
 
-var MSBuildTools;
+var ConfigParser, MSBuildTools, Version, exec;
 try {
+ConfigParser = require('../../template/cordova/lib/ConfigParser');
 MSBuildTools = require('../../template/cordova/lib/MSBuildTools');
+exec = require('../../template/cordova/lib/exec');
+Version = require('../../template/cordova/lib/Version');
 } catch (ex) {
 // If previous import fails, we're probably running this script
 // from installed platform and the module location is different.
+ConfigParser = require('./ConfigParser');
 MSBuildTools = require('./MSBuildTools');
+exec = require('./exec');
+Version = require('./Version');
+}
+
+// The constant for VS2013 Upd2 PackageVersion. See MSDN for
+// reference: 
https://msdn.microsoft.com/en-us/library/bb164659(v=vs.120).aspx
+var VS2013_UPDATE2_RC = new Version(12, 0, 30324);
+var REQUIRED_VERSIONS = {
+'8.0': {
+os: '6.1',
+msbuild: '11.0',
+visualstudio: '11.0',
+windowssdk: '8.0'
+},
+'8.1': {
+os: '6.2',
+msbuild: '12.0',
+visualstudio: '12.0',
+windowssdk: '8.1',
+phonesdk: '8.1'
+},
+'10.0': {
+os: '6.2',
+msbuild: '14.0',
+visualstudio: '14.0',
+windowssdk: '10.0',
+phonesdk: '10.0'
+}
+};
+
+function getMinimalRequiredVersionFor (requirement) {
+var config = new ConfigParser(path.join(__dirname, '..', '..', 
'config.xml'));
+
+var windowsTargetVersion = config.getWindowsTargetVersion();
+var windowsPhoneTargetVersion = config.getWindowsPhoneTargetVersion();
+var windowsReqVersion = 
Version.tryParse(REQUIRED_VERSIONS[windowsTargetVersion][requirement]);
+var phoneReqVersion = 
Version.tryParse(REQUIRED_VERSIONS[windowsPhoneTargetVersion][requirement]);
+
+// If we're searching for Windows SDK, we're not
+// interested in Phone's version and and vice versa.
+if (requirement === 'windowssdk') return windowsReqVersion;
+if (requirement === 'phonesdk') return phoneReqVersion;
+
+// If both windowsReqVersion and phoneReqVersion is valid Versions, 
choose the max one
+if (windowsReqVersion && phoneReqVersion) {
+return windowsReqVersion.gt(phoneReqVersion) ?
+windowsReqVersion :
+phoneReqVersion;
+}
+
+// Otherwise return that one which is defined and valid
+return windowsReqVersion || phoneReqVersion;
+}
+
+function getHighestAppropriateVersion (versions, requiredVersion) {
+return versions.map(function (version) {
+return Version.tryParse(version);
+})
+.sort(Version.comparer)
+.filter(function (toolVersion) {
+return toolVersion.gte(requiredVersion);
+})[0];
+}
+
+/**
+ * Return Version object for current Windows version. User 'ver' binary or
+ *   os.release() in case of errors.
+ *
+ * @return  {Version}  Version information for current OS.
+ */
+function getWindowsVersion() {
+return exec('ver').then(function (output) {
+var match = /\[Version (.*)\]\s*$/.exec(output);
+return Version.fromString(match[1]);
+}).fail(function () {
+return Version.fromString(os.release());
+});
+}
+
+/**
+ * Lists all Visual Studio versions insalled. For VS 2013 if it present, 
alao
+ *   checks if Update 2 is installed.
+ *
+ * @return  {String[]}  List of installed Visual Studio versions.
+ */
+function getInstalledVSVersions() {
+// Query all keys with Install value equal to 1, then filter out
+// those, which are not related to VS itself
+return exec('reg query 
HKLM\\SOFTWARE\\Microsoft\\DevDiv\\vs\\Servicing /s /v Install /f 1 /d /e 
/reg:32')
+.fail(function () { return ''; })
+.then(function (output) {
+

[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...

2015-07-06 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/96

CB-9283: Add support for Windows 10 WinAppDeployCmd

The Windows 10 SDK uses a new "WinAppDeployCmd" utility for deployment to 
phones.  This change abstracts out the differences between Windows 8.1 and 
Windows 10 and the substantially different utility interfaces and factors that 
out into a separate deployment module.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9283

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/96.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #96


commit 53a6b629ae3f7b646136527ef1e8ca3a83e76954
Author: Rob Paveza 
Date:   2015-07-06T20:20:48Z

CB-9283: Add support for Windows 10 WinAppDeployCmd for deployment to
remote devices.




---
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



[GitHub] cordova-medic pull request: CB-8936 Gathering logs on Windows

2015-07-06 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/58#discussion_r33955365
  
--- Diff: medic/medic-run.js ---
@@ -232,12 +233,18 @@ function windowsSpecificPreparation(argv) {
 /^\s*\$appActivator .*$/gim,
 "$&\n" +
--- End diff --

Mixing PS and JS in this way === gross.


---
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



[GitHub] cordova-medic pull request: CB-8936 Gathering logs on Windows

2015-07-06 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-medic/pull/58#discussion_r33955321
  
--- Diff: medic/medic-run.js ---
@@ -232,12 +233,18 @@ function windowsSpecificPreparation(argv) {
 /^\s*\$appActivator .*$/gim,
 "$&\n" +
 "powershell " + path.join(process.cwd(), destScriptPath) + 
" $$ID\n" +
+"powershell " + path.join(process.cwd(), logScriptPath) + 
"\n" +
 "$Ole32 = Add-Type -MemberDefinition 
'[DllImport(\"Ole32.dll\")]public static extern int 
CoAllowSetForegroundWindow(IntPtr pUnk, IntPtr lpvReserved);' -Name 'Ole32' 
-Namespace 'Win32' -PassThru\n" +
 "
$Ole32::CoAllowSetForegroundWindow([System.Runtime.InteropServices.Marshal]::GetIUnknownForObject($appActivator),
 [System.IntPtr]::Zero)",
 appUtilsPath
 );
 }
 
+// write current time to a file to use it when gathering logs
+var now = new Date();
+var iso = now.toISOString();
+fs.writeFileSync('startTime.txt', iso, util.DEFAULT_ENCODING);
--- End diff --

Are we definitely writing to a file "startTime.txt"?  That seems like it'd 
be repeatedly overwritten and we'd lose data.


---
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



[GitHub] cordova-plugin-vibration pull request: CB-9166: Changed plugin.xml...

2015-06-30 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-plugin-vibration/pull/35

CB-9166: Changed plugin.xml framework reference condition to be valid XML

The original plugin.xml referenced "<10.0.0" which caused some validating 
XML readers to reject it as invalid.  Changed to entity-encoding.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-plugin-vibration CB-9166

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-vibration/pull/35.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #35


commit d6ccad811a360eab92fe2a29ef3bf29f8f4d25da
Author: Rob Paveza 
Date:   2015-06-30T23:27:21Z

CB-9166: Changed plugin.xml framework reference condition to be valid XML




---
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



[GitHub] cordova-windows pull request: CB-9271: Removed the unnecessary dev...

2015-06-30 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/95

CB-9271: Removed the unnecessary device capabilities from the Windows 10

Removed the unnecessary device capabilities from the Windows 10 app 
manifest.  These capabilities are no longer required as they no longer cause a 
crash in later flights of the OS.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9271

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/95.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #95


commit 688052328f0077f64f9c03b93b25f24802f4b60a
Author: Rob Paveza 
Date:   2015-06-30T23:15:51Z

CB-9271: Removed the unnecessary device capabilities from the Windows 10
app manifest.  These capabilities are no longer required as they no longer
cause a crash in later flights of the OS.




---
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



[GitHub] cordova-windows pull request: CB-9159 Fix Windows Phone 8.1 deploy...

2015-06-29 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/91#issuecomment-116763083
  
In general LGTM.  

I would prefer that we examine the pipeline here.  We had been talking 
about making the build process be module-based for Windows (for example, the 
Windows build step provides a set of require()-able modules that then executes 
from cordova-lib).  In such a world, we could just parse the CLI arguments once 
up-front, instead of making each individual step parse them, which seems to 
have increased the complexity as we talk about build vs run vs prepare.  I'd 
like to see us go that direction in the long-term, but in the short-term, I 
think this will be adequate.


---
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



[GitHub] cordova-windows pull request: CB-9159 Fix Windows Phone 8.1 deploy...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/91#discussion_r33486397
  
--- Diff: template/cordova/lib/run.js ---
@@ -169,20 +135,10 @@ module.exports.help = function () {
 process.exit(0);
 };
 
-
-function getWindowsTargetVersion() {
--- End diff --

I'm confused about why this function is being removed.


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33482157
  
--- Diff: src/windows/MediaProxy.js ---
@@ -203,20 +234,64 @@ module.exports = {
 var id = args[0];
 var thisM = Media.get(id);
 
-var normalizedSrc = thisM.src.replace(/\//g, '\\');
+var success = function () {
+Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
+win();
+};
+
+var error = function (reason) {
+Media.onStatus(id, Media.MEDIA_ERROR, reason);
+lose(reason);
+};
+
+var fsTypes = {
+PERSISTENT: 'PERSISTENT',
+TEMPORARY: 'TEMPORARY'
+};
+var fsType;
+
+var normalizedSrc = thisM.src;
+normalizedSrc = setTemporaryFsByDefault(normalizedSrc);
+
+if (normalizedSrc.indexOf('ms-appdata:///local/') === 0) {
+fsType = fsTypes.PERSISTENT;
+} else if (normalizedSrc.indexOf('ms-appdata:///temp/') === 0) {
+fsType = fsTypes.TEMPORARY;
+} else {
+lose({ code: MediaError.MEDIA_ERR_NONE_SUPPORTED });
+return;
+}
+
+// Removing schemes (both variants are supported)
+normalizedSrc = normalizedSrc.replace('ms-appdata:///local//', 
'').replace('ms-appdata:///temp//', '')
--- End diff --

Seems like as per line 192 you don't need these top two variations.  


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33482258
  
--- Diff: src/windows/MediaProxy.js ---
@@ -226,6 +301,10 @@ module.exports = {
 try {
 if (thisM.node) {
 thisM.node.onloadedmetadata = null;
+// Unsubscribing as the media object is being released
+thisM.node.onerror = null;
+// Needed to avoid "0x80070005 - JavaScript runtime error: 
Access is denied." on copyAsync
--- End diff --

Can you clarify here why this error is occurring?  Is it because there is a 
sharing violation (i.e., the file is already open when trying to overwrite it)?


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33482012
  
--- Diff: src/windows/MediaProxy.js ---
@@ -203,20 +234,64 @@ module.exports = {
 var id = args[0];
 var thisM = Media.get(id);
 
-var normalizedSrc = thisM.src.replace(/\//g, '\\');
+var success = function () {
+Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
+win();
+};
+
+var error = function (reason) {
+Media.onStatus(id, Media.MEDIA_ERROR, reason);
+lose(reason);
+};
+
+var fsTypes = {
+PERSISTENT: 'PERSISTENT',
+TEMPORARY: 'TEMPORARY'
+};
+var fsType;
+
+var normalizedSrc = thisM.src;
+normalizedSrc = setTemporaryFsByDefault(normalizedSrc);
+
+if (normalizedSrc.indexOf('ms-appdata:///local/') === 0) {
--- End diff --

Is this component going to allow for interoperable code among platforms?  I 
just want to ensure that the developer isn't expected to utter 
"ms-appdata:///local/" - instead they're getting that from some service (or 
we're converting into that from some other argument) so that the developer can 
just write "persistent" or "temporary" and it saves.


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33481751
  
--- Diff: src/windows/MediaProxy.js ---
@@ -159,7 +176,21 @@ module.exports = {
 var id = args[0];
 var src = args[1];
 
-var normalizedSrc = src.replace(/\//g, '\\');
+src = setTemporaryFsByDefault(src);
+
+var success = function () {
+Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_RUNNING);
+win();
+};
+
+var error = function (reason) {
+Media.onStatus(id, Media.MEDIA_ERROR, reason);
+lose(reason);
+};
+
+// Fixing paths like: ms-appdata:///temp//recs/memos/media.m4a => 
ms-appdata:///temp/recs/memos/media.m4a
+var normalizedSrc = src.replace(/([^\/])(\/\/)([^\/])/g, '$1/$3');
--- End diff --

This is another instance in which using Windows.Foundation.Uri may be 
preferable.  You can canonicalize the Uri using it, instead of worrying about 
doing accurate regular expression matching.  See for example 
https://msdn.microsoft.com/en-us/library/windows/apps/windows.foundation.uri.absolutecanonicaluri.aspx


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33481357
  
--- Diff: src/windows/MediaProxy.js ---
@@ -91,6 +106,8 @@ module.exports = {
 var thisM = Media.get(id);
 // if Media was released, then node will be null and we need to 
create it again
 if (!thisM.node) {
+// createAudioNode = true;
--- End diff --

Dead code?


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33481074
  
--- Diff: src/windows/MediaProxy.js ---
@@ -33,8 +42,11 @@ module.exports = {
 create:function(win, lose, args) {
 var id = args[0];
 var src = args[1];
+var createAudioNode = args[2];
--- End diff --

This is later compared to true using ===.  Suggest coercing it to true or 
false here, "var createAudioNode = !!args[2];".


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33480928
  
--- Diff: src/windows/MediaProxy.js ---
@@ -33,8 +42,11 @@ module.exports = {
 create:function(win, lose, args) {
 var id = args[0];
 var src = args[1];
+var createAudioNode = args[2];
 var thisM = Media.get(id);
 
+src = setTemporaryFsByDefault(src);
--- End diff --

Would prefer this line immediately follow "var src = args[1]" because it is 
easy to miss this mutation.


---
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



[GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec...

2015-06-29 Thread robpaveza
Github user robpaveza commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33480844
  
--- Diff: src/windows/MediaProxy.js ---
@@ -26,6 +26,15 @@ var MediaError = 
require('cordova-plugin-media.MediaError');
 
 var recordedFile;
 
+function setTemporaryFsByDefault(src) {
+if (!/.+:/.test(src)) {
--- End diff --

This test seems like it could collide with absolute file paths (e.g., 
"c:\foo.bar") or UNC paths (e.g., "\\?\C:\foo.bar").  Are you sure this is 
adequate?  I'm curious about whether creating a new Windows.Foundation.Uri 
would be more likely to detect such sources.


---
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



[GitHub] cordova-windows pull request: CB-9252: Migrate WinJS to an NPM dep...

2015-06-25 Thread robpaveza
GitHub user robpaveza opened a pull request:

https://github.com/apache/cordova-windows/pull/93

CB-9252: Migrate WinJS to an NPM dependency

This change puts the current WinJS NPM package into the node_modules
directory as well as package.json (for "npm install" support).  It then
modifies the create step to copy WinJS into the platform template
directory.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-windows CB-9252

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-windows/pull/93.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #93


commit 7d43388990f57500d4ef929e9f2006dcdd602065
Author: Rob Paveza 
Date:   2015-06-25T22:13:22Z

CB-9252: Migrate WinJS to an NPM dependency

This change puts the current WinJS NPM package into the node_modules
directory as well as package.json (for "npm install" support).  It then
modifies the create step to copy WinJS into the platform template
directory.




---
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



[GitHub] cordova-windows pull request: CB-9057: Replaced the Windows 10 Pre...

2015-05-21 Thread robpaveza
Github user robpaveza commented on the pull request:

https://github.com/apache/cordova-windows/pull/80#issuecomment-104441598
  
Also I made a corresponding PR for Cordova.js.

https://github.com/apache/cordova-js/pull/113


---
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



  1   2   >