From b695a8f49370f23cfbdea777cd5f65f2e65d4f69 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Thu, 15 Aug 2024 13:02:43 +0200 Subject: [PATCH 1/8] Update flatpak metadata and application name --- .github/workflows/Build.yml | 2 +- build.gradle | 4 +- flatpak/io.github.wivrn.wivrn.desktop | 9 +++ flatpak/io.github.wivrn.wivrn.metainfo.xml | 81 +++++++++++++++++++ ...n-server.yml => io.github.wivrn.wivrn.yml} | 18 ++--- flatpak/org.meumeu.wivrn-server.appdata.xml | 49 ----------- flatpak/org.meumeu.wivrn-server.desktop | 9 --- 7 files changed, 100 insertions(+), 72 deletions(-) create mode 100644 flatpak/io.github.wivrn.wivrn.desktop create mode 100644 flatpak/io.github.wivrn.wivrn.metainfo.xml rename flatpak/{org.meumeu.wivrn-server.yml => io.github.wivrn.wivrn.yml} (92%) delete mode 100644 flatpak/org.meumeu.wivrn-server.appdata.xml delete mode 100644 flatpak/org.meumeu.wivrn-server.desktop diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index d66b0f52..ef3856dd 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -87,7 +87,7 @@ jobs: # TODO: replace with version > v6.3 when it's released - uses: flatpak/flatpak-github-actions/flatpak-builder@b8be6bc0ede43cb3a2cc55895654312b14f84a0d with: - manifest-path: flatpak/org.meumeu.wivrn-server.yml + manifest-path: flatpak/io.github.wivrn.wivrn.yml bundle: wivrn-server.flatpak upload-artifact: false diff --git a/build.gradle b/build.gradle index 2b147a86..3502f00b 100644 --- a/build.gradle +++ b/build.gradle @@ -57,11 +57,11 @@ task "generatePngs"() { } android { - namespace "org.meumeu.wivrn" + namespace "io.github.wivrn.client" ndkVersion "26.1.10909125" defaultConfig { - applicationId "org.meumeu.wivrn" + applicationId "io.github.wivrn.client" // for Vulkan, need at least 24 // for AImage_getHardwareBuffer, API 26 minSdkVersion 29 diff --git a/flatpak/io.github.wivrn.wivrn.desktop b/flatpak/io.github.wivrn.wivrn.desktop new file mode 100644 index 00000000..55516c44 --- /dev/null +++ b/flatpak/io.github.wivrn.wivrn.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=WiVRn server +Comment=Play your PC VR games on a standalone headset +GenericName=WiVRn server +Exec=launch-wivrn-server +Icon=io.github.wivrn.wivrn +Type=Application +Categories=ConsoleOnly +Terminal=true diff --git a/flatpak/io.github.wivrn.wivrn.metainfo.xml b/flatpak/io.github.wivrn.wivrn.metainfo.xml new file mode 100644 index 00000000..bde30deb --- /dev/null +++ b/flatpak/io.github.wivrn.wivrn.metainfo.xml @@ -0,0 +1,81 @@ + + + io.github.wivrn.wivrn + WiVRn server + FSFAP + GPL-3.0-or-later + Play your PC VR games on a standalone headset + +

WiVRn allows you to run your VR games from your PC and play them from a standalone headset.

+ +

You will need to install the WiVRn client on your headset from the APK on Github.

+ +

Supported headsets:

+
    +
  • Meta Quest 1
  • +
  • Meta Quest 2
  • +
  • Meta Quest 3
  • +
  • Meta Quest Pro
  • +
  • Pico Neo 3
  • +
  • Pico Neo 4
  • +
  • HTC Vive Focus 3
  • +
  • HTC Vive XR Elite
  • +
+

Features:

+
    +
  • Supports OpenXR and OpenVR applications
  • +
  • Controller tracking, hand tracking, eye gaze tracking (if supported by the headset)
  • +
  • Audio streaming and microphone
  • +
  • Video streaming with H264 / HEVC / AV1 compression
  • +
  • Hardware accelerated compression with VAAPI or NVENC
  • +
  • Software compression with x264
  • +
+
+ + Guillaume Meunier, Patrick Nicolas et al + + + #F6F5F5 + #424242 + + + io.github.wivrn.wivrn.desktop + + https://www.github.com/WiVRn/WiVRn + + io.github.wivrn.wivrn + + + launch-wivrn-server + + + + + + + https://github.com/WiVRn/WiVRn/releases/tag/v0.18 + +
    +
  • The standard APK is now compatible with Pico headsets
  • +
  • Fixes for position on start and reconnect
  • +
  • Support for EXT_eye_gaze_interaction by @galister
  • +
  • Better support for libmonado, now discoverable in manifest
  • +
  • Server can now be distributed as a flatpak
  • +
