appcelerator-archive / windowslib

This is a library of utilities for dealing programmatically with Windows Phone applications, used namely for tools like Titanium.
http://www.appcelerator.com
Other
4 stars 10 forks source link

0.2.0 Support enumerating, launching, installing to Windows 10 Mobile Emulators #27

Closed sgtcoolguy closed 8 years ago

sgtcoolguy commented 8 years ago

This is a major overhaul of windowslib to better support Windows 10. We now brought back our own custom wptool written in C# that we compile on-demand on the user's system. This tool fills in the gaps from Windows 10 tooling, namely that we can enumerate emulators (without hacking the 8.1 tooling), we can launch/connect to an emulator and grab it's IP address (it launches the emulator to connect to it), and then we can use that info to install/update/uninstall apps on the emulator using the WinAppCeployCmd.exe that MS provides. Additionally our custom tool allows you to launch an app by it's product id (guid). We have a powershell script to grab that out of an appx file so we can just take the built appx as input to install and then launch it.

You can run the included npm tests to exercise some of this (the device ones will likely fail).

Ideally this PR should be tested by basically placing this version of windowslib into a build of the SDK from master and then trying to build for Win 10 emulator and seeing if it works. It's possible it may fail due to other bugs we need to address though.

infosia commented 8 years ago

Wow awesome, running test-emulator and test-device went through well for Windows 10 Mobile! I saw test-device actually installs TestApp on my usb-connected Windows 10 Mobile phone. :+1: :sparkles: I also did quick smoke-test on latest titanium_mobile_windows on both Windows 8.1 & 10, and got no regression for Windows Store 8.1 app as well as phone 8.1 app project.

One issue I had is that when I run tests on Windows 8.1, test-emulator failed. It's because there's some Windows 10-specific constants defined (WIN_10, WIN_10_PROJECT etc) and it fails to compile windows 10 project.

Can we use 8.1 sdk when unit tests are running on Windows 8.1? I see no good variable for Windows 8.1 on Node.js OS API though.

Other than that, I think it's good to go. Feel free to merge & bump up package. Nice work!

infosia commented 8 years ago

Ideally this PR should be tested by basically placing this version of windowslib into a build of the SDK from master and then trying to build for Win 10 emulator and seeing if it works. It's possible it may fail due to other bugs we need to address though.

I tried --wp-sdk=10.0 but it says it doesn't support 10.0.

> ti build --platform windows --target wp-emulator --device-id 8-1-6 --win-publisher-id 13AFB724-65F2-4F30-8994-C79399EDBD80 --wp-sdk 10.0
[ERROR] Invalid "--wp-sdk" value "10.0"

Please select a valid wp-sdk value:
 1)  8.0
 2)  8.1