[flutter_tools] support flutter run -d winuwp (#82373)

Allow flutter run to work end-to-end with a UWP device.

Uses win32/ffi for the actual launch of the application, injected via
the native API class. This is structured to avoid a g3 dependency.

Install and amuid require powershell scripts for now.

Actually connecting to the observatory requires running a command in an
elevated prompt. Instructions are presented to the user if a terminal is
attached.

This is a rebased version of https://github.com/flutter/flutter/pull/79684
by @jonahwilliams, updated to remove `NativeApi` and replace is with calls
to `uwptool`.

Part of https://github.com/flutter/flutter/issues/82085
This commit is contained in:
Chris Bracken
2021-05-12 20:45:30 -07:00
committed by GitHub
parent d6fc44ba67
commit 53c2f7086b
13 changed files with 642 additions and 34 deletions

View File

@@ -1466,7 +1466,9 @@ DevelopmentArtifact artifactFromTargetPlatform(TargetPlatform targetPlatform) {
case TargetPlatform.fuchsia_x64:
case TargetPlatform.tester:
case TargetPlatform.windows_uwp_x64:
// No artifacts currently supported.
if (featureFlags.isWindowsUwpEnabled) {
return DevelopmentArtifact.windowsUwp;
}
return null;
}
return null;