More accurate flatpak info parser
This commit is contained in:
@@ -31,7 +31,7 @@ std::filesystem::path active_runtime::manifest_path()
|
||||
{
|
||||
const std::filesystem::path install_location = "share/openxr/1/openxr_wivrn.json";
|
||||
// Check if in a flatpak
|
||||
if (auto path = flatpak_key("app-path"))
|
||||
if (auto path = flatpak_key(flatpak::section::instance, "app-path"))
|
||||
return *path / install_location.relative_path();
|
||||
|
||||
// Check if running from build directory
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ void display_child_status(int wstatus, const std::string & name)
|
||||
|
||||
static std::filesystem::path flatpak_app_path()
|
||||
{
|
||||
if (auto value = flatpak_key("app-path"))
|
||||
if (auto value = flatpak_key(flatpak::section::instance, "app-path"))
|
||||
{
|
||||
std::filesystem::path path = *value;
|
||||
while (path != "" and path != path.parent_path() and path.filename() != "io.github.wivrn.wivrn")
|
||||
|
||||
@@ -235,7 +235,7 @@ int wivrn::exec_application(configuration config)
|
||||
std::string executable;
|
||||
std::vector<std::string> args;
|
||||
|
||||
if (flatpak_key("org.freedesktop.Flatpak") == "talk")
|
||||
if (flatpak_key(flatpak::section::session_bus_policy, "org.freedesktop.Flatpak") == "talk")
|
||||
{
|
||||
executable = "flatpak-spawn";
|
||||
args.push_back("flatpak-spawn");
|
||||
|
||||
Reference in New Issue
Block a user