Skip to content

Commit

Permalink
Install icons to hicolor theme on Linux (#1669)
Browse files Browse the repository at this point in the history
  • Loading branch information
kodemeister authored Sep 24, 2023
1 parent e2f59c5 commit 17a320b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions cmake/packaging/linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,21 @@ set(CPACK_RPM_PACKAGE_REQUIRES "\
# This should automatically figure out dependencies, doesn't work with the current config
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)

# application icon
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps")

# tray icon
if(${SUNSHINE_TRAY} STREQUAL 1)
install(FILES "${CMAKE_SOURCE_DIR}/sunshine.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons")
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status"
RENAME "sunshine-tray.svg")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-playing.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons")
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-pausing.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons")
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/common/assets/web/images/sunshine-locked.svg"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons")
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/status")

set(CPACK_DEBIAN_PACKAGE_DEPENDS "\
${CPACK_DEBIAN_PACKAGE_DEPENDS}, \
Expand Down
2 changes: 1 addition & 1 deletion src/system_tray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define TRAY_ICON_PAUSING WEB_DIR "images/sunshine-pausing.ico"
#define TRAY_ICON_LOCKED WEB_DIR "images/sunshine-locked.ico"
#elif defined(__linux__) || defined(linux) || defined(__linux)
#define TRAY_ICON "sunshine"
#define TRAY_ICON "sunshine-tray"
#define TRAY_ICON_PLAYING "sunshine-playing"
#define TRAY_ICON_PAUSING "sunshine-pausing"
#define TRAY_ICON_LOCKED "sunshine-locked"
Expand Down

0 comments on commit 17a320b

Please sign in to comment.