+
+
+ + + https://github.com/WiVRn/WiVRn/releases/tag/v0.17 + +
    +
  • Add systemd hardening options by @Pandapip1
  • +
  • update monado to 24.0.0 by @galister
  • +
  • Update building doc by @SanyaNya
  • +
  • Multiple tweaks for controller tracking, audio resync
  • +
  • Minor performance improvements
  • +
+
+
+
+
diff --git a/flatpak/org.meumeu.wivrn-server.yml b/flatpak/io.github.wivrn.wivrn.yml similarity index 92% rename from flatpak/org.meumeu.wivrn-server.yml rename to flatpak/io.github.wivrn.wivrn.yml index 676ca774..ab4e195b 100644 --- a/flatpak/org.meumeu.wivrn-server.yml +++ b/flatpak/io.github.wivrn.wivrn.yml @@ -1,4 +1,4 @@ -id: org.meumeu.wivrn-server +id: io.github.wivrn.wivrn runtime: org.freedesktop.Platform runtime-version: '23.08' sdk: org.freedesktop.Sdk @@ -140,6 +140,10 @@ modules: - type: shell commands: - cd deps/monado-src && ../../patches/apply.sh ../../patches/monado + build-commands: + - install -DTm644 images/wivrn.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/io.github.wivrn.wivrn.svg + - install -Dm644 flatpak/io.github.wivrn.wivrn.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo + - install -Dm644 flatpak/io.github.wivrn.wivrn.desktop -t ${FLATPAK_DEST}/share/applications - name: opencomposite buildsystem: cmake-ninja @@ -157,7 +161,7 @@ modules: - name: launcher buildsystem: simple build-commands: - - install -Dm755 launch-wivrn-server.sh ${FLATPAK_DEST}/bin/launch-wivrn-server + - install -Dm755 launch-wivrn-server.sh ${FLATPAK_DEST}/bin/launch-wivrn-server sources: - type: script dest-filename: launch-wivrn-server.sh @@ -167,14 +171,6 @@ modules: - chmod -w $XDG_CONFIG_HOME/openvr/openvrpaths.vrpath - wivrn-server - - name: appdata - buildsystem: simple - build-commands: - - install -Dm644 org.meumeu.wivrn-server.appdata.xml -t ${FLATPAK_DEST}/share/appdata - sources: - - type: file - path: org.meumeu.wivrn-server.appdata.xml - cleanup: - /lib/pkgconfig - /share/pkgconfig @@ -193,7 +189,7 @@ finish-args: - --socket=fallback-x11 # Wayland access - --socket=wayland - # GPU acceleration if needed + # GPU acceleration - --device=dri # Needs to talk to the network - --share=network diff --git a/flatpak/org.meumeu.wivrn-server.appdata.xml b/flatpak/org.meumeu.wivrn-server.appdata.xml deleted file mode 100644 index bc51af15..00000000 --- a/flatpak/org.meumeu.wivrn-server.appdata.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - org.meumeu.wivrn-server - WiVRn server - FSFAP - GPL-3.0+ - The WiVRn server -

Server component of the WiVRn OpenXR streaming system

- - Guillaume Meunier, Patrick Nicolas et al - - - - https://www.github.org/Meumeu/WiVRn - - - launch-wivrn-server - - - - - - - https://github.com/Meumeu/WiVRn/releases/tag/v0.18 - -
    -
  • The standard APK is now compatible with Pico headsets
  • -
  • Fixes for position on start and reconnect
  • -
  • Support for EXT_eye_gaze_interaction by @galister
  • -
  • Better support for libmonado, now discoverable in manifest
  • -
  • Server can now be distributed as a flatpak
  • -
-
-
- - - https://github.com/Meumeu/WiVRn/releases/tag/v0.17 - -
    -
  • Add systemd hardening options by @Pandapip1
  • -
  • update monado to 24.0.0 by @galister
  • -
  • Update building doc by @SanyaNya
  • -
  • Multiple tweaks for controller tracking, audio resync
  • -
  • Minor performance improvements
  • -
