Unverified Commit e67113c1 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] use UWP cpp wrapper for UWP build (#85167)

parent 640ba2a7
......@@ -37,8 +37,10 @@ enum Artifact {
linuxHeaders,
/// The root of the Windows desktop sources.
windowsDesktopPath,
/// The root of the cpp client code for Windows desktop and Windows UWP desktop.
/// 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.
......@@ -192,6 +194,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:
......@@ -577,6 +580,9 @@ class CachedArtifacts implements Artifacts {
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));
......@@ -862,6 +868,7 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
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, 'gen', artifactFileName);
......
......@@ -144,7 +144,7 @@ class UnpackWindowsUwp extends Target {
);
final String clientSourcePath = environment.artifacts
.getArtifactPath(
Artifact.windowsCppClientWrapper,
Artifact.windowsUwpCppClientWrapper,
platform: TargetPlatform.windows_x64,
mode: buildMode,
);
......
......@@ -145,7 +145,7 @@ void main() {
environment.buildDir.createSync(recursive: true);
final String windowsDesktopPath = artifacts.getArtifactPath(Artifact.windowsUwpDesktopPath, platform: TargetPlatform.windows_x64, mode: BuildMode.debug);
final String windowsCppClientWrapper = artifacts.getArtifactPath(Artifact.windowsCppClientWrapper, platform: TargetPlatform.windows_x64, mode: BuildMode.debug);
final String windowsCppClientWrapper = artifacts.getArtifactPath(Artifact.windowsUwpCppClientWrapper, platform: TargetPlatform.windows_x64, mode: BuildMode.debug);
final String icuData = artifacts.getArtifactPath(Artifact.icuData, platform: TargetPlatform.windows_x64);
final List<String> requiredFiles = <String>[
'$windowsDesktopPath\\flutter_export.h',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment