Teach flutter msbuild for Windows (#32335)
Eliminates the need for a build.bat in the Windows build workflow, adding
preliminary support for building using msbuild. The handling of
vcvars64.bat may be refined in the future, but this serves as a starting point.
diff --git a/packages/flutter_tools/lib/src/project.dart b/packages/flutter_tools/lib/src/project.dart
index 2decfcf..8ac323e 100644
--- a/packages/flutter_tools/lib/src/project.dart
+++ b/packages/flutter_tools/lib/src/project.dart
@@ -592,13 +592,19 @@
final FlutterProject project;
- bool existsSync() => project.directory.childDirectory('windows').existsSync();
+ bool existsSync() => _editableDirectory.existsSync();
- // Note: The build script file exists as a temporary shim.
- File get buildScript => project.directory.childDirectory('windows').childFile('build.bat');
+ Directory get _editableDirectory => project.directory.childDirectory('windows');
+
+ /// Contains definitions for FLUTTER_ROOT, LOCAL_ENGINE, and more flags for
+ /// the build.
+ File get generatedPropertySheetFile => _editableDirectory.childDirectory('flutter').childFile('Generated.props');
+
+ // The MSBuild project file.
+ File get vcprojFile => _editableDirectory.childFile('Runner.vcxproj');
// Note: The name script file exists as a temporary shim.
- File get nameScript => project.directory.childDirectory('windows').childFile('name_output.bat');
+ File get nameScript => _editableDirectory.childFile('name_output.bat');
}
/// The Linux sub project.