Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
d12aad5c
A
anbox
项目概览
openeuler
/
anbox
通知
24
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
anbox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d12aad5c
编写于
2月 03, 2017
作者:
S
Simon Fels
提交者:
GitHub
2月 03, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #34 from morphis/feature/minor-fixes
A few minor fixes to clean things up a bit
上级
e1aff472
e2f51b80
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
30 deletion
+24
-30
scripts/container-manager.sh
scripts/container-manager.sh
+1
-1
snapcraft.yaml
snapcraft.yaml
+1
-3
src/anbox/application/launcher_storage.cpp
src/anbox/application/launcher_storage.cpp
+19
-19
src/anbox/cmds/run.cpp
src/anbox/cmds/run.cpp
+0
-3
src/anbox/cmds/run.h
src/anbox/cmds/run.h
+0
-1
tests/anbox/graphics/buffered_io_stream_tests.cpp
tests/anbox/graphics/buffered_io_stream_tests.cpp
+3
-3
未找到文件。
scripts/container-manager.sh
浏览文件 @
d12aad5c
...
...
@@ -95,7 +95,7 @@ start() {
fi
# Ensure FUSE support for user namespaces is enabled
echo
Y
>
/sys/module/fuse/parameters/userns_mounts
echo
Y
|
sudo tee
/sys/module/fuse/parameters/userns_mounts
||
echo
"WARNING: kernel doesn't support fuse in user namespaces"
exec
$SNAP
/usr/sbin/aa-exec
-p
unconfined
--
$SNAP
/bin/anbox-wrapper.sh container-manager
}
...
...
snapcraft.yaml
浏览文件 @
d12aad5c
...
...
@@ -88,9 +88,6 @@ parts:
# FIXME: Anbox currently has some paths with hard coded prefixes. Once
# that is fixed we can avoid using a prefix here.
-
-DCMAKE_INSTALL_PREFIX:PATH=/usr
# FIXME: When building in release mode we get a lot of error which cause
# the build to fail.
-
-DCMAKE_BUILD_TYPE=debug
build-packages
:
-
build-essential
-
cmake
...
...
@@ -104,6 +101,7 @@ parts:
-
libboost-iostreams-dev
-
libboost-program-options-dev
-
libboost-system-dev
-
libboost-test-dev
-
libboost-thread-dev
-
libcap-dev
-
libdbus-1-dev
...
...
src/anbox/application/launcher_storage.cpp
浏览文件 @
d12aad5c
...
...
@@ -48,10 +48,8 @@ void LauncherStorage::add(const Item &item) {
auto
package_name
=
item
.
package
;
std
::
replace
(
package_name
.
begin
(),
package_name
.
end
(),
'.'
,
'-'
);
const
auto
item_path
=
path_
/
utils
::
string_format
(
"anbox-%s.desktop"
,
package_name
);
const
auto
item_icon_path
=
icon_path_
/
utils
::
string_format
(
"anbox-%s.png"
,
package_name
);
const
auto
item_path
=
path_
/
utils
::
string_format
(
"anbox-%s.desktop"
,
package_name
);
const
auto
item_icon_path
=
icon_path_
/
utils
::
string_format
(
"anbox-%s.png"
,
package_name
);
std
::
string
exec
=
utils
::
string_format
(
"%s launch "
,
utils
::
process_get_exe_path
(
getpid
()));
...
...
@@ -68,21 +66,23 @@ void LauncherStorage::add(const Item &item) {
exec
+=
utils
::
string_format
(
"--package=%s "
,
item
.
launch_intent
.
package
);
if
(
!
item
.
launch_intent
.
component
.
empty
())
exec
+=
utils
::
string_format
(
"--component=%s "
,
item
.
launch_intent
.
component
);
std
::
ofstream
f
(
item_path
.
string
());
f
<<
"[Desktop Entry]"
<<
std
::
endl
<<
"Name="
<<
item
.
package
<<
std
::
endl
<<
"Exec="
<<
exec
<<
std
::
endl
<<
"Terminal=false"
<<
std
::
endl
<<
"Type=Application"
<<
std
::
endl
<<
"Icon="
<<
item_icon_path
.
string
()
<<
std
::
endl
;
f
.
close
();
f
=
std
::
ofstream
(
item_icon_path
.
string
());
f
.
write
(
item
.
icon
.
data
(),
item
.
icon
.
size
());
f
.
close
();
exec
+=
utils
::
string_format
(
"--component=%s "
,
item
.
launch_intent
.
component
);
if
(
auto
desktop_item
=
std
::
ofstream
(
item_path
.
string
()))
{
desktop_item
<<
"[Desktop Entry]"
<<
std
::
endl
<<
"Name="
<<
item
.
package
<<
std
::
endl
<<
"Exec="
<<
exec
<<
std
::
endl
<<
"Terminal=false"
<<
std
::
endl
<<
"Type=Application"
<<
std
::
endl
<<
"Icon="
<<
item_icon_path
.
string
()
<<
std
::
endl
;
}
else
{
BOOST_THROW_EXCEPTION
(
std
::
runtime_error
(
"Failed to create desktop item"
));
}
if
(
auto
icon
=
std
::
ofstream
(
item_icon_path
.
string
()))
icon
.
write
(
item
.
icon
.
data
(),
item
.
icon
.
size
());
else
BOOST_THROW_EXCEPTION
(
std
::
runtime_error
(
"Failed to write icon"
));
}
}
// namespace application
}
// namespace anbox
src/anbox/cmds/run.cpp
浏览文件 @
d12aad5c
...
...
@@ -81,9 +81,6 @@ anbox::cmds::Run::Run(const BusFactory &bus_factory)
flag
(
cli
::
make_flag
(
cli
::
Name
{
"desktop_file_hint"
},
cli
::
Description
{
"Desktop file hint for QtMir/Unity8"
},
desktop_file_hint_
));
flag
(
cli
::
make_flag
(
cli
::
Name
{
"icon"
},
cli
::
Description
{
"Icon of the application to run"
},
icon_
));
action
([
this
](
const
cli
::
Command
::
Context
&
)
{
auto
trap
=
core
::
posix
::
trap_signals_for_process
(
...
...
src/anbox/cmds/run.h
浏览文件 @
d12aad5c
...
...
@@ -39,7 +39,6 @@ class Run : public cli::CommandWithFlagsAndAction {
private:
BusFactory
bus_factory_
;
std
::
string
desktop_file_hint_
;
std
::
string
icon_
;
};
}
// namespace cmds
}
// namespace anbox
...
...
tests/anbox/graphics/buffered_io_stream_tests.cpp
浏览文件 @
d12aad5c
...
...
@@ -51,7 +51,7 @@ TEST(BufferedIOStream, CommitBufferWritesOutToMessenger) {
auto
messenger
=
std
::
make_shared
<
MockSocketMessenger
>
();
BufferedIOStream
stream
(
messenger
);
const
auto
buffer_size
{
1000
};
const
size_t
buffer_size
{
1000
};
// We will write out the data we get in two junks of half the size
// the original buffer has.
EXPECT_CALL
(
*
messenger
,
send_raw
(
_
,
buffer_size
))
...
...
@@ -75,8 +75,8 @@ TEST(BufferedIOStream, WriterContinuesWhenSocketIsBusy) {
auto
messenger
=
std
::
make_shared
<
MockSocketMessenger
>
();
BufferedIOStream
stream
(
messenger
);
const
auto
buffer_size
{
1000
};
const
auto
first_chunk_size
{
100
};
const
size_t
buffer_size
{
1000
};
const
size_t
first_chunk_size
{
100
};
// The writer will check the error code of the send function
// and will retry writing the next chunk when it doesn't get
// EAGAIN anymore from the sender.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录