Skip to content

Commit 0ff508b

Browse files
authored
Standardize embedder archive name. (flutter#31693)
1 parent afd334d commit 0ff508b

File tree

2 files changed

+93
-0
lines changed

2 files changed

+93
-0
lines changed

build/archives/BUILD.gn

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,41 @@ if (!is_fuchsia) {
8989
deps = [ "//flutter/web_sdk:flutter_web_sdk_archive" ]
9090
}
9191
}
92+
93+
# Archives Flutter Windows Artifacts
94+
if (host_os == "win") {
95+
zip_bundle("windows_flutter") {
96+
output = "$full_platform_name-$flutter_runtime_mode/$full_platform_name-flutter.zip"
97+
deps = [
98+
"//flutter/shell/platform/common:publish_headers",
99+
"//flutter/shell/platform/windows:flutter_windows",
100+
"//flutter/shell/platform/windows:publish_headers_windows",
101+
]
102+
files = [
103+
{
104+
source = "$root_out_dir/flutter_export.h"
105+
destination = "flutter_export.h"
106+
},
107+
{
108+
source = "$root_out_dir/flutter_windows.h"
109+
destination = "flutter_windows.h"
110+
},
111+
{
112+
source = "$root_out_dir/flutter_messenger.h"
113+
destination = "flutter_messenger.h"
114+
},
115+
{
116+
source = "$root_out_dir/flutter_plugin_registrar.h"
117+
destination = "flutter_plugin_registrar.h"
118+
},
119+
{
120+
source = "$root_out_dir/flutter_texture_registrar.h"
121+
destination = "flutter_texture_registrar.h"
122+
},
123+
{
124+
source = "$root_out_dir/flutter_windows.dll"
125+
destination = "flutter_windows.dll"
126+
},
127+
]
128+
}
129+
}

shell/platform/windows/client_wrapper/BUILD.gn

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5+
import("//flutter/build/zip_bundle.gni")
56
import("//flutter/shell/platform/common/client_wrapper/publish.gni")
67
import("//flutter/testing/testing.gni")
78

@@ -97,3 +98,57 @@ executable("client_wrapper_windows_unittests") {
9798
"//third_party/dart/runtime:libdart_jit",
9899
]
99100
}
101+
102+
client_wrapper_file_archive_list = [
103+
"core_implementations.cc",
104+
"engine_method_result.cc",
105+
"plugin_registrar.cc",
106+
"README",
107+
"standard_codec.cc",
108+
]
109+
110+
win_client_wrapper_file_archive_list = [
111+
"flutter_engine.cc",
112+
"flutter_view_controller.cc",
113+
]
114+
115+
zip_bundle("client_wrapper_archive") {
116+
output = "$full_platform_name/flutter-cpp-client-wrapper.zip"
117+
deps = [
118+
":client_wrapper_windows",
119+
":publish_wrapper_windows",
120+
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
121+
]
122+
tmp_files = []
123+
foreach(source, client_wrapper_file_archive_list) {
124+
tmp_files += [
125+
{
126+
source = "//flutter/shell/platform/common/client_wrapper/$source"
127+
destination = "cpp_client_wrapper/$source"
128+
},
129+
]
130+
}
131+
132+
# Windows specific source code files
133+
foreach(source, win_client_wrapper_file_archive_list) {
134+
tmp_files += [
135+
{
136+
source = "//flutter/shell/platform/windows/client_wrapper/$source"
137+
destination = "cpp_client_wrapper/$source"
138+
},
139+
]
140+
}
141+
headers = core_cpp_client_wrapper_includes +
142+
core_cpp_client_wrapper_internal_headers
143+
foreach(header, headers) {
144+
rebased_path =
145+
rebase_path(header, "//flutter/shell/platform/common/client_wrapper")
146+
tmp_files += [
147+
{
148+
source = header
149+
destination = "cpp_client_wrapper/$rebased_path"
150+
},
151+
]
152+
}
153+
files = tmp_files
154+
}

0 commit comments

Comments
 (0)