Set correct resource path when starting from within a snap
This commit is contained in:
parent
f838e759d8
commit
48758d8955
1 changed files with 7 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "anbox/dbus/stub/application_manager.h"
|
||||
#include "anbox/common/dispatcher.h"
|
||||
#include "anbox/ui/splash_screen.h"
|
||||
#include "anbox/config.h"
|
||||
#include "anbox/runtime.h"
|
||||
#include "anbox/logger.h"
|
||||
|
||||
|
|
@ -85,6 +86,12 @@ anbox::cmds::Launch::Launch()
|
|||
auto bus = std::make_shared<core::dbus::Bus>(core::dbus::WellKnownBus::session);
|
||||
bus->install_executor(core::dbus::asio::make_executor(bus, rt->service()));
|
||||
|
||||
const auto snap_path = utils::get_env_value("SNAP");
|
||||
if (!snap_path.empty()) {
|
||||
const auto resource_path = utils::string_format("%s/share/anbox", snap_path);
|
||||
SystemConfiguration::instance().set_resource_path(resource_path)
|
||||
}
|
||||
|
||||
std::shared_ptr<ui::SplashScreen> ss;
|
||||
|
||||
// Instead of relying on the user session init system to start our
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue