From 5f6f70e67776e3b645ffd91351850af93be76f0c Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 30 May 2019 12:45:33 -0700 Subject: [PATCH] Pass local engine variables to Windows build (#33540) The props file used in the Windows build didn't include the local engine build flags when applicable. --- packages/flutter_tools/lib/src/windows/build_windows.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/flutter_tools/lib/src/windows/build_windows.dart b/packages/flutter_tools/lib/src/windows/build_windows.dart index eddd533b03..a4ddb7d15b 100644 --- a/packages/flutter_tools/lib/src/windows/build_windows.dart +++ b/packages/flutter_tools/lib/src/windows/build_windows.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file +import '../artifacts.dart'; import '../base/common.dart'; import '../base/file_system.dart'; import '../base/io.dart'; @@ -22,6 +23,12 @@ Future buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {S 'PROJECT_DIR': windowsProject.project.directory.path, 'TRACK_WIDGET_CREATION': (buildInfo?.trackWidgetCreation == true).toString(), }; + if (artifacts is LocalEngineArtifacts) { + final LocalEngineArtifacts localEngineArtifacts = artifacts; + final String engineOutPath = localEngineArtifacts.engineOutPath; + environment['FLUTTER_ENGINE'] = fs.path.dirname(fs.path.dirname(engineOutPath)); + environment['LOCAL_ENGINE'] = fs.path.basename(engineOutPath); + } writePropertySheet(windowsProject.generatedPropertySheetFile, environment); final String vcvarsScript = await findVcvars();