forked from firka/flutter
GN targets for generating release artifacts (flutter/engine#30679)
This commit is contained in:
2
DEPS
2
DEPS
@@ -101,7 +101,7 @@ allowed_hosts = [
|
||||
]
|
||||
|
||||
deps = {
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + '4660f4a166979c64ff56f6b856b44ccc1dba5c63',
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + '6cd24973cdf055bea3aa1ec1a0c54f2ff9a3f192',
|
||||
|
||||
# Fuchsia compatibility
|
||||
#
|
||||
|
||||
64
engine/src/flutter/build/archives/BUILD.gn
Normal file
64
engine/src/flutter/build/archives/BUILD.gn
Normal file
@@ -0,0 +1,64 @@
|
||||
import("//flutter/build/zip_bundle.gni")
|
||||
|
||||
zip_bundle("artifacts") {
|
||||
output = "$host_os-$target_cpu/artifacts.zip"
|
||||
deps = [
|
||||
"//flutter/flutter_frontend_server:frontend_server",
|
||||
"//flutter/lib/snapshot:generate_snapshot_bin",
|
||||
"//flutter/shell/testing:testing",
|
||||
]
|
||||
files = [
|
||||
{
|
||||
source = "//third_party/icu/flutter/icudtl.dat"
|
||||
destination = "icudtl.dat"
|
||||
},
|
||||
{
|
||||
source = "$root_out_dir/gen/flutter/lib/snapshot/isolate_snapshot.bin"
|
||||
destination = "isolate_snapshot.bin"
|
||||
},
|
||||
{
|
||||
source = "$root_gen_dir/flutter/lib/snapshot/vm_isolate_snapshot.bin"
|
||||
destination = "vm_isolate_snapshot.bin"
|
||||
},
|
||||
{
|
||||
source = "$root_gen_dir/frontend_server.dart.snapshot"
|
||||
destination = "frontend_server.dart.snapshot"
|
||||
},
|
||||
]
|
||||
if (host_os == "win") {
|
||||
files += [
|
||||
{
|
||||
source = "$root_out_dir/flutter_tester.exe"
|
||||
destination = "flutter_tester"
|
||||
},
|
||||
]
|
||||
} else {
|
||||
files += [
|
||||
{
|
||||
source = "$root_out_dir/flutter_tester"
|
||||
destination = "flutter_tester"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (host_os == "linux") {
|
||||
group("linux-embedder") {
|
||||
deps = [ "//flutter/shell/platform/embedder:linux-embedder-archive" ]
|
||||
}
|
||||
}
|
||||
|
||||
zip_bundle("flutter_patched_sdk") {
|
||||
output = "flutter_patched_sdk.zip"
|
||||
deps = [ "//flutter/lib/snapshot:strong_platform" ]
|
||||
files = [
|
||||
{
|
||||
source = "$root_out_dir/flutter_patched_sdk/vm_outline_strong.dill"
|
||||
destination = "vm_outline_strong.dill"
|
||||
},
|
||||
{
|
||||
source = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
|
||||
destination = "platform_strong.dill"
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/toolchain/clang.gni")
|
||||
import("//flutter/build/zip_bundle.gni")
|
||||
import("//flutter/common/config.gni")
|
||||
import("//flutter/shell/gpu/gpu.gni")
|
||||
import("//flutter/shell/platform/embedder/embedder.gni")
|
||||
@@ -410,3 +411,23 @@ group("flutter_engine") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (host_os == "linux") {
|
||||
zip_bundle("linux-embedder-archive") {
|
||||
output = "${host_os}-${target_cpu}/${host_os}-${target_cpu}-embedder"
|
||||
deps = [
|
||||
"//flutter/shell/platform/embedder:copy_headers",
|
||||
"//flutter/shell/platform/embedder:flutter_engine_library",
|
||||
]
|
||||
files = [
|
||||
{
|
||||
source = "$root_out_dir/flutter_embedder.h"
|
||||
destination = "flutter_embedder.h"
|
||||
},
|
||||
{
|
||||
source = "$root_out_dir/libflutter_engine.so"
|
||||
destination = "libflutter_engine.so"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
assert(is_linux)
|
||||
|
||||
import("//flutter/build/zip_bundle.gni")
|
||||
import("//flutter/shell/platform/glfw/config.gni")
|
||||
import("//flutter/testing/testing.gni")
|
||||
|
||||
@@ -244,3 +245,28 @@ copy("publish_headers_linux") {
|
||||
sources = _public_headers
|
||||
outputs = [ "$root_out_dir/flutter_linux/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
zip_bundle("flutter_gtk") {
|
||||
output = "$host_os-$target_cpu-flutter-gtk.zip"
|
||||
deps = [
|
||||
":flutter_linux_gtk",
|
||||
":publish_headers_linux",
|
||||
]
|
||||
sources = get_target_outputs(":publish_headers_linux")
|
||||
tmp_files = []
|
||||
foreach(source, sources) {
|
||||
tmp_files += [
|
||||
{
|
||||
source = source
|
||||
destination = rebase_path(source, "$root_build_dir")
|
||||
},
|
||||
]
|
||||
}
|
||||
tmp_files += [
|
||||
{
|
||||
source = "$root_build_dir/libflutter_${host_os}_gtk.so"
|
||||
destination = "libflutter_${host_os}_gtk.so"
|
||||
},
|
||||
]
|
||||
files = tmp_files
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user