Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
8cf47d72
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,发现更多精彩内容 >>
未验证
提交
8cf47d72
编写于
10月 28, 2019
作者:
K
Kaushik Iska
提交者:
GitHub
10月 28, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[flutter_runner] Don't build far files twice (#13397)
上级
4044876a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
27 addition
and
31 deletion
+27
-31
tools/fuchsia/build_fuchsia_artifacts.py
tools/fuchsia/build_fuchsia_artifacts.py
+3
-7
tools/fuchsia/gen_package.py
tools/fuchsia/gen_package.py
+24
-24
未找到文件。
tools/fuchsia/build_fuchsia_artifacts.py
浏览文件 @
8cf47d72
...
@@ -16,7 +16,6 @@ import sys
...
@@ -16,7 +16,6 @@ import sys
import
tempfile
import
tempfile
from
gather_flutter_runner_artifacts
import
CreateMetaPackage
,
CopyPath
from
gather_flutter_runner_artifacts
import
CreateMetaPackage
,
CopyPath
from
gen_package
import
CreateFarPackage
_script_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
realpath
(
__file__
),
'..'
))
_script_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
realpath
(
__file__
),
'..'
))
_src_root_dir
=
os
.
path
.
join
(
_script_dir
,
'..'
,
'..'
,
'..'
)
_src_root_dir
=
os
.
path
.
join
(
_script_dir
,
'..'
,
'..'
,
'..'
)
...
@@ -122,18 +121,15 @@ def CopyToBucketWithMode(source, destination, aot, product, runner_type):
...
@@ -122,18 +121,15 @@ def CopyToBucketWithMode(source, destination, aot, product, runner_type):
mode
=
'aot'
if
aot
else
'jit'
mode
=
'aot'
if
aot
else
'jit'
product_suff
=
'_product'
if
product
else
''
product_suff
=
'_product'
if
product
else
''
runner_name
=
'%s_%s%s_runner'
%
(
runner_type
,
mode
,
product_suff
)
runner_name
=
'%s_%s%s_runner'
%
(
runner_type
,
mode
,
product_suff
)
far_
dir_name
=
'%s_far'
%
runner_name
far_
name
=
runner_name
+
'-0.far'
source_root
=
os
.
path
.
join
(
_out_dir
,
source
)
source_root
=
os
.
path
.
join
(
_out_dir
,
source
)
far_base
=
os
.
path
.
join
(
source_root
,
far_dir_name
)
CreateMetaPackage
(
far_base
,
runner_name
)
pm_bin
=
GetPMBinPath
()
key_path
=
os
.
path
.
join
(
_script_dir
,
'development.key'
)
destination
=
os
.
path
.
join
(
_bucket_directory
,
destination
,
mode
)
destination
=
os
.
path
.
join
(
_bucket_directory
,
destination
,
mode
)
CreateFarPackage
(
pm_bin
,
far_base
,
key_path
,
destination
)
patched_sdk_dirname
=
'%s_runner_patched_sdk'
%
runner_type
patched_sdk_dirname
=
'%s_runner_patched_sdk'
%
runner_type
patched_sdk_dir
=
os
.
path
.
join
(
source_root
,
patched_sdk_dirname
)
patched_sdk_dir
=
os
.
path
.
join
(
source_root
,
patched_sdk_dirname
)
dest_sdk_path
=
os
.
path
.
join
(
destination
,
patched_sdk_dirname
)
dest_sdk_path
=
os
.
path
.
join
(
destination
,
patched_sdk_dirname
)
CopyPath
(
os
.
path
.
join
(
source_root
,
far_name
),
os
.
path
.
join
(
destination
,
far_name
))
if
not
os
.
path
.
exists
(
dest_sdk_path
):
if
not
os
.
path
.
exists
(
dest_sdk_path
):
CopyPath
(
patched_sdk_dir
,
dest_sdk_path
)
CopyPath
(
patched_sdk_dir
,
dest_sdk_path
)
CopyGenSnapshotIfExists
(
source_root
,
destination
)
CopyGenSnapshotIfExists
(
source_root
,
destination
)
...
...
tools/fuchsia/gen_package.py
浏览文件 @
8cf47d72
...
@@ -24,7 +24,8 @@ def GenerateManifest(package_dir):
...
@@ -24,7 +24,8 @@ def GenerateManifest(package_dir):
common_prefix
=
os
.
path
.
commonprefix
([
root
,
package_dir
])
common_prefix
=
os
.
path
.
commonprefix
([
root
,
package_dir
])
rel_path
=
os
.
path
.
relpath
(
os
.
path
.
join
(
root
,
f
),
common_prefix
)
rel_path
=
os
.
path
.
relpath
(
os
.
path
.
join
(
root
,
f
),
common_prefix
)
from_package
=
os
.
path
.
abspath
(
os
.
path
.
join
(
package_dir
,
rel_path
))
from_package
=
os
.
path
.
abspath
(
os
.
path
.
join
(
package_dir
,
rel_path
))
assert
from_package
,
'Failed to create from_package for %s'
%
os
.
path
.
join
(
root
,
f
)
assert
from_package
,
'Failed to create from_package for %s'
%
os
.
path
.
join
(
root
,
f
)
full_paths
.
append
(
'%s=%s'
%
(
rel_path
,
from_package
))
full_paths
.
append
(
'%s=%s'
%
(
rel_path
,
from_package
))
parent_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
package_dir
,
os
.
pardir
))
parent_dir
=
os
.
path
.
abspath
(
os
.
path
.
join
(
package_dir
,
os
.
pardir
))
manifest_file_name
=
os
.
path
.
basename
(
package_dir
)
+
'.manifest'
manifest_file_name
=
os
.
path
.
basename
(
package_dir
)
+
'.manifest'
...
@@ -35,22 +36,6 @@ def GenerateManifest(package_dir):
...
@@ -35,22 +36,6 @@ def GenerateManifest(package_dir):
return
manifest_path
return
manifest_path
def
CreateFarPackage
(
pm_bin
,
package_dir
,
signing_key
,
dst_dir
):
manifest_path
=
GenerateManifest
(
package_dir
)
pm_command_base
=
[
pm_bin
,
'-m'
,
manifest_path
,
'-k'
,
signing_key
,
'-o'
,
dst_dir
]
# Build the package
subprocess
.
check_output
(
pm_command_base
+
[
'build'
])
# Archive the package
subprocess
.
check_output
(
pm_command_base
+
[
'archive'
])
return
0
def
main
():
def
main
():
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
...
@@ -106,27 +91,42 @@ def main():
...
@@ -106,27 +91,42 @@ def main():
try
:
try
:
pm_commands
=
[
pm_commands
=
[
[
'build'
],
[
'build'
],
[
'archive'
,
'--output='
+
os
.
path
.
join
(
os
.
path
.
dirname
(
output_dir
),
args
.
far_name
+
"-0"
)],
[
'archive'
,
'--output='
+
os
.
path
.
join
(
os
.
path
.
dirname
(
output_dir
),
args
.
far_name
+
"-0"
)
],
]
]
for
pm_command
in
pm_commands
:
for
pm_command
in
pm_commands
:
pm_command_args
=
pm_command_base
+
pm_command
pm_command_args
=
pm_command_base
+
pm_command
sys
.
stderr
.
write
(
"===== Running %s
\n
"
%
pm_command_args
)
sys
.
stderr
.
write
(
"===== Running %s
\n
"
%
pm_command_args
)
subprocess
.
check_output
(
pm_command_args
)
subprocess
.
check_output
(
pm_command_args
)
except
subprocess
.
CalledProcessError
as
e
:
except
subprocess
.
CalledProcessError
as
e
:
print
(
'==================== Manifest contents ========================================='
)
print
(
'==================== Manifest contents ========================================='
)
with
open
(
manifest_file
,
'r'
)
as
manifest
:
with
open
(
manifest_file
,
'r'
)
as
manifest
:
sys
.
stdout
.
write
(
manifest
.
read
())
sys
.
stdout
.
write
(
manifest
.
read
())
print
(
'==================== End manifest contents ====================================='
)
print
(
'==================== End manifest contents ====================================='
)
meta_contents_path
=
os
.
path
.
join
(
output_dir
,
'meta'
,
'contents'
)
meta_contents_path
=
os
.
path
.
join
(
output_dir
,
'meta'
,
'contents'
)
if
os
.
path
.
exists
(
meta_contents_path
):
if
os
.
path
.
exists
(
meta_contents_path
):
print
(
'==================== meta/contents ============================================='
)
print
(
'==================== meta/contents ============================================='
)
with
open
(
meta_contents_path
,
'r'
)
as
meta_contents
:
with
open
(
meta_contents_path
,
'r'
)
as
meta_contents
:
sys
.
stdout
.
write
(
meta_contents
.
read
())
sys
.
stdout
.
write
(
meta_contents
.
read
())
print
(
'==================== End meta/contents ========================================='
)
print
(
print
(
'==================== Strace output ============================================='
)
'==================== End meta/contents ========================================='
)
print
(
'==================== Strace output ============================================='
)
with
open
(
strace_out
,
'r'
)
as
strace
:
with
open
(
strace_out
,
'r'
)
as
strace
:
sys
.
stdout
.
write
(
strace
.
read
())
sys
.
stdout
.
write
(
strace
.
read
())
print
(
'==================== End strace output ========================================='
)
print
(
'==================== End strace output ========================================='
)
raise
raise
return
0
return
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录