Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
ac165300
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ac165300
编写于
10月 31, 2017
作者:
C
Chinmay Garde
提交者:
GitHub
10月 31, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ensure that public framework headers can be cleanly imported from outside the engine root. (#4303)
上级
277bfe66
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
117 addition
and
47 deletion
+117
-47
shell/platform/darwin/ios/BUILD.gn
shell/platform/darwin/ios/BUILD.gn
+62
-47
shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m
...tform/darwin/ios/framework/Source/FlutterUmbrellaImport.m
+9
-0
sky/tools/install_framework_headers.py
sky/tools/install_framework_headers.py
+45
-0
travis/licenses_golden/licenses_flutter
travis/licenses_golden/licenses_flutter
+1
-0
未找到文件。
shell/platform/darwin/ios/BUILD.gn
浏览文件 @
ac165300
...
...
@@ -9,22 +9,29 @@ import("//build/config/ios/ios_sdk.gni")
_flutter_framework_dir = "$root_out_dir/Flutter.framework"
shared_library("flutter_framework_dylib") {
# The headers that will be copied to the Flutter.framework and be accessed
# from outside the Flutter engine source root.
_flutter_framework_headers = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterBinaryMessenger.h",
"framework/Headers/FlutterChannels.h",
"framework/Headers/FlutterCodecs.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterNavigationController.h",
"framework/Headers/FlutterPlugin.h",
"framework/Headers/FlutterViewController.h",
]
_flutter_framework_headers_copy_dir = "$_flutter_framework_dir/Headers"
shared_library("create_flutter_framework_dylib") {
visibility = [ ":*" ]
output_name = "Flutter"
sources = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterBinaryMessenger.h",
"framework/Headers/FlutterChannels.h",
"framework/Headers/FlutterCodecs.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterPlugin.h",
"framework/Headers/FlutterViewController.h",
"framework/Headers/FlutterNavigationController.h",
"framework/Source/FlutterAppDelegate.mm",
"framework/Source/FlutterChannels.mm",
"framework/Source/FlutterCodecs.mm",
...
...
@@ -32,6 +39,7 @@ shared_library("flutter_framework_dylib") {
"framework/Source/FlutterDartProject_Internal.h",
"framework/Source/FlutterDartSource.h",
"framework/Source/FlutterDartSource.mm",
"framework/Source/FlutterNavigationController.mm",
"framework/Source/FlutterPlatformPlugin.h",
"framework/Source/FlutterPlatformPlugin.mm",
"framework/Source/FlutterStandardCodec.mm",
...
...
@@ -42,7 +50,6 @@ shared_library("flutter_framework_dylib") {
"framework/Source/FlutterView.h",
"framework/Source/FlutterView.mm",
"framework/Source/FlutterViewController.mm",
"framework/Source/FlutterNavigationController.mm",
"framework/Source/accessibility_bridge.h",
"framework/Source/accessibility_bridge.mm",
"framework/Source/flutter_main_ios.h",
...
...
@@ -65,6 +72,8 @@ shared_library("flutter_framework_dylib") {
"platform_view_ios.mm",
]
sources += _flutter_framework_headers
deps = [
"$flutter_root/flow",
"$flutter_root/fml",
...
...
@@ -84,9 +93,7 @@ shared_library("flutter_framework_dylib") {
deps += [ "//third_party/dart/runtime:libdart_precompiled_runtime" ]
}
public_configs = [
"$flutter_root:config",
]
public_configs = [ "$flutter_root:config" ]
defines = [ "FLUTTER_FRAMEWORK" ]
...
...
@@ -99,8 +106,9 @@ shared_library("flutter_framework_dylib") {
]
}
copy("framework_dylib") {
copy("
copy_
framework_dylib") {
visibility = [ ":*" ]
sources = [
"$root_out_dir/libFlutter.dylib",
]
...
...
@@ -109,11 +117,11 @@ copy("framework_dylib") {
]
deps = [
":flutter_framework_dylib",
":
create_
flutter_framework_dylib",
]
}
action("framework_install_name") {
action("
copy_dylib_and_update_
framework_install_name") {
visibility = [ ":*" ]
stamp_file = "$root_out_dir/flutter_install_name_stamp"
script = "$flutter_root/sky/tools/change_install_name.py"
...
...
@@ -135,11 +143,11 @@ action("framework_install_name") {
]
deps = [
":framework_dylib",
":
copy_
framework_dylib",
]
}
copy("framework_info_plist") {
copy("
copy_
framework_info_plist") {
visibility = [ ":*" ]
sources = [
"framework/Info.plist",
...
...
@@ -149,7 +157,7 @@ copy("framework_info_plist") {
]
}
copy("framework_module_map") {
copy("
copy_
framework_module_map") {
visibility = [ ":*" ]
sources = [
"framework/module.modulemap",
...
...
@@ -159,26 +167,23 @@ copy("framework_module_map") {
]
}
copy("framework_headers") {
action("copy_framework_headers") {
script = "$flutter_root/sky/tools/install_framework_headers.py"
visibility = [ ":*" ]
sources = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterBinaryMessenger.h",
"framework/Headers/FlutterChannels.h",
"framework/Headers/FlutterCodecs.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterPlugin.h",
"framework/Headers/FlutterViewController.h",
"framework/Headers/FlutterNavigationController.h",
]
outputs = [
"$_flutter_framework_dir/Headers/{{source_file_part}}",
]
sources = _flutter_framework_headers
outputs = []
foreach(header, _flutter_framework_headers) {
header_basename = rebase_path(header, "framework/headers")
outputs += [ "$_flutter_framework_headers_copy_dir/$header_basename" ]
}
args = [
"--location",
rebase_path("$_flutter_framework_headers_copy_dir"),
"--headers",
] + rebase_path(_flutter_framework_headers)
}
copy("framework_icu") {
copy("
copy_
framework_icu") {
visibility = [ ":*" ]
set_sources_assignment_filter([])
sources = [
...
...
@@ -190,7 +195,7 @@ copy("framework_icu") {
]
}
copy("framework_podspec") {
copy("
copy_
framework_podspec") {
visibility = [ ":*" ]
sources = [
"framework/Flutter.podspec",
...
...
@@ -200,14 +205,24 @@ copy("framework_podspec") {
]
}
shared_library("copy_and_verify_framework_headers") {
visibility = [ ":*" ]
include_dirs = [ "$_flutter_framework_headers_copy_dir" ]
sources = [
"framework/Source/FlutterUmbrellaImport.m",
]
deps = [
":copy_framework_headers",
]
}
group("flutter_framework") {
public_deps = [
":framework_dylib",
":framework_headers",
":framework_icu",
":framework_info_plist",
":framework_install_name",
":framework_module_map",
":framework_podspec",
deps = [
":copy_and_verify_framework_headers",
":copy_dylib_and_update_framework_install_name",
":copy_framework_icu",
":copy_framework_info_plist",
":copy_framework_module_map",
":copy_framework_podspec",
]
}
shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m
0 → 100644
浏览文件 @
ac165300
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// The only point of this file is to ensure that the Flutter framework umbrella header can be
// cleanly imported from an Objective-C translation unit. The target that uses this file copies the
// headers to a path that simulats how users would actually consume the framework outside of the
// engine source root.
#import "Flutter.h"
sky/tools/install_framework_headers.py
0 → 100644
浏览文件 @
ac165300
#!/usr/bin/env python
# Copyright 2017 The Chromium 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
argparse
import
errno
import
os
import
shutil
import
subprocess
import
sys
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'Removes existing files and installs the specified headers'
+
'at the given location.'
)
parser
.
add_argument
(
'--headers'
,
nargs
=
'+'
,
help
=
'The headers to install at the location.'
,
required
=
True
)
parser
.
add_argument
(
'--location'
,
type
=
str
,
required
=
True
)
args
=
parser
.
parse_args
()
# Remove old headers.
try
:
shutil
.
rmtree
(
os
.
path
.
normpath
(
args
.
location
))
except
OSError
as
e
:
# Ignore only "not found" errors.
if
e
.
errno
!=
errno
.
ENOENT
:
raise
e
# Create the directory to copy the files to.
if
not
os
.
path
.
isdir
(
args
.
location
):
os
.
makedirs
(
args
.
location
)
# Copy all files specified in the args.
for
header_file
in
args
.
headers
:
shutil
.
copyfile
(
header_file
,
os
.
path
.
join
(
args
.
location
,
os
.
path
.
basename
(
header_file
)))
if
__name__
==
'__main__'
:
sys
.
exit
(
main
())
travis/licenses_golden/licenses_flutter
浏览文件 @
ac165300
...
...
@@ -1172,6 +1172,7 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterCodecs.
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterNavigationController.mm
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec_Internal.h
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterUmbrellaImport.m
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/flutter_codecs_unittest.mm
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.h
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/flutter_main_ios.mm
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录