Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
b8bfa79c
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,发现更多精彩内容 >>
提交
b8bfa79c
编写于
3月 14, 2017
作者:
S
Simon Fels
提交者:
GitHub
3月 14, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #59 from morphis/f/launcher-fixes
Small fixes to get the app launchers working when running within a snap
上级
625e0830
11aea9c6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
3 deletion
+13
-3
scripts/snap-wrapper.sh
scripts/snap-wrapper.sh
+1
-1
src/anbox/application/launcher_storage.cpp
src/anbox/application/launcher_storage.cpp
+11
-1
src/anbox/cmds/system_info.cpp
src/anbox/cmds/system_info.cpp
+1
-1
未找到文件。
scripts/snap-wrapper.sh
浏览文件 @
b8bfa79c
...
...
@@ -33,6 +33,6 @@ export LD_LIBRARY_PATH="$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH"
# create all our application launchers in. The system application launcher will
# be configured by our installer to look into this directory for available
# launchers.
export
XDG_DATA_HOME
=
"
$SNAP_USER_COMMON
"
export
XDG_DATA_HOME
=
"
$SNAP_USER_COMMON
/app-data
"
exec
$SNAP
/usr/bin/anbox
$@
src/anbox/application/launcher_storage.cpp
浏览文件 @
b8bfa79c
...
...
@@ -25,6 +25,12 @@
namespace
fs
=
boost
::
filesystem
;
namespace
{
// This will always point us to the right executable when we're running within
// a snap environment.
constexpr
const
char
*
snap_exe_path
{
"/snap/bin/anbox"
};
}
namespace
anbox
{
namespace
application
{
LauncherStorage
::
LauncherStorage
(
const
fs
::
path
&
path
,
...
...
@@ -62,7 +68,11 @@ void LauncherStorage::add_or_update(const Item &item) {
auto
package_name
=
item
.
package
;
std
::
replace
(
package_name
.
begin
(),
package_name
.
end
(),
'.'
,
'-'
);
std
::
string
exec
=
utils
::
string_format
(
"%s launch "
,
utils
::
process_get_exe_path
(
getpid
()));
auto
exe_path
=
utils
::
process_get_exe_path
(
getpid
());
if
(
utils
::
get_env_value
(
"SNAP"
).
length
()
>
0
)
exe_path
=
snap_exe_path
;
std
::
string
exec
=
utils
::
string_format
(
"%s launch "
,
exe_path
);
if
(
!
item
.
launch_intent
.
action
.
empty
())
exec
+=
utils
::
string_format
(
"--action=%s "
,
item
.
launch_intent
.
action
);
...
...
src/anbox/cmds/system_info.cpp
浏览文件 @
b8bfa79c
...
...
@@ -195,7 +195,7 @@ anbox::cmds::SystemInfo::SystemInfo()
:
CommandWithFlagsAndAction
{
cli
::
Name
{
"system-info"
},
cli
::
Usage
{
"system-info"
},
cli
::
Description
{
"Print various information about the system we're running on"
}}
{
action
([](
const
cli
::
Command
::
Context
&
ctxt
)
{
action
([](
const
cli
::
Command
::
Context
&
)
{
SystemInformation
si
;
std
::
cout
<<
si
;
return
EXIT_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录