Skip to content

Commit

Permalink
[flutter_tools] remove UWP tooling (#102174)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams authored Apr 26, 2022
1 parent a75743e commit 944fcda
Show file tree
Hide file tree
Showing 113 changed files with 19 additions and 3,060 deletions.
13 changes: 0 additions & 13 deletions packages/flutter_tools/bin/getaumidfromname.ps1

This file was deleted.

3 changes: 1 addition & 2 deletions packages/flutter_tools/bin/tool_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ or
else
'flutter'
]);
final bool uwp = targetPlatform.contains('uwp');
final String bundlePlatform = targetPlatform.startsWith('windows') ? 'windows' : targetPlatform;
final String target = '${buildMode}_bundle_${bundlePlatform}_assets${uwp ? '_uwp' : ''}';
final String target = '${buildMode}_bundle_${bundlePlatform}_assets';
final Process assembleProcess = await Process.start(
flutterExecutable,
<String>[
Expand Down
2 changes: 0 additions & 2 deletions packages/flutter_tools/lib/src/android/android_device.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ class AndroidDevice extends Device {
case TargetPlatform.linux_x64:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
case TargetPlatform.windows_uwp_x64:
case TargetPlatform.windows_x64:
throw UnsupportedError('Invalid target platform for Android');
}
Expand Down Expand Up @@ -565,7 +564,6 @@ class AndroidDevice extends Device {
case TargetPlatform.linux_x64:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
case TargetPlatform.windows_uwp_x64:
case TargetPlatform.windows_x64:
_logger.printError('Android platforms are only supported.');
return LaunchResult.failed();
Expand Down
40 changes: 1 addition & 39 deletions packages/flutter_tools/lib/src/artifacts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ enum Artifact {
windowsDesktopPath,
/// The root of the cpp client code for Windows desktop.
windowsCppClientWrapper,
/// The root of the cpp client code for Windows UWP desktop.
windowsUwpCppClientWrapper,
/// The root of the Windows UWP desktop sources.
windowsUwpDesktopPath,

/// The root of the sky_engine package.
skyEnginePath,
/// The location of the macOS engine podspec file.
Expand All @@ -54,9 +51,6 @@ enum Artifact {
/// Tools related to subsetting or icon font files.
fontSubset,
constFinder,

// Windows UWP app management tool.
uwptool,
}

/// A subset of [Artifact]s that are platform and build mode independent
Expand Down Expand Up @@ -120,7 +114,6 @@ TargetPlatform? _mapTargetPlatform(TargetPlatform? targetPlatform) {
case TargetPlatform.linux_x64:
case TargetPlatform.linux_arm64:
case TargetPlatform.windows_x64:
case TargetPlatform.windows_uwp_x64:
case TargetPlatform.fuchsia_arm64:
case TargetPlatform.fuchsia_x64:
case TargetPlatform.tester:
Expand All @@ -137,7 +130,6 @@ TargetPlatform? _mapTargetPlatform(TargetPlatform? targetPlatform) {
bool _isWindows(TargetPlatform? platform) {
switch (platform) {
case TargetPlatform.windows_x64:
case TargetPlatform.windows_uwp_x64:
return true;
case TargetPlatform.android:
case TargetPlatform.android_arm:
Expand Down Expand Up @@ -190,9 +182,7 @@ String? _artifactToFileName(Artifact artifact, [ TargetPlatform? platform, Build
case Artifact.linuxHeaders:
return 'flutter_linux';
case Artifact.windowsCppClientWrapper:
case Artifact.windowsUwpCppClientWrapper:
return 'cpp_client_wrapper';
case Artifact.windowsUwpDesktopPath:
case Artifact.windowsDesktopPath:
return '';
case Artifact.skyEnginePath:
Expand All @@ -209,8 +199,6 @@ String? _artifactToFileName(Artifact artifact, [ TargetPlatform? platform, Build
return 'font-subset$exe';
case Artifact.constFinder:
return 'const_finder.dart.snapshot';
case Artifact.uwptool:
return 'uwptool$exe';
}
}

Expand Down Expand Up @@ -431,7 +419,6 @@ class CachedArtifacts implements Artifacts {
case TargetPlatform.linux_x64:
case TargetPlatform.linux_arm64:
case TargetPlatform.windows_x64:
case TargetPlatform.windows_uwp_x64:
return _getDesktopArtifactPath(artifact, platform, mode);
case TargetPlatform.fuchsia_arm64:
case TargetPlatform.fuchsia_x64:
Expand Down Expand Up @@ -483,12 +470,9 @@ class CachedArtifacts implements Artifacts {
case Artifact.platformKernelDill:
case Artifact.platformLibrariesJson:
case Artifact.skyEnginePath:
case Artifact.uwptool:
case Artifact.vmSnapshotData:
case Artifact.windowsCppClientWrapper:
case Artifact.windowsDesktopPath:
case Artifact.windowsUwpCppClientWrapper:
case Artifact.windowsUwpDesktopPath:
return _getHostArtifactPath(artifact, platform, mode);
}
}
Expand Down Expand Up @@ -519,12 +503,9 @@ class CachedArtifacts implements Artifacts {
case Artifact.platformKernelDill:
case Artifact.platformLibrariesJson:
case Artifact.skyEnginePath:
case Artifact.uwptool:
case Artifact.vmSnapshotData:
case Artifact.windowsCppClientWrapper:
case Artifact.windowsDesktopPath:
case Artifact.windowsUwpCppClientWrapper:
case Artifact.windowsUwpDesktopPath:
return _getHostArtifactPath(artifact, platform, mode);
}
}
Expand Down Expand Up @@ -567,12 +548,9 @@ class CachedArtifacts implements Artifacts {
case Artifact.linuxHeaders:
case Artifact.platformLibrariesJson:
case Artifact.skyEnginePath:
case Artifact.uwptool:
case Artifact.vmSnapshotData:
case Artifact.windowsCppClientWrapper:
case Artifact.windowsDesktopPath:
case Artifact.windowsUwpCppClientWrapper:
case Artifact.windowsUwpDesktopPath:
return _getHostArtifactPath(artifact, platform, mode);
}
}
Expand Down Expand Up @@ -626,15 +604,9 @@ class CachedArtifacts implements Artifacts {
}
final String engineArtifactsPath = _cache.getArtifactDirectory('engine').path;
return _fileSystem.path.join(engineArtifactsPath, platformDirName, _artifactToFileName(artifact, platform, mode));
case Artifact.windowsUwpDesktopPath:
final String engineArtifactsPath = _cache.getArtifactDirectory('engine').path;
return _fileSystem.path.join(engineArtifactsPath, 'windows-uwp-x64-${getNameForBuildMode(mode!)}', _artifactToFileName(artifact, platform, mode));
case Artifact.windowsCppClientWrapper:
final String engineArtifactsPath = _cache.getArtifactDirectory('engine').path;
return _fileSystem.path.join(engineArtifactsPath, 'windows-x64', _artifactToFileName(artifact, platform, mode));
case Artifact.windowsUwpCppClientWrapper:
final String engineArtifactsPath = _cache.getArtifactDirectory('engine').path;
return _fileSystem.path.join(engineArtifactsPath, 'windows-uwp-x64-debug', _artifactToFileName(artifact, platform, mode));
case Artifact.skyEnginePath:
final Directory dartPackageDirectory = _cache.getCacheDir('pkg');
return _fileSystem.path.join(dartPackageDirectory.path, _artifactToFileName(artifact));
Expand All @@ -644,11 +616,6 @@ class CachedArtifacts implements Artifacts {
.childDirectory(_enginePlatformDirectoryName(platform))
.childFile(_artifactToFileName(artifact, platform, mode)!)
.path;
case Artifact.uwptool:
return _cache.getArtifactDirectory('engine')
.childDirectory('windows-uwp-x64-${getNameForBuildMode(mode ?? BuildMode.debug)}')
.childFile(_artifactToFileName(artifact, platform, mode)!)
.path;
case Artifact.flutterFramework:
case Artifact.flutterXcframework:
case Artifact.fuchsiaFlutterRunner:
Expand Down Expand Up @@ -684,7 +651,6 @@ class CachedArtifacts implements Artifacts {
case TargetPlatform.android_arm64:
case TargetPlatform.android_x64:
case TargetPlatform.android_x86:
case TargetPlatform.windows_uwp_x64:
assert(mode != null, 'Need to specify a build mode for platform $platform.');
final String suffix = mode != BuildMode.debug ? '-${snakeCase(getModeName(mode!), '-')}' : '';
return _fileSystem.path.join(engineDir, platformName + suffix);
Expand Down Expand Up @@ -914,19 +880,15 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
return _fileSystem.path.join(_hostEngineOutPath, artifactFileName);
case Artifact.constFinder:
return _fileSystem.path.join(_hostEngineOutPath, 'gen', artifactFileName);
case Artifact.windowsUwpDesktopPath:
case Artifact.linuxDesktopPath:
case Artifact.linuxHeaders:
case Artifact.windowsDesktopPath:
case Artifact.windowsCppClientWrapper:
case Artifact.windowsUwpCppClientWrapper:
return _fileSystem.path.join(_hostEngineOutPath, artifactFileName);
case Artifact.frontendServerSnapshotForEngineDartSdk:
return _fileSystem.path.join(
_hostEngineOutPath, 'dart-sdk', 'bin', 'snapshots', artifactFileName,
);
case Artifact.uwptool:
return _fileSystem.path.join(_hostEngineOutPath, artifactFileName);
}
}

Expand Down
1 change: 0 additions & 1 deletion packages/flutter_tools/lib/src/base/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ class AOTSnapshotter {
TargetPlatform.linux_x64,
TargetPlatform.linux_arm64,
TargetPlatform.windows_x64,
TargetPlatform.windows_uwp_x64,
].contains(platform);
}
}
12 changes: 0 additions & 12 deletions packages/flutter_tools/lib/src/build_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ enum TargetPlatform {
linux_x64,
linux_arm64,
windows_x64,
windows_uwp_x64,
fuchsia_arm64,
fuchsia_x64,
tester,
Expand Down Expand Up @@ -660,8 +659,6 @@ String getNameForTargetPlatform(TargetPlatform platform, {DarwinArch? darwinArch
return 'linux-arm64';
case TargetPlatform.windows_x64:
return 'windows-x64';
case TargetPlatform.windows_uwp_x64:
return 'windows-uwp-x64';
case TargetPlatform.fuchsia_arm64:
return 'fuchsia-arm64';
case TargetPlatform.fuchsia_x64:
Expand Down Expand Up @@ -705,8 +702,6 @@ TargetPlatform getTargetPlatformForName(String platform) {
return TargetPlatform.linux_arm64;
case 'windows-x64':
return TargetPlatform.windows_x64;
case 'windows-uwp-x64':
return TargetPlatform.windows_uwp_x64;
case 'web-javascript':
return TargetPlatform.web_javascript;
}
Expand Down Expand Up @@ -770,7 +765,6 @@ String fuchsiaArchForTargetPlatform(TargetPlatform targetPlatform) {
case TargetPlatform.linux_x64:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
case TargetPlatform.windows_uwp_x64:
case TargetPlatform.windows_x64:
throw UnsupportedError('Unexpected Fuchsia platform $targetPlatform');
}
Expand Down Expand Up @@ -859,11 +853,6 @@ String getWindowsBuildDirectory() {
return globals.fs.path.join(getBuildDirectory(), 'windows');
}

/// Returns the Windows UWP build output directory.
String getWindowsBuildUwpDirectory() {
return globals.fs.path.join(getBuildDirectory(), 'winuwp');
}

/// Returns the Fuchsia build output directory.
String getFuchsiaBuildDirectory() {
return globals.fs.path.join(getBuildDirectory(), 'fuchsia');
Expand Down Expand Up @@ -1030,7 +1019,6 @@ String getNameForTargetPlatformArch(TargetPlatform platform) {
case TargetPlatform.ios:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
case TargetPlatform.windows_uwp_x64:
throw UnsupportedError('Unexpected target platform $platform');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ class KernelSnapshot extends Target {
case TargetPlatform.linux_arm64:
case TargetPlatform.tester:
case TargetPlatform.web_javascript:
case TargetPlatform.windows_uwp_x64:
forceLinkPlatform = false;
break;
}
Expand Down
Loading

0 comments on commit 944fcda

Please sign in to comment.