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 { ...@@ -37,8 +37,10 @@ enum Artifact {
linuxHeaders, linuxHeaders,
/// The root of the Windows desktop sources. /// The root of the Windows desktop sources.
windowsDesktopPath, 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, windowsCppClientWrapper,
/// The root of the cpp client code for Windows UWP desktop.
windowsUwpCppClientWrapper,
/// The root of the Windows UWP desktop sources. /// The root of the Windows UWP desktop sources.
windowsUwpDesktopPath, windowsUwpDesktopPath,
/// The root of the sky_engine package. /// The root of the sky_engine package.
...@@ -192,6 +194,7 @@ String? _artifactToFileName(Artifact artifact, [ TargetPlatform? platform, Build ...@@ -192,6 +194,7 @@ String? _artifactToFileName(Artifact artifact, [ TargetPlatform? platform, Build
case Artifact.linuxHeaders: case Artifact.linuxHeaders:
return 'flutter_linux'; return 'flutter_linux';
case Artifact.windowsCppClientWrapper: case Artifact.windowsCppClientWrapper:
case Artifact.windowsUwpCppClientWrapper:
return 'cpp_client_wrapper'; return 'cpp_client_wrapper';
case Artifact.windowsUwpDesktopPath: case Artifact.windowsUwpDesktopPath:
case Artifact.windowsDesktopPath: case Artifact.windowsDesktopPath:
...@@ -577,6 +580,9 @@ class CachedArtifacts implements Artifacts { ...@@ -577,6 +580,9 @@ class CachedArtifacts implements Artifacts {
case Artifact.windowsCppClientWrapper: case Artifact.windowsCppClientWrapper:
final String engineArtifactsPath = _cache.getArtifactDirectory('engine').path; final String engineArtifactsPath = _cache.getArtifactDirectory('engine').path;
return _fileSystem.path.join(engineArtifactsPath, 'windows-x64', _artifactToFileName(artifact, platform, mode)); 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: case Artifact.skyEnginePath:
final Directory dartPackageDirectory = _cache.getCacheDir('pkg'); final Directory dartPackageDirectory = _cache.getCacheDir('pkg');
return _fileSystem.path.join(dartPackageDirectory.path, _artifactToFileName(artifact)); return _fileSystem.path.join(dartPackageDirectory.path, _artifactToFileName(artifact));
...@@ -862,6 +868,7 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts { ...@@ -862,6 +868,7 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
case Artifact.linuxHeaders: case Artifact.linuxHeaders:
case Artifact.windowsDesktopPath: case Artifact.windowsDesktopPath:
case Artifact.windowsCppClientWrapper: case Artifact.windowsCppClientWrapper:
case Artifact.windowsUwpCppClientWrapper:
return _fileSystem.path.join(_hostEngineOutPath, artifactFileName); return _fileSystem.path.join(_hostEngineOutPath, artifactFileName);
case Artifact.frontendServerSnapshotForEngineDartSdk: case Artifact.frontendServerSnapshotForEngineDartSdk:
return _fileSystem.path.join(_hostEngineOutPath, 'gen', artifactFileName); return _fileSystem.path.join(_hostEngineOutPath, 'gen', artifactFileName);
......
...@@ -144,7 +144,7 @@ class UnpackWindowsUwp extends Target { ...@@ -144,7 +144,7 @@ class UnpackWindowsUwp extends Target {
); );
final String clientSourcePath = environment.artifacts final String clientSourcePath = environment.artifacts
.getArtifactPath( .getArtifactPath(
Artifact.windowsCppClientWrapper, Artifact.windowsUwpCppClientWrapper,
platform: TargetPlatform.windows_x64, platform: TargetPlatform.windows_x64,
mode: buildMode, mode: buildMode,
); );
......
...@@ -145,7 +145,7 @@ void main() { ...@@ -145,7 +145,7 @@ void main() {
environment.buildDir.createSync(recursive: true); environment.buildDir.createSync(recursive: true);
final String windowsDesktopPath = artifacts.getArtifactPath(Artifact.windowsUwpDesktopPath, platform: TargetPlatform.windows_x64, mode: BuildMode.debug); 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 String icuData = artifacts.getArtifactPath(Artifact.icuData, platform: TargetPlatform.windows_x64);
final List<String> requiredFiles = <String>[ final List<String> requiredFiles = <String>[
'$windowsDesktopPath\\flutter_export.h', '$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