Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ if(SUNSHINE_ENABLE_TRAY)

add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/tray")

# TRAY_QT_VERSION is scoped to the tray subdirectory, so inspect the target's actual dependencies.
get_target_property(_sunshine_tray_link_libraries tray LINK_LIBRARIES)
if("Qt6::Widgets" IN_LIST _sunshine_tray_link_libraries)
set(SUNSHINE_TRAY_QT_VERSION 6)
elseif("Qt5::Widgets" IN_LIST _sunshine_tray_link_libraries)
set(SUNSHINE_TRAY_QT_VERSION 5)
else()
message(FATAL_ERROR "Could not determine the Qt version used by the tray target.")
endif()
unset(_sunshine_tray_link_libraries)

if(BUILD_TESTS)
target_compile_definitions(tray PRIVATE TRAY_ENABLE_TEST_HOOKS)
endif()
Expand Down
6 changes: 4 additions & 2 deletions cmake/packaging/linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ if(${SUNSHINE_TRAY} STREQUAL 1)
# Icons used by the Qt tray backend are no longer installed to the hicolor icon theme,
# because Qt6 will not allow icons not part of the theme... so we will use icons from our web directory instead

if(TRAY_QT_VERSION EQUAL 6)
if(SUNSHINE_TRAY_QT_VERSION EQUAL 6)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
libqt6widgets6, \
Expand All @@ -178,7 +178,7 @@ if(${SUNSHINE_TRAY} STREQUAL 1)
devel/qt6-base
graphics/qt6-svg
)
else()
elseif(SUNSHINE_TRAY_QT_VERSION EQUAL 5)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
libqt5widgets5, \
Expand All @@ -193,6 +193,8 @@ if(${SUNSHINE_TRAY} STREQUAL 1)
x11-toolkits/qt5-widgets
graphics/qt5-svg
)
else()
message(FATAL_ERROR "Unsupported tray Qt version: ${SUNSHINE_TRAY_QT_VERSION}")
endif()
endif()

Expand Down
11 changes: 11 additions & 0 deletions docker/debian.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ set -e
./scripts/linux_build.sh \
--step=package \
--sudo-off

package_dependencies="$(dpkg-deb --field build/cpack_artifacts/*.deb Depends)"
package_dependencies_valid=false
case "${package_dependencies}" in
*libqt5*) ;;
*libqt6widgets6*libqt6svg6* | *libqt6svg6*libqt6widgets6*) package_dependencies_valid=true ;;
esac
if [ "${package_dependencies_valid}" = false ]; then
echo "Unexpected Qt package dependencies: ${package_dependencies}"
exit 1
fi
_BUILD

# run tests
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ sudo apt install sunshine

Download `sunshine_{version}-1+{distro}{distro-version}_{arch}.deb` and run the following command.
```bash
sudo dpkg -i ./sunshine_{version}-1+{distro}{distro-version}_{arch}.deb
sudo apt install ./sunshine_{version}-1+{distro}{distro-version}_{arch}.deb
```

> [!NOTE]
Expand Down
Loading