Unverified Commit 2daab305 authored by stuartmorgan's avatar stuartmorgan Committed by GitHub

Use GLFW-name artifacts on Windows and Linux (#38858)

Switch from the un-suffixed Windows and Linux libraries to the
_glfw-suffixed versions, in preparation for having non-GLFW versions
using the previous library/wrapper names.

Part of #38589
parent ce6dedfc
...@@ -22,13 +22,13 @@ class UnpackLinux extends Target { ...@@ -22,13 +22,13 @@ class UnpackLinux extends Target {
@override @override
List<Source> get outputs => const <Source>[ List<Source> get outputs => const <Source>[
Source.pattern('{PROJECT_DIR}/linux/flutter/libflutter_linux.so'), Source.pattern('{PROJECT_DIR}/linux/flutter/libflutter_linux_glfw.so'),
Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_export.h'), Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_export.h'),
Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_messenger.h'), Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_messenger.h'),
Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_plugin_registrar.h'), Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_plugin_registrar.h'),
Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_glfw.h'), Source.pattern('{PROJECT_DIR}/linux/flutter/flutter_glfw.h'),
Source.pattern('{PROJECT_DIR}/linux/flutter/icudtl.dat'), Source.pattern('{PROJECT_DIR}/linux/flutter/icudtl.dat'),
Source.pattern('{PROJECT_DIR}/linux/flutter/cpp_client_wrapper/*'), Source.pattern('{PROJECT_DIR}/linux/flutter/cpp_client_wrapper_glfw/*'),
]; ];
@override @override
......
...@@ -22,16 +22,16 @@ class UnpackWindows extends Target { ...@@ -22,16 +22,16 @@ class UnpackWindows extends Target {
@override @override
List<Source> get outputs => const <Source>[ List<Source> get outputs => const <Source>[
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows.dll'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows_glfw.dll'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows.dll.exp'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows_glfw.dll.exp'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows.dll.lib'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows_glfw.dll.lib'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows.dll.pdb'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_windows_glfw.dll.pdb'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_export.h'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_export.h'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_messenger.h'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_messenger.h'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_plugin_registrar.h'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_plugin_registrar.h'),
Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_glfw.h'), Source.pattern('{PROJECT_DIR}/windows/flutter/flutter_glfw.h'),
Source.pattern('{PROJECT_DIR}/windows/flutter/icudtl.dat'), Source.pattern('{PROJECT_DIR}/windows/flutter/icudtl.dat'),
Source.pattern('{PROJECT_DIR}/windows/flutter/cpp_client_wrapper/*'), Source.pattern('{PROJECT_DIR}/windows/flutter/cpp_client_wrapper_glfw/*'),
]; ];
@override @override
......
...@@ -1052,13 +1052,13 @@ void _ensureExists(Directory directory) { ...@@ -1052,13 +1052,13 @@ void _ensureExists(Directory directory) {
} }
const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[ const List<List<String>> _windowsDesktopBinaryDirs = <List<String>>[
<String>['windows-x64', 'windows-x64/windows-x64-flutter.zip'], <String>['windows-x64', 'windows-x64/windows-x64-flutter-glfw.zip'],
<String>['windows-x64', 'windows-x64/flutter-cpp-client-wrapper.zip'], <String>['windows-x64', 'windows-x64/flutter-cpp-client-wrapper-glfw.zip'],
]; ];
const List<List<String>> _linuxDesktopBinaryDirs = <List<String>>[ const List<List<String>> _linuxDesktopBinaryDirs = <List<String>>[
<String>['linux-x64', 'linux-x64/linux-x64-flutter.zip'], <String>['linux-x64', 'linux-x64/linux-x64-flutter-glfw.zip'],
<String>['linux-x64', 'linux-x64/flutter-cpp-client-wrapper.zip'], <String>['linux-x64', 'linux-x64/flutter-cpp-client-wrapper-glfw.zip'],
]; ];
const List<List<String>> _macOSDesktopBinaryDirs = <List<String>>[ const List<List<String>> _macOSDesktopBinaryDirs = <List<String>>[
......
...@@ -24,28 +24,28 @@ const Map<TargetPlatform, String> flutterArtifactPlatformDirectory = ...@@ -24,28 +24,28 @@ const Map<TargetPlatform, String> flutterArtifactPlatformDirectory =
// directory. // directory.
const Map<TargetPlatform, List<String>> artifactFilesByPlatform = <TargetPlatform, List<String>>{ const Map<TargetPlatform, List<String>> artifactFilesByPlatform = <TargetPlatform, List<String>>{
TargetPlatform.linux_x64: <String>[ TargetPlatform.linux_x64: <String>[
'libflutter_linux.so', 'libflutter_linux_glfw.so',
'flutter_export.h', 'flutter_export.h',
'flutter_messenger.h', 'flutter_messenger.h',
'flutter_plugin_registrar.h', 'flutter_plugin_registrar.h',
'flutter_glfw.h', 'flutter_glfw.h',
'icudtl.dat', 'icudtl.dat',
'cpp_client_wrapper/', 'cpp_client_wrapper_glfw/',
], ],
TargetPlatform.darwin_x64: <String>[ TargetPlatform.darwin_x64: <String>[
'FlutterMacOS.framework', 'FlutterMacOS.framework',
], ],
TargetPlatform.windows_x64: <String>[ TargetPlatform.windows_x64: <String>[
'flutter_windows.dll', 'flutter_windows_glfw.dll',
'flutter_windows.dll.exp', 'flutter_windows_glfw.dll.exp',
'flutter_windows.dll.lib', 'flutter_windows_glfw.dll.lib',
'flutter_windows.dll.pdb', 'flutter_windows_glfw.dll.pdb',
'flutter_export.h', 'flutter_export.h',
'flutter_messenger.h', 'flutter_messenger.h',
'flutter_plugin_registrar.h', 'flutter_plugin_registrar.h',
'flutter_glfw.h', 'flutter_glfw.h',
'icudtl.dat', 'icudtl.dat',
'cpp_client_wrapper/', 'cpp_client_wrapper_glfw/',
], ],
}; };
......
...@@ -33,13 +33,13 @@ void main() { ...@@ -33,13 +33,13 @@ void main() {
environment = Environment( environment = Environment(
projectDir: fs.currentDirectory, projectDir: fs.currentDirectory,
); );
fs.file('bin/cache/artifacts/engine/linux-x64/libflutter_linux.so').createSync(recursive: true); fs.file('bin/cache/artifacts/engine/linux-x64/libflutter_linux_glfw.so').createSync(recursive: true);
fs.file('bin/cache/artifacts/engine/linux-x64/flutter_export.h').createSync(); fs.file('bin/cache/artifacts/engine/linux-x64/flutter_export.h').createSync();
fs.file('bin/cache/artifacts/engine/linux-x64/flutter_messenger.h').createSync(); fs.file('bin/cache/artifacts/engine/linux-x64/flutter_messenger.h').createSync();
fs.file('bin/cache/artifacts/engine/linux-x64/flutter_plugin_registrar.h').createSync(); fs.file('bin/cache/artifacts/engine/linux-x64/flutter_plugin_registrar.h').createSync();
fs.file('bin/cache/artifacts/engine/linux-x64/flutter_glfw.h').createSync(); fs.file('bin/cache/artifacts/engine/linux-x64/flutter_glfw.h').createSync();
fs.file('bin/cache/artifacts/engine/linux-x64/icudtl.dat').createSync(); fs.file('bin/cache/artifacts/engine/linux-x64/icudtl.dat').createSync();
fs.file('bin/cache/artifacts/engine/linux-x64/cpp_client_wrapper/foo').createSync(recursive: true); fs.file('bin/cache/artifacts/engine/linux-x64/cpp_client_wrapper_glfw/foo').createSync(recursive: true);
fs.file('packages/flutter_tools/lib/src/build_system/targets/linux.dart').createSync(recursive: true); fs.file('packages/flutter_tools/lib/src/build_system/targets/linux.dart').createSync(recursive: true);
fs.directory('linux').createSync(); fs.directory('linux').createSync();
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
...@@ -51,13 +51,13 @@ void main() { ...@@ -51,13 +51,13 @@ void main() {
final BuildResult result = await buildSystem.build(const UnpackLinux(), environment); final BuildResult result = await buildSystem.build(const UnpackLinux(), environment);
expect(result.hasException, false); expect(result.hasException, false);
expect(fs.file('linux/flutter/libflutter_linux.so').existsSync(), true); expect(fs.file('linux/flutter/libflutter_linux_glfw.so').existsSync(), true);
expect(fs.file('linux/flutter/flutter_export.h').existsSync(), true); expect(fs.file('linux/flutter/flutter_export.h').existsSync(), true);
expect(fs.file('linux/flutter/flutter_messenger.h').existsSync(), true); expect(fs.file('linux/flutter/flutter_messenger.h').existsSync(), true);
expect(fs.file('linux/flutter/flutter_plugin_registrar.h').existsSync(), true); expect(fs.file('linux/flutter/flutter_plugin_registrar.h').existsSync(), true);
expect(fs.file('linux/flutter/flutter_glfw.h').existsSync(), true); expect(fs.file('linux/flutter/flutter_glfw.h').existsSync(), true);
expect(fs.file('linux/flutter/icudtl.dat').existsSync(), true); expect(fs.file('linux/flutter/icudtl.dat').existsSync(), true);
expect(fs.file('linux/flutter/cpp_client_wrapper/foo').existsSync(), true); expect(fs.file('linux/flutter/cpp_client_wrapper_glfw/foo').existsSync(), true);
})); }));
test('Does not re-copy files unecessarily', () => testbed.run(() async { test('Does not re-copy files unecessarily', () => testbed.run(() async {
...@@ -65,19 +65,19 @@ void main() { ...@@ -65,19 +65,19 @@ void main() {
// Set a date in the far distant past to deal with the limited resolution // Set a date in the far distant past to deal with the limited resolution
// of the windows filesystem. // of the windows filesystem.
final DateTime theDistantPast = DateTime(1991, 8, 23); final DateTime theDistantPast = DateTime(1991, 8, 23);
fs.file('linux/flutter/libflutter_linux.so').setLastModifiedSync(theDistantPast); fs.file('linux/flutter/libflutter_linux_glfw.so').setLastModifiedSync(theDistantPast);
await buildSystem.build(const UnpackLinux(), environment); await buildSystem.build(const UnpackLinux(), environment);
expect(fs.file('linux/flutter/libflutter_linux.so').statSync().modified, equals(theDistantPast)); expect(fs.file('linux/flutter/libflutter_linux_glfw.so').statSync().modified, equals(theDistantPast));
})); }));
test('Detects changes in input cache files', () => testbed.run(() async { test('Detects changes in input cache files', () => testbed.run(() async {
await buildSystem.build(const UnpackLinux(), environment); await buildSystem.build(const UnpackLinux(), environment);
fs.file('bin/cache/artifacts/engine/linux-x64/libflutter_linux.so').writeAsStringSync('asd'); // modify cache. fs.file('bin/cache/artifacts/engine/linux-x64/libflutter_linux_glfw.so').writeAsStringSync('asd'); // modify cache.
await buildSystem.build(const UnpackLinux(), environment); await buildSystem.build(const UnpackLinux(), environment);
expect(fs.file('linux/flutter/libflutter_linux.so').readAsStringSync(), 'asd'); expect(fs.file('linux/flutter/libflutter_linux_glfw.so').readAsStringSync(), 'asd');
})); }));
} }
......
...@@ -36,16 +36,16 @@ void main() { ...@@ -36,16 +36,16 @@ void main() {
); );
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_export.h').createSync(recursive: true); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_export.h').createSync(recursive: true);
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_messenger.h').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_messenger.h').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows.dll').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows_glfw.dll').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows.dll.exp').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows_glfw.dll.exp').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows.dll.lib').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows_glfw.dll.lib').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows.dll.pdb').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_windows_glfw.dll.pdb').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\lutter_export.h').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\lutter_export.h').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_messenger.h').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_messenger.h').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_plugin_registrar.h').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_plugin_registrar.h').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_glfw.h').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\flutter_glfw.h').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\icudtl.dat').createSync(); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\icudtl.dat').createSync();
fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\cpp_client_wrapper\foo').createSync(recursive: true); fs.file(r'C:\bin\cache\artifacts\engine\windows-x64\cpp_client_wrapper_glfw\foo').createSync(recursive: true);
fs.file(r'C:\packages\flutter_tools\lib\src\build_system\targets\windows.dart').createSync(recursive: true); fs.file(r'C:\packages\flutter_tools\lib\src\build_system\targets\windows.dart').createSync(recursive: true);
fs.directory('windows').createSync(); fs.directory('windows').createSync();
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
...@@ -59,16 +59,16 @@ void main() { ...@@ -59,16 +59,16 @@ void main() {
expect(fs.file(r'C:\windows\flutter\flutter_export.h').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_export.h').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_messenger.h').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_messenger.h').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_windows.dll').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_windows_glfw.dll').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_windows.dll.exp').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_windows_glfw.dll.exp').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_windows.dll.lib').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_windows_glfw.dll.lib').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_windows.dll.pdb').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_windows_glfw.dll.pdb').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_export.h').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_export.h').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_messenger.h').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_messenger.h').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_plugin_registrar.h').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_plugin_registrar.h').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\flutter_glfw.h').existsSync(), true); expect(fs.file(r'C:\windows\flutter\flutter_glfw.h').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\icudtl.dat').existsSync(), true); expect(fs.file(r'C:\windows\flutter\icudtl.dat').existsSync(), true);
expect(fs.file(r'C:\windows\flutter\cpp_client_wrapper\foo').existsSync(), true); expect(fs.file(r'C:\windows\flutter\cpp_client_wrapper_glfw\foo').existsSync(), true);
})); }));
test('Does not re-copy files unecessarily', () => testbed.run(() async { test('Does not re-copy files unecessarily', () => testbed.run(() async {
......
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