Merge remote-tracking branch 'upstream/master'
This commit is contained in:
+2
-2
@@ -185,8 +185,8 @@ endif()
|
|||||||
|
|
||||||
if (WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_SERVER)
|
if (WIVRN_BUILD_DASHBOARD OR WIVRN_BUILD_SERVER)
|
||||||
pkg_check_modules(librsvg-2.0 REQUIRED IMPORTED_TARGET librsvg-2.0)
|
pkg_check_modules(librsvg-2.0 REQUIRED IMPORTED_TARGET librsvg-2.0)
|
||||||
find_package(LibArchive)
|
find_package(LibArchive REQUIRED)
|
||||||
find_package(PNG)
|
find_package(PNG REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIVRN_BUILD_DASHBOARD)
|
if (WIVRN_BUILD_DASHBOARD)
|
||||||
|
|||||||
+1
-1
@@ -425,7 +425,7 @@ gboolean headset_connected_success(void *)
|
|||||||
}
|
}
|
||||||
catch (std::exception & e)
|
catch (std::exception & e)
|
||||||
{
|
{
|
||||||
std::cerr << "Failed to start application: " << e.what();
|
std::cerr << "Failed to start application: " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
delay_next_try = default_delay_next_try;
|
delay_next_try = default_delay_next_try;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "start_systemd_unit.h"
|
#include "start_systemd_unit.h"
|
||||||
#include "systemd_manager.h"
|
#include "systemd_manager.h"
|
||||||
#include "systemd_unit.h"
|
#include "systemd_unit.h"
|
||||||
|
#include "utils/strings.h"
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -211,11 +212,10 @@ void systemd_units_manager::start_application(const std::vector<std::string> & a
|
|||||||
variant_builder argv(G_VARIANT_TYPE("as"));
|
variant_builder argv(G_VARIANT_TYPE("as"));
|
||||||
for (const auto & arg: args)
|
for (const auto & arg: args)
|
||||||
g_variant_builder_add(&argv, "s", arg.c_str());
|
g_variant_builder_add(&argv, "s", arg.c_str());
|
||||||
auto exec_start =
|
auto exec_start = g_variant_new("(s@asb)",
|
||||||
g_variant_new("(s@asb)",
|
args.front().c_str(),
|
||||||
args.front().c_str(),
|
g_variant_new("as", &argv),
|
||||||
g_variant_new("as", &argv),
|
false);
|
||||||
false);
|
|
||||||
g_variant_builder_add(&b,
|
g_variant_builder_add(&b,
|
||||||
"(sv)",
|
"(sv)",
|
||||||
"ExecStart",
|
"ExecStart",
|
||||||
@@ -224,6 +224,17 @@ void systemd_units_manager::start_application(const std::vector<std::string> & a
|
|||||||
&exec_start,
|
&exec_start,
|
||||||
1));
|
1));
|
||||||
|
|
||||||
|
if (auto path = std::getenv("PATH"))
|
||||||
|
{
|
||||||
|
variant_builder pathv(G_VARIANT_TYPE("as"));
|
||||||
|
for (auto item: utils::split(path, ":"))
|
||||||
|
g_variant_builder_add(&pathv, "s", item.c_str());
|
||||||
|
g_variant_builder_add(&b,
|
||||||
|
"(sv)",
|
||||||
|
"ExecSearchPath",
|
||||||
|
g_variant_new("as", &pathv));
|
||||||
|
}
|
||||||
|
|
||||||
auto properties = b.end();
|
auto properties = b.end();
|
||||||
auto aux = g_variant_new_array(G_VARIANT_TYPE("(sa(sv))"), nullptr, 0);
|
auto aux = g_variant_new_array(G_VARIANT_TYPE("(sa(sv))"), nullptr, 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user