Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
dd17a112
E
engine
项目概览
qq_34031325
/
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,发现更多精彩内容 >>
提交
dd17a112
编写于
11月 28, 2016
作者:
T
Todd Volkert
提交者:
GitHub
11月 28, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make dylib filename configurable in Info.plist for iOS (#3277)
上级
bc4dac32
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
35 addition
and
10 deletion
+35
-10
common/settings.h
common/settings.h
+1
-0
runtime/dart_init.cc
runtime/dart_init.cc
+9
-1
shell/common/shell.cc
shell/common/shell.cc
+3
-1
shell/common/shell.h
shell/common/shell.h
+2
-1
shell/platform/darwin/common/platform_mac.h
shell/platform/darwin/common/platform_mac.h
+4
-1
shell/platform/darwin/common/platform_mac.mm
shell/platform/darwin/common/platform_mac.mm
+11
-4
shell/platform/darwin/desktop/main_mac.mm
shell/platform/darwin/desktop/main_mac.mm
+1
-1
shell/platform/darwin/ios/framework/Source/FlutterViewController.mm
...form/darwin/ios/framework/Source/FlutterViewController.mm
+4
-1
未找到文件。
common/settings.h
浏览文件 @
dd17a112
...
...
@@ -26,6 +26,7 @@ struct Settings {
std
::
string
aot_vm_isolate_snapshot_file_name
;
std
::
string
aot_instructions_blob_file_name
;
std
::
string
aot_rodata_blob_file_name
;
std
::
string
application_library_path
;
std
::
string
temp_directory_path
;
std
::
vector
<
std
::
string
>
dart_flags
;
...
...
runtime/dart_init.cc
浏览文件 @
dd17a112
...
...
@@ -399,12 +399,20 @@ void* _DartSymbolLookup(const char* symbol_name) {
return
nullptr
;
}
const
char
*
application_library_path
=
kDartApplicationLibraryPath
;
const
Settings
&
settings
=
Settings
::
Get
();
const
std
::
string
&
application_library_path_setting
=
settings
.
application_library_path
;
if
(
!
application_library_path_setting
.
empty
())
{
application_library_path
=
application_library_path_setting
.
c_str
();
}
// First the application library is checked for the valid symbols. This
// library may not necessarily exist. If it does exist, it is loaded and the
// symbols resolved. Once the application library is loaded, there is
// currently no provision to unload the same.
void
*
symbol
=
DartLookupSymbolInLibrary
(
symbol_name
,
kDartApplicationLibraryP
ath
);
DartLookupSymbolInLibrary
(
symbol_name
,
application_library_p
ath
);
if
(
symbol
!=
nullptr
)
{
return
symbol
;
}
...
...
shell/common/shell.cc
浏览文件 @
dd17a112
...
...
@@ -107,7 +107,8 @@ Shell::Shell() {
Shell
::~
Shell
()
{}
void
Shell
::
InitStandalone
(
std
::
string
icu_data_path
)
{
void
Shell
::
InitStandalone
(
std
::
string
icu_data_path
,
std
::
string
application_library_path
)
{
TRACE_EVENT0
(
"flutter"
,
"Shell::InitStandalone"
);
ftl
::
UniqueFD
icu_fd
(
...
...
@@ -126,6 +127,7 @@ void Shell::InitStandalone(std::string icu_data_path) {
base
::
CommandLine
&
command_line
=
*
base
::
CommandLine
::
ForCurrentProcess
();
blink
::
Settings
settings
;
settings
.
application_library_path
=
application_library_path
;
// Enable Observatory
settings
.
enable_observatory
=
...
...
shell/common/shell.h
浏览文件 @
dd17a112
...
...
@@ -22,7 +22,8 @@ class Shell {
public:
~
Shell
();
static
void
InitStandalone
(
std
::
string
icu_data_path
=
""
);
static
void
InitStandalone
(
std
::
string
icu_data_path
=
""
,
std
::
string
application_library_path
=
""
);
static
void
Init
();
static
Shell
&
Shared
();
...
...
shell/platform/darwin/common/platform_mac.h
浏览文件 @
dd17a112
...
...
@@ -9,7 +9,10 @@
namespace
shell
{
void
PlatformMacMain
(
int
argc
,
const
char
*
argv
[],
std
::
string
icu_data_path
);
void
PlatformMacMain
(
int
argc
,
const
char
*
argv
[],
std
::
string
icu_data_path
,
std
::
string
application_library_path
);
bool
AttemptLaunchFromCommandLineSwitches
(
Engine
*
engine
);
...
...
shell/platform/darwin/common/platform_mac.mm
浏览文件 @
dd17a112
...
...
@@ -52,7 +52,10 @@ static void RedirectIOConnectionsToSyslog() {
class
EmbedderState
{
public:
EmbedderState
(
int
argc
,
const
char
*
argv
[],
std
::
string
icu_data_path
)
{
EmbedderState
(
int
argc
,
const
char
*
argv
[],
std
::
string
icu_data_path
,
std
::
string
application_library_path
)
{
#if TARGET_OS_IPHONE
// This calls crashes on MacOS because we haven't run Dart_Initialize yet.
// See https://github.com/flutter/flutter/issues/4006
...
...
@@ -90,7 +93,7 @@ class EmbedderState {
embedder_message_loop_
->
Attach
();
#endif
shell
::
Shell
::
InitStandalone
(
icu_data_path
);
shell
::
Shell
::
InitStandalone
(
icu_data_path
,
application_library_path
);
}
~
EmbedderState
()
{
...
...
@@ -106,12 +109,16 @@ class EmbedderState {
FTL_DISALLOW_COPY_AND_ASSIGN
(
EmbedderState
);
};
void
PlatformMacMain
(
int
argc
,
const
char
*
argv
[],
std
::
string
icu_data_path
)
{
void
PlatformMacMain
(
int
argc
,
const
char
*
argv
[],
std
::
string
icu_data_path
,
std
::
string
application_library_path
)
{
static
std
::
unique_ptr
<
EmbedderState
>
g_embedder
;
static
std
::
once_flag
once_main
;
std
::
call_once
(
once_main
,
[
&
]()
{
g_embedder
=
WTF
::
MakeUnique
<
EmbedderState
>
(
argc
,
argv
,
icu_data_path
);
g_embedder
=
WTF
::
MakeUnique
<
EmbedderState
>
(
argc
,
argv
,
icu_data_path
,
application_library_path
);
});
}
...
...
shell/platform/darwin/desktop/main_mac.mm
浏览文件 @
dd17a112
...
...
@@ -32,7 +32,7 @@ void AttachMessageLoopToMainRunLoop(void) {
int
main
(
int
argc
,
const
char
*
argv
[])
{
[
SkyApplication
sharedApplication
];
shell
::
PlatformMacMain
(
argc
,
argv
,
""
);
shell
::
PlatformMacMain
(
argc
,
argv
,
""
,
""
);
base
::
CommandLine
&
command_line
=
*
base
::
CommandLine
::
ForCurrentProcess
();
if
(
command_line
.
HasSwitch
(
shell
::
FlagForSwitch
(
shell
::
Switch
::
Help
)))
{
...
...
shell/platform/darwin/ios/framework/Source/FlutterViewController.mm
浏览文件 @
dd17a112
...
...
@@ -58,7 +58,10 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse {
void
FlutterInit
(
int
argc
,
const
char
*
argv
[])
{
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
FlutterViewController
class
]];
NSString
*
icuDataPath
=
[
bundle
pathForResource
:
@"icudtl"
ofType
:
@"dat"
];
shell
::
PlatformMacMain
(
argc
,
argv
,
icuDataPath
.
UTF8String
);
NSString
*
libraryName
=
[[
NSBundle
mainBundle
]
objectForInfoDictionaryKey
:
@"FLTLibraryPath"
];
shell
::
PlatformMacMain
(
argc
,
argv
,
icuDataPath
.
UTF8String
,
libraryName
!=
nil
?
libraryName
.
UTF8String
:
""
);
}
@implementation
FlutterViewController
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录