fix(linux): migrate to qt tray (#4907)
Co-authored-by: Kishi <41839133+Kishi85@users.noreply.github.com>
This commit is contained in:
11
.github/workflows/ci-flatpak.yml
vendored
11
.github/workflows/ci-flatpak.yml
vendored
@@ -17,9 +17,10 @@ jobs:
|
|||||||
name: ${{ matrix.arch }}
|
name: ${{ matrix.arch }}
|
||||||
env:
|
env:
|
||||||
APP_ID: dev.lizardbyte.app.Sunshine
|
APP_ID: dev.lizardbyte.app.Sunshine
|
||||||
|
FREEDESKTOP_SDK_VERSION: "25.08"
|
||||||
|
KDE_PLATFORM_VERSION: "6.10"
|
||||||
MATRIX_ARCH: ${{ matrix.arch }}
|
MATRIX_ARCH: ${{ matrix.arch }}
|
||||||
NODE_VERSION: "20"
|
NODE_VERSION: "20"
|
||||||
PLATFORM_VERSION: "24.08"
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
@@ -65,9 +66,9 @@ jobs:
|
|||||||
|
|
||||||
sudo su "$(whoami)" -c "flatpak --user install -y flathub \
|
sudo su "$(whoami)" -c "flatpak --user install -y flathub \
|
||||||
org.flatpak.Builder \
|
org.flatpak.Builder \
|
||||||
org.freedesktop.Platform/${MATRIX_ARCH}/${PLATFORM_VERSION} \
|
org.kde.Platform/${MATRIX_ARCH}/${KDE_PLATFORM_VERSION} \
|
||||||
org.freedesktop.Sdk/${MATRIX_ARCH}/${PLATFORM_VERSION} \
|
org.kde.Sdk/${MATRIX_ARCH}/${KDE_PLATFORM_VERSION} \
|
||||||
org.freedesktop.Sdk.Extension.node${NODE_VERSION}/${MATRIX_ARCH}/${PLATFORM_VERSION} \
|
org.freedesktop.Sdk.Extension.node${NODE_VERSION}/${MATRIX_ARCH}/${FREEDESKTOP_SDK_VERSION} \
|
||||||
"
|
"
|
||||||
|
|
||||||
flatpak run org.flatpak.Builder --version
|
flatpak run org.flatpak.Builder --version
|
||||||
@@ -84,7 +85,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python \
|
python \
|
||||||
./packaging/linux/flatpak/deps/flatpak-builder-tools/pip/flatpak-pip-generator.py \
|
./packaging/linux/flatpak/deps/flatpak-builder-tools/pip/flatpak-pip-generator.py \
|
||||||
--runtime="org.freedesktop.Sdk//${PLATFORM_VERSION}" \
|
--runtime="org.kde.Sdk//${KDE_PLATFORM_VERSION}" \
|
||||||
--output glad-dependencies \
|
--output glad-dependencies \
|
||||||
--build-only \
|
--build-only \
|
||||||
--requirements-file=./third-party/glad/requirements.txt
|
--requirements-file=./third-party/glad/requirements.txt
|
||||||
|
|||||||
3
.github/workflows/ci-freebsd.yml
vendored
3
.github/workflows/ci-freebsd.yml
vendored
@@ -105,14 +105,15 @@ jobs:
|
|||||||
devel/cmake-core \
|
devel/cmake-core \
|
||||||
devel/evdev-proto \
|
devel/evdev-proto \
|
||||||
devel/git \
|
devel/git \
|
||||||
devel/libayatana-appindicator \
|
|
||||||
devel/libevdev \
|
devel/libevdev \
|
||||||
devel/libnotify \
|
devel/libnotify \
|
||||||
devel/llvm${{ env.FREEBSD_CLANG_VERSION }} \
|
devel/llvm${{ env.FREEBSD_CLANG_VERSION }} \
|
||||||
devel/ninja \
|
devel/ninja \
|
||||||
devel/pkgconf \
|
devel/pkgconf \
|
||||||
|
devel/qt6-base \
|
||||||
ftp/curl \
|
ftp/curl \
|
||||||
graphics/libdrm \
|
graphics/libdrm \
|
||||||
|
graphics/qt6-svg \
|
||||||
graphics/shaderc \
|
graphics/shaderc \
|
||||||
graphics/vulkan-headers \
|
graphics/vulkan-headers \
|
||||||
graphics/vulkan-loader \
|
graphics/vulkan-loader \
|
||||||
|
|||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -2,10 +2,6 @@
|
|||||||
path = packaging/linux/flatpak/deps/flatpak-builder-tools
|
path = packaging/linux/flatpak/deps/flatpak-builder-tools
|
||||||
url = https://github.com/flatpak/flatpak-builder-tools.git
|
url = https://github.com/flatpak/flatpak-builder-tools.git
|
||||||
branch = master
|
branch = master
|
||||||
[submodule "packaging/linux/flatpak/deps/shared-modules"]
|
|
||||||
path = packaging/linux/flatpak/deps/shared-modules
|
|
||||||
url = https://github.com/flathub/shared-modules.git
|
|
||||||
branch = master
|
|
||||||
[submodule "third-party/build-deps"]
|
[submodule "third-party/build-deps"]
|
||||||
path = third-party/build-deps
|
path = third-party/build-deps
|
||||||
url = https://github.com/LizardByte/build-deps.git
|
url = https://github.com/LizardByte/build-deps.git
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ set(SUNSHINE_TARGET_FILES
|
|||||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
|
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Rtsp.h"
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
|
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/RtspParser.c"
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
|
"${CMAKE_SOURCE_DIR}/third-party/moonlight-common-c/src/Video.h"
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray.h"
|
|
||||||
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
|
"${CMAKE_SOURCE_DIR}/src/upnp.cpp"
|
||||||
"${CMAKE_SOURCE_DIR}/src/upnp.h"
|
"${CMAKE_SOURCE_DIR}/src/upnp.h"
|
||||||
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
|
"${CMAKE_SOURCE_DIR}/src/cbs.cpp"
|
||||||
@@ -159,3 +158,11 @@ list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
|||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${PLATFORM_LIBRARIES})
|
${PLATFORM_LIBRARIES})
|
||||||
|
|
||||||
|
# tray icon
|
||||||
|
if(SUNSHINE_ENABLE_TRAY)
|
||||||
|
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES tray::tray)
|
||||||
|
else()
|
||||||
|
set(SUNSHINE_TRAY 0)
|
||||||
|
message(STATUS "Tray icon disabled")
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
if(FREEBSD)
|
if(FREEBSD)
|
||||||
add_compile_definitions(SUNSHINE_PLATFORM="freebsd")
|
add_compile_definitions(SUNSHINE_PLATFORM="freebsd")
|
||||||
|
# FreeBSD installs packages to /usr/local/lib, which is not in the default linker search path.
|
||||||
|
# link_directories() is directory-scoped and propagates to all subdirectories (including tests/),
|
||||||
|
# so all targets (sunshine, test_sunshine) can resolve libraries found via pkg_check_modules.
|
||||||
|
link_directories(/usr/local/lib)
|
||||||
else()
|
else()
|
||||||
add_compile_definitions(SUNSHINE_PLATFORM="linux")
|
add_compile_definitions(SUNSHINE_PLATFORM="linux")
|
||||||
endif()
|
endif()
|
||||||
@@ -293,37 +297,6 @@ if(NOT ${CUDA_FOUND}
|
|||||||
message(FATAL_ERROR "Couldn't find either cuda, (libdrm and libcap), libva, kwin, pipewire, portal, wayland or x11")
|
message(FATAL_ERROR "Couldn't find either cuda, (libdrm and libcap), libva, kwin, pipewire, portal, wayland or x11")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# tray icon
|
|
||||||
if(${SUNSHINE_ENABLE_TRAY})
|
|
||||||
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
|
|
||||||
if(APPINDICATOR_FOUND)
|
|
||||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_AYATANA_APPINDICATOR=1)
|
|
||||||
else()
|
|
||||||
pkg_check_modules(APPINDICATOR appindicator3-0.1)
|
|
||||||
if(APPINDICATOR_FOUND)
|
|
||||||
list(APPEND SUNSHINE_DEFINITIONS TRAY_LEGACY_APPINDICATOR=1)
|
|
||||||
endif ()
|
|
||||||
endif()
|
|
||||||
pkg_check_modules(LIBNOTIFY libnotify)
|
|
||||||
if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND)
|
|
||||||
message(STATUS "APPINDICATOR_FOUND: ${APPINDICATOR_FOUND}")
|
|
||||||
message(STATUS "LIBNOTIFY_FOUND: ${LIBNOTIFY_FOUND}")
|
|
||||||
message(FATAL_ERROR "Couldn't find either appindicator or libnotify")
|
|
||||||
else()
|
|
||||||
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
|
|
||||||
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
list(APPEND PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_linux.c")
|
|
||||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(SUNSHINE_TRAY_PREFIX "${PROJECT_FQDN}")
|
|
||||||
list(APPEND SUNSHINE_DEFINITIONS SUNSHINE_TRAY_PREFIX="${SUNSHINE_TRAY_PREFIX}")
|
|
||||||
else()
|
|
||||||
set(SUNSHINE_TRAY 0)
|
|
||||||
message(STATUS "Tray icon disabled")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# These need to be set before adding the inputtino subdirectory in order for them to be picked up
|
# These need to be set before adding the inputtino subdirectory in order for them to be picked up
|
||||||
set(LIBEVDEV_CUSTOM_INCLUDE_DIR "${EVDEV_INCLUDE_DIR}")
|
set(LIBEVDEV_CUSTOM_INCLUDE_DIR "${EVDEV_INCLUDE_DIR}")
|
||||||
set(LIBEVDEV_CUSTOM_LIBRARY "${EVDEV_LIBRARY}")
|
set(LIBEVDEV_CUSTOM_LIBRARY "${EVDEV_LIBRARY}")
|
||||||
|
|||||||
@@ -58,10 +58,3 @@ set(PLATFORM_TARGET_FILES
|
|||||||
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
|
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
|
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
|
||||||
${APPLE_PLIST_FILE})
|
${APPLE_PLIST_FILE})
|
||||||
|
|
||||||
if(SUNSHINE_ENABLE_TRAY)
|
|
||||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
|
||||||
${COCOA})
|
|
||||||
list(APPEND PLATFORM_TARGET_FILES
|
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_darwin.m")
|
|
||||||
endif()
|
|
||||||
|
|||||||
@@ -105,8 +105,3 @@ list(PREPEND PLATFORM_LIBRARIES
|
|||||||
ws2_32
|
ws2_32
|
||||||
wsock32
|
wsock32
|
||||||
)
|
)
|
||||||
|
|
||||||
if(SUNSHINE_ENABLE_TRAY)
|
|
||||||
list(APPEND PLATFORM_TARGET_FILES
|
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_windows.c")
|
|
||||||
endif()
|
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/Simple-Web-Server")
|
|||||||
# libdisplaydevice
|
# libdisplaydevice
|
||||||
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/libdisplaydevice")
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/libdisplaydevice")
|
||||||
|
|
||||||
|
if(SUNSHINE_ENABLE_TRAY)
|
||||||
|
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/tray")
|
||||||
|
endif()
|
||||||
|
|
||||||
# common dependencies
|
# common dependencies
|
||||||
include("${CMAKE_MODULE_PATH}/dependencies/nlohmann_json.cmake")
|
include("${CMAKE_MODULE_PATH}/dependencies/nlohmann_json.cmake")
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
|||||||
@@ -138,33 +138,57 @@ set(CPACK_RPM_PACKAGE_AUTOREQ ON)
|
|||||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||||
RENAME "${PROJECT_FQDN}.svg")
|
RENAME "${PROJECT_FQDN}.svg")
|
||||||
|
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
||||||
|
DESTINATION "${SUNSHINE_ASSETS_DIR}/web/images"
|
||||||
|
RENAME "logo-sunshine.svg")
|
||||||
|
|
||||||
# tray icon
|
# tray icon
|
||||||
if(${SUNSHINE_TRAY} STREQUAL 1)
|
if(${SUNSHINE_TRAY} STREQUAL 1)
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
|
# Icons used by the Qt tray backend are no longer installed to the hicolor icon theme,
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
# because Qt6 will not allow icons not part of the theme... so we will use icons from our web directory instead
|
||||||
RENAME "${PROJECT_FQDN}-tray.svg")
|
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-playing.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-playing.svg")
|
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-pausing.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-pausing.svg")
|
|
||||||
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/public/images/sunshine-locked.svg"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status"
|
|
||||||
RENAME "${PROJECT_FQDN}-locked.svg")
|
|
||||||
|
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||||
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||||
libayatana-appindicator3-1, \
|
libnotify4"
|
||||||
libnotify4")
|
)
|
||||||
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||||
${CPACK_RPM_PACKAGE_REQUIRES}, \
|
${CPACK_RPM_PACKAGE_REQUIRES}, \
|
||||||
libappindicator-gtk3 >= 12.10.0")
|
libnotify >= 0.8.0"
|
||||||
|
)
|
||||||
list(APPEND CPACK_FREEBSD_PACKAGE_DEPS
|
list(APPEND CPACK_FREEBSD_PACKAGE_DEPS
|
||||||
devel/libayatana-appindicator
|
|
||||||
devel/libnotify
|
devel/libnotify
|
||||||
)
|
)
|
||||||
|
if(TRAY_QT_VERSION EQUAL 6)
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||||
|
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||||
|
libqt6widgets6, \
|
||||||
|
libqt6svg6"
|
||||||
|
)
|
||||||
|
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||||
|
${CPACK_RPM_PACKAGE_REQUIRES}, \
|
||||||
|
qt6-qtbase, \
|
||||||
|
qt6-qtsvg"
|
||||||
|
)
|
||||||
|
list(APPEND CPACK_FREEBSD_PACKAGE_DEPS
|
||||||
|
x11-toolkits/qt6-widgets
|
||||||
|
graphics/qt6-svg
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
|
||||||
|
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
|
||||||
|
libqt5widgets5, \
|
||||||
|
libqt5svg5"
|
||||||
|
)
|
||||||
|
set(CPACK_RPM_PACKAGE_REQUIRES "\
|
||||||
|
${CPACK_RPM_PACKAGE_REQUIRES}, \
|
||||||
|
qt5-qtbase, \
|
||||||
|
qt5-qtsvg"
|
||||||
|
)
|
||||||
|
list(APPEND CPACK_FREEBSD_PACKAGE_DEPS
|
||||||
|
x11-toolkits/qt5-widgets
|
||||||
|
graphics/qt5-svg
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# desktop file
|
# desktop file
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# linux specific target definitions
|
# linux specific target definitions
|
||||||
|
|
||||||
# Using newer c++ compilers / features on older distros causes runtime dyn link errors
|
if(NOT FREEBSD)
|
||||||
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
# Using newer c++ compilers / features on older distros causes runtime dyn link errors
|
||||||
-static-libgcc
|
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
||||||
-static-libstdc++
|
-static-libgcc
|
||||||
)
|
-static-libstdc++
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ apt-get install -y --no-install-recommends \
|
|||||||
gdb \
|
gdb \
|
||||||
git \
|
git \
|
||||||
graphviz \
|
graphviz \
|
||||||
libayatana-appindicator3-dev \
|
|
||||||
libcap-dev \
|
libcap-dev \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libdrm-dev \
|
libdrm-dev \
|
||||||
@@ -55,6 +54,8 @@ apt-get install -y --no-install-recommends \
|
|||||||
libxrandr-dev \
|
libxrandr-dev \
|
||||||
libxtst-dev \
|
libxtst-dev \
|
||||||
npm \
|
npm \
|
||||||
|
qt6-base-dev \
|
||||||
|
qt6-svg-dev \
|
||||||
udev \
|
udev \
|
||||||
wget \
|
wget \
|
||||||
x11-xserver-utils \
|
x11-xserver-utils \
|
||||||
|
|||||||
@@ -26,13 +26,14 @@ pkg install -y \
|
|||||||
devel/cmake \
|
devel/cmake \
|
||||||
devel/evdev-proto \
|
devel/evdev-proto \
|
||||||
devel/git \
|
devel/git \
|
||||||
devel/libayatana-appindicator \
|
|
||||||
devel/libevdev \
|
devel/libevdev \
|
||||||
devel/libnotify \
|
devel/libnotify \
|
||||||
devel/ninja \
|
devel/ninja \
|
||||||
devel/pkgconf \
|
devel/pkgconf \
|
||||||
|
devel/qt6-base \
|
||||||
ftp/curl \
|
ftp/curl \
|
||||||
graphics/libdrm \
|
graphics/libdrm \
|
||||||
|
graphics/qt6-svg \
|
||||||
graphics/wayland \
|
graphics/wayland \
|
||||||
multimedia/libva \
|
multimedia/libva \
|
||||||
net/miniupnpc \
|
net/miniupnpc \
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ fi
|
|||||||
depends=(
|
depends=(
|
||||||
'avahi'
|
'avahi'
|
||||||
'curl'
|
'curl'
|
||||||
'libayatana-appindicator'
|
|
||||||
'libcap'
|
'libcap'
|
||||||
'libdrm'
|
'libdrm'
|
||||||
'libevdev'
|
'libevdev'
|
||||||
@@ -49,6 +48,8 @@ depends=(
|
|||||||
'numactl'
|
'numactl'
|
||||||
'openssl'
|
'openssl'
|
||||||
'opus'
|
'opus'
|
||||||
|
'qt6-base'
|
||||||
|
'qt6-svg'
|
||||||
'udev'
|
'udev'
|
||||||
'vulkan-icd-loader'
|
'vulkan-icd-loader'
|
||||||
'which'
|
'which'
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ BuildRequires: libcap-devel
|
|||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: libdrm-devel
|
BuildRequires: libdrm-devel
|
||||||
BuildRequires: libevdev-devel
|
BuildRequires: libevdev-devel
|
||||||
BuildRequires: libnotify-devel
|
BuildRequires: libnotify-devel >= 0.8.0
|
||||||
BuildRequires: libva-devel
|
BuildRequires: libva-devel
|
||||||
BuildRequires: libX11-devel
|
BuildRequires: libX11-devel
|
||||||
BuildRequires: libxcb-devel
|
BuildRequires: libxcb-devel
|
||||||
@@ -58,7 +58,6 @@ BuildRequires: vulkan-loader-devel
|
|||||||
# needed for npm from nvm
|
# needed for npm from nvm
|
||||||
BuildRequires: libatomic
|
BuildRequires: libatomic
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: libayatana-appindicator3-devel
|
|
||||||
BuildRequires: libgudev
|
BuildRequires: libgudev
|
||||||
BuildRequires: mesa-libGL-devel
|
BuildRequires: mesa-libGL-devel
|
||||||
BuildRequires: mesa-libgbm-devel
|
BuildRequires: mesa-libgbm-devel
|
||||||
@@ -71,6 +70,8 @@ BuildRequires: opus-devel
|
|||||||
BuildRequires: pulseaudio-libs-devel
|
BuildRequires: pulseaudio-libs-devel
|
||||||
BuildRequires: python3-jinja2
|
BuildRequires: python3-jinja2
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: qt6-qtbase-devel
|
||||||
|
BuildRequires: qt6-qtsvg-devel
|
||||||
BuildRequires: systemd-udev
|
BuildRequires: systemd-udev
|
||||||
%{?sysusers_requires_compat}
|
%{?sysusers_requires_compat}
|
||||||
# for unit tests
|
# for unit tests
|
||||||
@@ -81,7 +82,6 @@ BuildRequires: xorg-x11-server-Xvfb
|
|||||||
# OpenSUSE-specific BuildRequires
|
# OpenSUSE-specific BuildRequires
|
||||||
BuildRequires: AppStream
|
BuildRequires: AppStream
|
||||||
BuildRequires: appstream-glib
|
BuildRequires: appstream-glib
|
||||||
BuildRequires: libappindicator3-devel
|
|
||||||
BuildRequires: libgudev-1_0-devel
|
BuildRequires: libgudev-1_0-devel
|
||||||
BuildRequires: Mesa-libGL-devel
|
BuildRequires: Mesa-libGL-devel
|
||||||
BuildRequires: libgbm-devel
|
BuildRequires: libgbm-devel
|
||||||
@@ -132,6 +132,9 @@ BuildRequires: gcc15-c++
|
|||||||
# OpenSUSE Leap 15.x
|
# OpenSUSE Leap 15.x
|
||||||
BuildRequires: gcc14
|
BuildRequires: gcc14
|
||||||
BuildRequires: gcc14-c++
|
BuildRequires: gcc14-c++
|
||||||
|
# OpenSUSE Leap: Qt6 not in standard repos, use Qt5
|
||||||
|
BuildRequires: libqt5-qtbase-devel
|
||||||
|
BuildRequires: libqt5-qtsvg-devel
|
||||||
%global gcc_version 14
|
%global gcc_version 14
|
||||||
%global cuda_version 12.9.1
|
%global cuda_version 12.9.1
|
||||||
%global cuda_build 575.57.08
|
%global cuda_build 575.57.08
|
||||||
@@ -139,6 +142,8 @@ BuildRequires: gcc14-c++
|
|||||||
# OpenSUSE Tumbleweed
|
# OpenSUSE Tumbleweed
|
||||||
BuildRequires: gcc14
|
BuildRequires: gcc14
|
||||||
BuildRequires: gcc14-c++
|
BuildRequires: gcc14-c++
|
||||||
|
BuildRequires: libqt6-qtbase-devel
|
||||||
|
BuildRequires: libqt6-qtsvg-devel
|
||||||
%global gcc_version 14
|
%global gcc_version 14
|
||||||
%global cuda_version 12.9.1
|
%global cuda_version 12.9.1
|
||||||
%global cuda_build 575.57.08
|
%global cuda_build 575.57.08
|
||||||
@@ -148,12 +153,12 @@ BuildRequires: gcc14-c++
|
|||||||
%global cuda_dir %{_builddir}/cuda
|
%global cuda_dir %{_builddir}/cuda
|
||||||
|
|
||||||
# Common runtime requirements
|
# Common runtime requirements
|
||||||
|
Requires: libnotify >= 0.8.0
|
||||||
Requires: miniupnpc >= 2.2.4
|
Requires: miniupnpc >= 2.2.4
|
||||||
Requires: which >= 2.21
|
Requires: which >= 2.21
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
# Fedora runtime requirements
|
# Fedora runtime requirements
|
||||||
Requires: libayatana-appindicator3 >= 0.5.3
|
|
||||||
Requires: libcap >= 2.22
|
Requires: libcap >= 2.22
|
||||||
Requires: libcurl >= 7.0
|
Requires: libcurl >= 7.0
|
||||||
Requires: libdrm > 2.4.97
|
Requires: libdrm > 2.4.97
|
||||||
@@ -165,12 +170,13 @@ Requires: libX11 >= 1.7.3.1
|
|||||||
Requires: numactl-libs >= 2.0.14
|
Requires: numactl-libs >= 2.0.14
|
||||||
Requires: openssl >= 3.0.2
|
Requires: openssl >= 3.0.2
|
||||||
Requires: pulseaudio-libs >= 10.0
|
Requires: pulseaudio-libs >= 10.0
|
||||||
|
Requires: qt6-qtbase
|
||||||
|
Requires: qt6-qtsvg
|
||||||
Requires: vulkan-loader
|
Requires: vulkan-loader
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
# OpenSUSE runtime requirements
|
# OpenSUSE runtime requirements
|
||||||
Requires: libappindicator3-1
|
|
||||||
Requires: libcap2
|
Requires: libcap2
|
||||||
Requires: libcurl4
|
Requires: libcurl4
|
||||||
Requires: libdrm2
|
Requires: libdrm2
|
||||||
@@ -185,6 +191,15 @@ Requires: libpulse0
|
|||||||
%if !0%{?sle_version}
|
%if !0%{?sle_version}
|
||||||
Requires: libvulkan1
|
Requires: libvulkan1
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?suse_version} <= 1699
|
||||||
|
# OpenSUSE Leap: built with Qt5
|
||||||
|
Requires: libQt5Svg5
|
||||||
|
Requires: libQt5Widgets5
|
||||||
|
%else
|
||||||
|
# OpenSUSE Tumbleweed: built with Qt6
|
||||||
|
Requires: libQt6Svg6
|
||||||
|
Requires: libQt6Widgets6
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -421,7 +436,6 @@ fi
|
|||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/*.Sunshine.svg
|
%{_datadir}/icons/hicolor/scalable/apps/*.Sunshine.svg
|
||||||
%{_datadir}/icons/hicolor/scalable/status/*.Sunshine-*.svg
|
|
||||||
|
|
||||||
# Metainfo
|
# Metainfo
|
||||||
%{_datadir}/metainfo/*.metainfo.xml
|
%{_datadir}/metainfo/*.metainfo.xml
|
||||||
|
|||||||
Submodule packaging/linux/flatpak/deps/shared-modules deleted from 8c3f3cfa5a
@@ -1,10 +1,14 @@
|
|||||||
---
|
---
|
||||||
app-id: "@PROJECT_FQDN@"
|
app-id: "@PROJECT_FQDN@"
|
||||||
runtime: org.freedesktop.Platform
|
runtime: org.kde.Platform
|
||||||
runtime-version: "24.08"
|
runtime-version: "6.10"
|
||||||
sdk: org.freedesktop.Sdk
|
sdk: org.kde.Sdk
|
||||||
sdk-extensions:
|
add-build-extensions:
|
||||||
- org.freedesktop.Sdk.Extension.node20
|
org.freedesktop.Sdk.Extension.node20:
|
||||||
|
directory: lib/sdk/node20
|
||||||
|
version: "25.08"
|
||||||
|
no-autodownload: true
|
||||||
|
autodelete: false
|
||||||
command: sunshine
|
command: sunshine
|
||||||
separate-locales: false
|
separate-locales: false
|
||||||
finish-args:
|
finish-args:
|
||||||
@@ -37,7 +41,6 @@ modules:
|
|||||||
- "modules/nlohmann_json.json"
|
- "modules/nlohmann_json.json"
|
||||||
|
|
||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
- shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json
|
|
||||||
- "modules/avahi.json"
|
- "modules/avahi.json"
|
||||||
- "modules/boost.json"
|
- "modules/boost.json"
|
||||||
- "modules/libevdev.json"
|
- "modules/libevdev.json"
|
||||||
@@ -79,13 +82,13 @@ modules:
|
|||||||
- -DGLAD_SKIP_PIP_INSTALL=ON
|
- -DGLAD_SKIP_PIP_INSTALL=ON
|
||||||
- -DSUNSHINE_ASSETS_DIR=share/sunshine
|
- -DSUNSHINE_ASSETS_DIR=share/sunshine
|
||||||
- -DSUNSHINE_BUILD_FLATPAK=ON
|
- -DSUNSHINE_BUILD_FLATPAK=ON
|
||||||
- -DSUNSHINE_EXECUTABLE_PATH=/app/bin/sunshine
|
|
||||||
- -DSUNSHINE_ENABLE_CUDA=ON
|
- -DSUNSHINE_ENABLE_CUDA=ON
|
||||||
- -DSUNSHINE_ENABLE_DRM=ON
|
- -DSUNSHINE_ENABLE_DRM=ON
|
||||||
- -DSUNSHINE_ENABLE_KWIN=ON
|
- -DSUNSHINE_ENABLE_KWIN=ON
|
||||||
- -DSUNSHINE_ENABLE_PORTAL=ON
|
- -DSUNSHINE_ENABLE_PORTAL=ON
|
||||||
- -DSUNSHINE_ENABLE_WAYLAND=ON
|
- -DSUNSHINE_ENABLE_WAYLAND=ON
|
||||||
- -DSUNSHINE_ENABLE_X11=ON
|
- -DSUNSHINE_ENABLE_X11=ON
|
||||||
|
- -DSUNSHINE_EXECUTABLE_PATH=/app/bin/sunshine
|
||||||
- -DSUNSHINE_PUBLISHER_NAME='LizardByte'
|
- -DSUNSHINE_PUBLISHER_NAME='LizardByte'
|
||||||
- -DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev'
|
- -DSUNSHINE_PUBLISHER_WEBSITE='https://app.lizardbyte.dev'
|
||||||
- -DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
|
- -DSUNSHINE_PUBLISHER_ISSUE_URL='https://app.lizardbyte.dev/support'
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "cuda",
|
"name": "cuda",
|
||||||
"build-options": {
|
"build-options": {
|
||||||
"no_debuginfo": true
|
"no_debuginfo": true,
|
||||||
|
"prepend-ld-library-path": "/app/lib:/app/lib64"
|
||||||
},
|
},
|
||||||
"buildsystem": "simple",
|
"buildsystem": "simple",
|
||||||
"cleanup": [
|
"cleanup": [
|
||||||
@@ -9,18 +10,41 @@
|
|||||||
],
|
],
|
||||||
"build-commands": [
|
"build-commands": [
|
||||||
"chmod u+x ./cuda.run",
|
"chmod u+x ./cuda.run",
|
||||||
"./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR",
|
"./cuda.run --silent --toolkit --toolkitpath=$FLATPAK_DEST/cuda --no-opengl-libs --no-man-page --no-drm --tmpdir=$FLATPAK_BUILDER_BUILDDIR || { echo '=== cuda-installer.log ==='; cat /tmp/cuda-installer.log 2>/dev/null; true; }",
|
||||||
"rm -r $FLATPAK_DEST/cuda/nsight-systems-*",
|
"test -f $FLATPAK_DEST/cuda/bin/nvcc",
|
||||||
|
"rm -rf $FLATPAK_DEST/cuda/nsight-systems-*",
|
||||||
"rm ./cuda.run"
|
"rm ./cuda.run"
|
||||||
],
|
],
|
||||||
|
"modules": [
|
||||||
|
{
|
||||||
|
"name": "libxml2",
|
||||||
|
"config-opts": [
|
||||||
|
"--without-python",
|
||||||
|
"--without-debug",
|
||||||
|
"--without-history"
|
||||||
|
],
|
||||||
|
"cleanup": [
|
||||||
|
"/share",
|
||||||
|
"/include",
|
||||||
|
"/bin"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.9.tar.xz",
|
||||||
|
"sha256": "a2c9ae7b770da34860050c309f903221c67830c86e4a7e760692b803df95143a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"only-arches": [
|
"only-arches": [
|
||||||
"x86_64"
|
"x86_64"
|
||||||
],
|
],
|
||||||
"url": "https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda_12.9.1_575.57.08_linux.run",
|
"url": "https://developer.download.nvidia.com/compute/cuda/13.2.0/local_installers/cuda_13.2.0_595.45.04_linux.run",
|
||||||
"sha256": "0f6d806ddd87230d2adbe8a6006a9d20144fdbda9de2d6acc677daa5d036417a",
|
"sha256": "c599b651582c8f345ebde7bcf089b7dcfcd8afd7d3ea7f50525698c563a239d7",
|
||||||
"dest-filename": "cuda.run"
|
"dest-filename": "cuda.run"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -28,8 +52,8 @@
|
|||||||
"only-arches": [
|
"only-arches": [
|
||||||
"aarch64"
|
"aarch64"
|
||||||
],
|
],
|
||||||
"url": "https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda_12.9.1_575.57.08_linux_sbsa.run",
|
"url": "https://developer.download.nvidia.com/compute/cuda/13.2.0/local_installers/cuda_13.2.0_595.45.04_linux_sbsa.run",
|
||||||
"sha256": "64f47ab791a76b6889702425e0755385f5fa216c5a9f061875c7deed5f08cdb6",
|
"sha256": "9684ebc64988f71ef1c70846cc9d158fb27950c1355bf37c8795c346346b6a72",
|
||||||
"dest-filename": "cuda.run"
|
"dest-filename": "cuda.run"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -99,6 +99,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "libtirpc",
|
"name": "libtirpc",
|
||||||
|
"build-options": {
|
||||||
|
"cflags": "-std=gnu17"
|
||||||
|
},
|
||||||
"config-opts": [
|
"config-opts": [
|
||||||
"--disable-gssapi"
|
"--disable-gssapi"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -66,17 +66,12 @@ class Sunshine < Formula
|
|||||||
depends_on "python3" => :build
|
depends_on "python3" => :build
|
||||||
depends_on "at-spi2-core"
|
depends_on "at-spi2-core"
|
||||||
depends_on "avahi"
|
depends_on "avahi"
|
||||||
depends_on "ayatana-ido"
|
|
||||||
depends_on "cairo"
|
depends_on "cairo"
|
||||||
depends_on "gdk-pixbuf"
|
depends_on "gdk-pixbuf"
|
||||||
depends_on "glib"
|
depends_on "glib"
|
||||||
depends_on "gnu-which"
|
depends_on "gnu-which"
|
||||||
depends_on "gtk+3"
|
|
||||||
depends_on "harfbuzz"
|
depends_on "harfbuzz"
|
||||||
depends_on "libayatana-appindicator"
|
|
||||||
depends_on "libayatana-indicator"
|
|
||||||
depends_on "libcap"
|
depends_on "libcap"
|
||||||
depends_on "libdbusmenu"
|
|
||||||
depends_on "libdrm"
|
depends_on "libdrm"
|
||||||
depends_on "libice"
|
depends_on "libice"
|
||||||
depends_on "libnotify"
|
depends_on "libnotify"
|
||||||
@@ -96,6 +91,8 @@ class Sunshine < Formula
|
|||||||
depends_on "pango"
|
depends_on "pango"
|
||||||
depends_on "pipewire"
|
depends_on "pipewire"
|
||||||
depends_on "pulseaudio"
|
depends_on "pulseaudio"
|
||||||
|
depends_on "qtbase"
|
||||||
|
depends_on "qtsvg"
|
||||||
depends_on "shaderc"
|
depends_on "shaderc"
|
||||||
depends_on "systemd"
|
depends_on "systemd"
|
||||||
depends_on "vulkan-loader"
|
depends_on "vulkan-loader"
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Version requirements - centralized for easy maintenance
|
# Version requirements - centralized for easy maintenance
|
||||||
cmake_min="3.25.0"
|
cmake_min="4.0.0"
|
||||||
target_cmake_version="3.30.1"
|
target_cmake_version="4.3.0"
|
||||||
doxygen_min="1.10.0"
|
doxygen_min="1.10.0"
|
||||||
_doxygen_min="${doxygen_min//\./_}" # Convert dots to underscores for URL
|
_doxygen_min="${doxygen_min//\./_}" # Convert dots to underscores for URL
|
||||||
doxygen_max="1.12.0"
|
doxygen_max="1.12.0"
|
||||||
@@ -279,7 +279,6 @@ function add_arch_deps() {
|
|||||||
"gcc${gcc_version}-libs"
|
"gcc${gcc_version}-libs"
|
||||||
'git'
|
'git'
|
||||||
'graphviz'
|
'graphviz'
|
||||||
'libayatana-appindicator'
|
|
||||||
'libcap'
|
'libcap'
|
||||||
'libdrm'
|
'libdrm'
|
||||||
'libevdev'
|
'libevdev'
|
||||||
@@ -301,6 +300,8 @@ function add_arch_deps() {
|
|||||||
'opus'
|
'opus'
|
||||||
'python-jinja' # glad OpenGL/EGL loader generator
|
'python-jinja' # glad OpenGL/EGL loader generator
|
||||||
'python-setuptools' # glad OpenGL/EGL loader generated, v2.0.0
|
'python-setuptools' # glad OpenGL/EGL loader generated, v2.0.0
|
||||||
|
'qt6-base'
|
||||||
|
'qt6-svg'
|
||||||
'shaderc'
|
'shaderc'
|
||||||
'udev'
|
'udev'
|
||||||
'vulkan-icd-loader'
|
'vulkan-icd-loader'
|
||||||
@@ -335,8 +336,8 @@ function add_debian_based_deps() {
|
|||||||
"gcc-${gcc_version}"
|
"gcc-${gcc_version}"
|
||||||
"g++-${gcc_version}"
|
"g++-${gcc_version}"
|
||||||
"git"
|
"git"
|
||||||
|
"glslang-tools" # Vulkan shader compiler
|
||||||
"graphviz"
|
"graphviz"
|
||||||
"libayatana-appindicator3-dev"
|
|
||||||
"libcap-dev" # KMS
|
"libcap-dev" # KMS
|
||||||
"libcurl4-openssl-dev"
|
"libcurl4-openssl-dev"
|
||||||
"libdrm-dev" # KMS
|
"libdrm-dev" # KMS
|
||||||
@@ -360,17 +361,27 @@ function add_debian_based_deps() {
|
|||||||
"libxrandr-dev" # X11
|
"libxrandr-dev" # X11
|
||||||
"libxtst-dev" # X11
|
"libxtst-dev" # X11
|
||||||
"libvulkan-dev" # Vulkan
|
"libvulkan-dev" # Vulkan
|
||||||
"glslang-tools" # Vulkan shader compiler
|
|
||||||
"ninja-build"
|
"ninja-build"
|
||||||
"npm" # web-ui
|
"npm" # web-ui
|
||||||
"python3-jinja2" # glad OpenGL/EGL loader generator
|
"python3-jinja2" # glad OpenGL/EGL loader generator
|
||||||
"python3-setuptools" # glad OpenGL/EGL loader generated, v2.0.0
|
"python3-setuptools" # glad OpenGL/EGL loader generated, v2.0.0
|
||||||
|
"qt6-base-dev"
|
||||||
"systemd"
|
"systemd"
|
||||||
"udev"
|
"udev"
|
||||||
"wget" # necessary for cuda install with `run` file
|
"wget" # necessary for cuda install with `run` file
|
||||||
"xvfb" # necessary for headless unit testing
|
"xvfb" # necessary for headless unit testing
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Ubuntu 22.04 uses a different package name for Qt6 SVG
|
||||||
|
if [[ "$distro" == "ubuntu" ]] && [[ "$version" == "22.04" ]]; then
|
||||||
|
dependencies+=(
|
||||||
|
"libgl-dev" # OpenGL development headers, needed for qt6-svg
|
||||||
|
"libqt6svg6-dev"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
dependencies+=("qt6-svg-dev")
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$skip_libva" == 0 ]]; then
|
if [[ "$skip_libva" == 0 ]]; then
|
||||||
dependencies+=(
|
dependencies+=(
|
||||||
"libva-dev" # VA-API
|
"libva-dev" # VA-API
|
||||||
@@ -397,6 +408,9 @@ function add_debian_deps() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function add_ubuntu_deps() {
|
function add_ubuntu_deps() {
|
||||||
|
# Enable universe; qt6-base-dev and several other required packages live there.
|
||||||
|
$package_install_command "software-properties-common"
|
||||||
|
${sudo_cmd} add-apt-repository universe -y
|
||||||
add_test_ppa
|
add_test_ppa
|
||||||
add_debian_based_deps
|
add_debian_based_deps
|
||||||
|
|
||||||
@@ -429,8 +443,8 @@ function add_fedora_deps() {
|
|||||||
"gcc${gcc_version}"
|
"gcc${gcc_version}"
|
||||||
"gcc${gcc_version}-c++"
|
"gcc${gcc_version}-c++"
|
||||||
"git"
|
"git"
|
||||||
|
"glslc"
|
||||||
"graphviz"
|
"graphviz"
|
||||||
"libappindicator-gtk3-devel"
|
|
||||||
"libappstream-glib"
|
"libappstream-glib"
|
||||||
"libcap-devel"
|
"libcap-devel"
|
||||||
"libcurl-devel"
|
"libcurl-devel"
|
||||||
@@ -457,9 +471,10 @@ function add_fedora_deps() {
|
|||||||
"pulseaudio-libs-devel"
|
"pulseaudio-libs-devel"
|
||||||
"python3-jinja2" # glad OpenGL/EGL loader generator
|
"python3-jinja2" # glad OpenGL/EGL loader generator
|
||||||
"python3-setuptools" # glad OpenGL/EGL loader generated, v2.0.0
|
"python3-setuptools" # glad OpenGL/EGL loader generated, v2.0.0
|
||||||
|
"qt6-qtbase-devel"
|
||||||
|
"qt6-qtsvg-devel"
|
||||||
"rpm-build" # if you want to build an RPM binary package
|
"rpm-build" # if you want to build an RPM binary package
|
||||||
"vulkan-loader-devel"
|
"vulkan-loader-devel"
|
||||||
"glslc"
|
|
||||||
"wget" # necessary for cuda install with `run` file
|
"wget" # necessary for cuda install with `run` file
|
||||||
"which" # necessary for cuda install with `run` file
|
"which" # necessary for cuda install with `run` file
|
||||||
"xorg-x11-server-Xvfb" # necessary for headless unit testing
|
"xorg-x11-server-Xvfb" # necessary for headless unit testing
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
#define TRAY_ICON_PAUSING WEB_DIR "images/sunshine-pausing.ico"
|
#define TRAY_ICON_PAUSING WEB_DIR "images/sunshine-pausing.ico"
|
||||||
#define TRAY_ICON_LOCKED WEB_DIR "images/sunshine-locked.ico"
|
#define TRAY_ICON_LOCKED WEB_DIR "images/sunshine-locked.ico"
|
||||||
#elif defined(__linux__) || defined(linux) || defined(__linux) || defined(__FreeBSD__)
|
#elif defined(__linux__) || defined(linux) || defined(__linux) || defined(__FreeBSD__)
|
||||||
#define TRAY_ICON SUNSHINE_TRAY_PREFIX "-tray"
|
#define TRAY_ICON WEB_DIR "images/logo-sunshine.svg"
|
||||||
#define TRAY_ICON_PLAYING SUNSHINE_TRAY_PREFIX "-playing"
|
#define TRAY_ICON_PLAYING WEB_DIR "images/sunshine-playing.svg"
|
||||||
#define TRAY_ICON_PAUSING SUNSHINE_TRAY_PREFIX "-pausing"
|
#define TRAY_ICON_PAUSING WEB_DIR "images/sunshine-pausing.svg"
|
||||||
#define TRAY_ICON_LOCKED SUNSHINE_TRAY_PREFIX "-locked"
|
#define TRAY_ICON_LOCKED WEB_DIR "images/sunshine-locked.svg"
|
||||||
#elif defined(__APPLE__) || defined(__MACH__)
|
#elif defined(__APPLE__) || defined(__MACH__)
|
||||||
#define TRAY_ICON WEB_DIR "images/logo-sunshine-16.png"
|
#define TRAY_ICON WEB_DIR "images/logo-sunshine-16.png"
|
||||||
#define TRAY_ICON_PLAYING WEB_DIR "images/sunshine-playing-16.png"
|
#define TRAY_ICON_PLAYING WEB_DIR "images/sunshine-playing-16.png"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
// lib includes
|
// lib includes
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/process/v1/environment.hpp>
|
#include <boost/process/v1/environment.hpp>
|
||||||
#include <tray/src/tray.h>
|
#include <tray.h>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
#include "confighttp.h"
|
#include "confighttp.h"
|
||||||
@@ -72,6 +72,33 @@ namespace system_tray {
|
|||||||
platf::open_url("https://www.paypal.com/paypalme/ReenigneArcher");
|
platf::open_url("https://www.paypal.com/paypalme/ReenigneArcher");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(linux) || defined(__linux) || defined(__FreeBSD__)
|
||||||
|
/**
|
||||||
|
* @brief Forwards Qt log messages to Sunshine's BOOST_LOG logger.
|
||||||
|
* @param level Log level: 0=debug, 1=info, 2=warning, 3=error.
|
||||||
|
* @param msg The message string from Qt.
|
||||||
|
*/
|
||||||
|
static void qt_log_to_boost(int level, const char *msg) {
|
||||||
|
if (msg == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (level) {
|
||||||
|
case 0:
|
||||||
|
BOOST_LOG(debug) << "Qt: " << msg;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
BOOST_LOG(info) << "Qt: " << msg;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
BOOST_LOG(warning) << "Qt: " << msg;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
BOOST_LOG(error) << "Qt: " << msg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void tray_reset_display_device_config_cb([[maybe_unused]] struct tray_menu *item) {
|
void tray_reset_display_device_config_cb([[maybe_unused]] struct tray_menu *item) {
|
||||||
BOOST_LOG(info) << "Resetting display device config from system tray"sv;
|
BOOST_LOG(info) << "Resetting display device config from system tray"sv;
|
||||||
|
|
||||||
@@ -254,6 +281,12 @@ namespace system_tray {
|
|||||||
tray.icon = tray.allIconPaths[0];
|
tray.icon = tray.allIconPaths[0];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__linux__) || defined(linux) || defined(__linux) || defined(__FreeBSD__)
|
||||||
|
tray_set_log_callback(qt_log_to_boost);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
tray_set_app_info(PROJECT_NAME, PROJECT_NAME, PROJECT_FQDN);
|
||||||
|
|
||||||
if (tray_init(&tray) < 0) {
|
if (tray_init(&tray) < 0) {
|
||||||
BOOST_LOG(warning) << "Failed to create system tray"sv;
|
BOOST_LOG(warning) << "Failed to create system tray"sv;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
2
third-party/tray
vendored
2
third-party/tray
vendored
Submodule third-party/tray updated: 563dee475f...6332649ac6
Reference in New Issue
Block a user