-
-
-
-
diff --git a/flatpak/org.meumeu.wivrn-server.desktop b/flatpak/org.meumeu.wivrn-server.desktop deleted file mode 100644 index 91c17305..00000000 --- a/flatpak/org.meumeu.wivrn-server.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=WiVRn server -Comment=TBD -GenericName=TBD -Exec=launch-wivrn-server -Icon=org.meumeu.wivrn -Type=Application -Categories=ConsoleOnly -Keywords=wivrn; From 6da658bcfb4f67abd6c697f2c222529a20ac10ca Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Fri, 16 Aug 2024 14:45:03 +0200 Subject: [PATCH 2/8] Allow using glib instead of sd-bus to get the pretty hostname --- CMakeLists.txt | 14 ++++++++- common/wivrn_config.h.in | 1 + flatpak/io.github.wivrn.wivrn.yml | 7 +++-- server/CMakeLists.txt | 4 +++ server/hostname.cpp | 52 +++++++++++++++++++++++++++++-- 5 files changed, 72 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 729f0e03..17a143f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,8 @@ include("cmake/AutoOption.cmake") option(WIVRN_USE_SYSTEM_FREETYPE "Use system FreeType" ON) auto_option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" AUTO) auto_option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" AUTO) -auto_option(WIVRN_USE_SYSTEMD "Use libsystemd, required to show pretty hostname" AUTO) +auto_option(WIVRN_USE_SYSTEMD "Use libsystemd, either libsystemd or glib is required to show pretty hostname" AUTO) +auto_option(WIVRN_USE_GLIB "Use glib, required to show pretty hostname inside a flatpak container" OFF) option(WIVRN_USE_ANDROID_VALIDATION_LAYER "Download the android version of the Vulkan validation layer" OFF) option(WIVRN_BUILD_CLIENT "Build WiVRn client" OFF) option(WIVRN_BUILD_SERVER "Build WiVRn server" ON) @@ -140,6 +141,17 @@ if (WIVRN_BUILD_SERVER) find_package(Eigen3 REQUIRED) find_package(nlohmann_json REQUIRED) find_package(CLI11 REQUIRED) + + if (WIVRN_USE_GLIB STREQUAL "AUTO") + pkg_check_modules(glib2 IMPORTED_TARGET glib-2.0 gio-2.0) + if(glib2_FOUND) + set(WIVRN_USE_GLIB ON) + else() + set(WIVRN_USE_GLIB OFF) + endif() + elseif (WIVRN_USE_GLIB) + pkg_check_modules(glib2 REQUIRED IMPORTED_TARGET glib-2.0 gio-2.0) + endif() endif() if (WIVRN_BUILD_CLIENT AND NOT ANDROID) diff --git a/common/wivrn_config.h.in b/common/wivrn_config.h.in index a152ba2c..d8c8f109 100644 --- a/common/wivrn_config.h.in +++ b/common/wivrn_config.h.in @@ -24,6 +24,7 @@ #cmakedefine WIVRN_USE_X264 #cmakedefine WIVRN_USE_SYSTEMD +#cmakedefine WIVRN_USE_GLIB #cmakedefine WIVRN_USE_PIPEWIRE #cmakedefine WIVRN_USE_PULSEAUDIO diff --git a/flatpak/io.github.wivrn.wivrn.yml b/flatpak/io.github.wivrn.wivrn.yml index ab4e195b..af071bd0 100644 --- a/flatpak/io.github.wivrn.wivrn.yml +++ b/flatpak/io.github.wivrn.wivrn.yml @@ -122,6 +122,7 @@ modules: - -DWIVRN_USE_X264=ON - -DWIVRN_USE_NVENC=ON - -DWIVRN_USE_PULSEAUDIO=OFF + - -DWIVRN_USE_GLIB=ON - -DFETCHCONTENT_FULLY_DISCONNECTED=ON - -DFETCHCONTENT_BASE_DIR=deps - -DXRT_IPC_MSG_SOCK_FILENAME=wivrn/comp_ipc @@ -194,10 +195,10 @@ finish-args: # Needs to talk to the network - --share=network # Announce WiVRn via avahi - # - --system-talk-name=org.freedesktop.Avahi + - --system-talk-name=org.freedesktop.Avahi # Allow getting the pretty hostname - # - --system-talk-name=org.freedesktop.hostname1 - - --socket=system-bus # workaround bug between sd-bus (https://github.com/systemd/systemd/issues/16610) and xdg-dbus-proxy (https://github.com/flatpak/xdg-dbus-proxy/issues/21) + - --system-talk-name=org.freedesktop.hostname1 + # - --socket=system-bus # workaround bug between sd-bus (https://github.com/systemd/systemd/issues/16610) and xdg-dbus-proxy (https://github.com/flatpak/xdg-dbus-proxy/issues/21) # Pipewire - --filesystem=xdg-run/pipewire-0 # Set the active OpenXR / OpenVR runtime diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 6693b9e5..1c2b7300 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -159,6 +159,10 @@ target_link_libraries( nlohmann_json::nlohmann_json ) +if(WIVRN_USE_GLIB) + target_link_libraries( wivrn-server PRIVATE PkgConfig::glib2) +endif() + configure_file(dist/wivrn.service.in wivrn.service) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/wivrn.service DESTINATION lib/systemd/user/) diff --git a/server/hostname.cpp b/server/hostname.cpp index e39cf06b..af149458 100644 --- a/server/hostname.cpp +++ b/server/hostname.cpp @@ -5,13 +5,61 @@ #include "util/u_logging.h" #include "wivrn_config.h" -#ifdef WIVRN_USE_SYSTEMD +#ifdef WIVRN_USE_GLIB +#include +#elif defined(WIVRN_USE_SYSTEMD) #include #endif std::string hostname() { -#ifdef WIVRN_USE_SYSTEMD +#ifdef WIVRN_USE_GLIB + GError * error = NULL; + GDBusConnection * con = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); + + if (!con) + { + U_LOG_W("Failed to connect to system bus: %s", error->message); + } + else + { + for (auto property: {"PrettyHostname", "StaticHostname", "Hostname"}) + { + GVariant * result = g_dbus_connection_call_sync(con, + "org.freedesktop.hostname1", + "/org/freedesktop/hostname1", + "org.freedesktop.DBus.Properties", + "Get", + g_variant_new("(ss)", "org.freedesktop.hostname1", property), + G_VARIANT_TYPE("(v)"), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + + if (error) + continue; + + GVariant * property_value; + g_variant_get(result, "(v)", &property_value); + const char * hostname = g_variant_get_string(property_value, NULL); + + if (hostname && strcmp(hostname, "")) + { + std::string s = hostname; + g_variant_unref(property_value); + g_variant_unref(result); + g_object_unref(con); + return s; + } + + g_variant_unref(property_value); + g_variant_unref(result); + } + + g_object_unref(con); + } +#elif defined(WIVRN_USE_SYSTEMD) sd_bus * bus; if (sd_bus_default_system(&bus) < 0) { From 1c445024d76fde9557921be679c840d7f06bef8b Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 18 Aug 2024 09:24:34 +0200 Subject: [PATCH 3/8] Only request hostname once --- server/hostname.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/hostname.cpp b/server/hostname.cpp index af149458..88dc4c2b 100644 --- a/server/hostname.cpp +++ b/server/hostname.cpp @@ -11,7 +11,7 @@ #include #endif -std::string hostname() +static std::string _hostname() { #ifdef WIVRN_USE_GLIB GError * error = NULL; @@ -100,3 +100,10 @@ std::string hostname() U_LOG_W("Failed to get hostname"); return "no-hostname"; } + +std::string hostname() +{ + // Accessing hostname in child process fails with glib + static std::string result = _hostname(); + return result; +} From 9af47ce00b662befa66298236faa18e968a63615 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Sat, 24 Aug 2024 09:45:50 +0200 Subject: [PATCH 4/8] Fix metainfo: AV1 not implemented yet, add links --- flatpak/io.github.wivrn.wivrn.metainfo.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flatpak/io.github.wivrn.wivrn.metainfo.xml b/flatpak/io.github.wivrn.wivrn.metainfo.xml index bde30deb..8a1ffd1a 100644 --- a/flatpak/io.github.wivrn.wivrn.metainfo.xml +++ b/flatpak/io.github.wivrn.wivrn.metainfo.xml @@ -26,7 +26,7 @@
  • Supports OpenXR and OpenVR applications
  • Controller tracking, hand tracking, eye gaze tracking (if supported by the headset)
  • Audio streaming and microphone
  • -
  • Video streaming with H264 / HEVC / AV1 compression
  • +
  • Video streaming with H264 / HEVC compression
  • Hardware accelerated compression with VAAPI or NVENC
  • Software compression with x264
  • @@ -41,7 +41,9 @@ io.github.wivrn.wivrn.desktop - https://www.github.com/WiVRn/WiVRn + https://wivrn.github.io + https://www.github.com/WiVRn/WiVRn + https://github.com/WiVRn/WiVRn/issues io.github.wivrn.wivrn From 5446847ed49a11ddb4f0cbac1031c9857000aaa2 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Sat, 24 Aug 2024 16:01:54 +0200 Subject: [PATCH 5/8] Display the correct steam command when installed as a system flatpak --- server/main.cpp | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/server/main.cpp b/server/main.cpp index 23d462c8..404cfeae 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -18,6 +18,7 @@ #include "wivrn_sockets.h" #include +#include #include #include #include @@ -123,11 +124,47 @@ void waitpid_verbose(pid_t pid, const std::string & name) } } +static std::filesystem::path flatpak_app_path() +{ + const std::string key("app-path="); + std::string line; + std::ifstream info("/.flatpak-info"); + while (std::getline(info, line)) + { + if (line.starts_with(key)) + { + std::filesystem::path path = line.substr(key.size()); + while (path != "" and path != path.parent_path() and path.filename() != "io.github.wivrn.wivrn") + path = path.parent_path(); + + return path; + } + } + + return "/"; +} + +static std::string steam_command() +{ + std::string pressure_vessel_filesystems_rw = "$XDG_RUNTIME_DIR/" XRT_IPC_MSG_SOCK_FILENAME; + + // Check if in a flatpak + if (std::filesystem::exists("/.flatpak-info")) + { + std::string app_path = flatpak_app_path().string(); + // /usr and /var are remapped by steam + if (app_path.starts_with("/usr") or app_path.starts_with("/var")) + pressure_vessel_filesystems_rw += ":" + app_path; + } + return "PRESSURE_VESSEL_FILESYSTEMS_RW=" + pressure_vessel_filesystems_rw + " %command%"; +} + int inner_main(int argc, char * argv[], bool use_systemd) { std::cerr << "WiVRn " << xrt::drivers::wivrn::git_version << " starting" << std::endl; - std::string command = "PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/" XRT_IPC_MSG_SOCK_FILENAME " %command%"; + std::string command = steam_command(); + if (auto p = active_runtime::manifest_path().string(); p.starts_with("/usr")) command = "XR_RUNTIME_JSON=/run/host" + p + " " + command; From a2b282a8c9af2b88c7689ef1ddf9535a297f0aeb Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Fri, 23 Aug 2024 21:37:57 +0200 Subject: [PATCH 6/8] Backport manifest fixes from flathub repo --- flatpak/io.github.wivrn.wivrn.yml | 78 +++++++++++++------------------ 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/flatpak/io.github.wivrn.wivrn.yml b/flatpak/io.github.wivrn.wivrn.yml index af071bd0..f1fb40d7 100644 --- a/flatpak/io.github.wivrn.wivrn.yml +++ b/flatpak/io.github.wivrn.wivrn.yml @@ -4,16 +4,39 @@ runtime-version: '23.08' sdk: org.freedesktop.Sdk command: launch-wivrn-server -add-extensions: - org.freedesktop.Platform.VAAPI.Intel: - version: '23.08' - directory: lib/dri - add-ld-path: lib - subdirectories: true - no-autodownload: true - autodelete: true -cleanup-commands: - - mkdir -p ${FLATPAK_DEST}/lib/dri +finish-args: + # X11 + XShm access + - --share=ipc + - --socket=fallback-x11 + # Wayland access + - --socket=wayland + # GPU acceleration + - --device=dri + # Needs to talk to the network + - --share=network + # Announce WiVRn via avahi + - --system-talk-name=org.freedesktop.Avahi + # Allow getting the pretty hostname + - --system-talk-name=org.freedesktop.hostname1 + # Pipewire + - --filesystem=xdg-run/pipewire-0 + # Set the active OpenXR / OpenVR runtime + - --filesystem=xdg-config/openxr:create + - --filesystem=xdg-config/openvr:create + # Let outside application access the WiVRn socket + - --filesystem=xdg-run/wivrn:create + +cleanup: + - /lib/pkgconfig + - /share/pkgconfig + - /include + - /share/man + - /share/cmake + - /share/gir-1.0 + - /lib/girepository-1.0 + - /lib/systemd + - '*.a' + - '*.la' modules: - name: libavahi-client @@ -171,38 +194,3 @@ modules: - sed -ne 's#app-path=\(.*\)#{"runtime":["\1/OpenComposite"],"version":1}#p' /.flatpak-info > $XDG_CONFIG_HOME/openvr/openvrpaths.vrpath - chmod -w $XDG_CONFIG_HOME/openvr/openvrpaths.vrpath - wivrn-server - -cleanup: - - /lib/pkgconfig - - /share/pkgconfig - - /include - - /share/man - - /share/cmake - - /share/gir-1.0 - - /lib/girepository-1.0 - - /lib/systemd - - '*.a' - - '*.la' - -finish-args: - # X11 + XShm access - - --share=ipc - - --socket=fallback-x11 - # Wayland access - - --socket=wayland - # GPU acceleration - - --device=dri - # Needs to talk to the network - - --share=network - # Announce WiVRn via avahi - - --system-talk-name=org.freedesktop.Avahi - # Allow getting the pretty hostname - - --system-talk-name=org.freedesktop.hostname1 - # - --socket=system-bus # workaround bug between sd-bus (https://github.com/systemd/systemd/issues/16610) and xdg-dbus-proxy (https://github.com/flatpak/xdg-dbus-proxy/issues/21) - # Pipewire - - --filesystem=xdg-run/pipewire-0 - # Set the active OpenXR / OpenVR runtime - - --filesystem=xdg-config/openxr:create - - --filesystem=xdg-config/openvr:create - # Let outside application access the WiVRn socket - - --filesystem=xdg-run/wivrn:create From 3d6981e3cdc0c8e861de473cbaebb2aac8094924 Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Fri, 23 Aug 2024 23:05:26 +0200 Subject: [PATCH 7/8] Don't install ffmpeg/ffplay/ffprobe in flatpak --- flatpak/io.github.wivrn.wivrn.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flatpak/io.github.wivrn.wivrn.yml b/flatpak/io.github.wivrn.wivrn.yml index f1fb40d7..d0f0819e 100644 --- a/flatpak/io.github.wivrn.wivrn.yml +++ b/flatpak/io.github.wivrn.wivrn.yml @@ -95,7 +95,9 @@ modules: - make install cleanup: - /share/ffmpeg - + - /bin/ffmpeg + - /bin/ffplay + - /bin/ffprobe sources: - type: git url: https://gitlab.com/freedesktop-sdk/mirrors/ffmpeg/ffmpeg.git From 1793622a54f73db11b4167d62130c94d5bea248c Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Fri, 23 Aug 2024 23:22:04 +0200 Subject: [PATCH 8/8] Install desktop and icon files in CMakeLists instead of flatpak manifest --- flatpak/io.github.wivrn.wivrn.yml | 4 ---- server/CMakeLists.txt | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/flatpak/io.github.wivrn.wivrn.yml b/flatpak/io.github.wivrn.wivrn.yml index d0f0819e..93c51288 100644 --- a/flatpak/io.github.wivrn.wivrn.yml +++ b/flatpak/io.github.wivrn.wivrn.yml @@ -166,10 +166,6 @@ modules: - type: shell commands: - cd deps/monado-src && ../../patches/apply.sh ../../patches/monado - build-commands: - - install -DTm644 images/wivrn.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/io.github.wivrn.wivrn.svg - - install -Dm644 flatpak/io.github.wivrn.wivrn.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo - - install -Dm644 flatpak/io.github.wivrn.wivrn.desktop -t ${FLATPAK_DEST}/share/applications - name: opencomposite buildsystem: cmake-ninja diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 1c2b7300..0f9f5656 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -181,9 +181,9 @@ set_target_properties(${RUNTIME_TARGET} PROPERTIES EXCLUDE_FROM_ALL FALSE) set(_extra_args) if(WIVRN_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH) -set(_extra_args ABSOLUTE_RUNTIME_PATH) + set(_extra_args ABSOLUTE_RUNTIME_PATH) else() -set(_extra_args RUNTIME_DIR_RELATIVE_TO_MANIFEST ../../../${CMAKE_INSTALL_LIBDIR}/wivrn) + set(_extra_args RUNTIME_DIR_RELATIVE_TO_MANIFEST ../../../${CMAKE_INSTALL_LIBDIR}/wivrn) endif() generate_openxr_runtime_manifest_at_install( @@ -198,3 +198,16 @@ install(TARGETS ${RUNTIME_TARGET} monado LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/wivrn COMPONENT Runtime) + +install(FILES ../flatpak/io.github.wivrn.wivrn.metainfo.xml + DESTINATION share/metainfo +) + +install(FILES ../images/wivrn.svg + DESTINATION share/icons/hicolor/scalable/apps + RENAME io.github.wivrn.wivrn.svg +) + +install(FILES ../flatpak/io.github.wivrn.wivrn.desktop + DESTINATION share/applications +)