From a498822916f55515e52ab3cb4c238df2b5769114 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 28 Aug 2023 16:47:01 +0200 Subject: [PATCH] Add readme and proper building --- CMakeLists.txt | 1 + Makefile | 21 +++++++++++++++++++ README.md | 17 +++++++++++---- ...sktop.impl.portal.desktop.hyprland.service | 4 ++++ 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 Makefile create mode 100644 org.freedesktop.impl.portal.desktop.hyprland.service diff --git a/CMakeLists.txt b/CMakeLists.txt index 411871f..6a64822 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-m message(STATUS "Checking deps...") add_subdirectory(subprojects/sdbus-cpp) +add_subdirectory(hyprland-share-picker) find_package(Threads REQUIRED) find_package(PkgConfig REQUIRED) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3d76318 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +PREFIX = /usr/local +LIBEXEC = /usr/lib +SHARE = /usr/share + +all: + $(MAKE) release + +release: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja + cmake --build ./build --config Release --target all -j$(nproc) + +debug: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -H./ -B./build -G Ninja + cmake --build ./build --config Debug --target all -j$(nproc) + +install: + $(MAKE) release + cp ./build/hyprland-share-picker/hyprland-share-picker ${PREFIX}/bin + cp ./build/xdg-desktop-portal-hyprland ${LIBEXEC}/ + cp ./hyprland.portal ${SHARE}/xdg-desktop-portal/portals/ + cp ./org.freedesktop.impl.portal.desktop.hyprland.service ${SHARE}/dbus-1/services/ \ No newline at end of file diff --git a/README.md b/README.md index dec88a5..5f8c5b9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,16 @@ -# v2 rewrite +# xdg-desktop-portal-hyprland +An [XDG Desktop Portal](https://github.com/flatpak/xdg-desktop-portal) backend for Hyprland. -shit is being worked on. +## Building +```sh +make all +``` -going C++ +## Installing +```sh +sudo make install +``` + +## Running, FAQs, etc. +See [the Hyprland wiki](https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal/) -idk I will write this some day \ No newline at end of file diff --git a/org.freedesktop.impl.portal.desktop.hyprland.service b/org.freedesktop.impl.portal.desktop.hyprland.service new file mode 100644 index 0000000..2a83e66 --- /dev/null +++ b/org.freedesktop.impl.portal.desktop.hyprland.service @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=org.freedesktop.impl.portal.desktop.hyprland +Exec=/usr/lib/xdg-desktop-portal-hyprland +SystemdService=xdg-desktop-portal-hyprland.service \ No newline at end of file