[Windows] Add target architecture to build path (#131843)
To implement windows-arm64 support, it is needed to add architecture as a subdirectory (https://github.com/flutter/flutter/issues/129805). In short, when performing a flutter windows build, we have: - Before: build/windows/runner/Release/gallery.exe - After: build/windows/x64/runner/Release/gallery.exe This convention follows what flutter linux build does. Addresses: https://github.com/flutter/flutter/issues/129805 Addresses: https://github.com/flutter/flutter/issues/116196 Design doc: [flutter.dev/go/windows-arm64](https://flutter.dev/go/windows-arm64)
This commit is contained in:
@@ -82,9 +82,12 @@ void main() {
|
||||
'-S',
|
||||
fileSystem.path.absolute(fileSystem.path.dirname(buildFilePath)),
|
||||
'-B',
|
||||
r'build\windows',
|
||||
r'build\windows\x64',
|
||||
'-G',
|
||||
generator,
|
||||
'-A',
|
||||
'x64',
|
||||
'-DFLUTTER_TARGET_PLATFORM=windows-x64',
|
||||
],
|
||||
onRun: onRun,
|
||||
);
|
||||
@@ -100,7 +103,7 @@ void main() {
|
||||
command: <String>[
|
||||
_cmakePath,
|
||||
'--build',
|
||||
r'build\windows',
|
||||
r'build\windows\x64',
|
||||
'--config',
|
||||
buildMode,
|
||||
...<String>['--target', 'INSTALL'],
|
||||
@@ -222,21 +225,21 @@ Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework
|
||||
Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
|
||||
Checking Build System
|
||||
Generating C:/foo/windows/flutter/ephemeral/flutter_windows.dll, [etc], _phony_
|
||||
Building Custom Rule C:/foo/windows/flutter/CMakeLists.txt
|
||||
Generating C:/foo/windows/x64/flutter/ephemeral/flutter_windows.dll, [etc], _phony_
|
||||
Building Custom Rule C:/foo/windows/x64/flutter/CMakeLists.txt
|
||||
standard_codec.cc
|
||||
Generating Code...
|
||||
flutter_wrapper_plugin.vcxproj -> C:\foo\build\windows\flutter\Debug\flutter_wrapper_plugin.lib
|
||||
C:\foo\windows\runner\main.cpp(18): error C2220: the following warning is treated as an error [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\windows\runner\main.cpp(18): warning C4706: assignment within conditional expression [C:\foo\build\windows\runner\test.vcxproj]
|
||||
main.obj : error LNK2019: unresolved external symbol "void __cdecl Bar(void)" (?Bar@@YAXXZ) referenced in function wWinMain [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\build\windows\runner\Debug\test.exe : fatal error LNK1120: 1 unresolved externals [C:\foo\build\windows\runner\test.vcxproj]
|
||||
Building Custom Rule C:/foo/windows/runner/CMakeLists.txt
|
||||
flutter_wrapper_plugin.vcxproj -> C:\foo\build\windows\x64\flutter\Debug\flutter_wrapper_plugin.lib
|
||||
C:\foo\windows\x64\runner\main.cpp(18): error C2220: the following warning is treated as an error [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
C:\foo\windows\x64\runner\main.cpp(18): warning C4706: assignment within conditional expression [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
main.obj : error LNK2019: unresolved external symbol "void __cdecl Bar(void)" (?Bar@@YAXXZ) referenced in function wWinMain [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
C:\foo\build\windows\x64\runner\Debug\test.exe : fatal error LNK1120: 1 unresolved externals [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
Building Custom Rule C:/foo/windows/x64/runner/CMakeLists.txt
|
||||
flutter_window.cpp
|
||||
main.cpp
|
||||
C:\foo\windows\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\windows\x64\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
-- Install configuration: "Debug"
|
||||
-- Installing: C:/foo/build/windows/runner/Debug/data/icudtl.dat
|
||||
-- Installing: C:/foo/build/windows/x64/runner/Debug/data/icudtl.dat
|
||||
''';
|
||||
|
||||
processManager = FakeProcessManager.list(<FakeCommand>[
|
||||
@@ -251,11 +254,11 @@ C:\foo\windows\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier
|
||||
);
|
||||
// Just the warnings and errors should be surfaced.
|
||||
expect(testLogger.errorText, r'''
|
||||
C:\foo\windows\runner\main.cpp(18): error C2220: the following warning is treated as an error [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\windows\runner\main.cpp(18): warning C4706: assignment within conditional expression [C:\foo\build\windows\runner\test.vcxproj]
|
||||
main.obj : error LNK2019: unresolved external symbol "void __cdecl Bar(void)" (?Bar@@YAXXZ) referenced in function wWinMain [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\build\windows\runner\Debug\test.exe : fatal error LNK1120: 1 unresolved externals [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\windows\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier [C:\foo\build\windows\runner\test.vcxproj]
|
||||
C:\foo\windows\x64\runner\main.cpp(18): error C2220: the following warning is treated as an error [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
C:\foo\windows\x64\runner\main.cpp(18): warning C4706: assignment within conditional expression [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
main.obj : error LNK2019: unresolved external symbol "void __cdecl Bar(void)" (?Bar@@YAXXZ) referenced in function wWinMain [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
C:\foo\build\windows\x64\runner\Debug\test.exe : fatal error LNK1120: 1 unresolved externals [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
C:\foo\windows\x64\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier [C:\foo\build\windows\x64\runner\test.vcxproj]
|
||||
''');
|
||||
}, overrides: <Type, Generator>{
|
||||
FileSystem: () => fileSystem,
|
||||
@@ -311,7 +314,7 @@ C:\foo\windows\runner\main.cpp(17,1): error C2065: 'Baz': undeclared identifier
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="somepath\build\windows\CMakeFiles\8b570225f626c250e12bc1ede88babae\flutter_windows.dll.rule">
|
||||
<CustomBuild Include="somepath\build\windows\x64\CMakeFiles\8b570225f626c250e12bc1ede88babae\flutter_windows.dll.rule">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating some files</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">setlocal
|
||||
"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E env FOO=bar C:/src/flutter/packages/flutter_tools/bin/tool_backend.bat windows-x64 Debug
|
||||
@@ -391,6 +394,7 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
final File assembleProject = fileSystem.currentDirectory
|
||||
.childDirectory('build')
|
||||
.childDirectory('windows')
|
||||
.childDirectory('x64')
|
||||
.childDirectory('flutter')
|
||||
.childFile('flutter_assemble.vcxproj');
|
||||
assembleProject.createSync(recursive: true);
|
||||
@@ -892,7 +896,7 @@ if %errorlevel% neq 0 goto :VCEnd</Command>
|
||||
..visualStudioOverride = fakeVisualStudio;
|
||||
setUpMockProjectFilesForBuild();
|
||||
|
||||
fileSystem.file(r'build\windows\runner\Release\app.so')
|
||||
fileSystem.file(r'build\windows\x64\runner\Release\app.so')
|
||||
..createSync(recursive: true)
|
||||
..writeAsBytesSync(List<int>.generate(10000, (int index) => 0));
|
||||
|
||||
|
||||
@@ -0,0 +1,299 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:file/file.dart';
|
||||
import 'package:file/memory.dart';
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/base/terminal.dart';
|
||||
import 'package:flutter_tools/src/cmake_project.dart';
|
||||
import 'package:flutter_tools/src/windows/migrations/build_architecture_migration.dart';
|
||||
import 'package:test/fake.dart';
|
||||
|
||||
import '../../../src/common.dart';
|
||||
|
||||
void main () {
|
||||
group('Windows Flutter build architecture migration', () {
|
||||
late MemoryFileSystem memoryFileSystem;
|
||||
late BufferLogger testLogger;
|
||||
late FakeWindowsProject mockProject;
|
||||
late File cmakeFile;
|
||||
late Directory buildDirectory;
|
||||
|
||||
setUp(() {
|
||||
memoryFileSystem = MemoryFileSystem.test();
|
||||
cmakeFile = memoryFileSystem.file('CMakeLists.txt');
|
||||
buildDirectory = memoryFileSystem.directory('x64');
|
||||
|
||||
testLogger = BufferLogger(
|
||||
terminal: Terminal.test(),
|
||||
outputPreferences: OutputPreferences.test(),
|
||||
);
|
||||
|
||||
mockProject = FakeWindowsProject(cmakeFile);
|
||||
});
|
||||
|
||||
testWithoutContext('delete old runner directory', () {
|
||||
buildDirectory.createSync();
|
||||
final Directory oldRunnerDirectory =
|
||||
buildDirectory
|
||||
.parent
|
||||
.childDirectory('runner');
|
||||
oldRunnerDirectory.createSync();
|
||||
final File executable = oldRunnerDirectory.childFile('program.exe');
|
||||
executable.createSync();
|
||||
expect(oldRunnerDirectory.existsSync(), isTrue);
|
||||
|
||||
final BuildArchitectureMigration migration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
migration.migrate();
|
||||
|
||||
expect(oldRunnerDirectory.existsSync(), isFalse);
|
||||
expect(testLogger.traceText,
|
||||
contains(
|
||||
'Deleting previous build folder ./runner.\n'
|
||||
'New binaries can be found in x64/runner.\n'
|
||||
)
|
||||
);
|
||||
expect(testLogger.statusText, isEmpty);
|
||||
});
|
||||
|
||||
testWithoutContext('skipped if CMake file is missing', () {
|
||||
final BuildArchitectureMigration migration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
migration.migrate();
|
||||
expect(cmakeFile.existsSync(), isFalse);
|
||||
|
||||
expect(testLogger.traceText,
|
||||
contains('windows/flutter/CMakeLists.txt file not found, skipping build architecture migration'));
|
||||
expect(testLogger.statusText, isEmpty);
|
||||
});
|
||||
|
||||
testWithoutContext('skipped if nothing to migrate', () {
|
||||
const String cmakeFileContents = 'Nothing to migrate';
|
||||
|
||||
cmakeFile.writeAsStringSync(cmakeFileContents);
|
||||
|
||||
final DateTime cmakeUpdatedAt = cmakeFile.lastModifiedSync();
|
||||
|
||||
final BuildArchitectureMigration buildArchitectureMigration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
buildArchitectureMigration.migrate();
|
||||
|
||||
expect(cmakeFile.lastModifiedSync(), cmakeUpdatedAt);
|
||||
expect(cmakeFile.readAsStringSync(), cmakeFileContents);
|
||||
expect(testLogger.statusText, isEmpty);
|
||||
});
|
||||
|
||||
testWithoutContext('skipped if already migrated', () {
|
||||
const String cmakeFileContents =
|
||||
'# TODO: Move the rest of this into files in ephemeral. See\n'
|
||||
'# https://github.com/flutter/flutter/issues/57146.\n'
|
||||
'set(WRAPPER_ROOT "\${EPHEMERAL_DIR}/cpp_client_wrapper")\n'
|
||||
'\n'
|
||||
'# Set fallback configurations for older versions of the flutter tool.\n'
|
||||
'if (NOT DEFINED FLUTTER_TARGET_PLATFORM)\n'
|
||||
' set(FLUTTER_TARGET_PLATFORM "windows-x64")\n'
|
||||
'endif()\n'
|
||||
'\n'
|
||||
'# === Flutter Library ===\n'
|
||||
'...\n'
|
||||
'add_custom_command(\n'
|
||||
' OUTPUT \${FLUTTER_LIBRARY} \${FLUTTER_LIBRARY_HEADERS}\n'
|
||||
' \${CPP_WRAPPER_SOURCES_CORE} \${CPP_WRAPPER_SOURCES_PLUGIN}\n'
|
||||
' \${CPP_WRAPPER_SOURCES_APP}\n'
|
||||
' \${PHONY_OUTPUT}\n'
|
||||
' COMMAND \${CMAKE_COMMAND} -E env\n'
|
||||
' \${FLUTTER_TOOL_ENVIRONMENT}\n'
|
||||
' "\${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"\n'
|
||||
' \${FLUTTER_TARGET_PLATFORM} \$<CONFIG>\n'
|
||||
' VERBATIM\n'
|
||||
')\n';
|
||||
|
||||
cmakeFile.writeAsStringSync(cmakeFileContents);
|
||||
|
||||
final DateTime cmakeUpdatedAt = cmakeFile.lastModifiedSync();
|
||||
|
||||
final BuildArchitectureMigration buildArchitectureMigration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
buildArchitectureMigration.migrate();
|
||||
|
||||
expect(cmakeFile.lastModifiedSync(), cmakeUpdatedAt);
|
||||
expect(cmakeFile.readAsStringSync(), cmakeFileContents);
|
||||
|
||||
expect(testLogger.statusText, isEmpty);
|
||||
});
|
||||
|
||||
testWithoutContext('skipped if already migrated (CRLF)', () {
|
||||
const String cmakeFileContents =
|
||||
'# TODO: Move the rest of this into files in ephemeral. See\r\n'
|
||||
'# https://github.com/flutter/flutter/issues/57146.\r\n'
|
||||
'set(WRAPPER_ROOT "\${EPHEMERAL_DIR}/cpp_client_wrapper")\r\n'
|
||||
'\r\n'
|
||||
'# Set fallback configurations for older versions of the flutter tool.\r\n'
|
||||
'if (NOT DEFINED FLUTTER_TARGET_PLATFORM)\r\n'
|
||||
' set(FLUTTER_TARGET_PLATFORM "windows-x64")\r\n'
|
||||
'endif()\r\n'
|
||||
'\r\n'
|
||||
'# === Flutter Library ===\r\n'
|
||||
'...\r\n'
|
||||
'add_custom_command(\r\n'
|
||||
' OUTPUT \${FLUTTER_LIBRARY} \${FLUTTER_LIBRARY_HEADERS}\r\n'
|
||||
' \${CPP_WRAPPER_SOURCES_CORE} \${CPP_WRAPPER_SOURCES_PLUGIN}\r\n'
|
||||
' \${CPP_WRAPPER_SOURCES_APP}\r\n'
|
||||
' \${PHONY_OUTPUT}\r\n'
|
||||
' COMMAND \${CMAKE_COMMAND} -E env\r\n'
|
||||
' \${FLUTTER_TOOL_ENVIRONMENT}\r\n'
|
||||
' "\${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"\r\n'
|
||||
' \${FLUTTER_TARGET_PLATFORM} \$<CONFIG>\r\n'
|
||||
' VERBATIM\r\n'
|
||||
')\r\n';
|
||||
|
||||
cmakeFile.writeAsStringSync(cmakeFileContents);
|
||||
|
||||
final DateTime cmakeUpdatedAt = cmakeFile.lastModifiedSync();
|
||||
|
||||
final BuildArchitectureMigration buildArchitectureMigration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
buildArchitectureMigration.migrate();
|
||||
|
||||
expect(cmakeFile.lastModifiedSync(), cmakeUpdatedAt);
|
||||
expect(cmakeFile.readAsStringSync(), cmakeFileContents);
|
||||
|
||||
expect(testLogger.statusText, isEmpty);
|
||||
});
|
||||
|
||||
testWithoutContext('migrates project to set the target platform', () {
|
||||
cmakeFile.writeAsStringSync(
|
||||
'# TODO: Move the rest of this into files in ephemeral. See\n'
|
||||
'# https://github.com/flutter/flutter/issues/57146.\n'
|
||||
'set(WRAPPER_ROOT "\${EPHEMERAL_DIR}/cpp_client_wrapper")\n'
|
||||
'\n'
|
||||
'# === Flutter Library ===\n'
|
||||
'...\n'
|
||||
'add_custom_command(\n'
|
||||
' OUTPUT \${FLUTTER_LIBRARY} \${FLUTTER_LIBRARY_HEADERS}\n'
|
||||
' \${CPP_WRAPPER_SOURCES_CORE} \${CPP_WRAPPER_SOURCES_PLUGIN}\n'
|
||||
' \${CPP_WRAPPER_SOURCES_APP}\n'
|
||||
' \${PHONY_OUTPUT}\n'
|
||||
' COMMAND \${CMAKE_COMMAND} -E env\n'
|
||||
' \${FLUTTER_TOOL_ENVIRONMENT}\n'
|
||||
' "\${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"\n'
|
||||
' windows-x64 \$<CONFIG>\n'
|
||||
' VERBATIM\n'
|
||||
')\n'
|
||||
);
|
||||
final BuildArchitectureMigration buildArchitectureMigration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
buildArchitectureMigration.migrate();
|
||||
|
||||
expect(cmakeFile.readAsStringSync(),
|
||||
'# TODO: Move the rest of this into files in ephemeral. See\n'
|
||||
'# https://github.com/flutter/flutter/issues/57146.\n'
|
||||
'set(WRAPPER_ROOT "\${EPHEMERAL_DIR}/cpp_client_wrapper")\n'
|
||||
'\n'
|
||||
'# Set fallback configurations for older versions of the flutter tool.\n'
|
||||
'if (NOT DEFINED FLUTTER_TARGET_PLATFORM)\n'
|
||||
' set(FLUTTER_TARGET_PLATFORM "windows-x64")\n'
|
||||
'endif()\n'
|
||||
'\n'
|
||||
'# === Flutter Library ===\n'
|
||||
'...\n'
|
||||
'add_custom_command(\n'
|
||||
' OUTPUT \${FLUTTER_LIBRARY} \${FLUTTER_LIBRARY_HEADERS}\n'
|
||||
' \${CPP_WRAPPER_SOURCES_CORE} \${CPP_WRAPPER_SOURCES_PLUGIN}\n'
|
||||
' \${CPP_WRAPPER_SOURCES_APP}\n'
|
||||
' \${PHONY_OUTPUT}\n'
|
||||
' COMMAND \${CMAKE_COMMAND} -E env\n'
|
||||
' \${FLUTTER_TOOL_ENVIRONMENT}\n'
|
||||
' "\${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"\n'
|
||||
' \${FLUTTER_TARGET_PLATFORM} \$<CONFIG>\n'
|
||||
' VERBATIM\n'
|
||||
')\n'
|
||||
);
|
||||
|
||||
expect(testLogger.statusText, contains('windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.'));
|
||||
});
|
||||
|
||||
testWithoutContext('migrates project to set the target platform (CRLF)', () {
|
||||
cmakeFile.writeAsStringSync(
|
||||
'# TODO: Move the rest of this into files in ephemeral. See\r\n'
|
||||
'# https://github.com/flutter/flutter/issues/57146.\r\n'
|
||||
'set(WRAPPER_ROOT "\${EPHEMERAL_DIR}/cpp_client_wrapper")\r\n'
|
||||
'\r\n'
|
||||
'# === Flutter Library ===\r\n'
|
||||
'...\r\n'
|
||||
'add_custom_command(\r\n'
|
||||
' OUTPUT \${FLUTTER_LIBRARY} \${FLUTTER_LIBRARY_HEADERS}\r\n'
|
||||
' \${CPP_WRAPPER_SOURCES_CORE} \${CPP_WRAPPER_SOURCES_PLUGIN}\r\n'
|
||||
' \${CPP_WRAPPER_SOURCES_APP}\r\n'
|
||||
' \${PHONY_OUTPUT}\r\n'
|
||||
' COMMAND \${CMAKE_COMMAND} -E env\r\n'
|
||||
' \${FLUTTER_TOOL_ENVIRONMENT}\r\n'
|
||||
' "\${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"\r\n'
|
||||
' windows-x64 \$<CONFIG>\r\n'
|
||||
' VERBATIM\r\n'
|
||||
')\r\n'
|
||||
);
|
||||
|
||||
final BuildArchitectureMigration buildArchitectureMigration = BuildArchitectureMigration(
|
||||
mockProject,
|
||||
buildDirectory,
|
||||
testLogger,
|
||||
);
|
||||
buildArchitectureMigration.migrate();
|
||||
|
||||
expect(cmakeFile.readAsStringSync(),
|
||||
'# TODO: Move the rest of this into files in ephemeral. See\r\n'
|
||||
'# https://github.com/flutter/flutter/issues/57146.\r\n'
|
||||
'set(WRAPPER_ROOT "\${EPHEMERAL_DIR}/cpp_client_wrapper")\r\n'
|
||||
'\r\n'
|
||||
'# Set fallback configurations for older versions of the flutter tool.\r\n'
|
||||
'if (NOT DEFINED FLUTTER_TARGET_PLATFORM)\r\n'
|
||||
' set(FLUTTER_TARGET_PLATFORM "windows-x64")\r\n'
|
||||
'endif()\r\n'
|
||||
'\r\n'
|
||||
'# === Flutter Library ===\r\n'
|
||||
'...\r\n'
|
||||
'add_custom_command(\r\n'
|
||||
' OUTPUT \${FLUTTER_LIBRARY} \${FLUTTER_LIBRARY_HEADERS}\r\n'
|
||||
' \${CPP_WRAPPER_SOURCES_CORE} \${CPP_WRAPPER_SOURCES_PLUGIN}\r\n'
|
||||
' \${CPP_WRAPPER_SOURCES_APP}\r\n'
|
||||
' \${PHONY_OUTPUT}\r\n'
|
||||
' COMMAND \${CMAKE_COMMAND} -E env\r\n'
|
||||
' \${FLUTTER_TOOL_ENVIRONMENT}\r\n'
|
||||
' "\${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"\r\n'
|
||||
' \${FLUTTER_TARGET_PLATFORM} \$<CONFIG>\r\n'
|
||||
' VERBATIM\r\n'
|
||||
')\r\n'
|
||||
);
|
||||
|
||||
expect(testLogger.statusText, contains('windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.'));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
class FakeWindowsProject extends Fake implements WindowsProject {
|
||||
FakeWindowsProject(this.managedCmakeFile);
|
||||
|
||||
@override
|
||||
final File managedCmakeFile;
|
||||
}
|
||||
@@ -45,6 +45,7 @@ void main() {
|
||||
projectRoot.path,
|
||||
'build',
|
||||
'windows',
|
||||
'x64',
|
||||
'runner',
|
||||
'Release',
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user