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.
This commit is contained in:
stuartmorgan 2019-05-30 12:45:33 -07:00 committed by GitHub
parent d963e4fe35
commit 5f6f70e677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<void> 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();