Skip to content

Commit 009c2e0

Browse files
hbatagelomattkae
authored andcommitted
Add command-line option for multi-window support and refactor runner code
1 parent bf0ffb4 commit 009c2e0

File tree

15 files changed

+33
-471
lines changed

15 files changed

+33
-471
lines changed

examples/multi_window_ref_app/windows/flutter/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,12 @@ list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
5252
list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
5353
list(APPEND CPP_WRAPPER_SOURCES_APP
5454
"flutter_engine.cc"
55-
"flutter_view_controller.cc"
56-
"flutter_window_controller.cc"
57-
"flutter_win32_window.cc"
58-
"win32_window.cc"
5955
)
6056
list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
6157

6258
# Wrapper sources needed for a plugin.
6359
add_library(flutter_wrapper_plugin STATIC
6460
${CPP_WRAPPER_SOURCES_CORE}
65-
${CPP_WRAPPER_SOURCES_WINDOWING}
6661
${CPP_WRAPPER_SOURCES_PLUGIN}
6762
)
6863
apply_standard_settings(flutter_wrapper_plugin)
@@ -79,7 +74,6 @@ add_dependencies(flutter_wrapper_plugin flutter_assemble)
7974
# Wrapper sources needed for the runner.
8075
add_library(flutter_wrapper_app STATIC
8176
${CPP_WRAPPER_SOURCES_CORE}
82-
${CPP_WRAPPER_SOURCES_WINDOWING}
8377
${CPP_WRAPPER_SOURCES_APP}
8478
)
8579
apply_standard_settings(flutter_wrapper_app)
@@ -97,7 +91,7 @@ set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
9791
set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
9892
add_custom_command(
9993
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
100-
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_WINDOWING} ${CPP_WRAPPER_SOURCES_PLUGIN}
94+
${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
10195
${CPP_WRAPPER_SOURCES_APP}
10296
${PHONY_OUTPUT}
10397
COMMAND ${CMAKE_COMMAND} -E env
@@ -110,7 +104,6 @@ add_custom_target(flutter_assemble DEPENDS
110104
"${FLUTTER_LIBRARY}"
111105
${FLUTTER_LIBRARY_HEADERS}
112106
${CPP_WRAPPER_SOURCES_CORE}
113-
${CPP_WRAPPER_SOURCES_WINDOWING}
114107
${CPP_WRAPPER_SOURCES_PLUGIN}
115108
${CPP_WRAPPER_SOURCES_APP}
116109
)

examples/multi_window_ref_app/windows/runner/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
3131
# Add dependency libraries and include directories. Add any application-specific
3232
# dependencies here.
3333
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
34-
target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
3534
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
3635

3736
# Run the Flutter tool portions of the build. This must not be removed.

examples/multi_window_ref_app/windows/runner/Runner.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ END
5252

5353
// Icon with lowest ID value placed first to ensure application icon
5454
// remains consistent on all systems.
55-
// IDI_APP_ICON ICON "resources\\app_icon.ico"
55+
IDI_APP_ICON ICON "resources\\app_icon.ico"
5656

5757

5858
/////////////////////////////////////////////////////////////////////////////
@@ -90,12 +90,12 @@ BEGIN
9090
BLOCK "040904e4"
9191
BEGIN
9292
VALUE "CompanyName", "The Flutter Authors" "\0"
93-
VALUE "FileDescription", "A sample application demonstrating Flutter APIs." "\0"
93+
VALUE "FileDescription", "A reference application demonstrating Flutter's multi-window API." "\0"
9494
VALUE "FileVersion", VERSION_AS_STRING "\0"
95-
VALUE "InternalName", "Flutter API Sample" "\0"
95+
VALUE "InternalName", "Flutter Multi-Window Reference App" "\0"
9696
VALUE "LegalCopyright", "Copyright 2014 The Flutter Authors. All rights reserved." "\0"
97-
VALUE "OriginalFilename", "flutter_api_samples.exe" "\0"
98-
VALUE "ProductName", "Flutter API Sample" "\0"
97+
VALUE "OriginalFilename", "multi_window_ref_app.exe" "\0"
98+
VALUE "ProductName", "Flutter Multi-Window Reference App" "\0"
9999
VALUE "ProductVersion", VERSION_AS_STRING "\0"
100100
END
101101
END

examples/multi_window_ref_app/windows/runner/flutter_window.cpp

Lines changed: 0 additions & 65 deletions
This file was deleted.

examples/multi_window_ref_app/windows/runner/flutter_window.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

examples/multi_window_ref_app/windows/runner/main.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include <flutter/generated_plugin_registrant.h>
2-
#include <flutter/method_channel.h>
32
#include <flutter/dart_project.h>
4-
#include <flutter/flutter_window_controller.h>
5-
#include <windows.h>
3+
#include <flutter/flutter_engine.h>
64

75
#include "utils.h"
86

@@ -26,7 +24,6 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
2624

2725
auto const engine{std::make_shared<flutter::FlutterEngine>(project)};
2826
RegisterPlugins(engine.get());
29-
flutter::FlutterWindowController::GetInstance().SetEngine(engine);
3027
engine->Run();
3128

3229
::MSG msg;
Binary file not shown.

0 commit comments

Comments
 (0)