diff --git a/debian/control b/debian/control index 2feb15511..a1734475b 100644 --- a/debian/control +++ b/debian/control @@ -37,7 +37,7 @@ Vcs-Browser: https://github.com/GerbilSoft/rom-properties Package: rom-properties-all Architecture: any -Depends: rom-properties-kde4, rom-properties-kde5, rom-properties-xfce, rom-properties-gnome, rom-properties-cli, rom-properties-stub, rom-properties-lang, ${misc:Depends} +Depends: rom-properties-kde4, rom-properties-kde5, rom-properties-xfce, rom-properties-gnome, rom-properties-cli, rom-properties-stub, rom-properties-lang, rom-properties-thumbnail-dbus, ${misc:Depends} Description: ROM Properties Page shell extension This shell extension provides thumbnailing and property page functionality for ROM images, disc images, and save files for various game consoles, @@ -69,14 +69,14 @@ Description: ROM Properties Page shell extension Package: rom-properties-xfce Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: rom-properties-thumbnailer-dbus, ${shlibs:Depends}, ${misc:Depends} Recommends: rom-properties-lang Description: ROM Properties Page shell extension This shell extension provides thumbnailing and property page functionality for ROM images, disc images, and save files for various game consoles, including Nintendo GameCube and Wii. . - This package contains the XFCE version. + This package contains the XFCE (GTK+ 2.x) version. Package: rom-properties-gnome Architecture: any @@ -122,3 +122,16 @@ Description: ROM Properties Page shell extension including Nintendo GameCube and Wii. . This package contains the language files for localization. + +Package: rom-properties-thumbnailer-dbus +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: rom-properties-lang +Description: ROM Properties Page shell extension + This shell extension provides thumbnailing and property page functionality + for ROM images, disc images, and save files for various game consoles, + including Nintendo GameCube and Wii. + . + This package contains the D-Bus Thumbnailer service, used by XFCE's + tumblerd thumbnailing subsystem. + diff --git a/debian/rom-properties-thumbnailer-dbus.docs b/debian/rom-properties-thumbnailer-dbus.docs new file mode 100644 index 000000000..4ca499f02 --- /dev/null +++ b/debian/rom-properties-thumbnailer-dbus.docs @@ -0,0 +1,4 @@ +README.md +NEWS.md +doc/keys.conf.example +doc/rom-properties.conf.example diff --git a/debian/rom-properties-thumbnailer-dbus.install b/debian/rom-properties-thumbnailer-dbus.install new file mode 100644 index 000000000..1b1e3cd31 --- /dev/null +++ b/debian/rom-properties-thumbnailer-dbus.install @@ -0,0 +1,3 @@ +usr/bin/rp-thumbnailer-dbus +usr/share/dbus-1/services/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service +usr/share/xfce4/thumbnailers/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service diff --git a/debian/rom-properties-xfce.install b/debian/rom-properties-xfce.install index 1e6cda543..c6a2e2dd0 100644 --- a/debian/rom-properties-xfce.install +++ b/debian/rom-properties-xfce.install @@ -1,4 +1 @@ usr/lib/*/thunarx-2/rom-properties-xfce.so -usr/bin/rp-thumbnailer-dbus -usr/share/dbus-1/services/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service -usr/share/xfce4/thumbnailers/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service diff --git a/src/gtk/CMakeLists.txt b/src/gtk/CMakeLists.txt index 49d6a6d51..990c1fba1 100644 --- a/src/gtk/CMakeLists.txt +++ b/src/gtk/CMakeLists.txt @@ -69,12 +69,14 @@ IF(GLib2_FOUND AND GObject2_FOUND) # Cannot build GTK3 frontends. SET(BUILD_GTK3 OFF CACHE "" INTERNAL FORCE) SET(BUILD_GNOME OFF CACHE "" INTERNAL FORCE) + SET(BUILD_XFCE3 OFF CACHE "" INTERNAL FORCE) ENDIF(NOT Cairo_FOUND) ELSE(GLib2_FOUND AND GObject2_FOUND) # Cannot build any GTK+ frontends. SET(BUILD_GTK2 OFF CACHE "" INTERNAL FORCE) SET(BUILD_GTK3 OFF CACHE "" INTERNAL FORCE) SET(BUILD_XFCE OFF CACHE "" INTERNAL FORCE) + SET(BUILD_XFCE3 OFF CACHE "" INTERNAL FORCE) SET(BUILD_GNOME OFF CACHE "" INTERNAL FORCE) ENDIF(GLib2_FOUND AND GObject2_FOUND) @@ -99,6 +101,8 @@ IF(BUILD_GTK3) FIND_PACKAGE(GTK3 3.10.0 ${REQUIRE_GTK3}) IF(GTK3_FOUND) ADD_SUBDIRECTORY(gnome) + # TODO: Thunar 1.8 is ported to GTK+ 3.0. + #ADD_SUBDIRECTORY(xfce3) ELSE(GTK3_FOUND) SET(BUILD_GTK3 OFF CACHE "" INTERNAL FORCE) SET(BUILD_GNOME OFF CACHE "" INTERNAL FORCE) @@ -107,3 +111,9 @@ ELSE(BUILD_GTK3) # No GTK3 builds. SET(BUILD_GNOME OFF CACHE "" INTERNAL FORCE) ENDIF(BUILD_GTK3) + +# Build the D-Bus thumbnailer if building an XFCE plugin. +IF(BUILD_XFCE OR BUILD_XFCE3) + SET(BUILD_THUMBNAILER_DBUS ON CACHE "" INTERNAL FORCE) + ADD_SUBDIRECTORY(thumbnailer-dbus) +ENDIF(BUILD_XFCE OR BUILD_XFCE3) diff --git a/src/gtk/thumbnailer-dbus/CMakeLists.txt b/src/gtk/thumbnailer-dbus/CMakeLists.txt new file mode 100644 index 000000000..7ec45da62 --- /dev/null +++ b/src/gtk/thumbnailer-dbus/CMakeLists.txt @@ -0,0 +1,123 @@ +PROJECT(rp-thumbnailer-dbus) + +# Find packages. +FIND_PACKAGE(GLib2 ${REQUIRE_XFCE} 2.26.0) +FIND_PACKAGE(GObject2 ${REQUIRE_XFCE} 2.26.0) +FIND_PACKAGE(GIO ${REQUIRE_XFCE} 2.26.0) +FIND_PACKAGE(GIO-UNIX ${REQUIRE_XFCE} 2.26.0) +FIND_PACKAGE(GdkPixbuf2 ${REQUIRE_XFCE}) +IF(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND) + # All required libraries were found. +ELSE(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND) + # A required library was not found. + # Disable the D-Bus t + SET(BUILD_THUMBNAILER_DBUS OFF CACHE "" INTERNAL FORCE) +ENDIF(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND) + +# D-Bus bindings for the thumbnailer. +ADD_CUSTOM_COMMAND( + OUTPUT SpecializedThumbnailer1.c SpecializedThumbnailer1.h + COMMAND "${GDBUS_CODEGEN}" + --generate-c-code SpecializedThumbnailer1 + "${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.thumbnails.SpecializedThumbnailer1.xml" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + DEPENDS org.freedesktop.thumbnails.SpecializedThumbnailer1.xml + VERBATIM + ) + +SET(rp-thumbnailer-dbus_SRCS + rp-thumbnailer-dbus.cpp + rp-thumbnailer-main.cpp + ${CMAKE_CURRENT_BINARY_DIR}/SpecializedThumbnailer1.c + ) +SET(rp-thumbnailer-dbus_H + rp-thumbnailer-dbus.hpp + ${CMAKE_CURRENT_BINARY_DIR}/SpecializedThumbnailer1.h + ) + +# Process the .service file. +INCLUDE(DirInstallPaths) +CONFIGURE_FILE(com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service.in + com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service) + +IF(BUILD_THUMBNAILER_DBUS) + # D-Bus thumbnailer. + ADD_EXECUTABLE(rp-thumbnailer-dbus + ${rp-thumbnailer-dbus_SRCS} + ${rp-thumbnailer-dbus_H} + ) + DO_SPLIT_DEBUG(rp-thumbnailer-dbus) + TARGET_INCLUDE_DIRECTORIES(rp-thumbnailer-dbus + PUBLIC $ + $ + PRIVATE $ + $ + $ + $ + ) + TARGET_LINK_LIBRARIES(rp-thumbnailer-dbus unixcommon) + TARGET_LINK_LIBRARIES(rp-thumbnailer-dbus GLib2::gio-unix GLib2::gio GLib2::gobject GLib2::glib) + # Link in libdl if it's required for dlopen(). + IF(CMAKE_DL_LIBS) + TARGET_LINK_LIBRARIES(rp-thumbnailer-dbus ${CMAKE_DL_LIBS}) + ENDIF(CMAKE_DL_LIBS) + TARGET_COMPILE_DEFINITIONS(rp-thumbnailer-dbus + PRIVATE G_LOG_DOMAIN=\"rp-thumbnailer-dbus\" + ) +ENDIF(BUILD_THUMBNAILER_DBUS) + +########################################## +# Install the thumbnailer D-Bus service. # +########################################## + +IF(BUILD_THUMBNAILER_DBUS) + # FIXME: ${ThunarX2_EXTENSIONS_DIR} always uses the system prefix. + # This should be adjusted to ${CMAKE_INSTALL_PREFIX}. + INSTALL(TARGETS rp-thumbnailer-dbus + RUNTIME DESTINATION "${DIR_INSTALL_EXE}" + COMPONENT "plugin" + ) + # TODO: Use session_bus_services_dir from dbus-1.pc. + INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service" + DESTINATION "share/dbus-1/services" + COMPONENT "plugin" + ) + + # NOTE: This file must be installed with a ".service" extension. + # NOTE 2: On Ubuntu, this must be installed in share/xfce4/thumbnailers, + # since Ubuntu ends up listing /usr/share/ in $XDG_DATA_DIRS twice, + # which causes tumblerd to load /usr/share/thumbnailers/ twice and + # fail an assertion. + + # Detect Ubuntu. + # Reference: https://stackoverflow.com/questions/26919334/detect-underlying-platform-flavour-in-cmake + FIND_PROGRAM(LSB_RELEASE lsb_release) + IF(LSB_RELEASE) + EXECUTE_PROCESS(COMMAND ${LSB_RELEASE} -is + OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + ENDIF(LSB_RELEASE) + IF(LSB_RELEASE_ID_SHORT STREQUAL Ubuntu) + SET(THUMBNAIL_DEST_DIR "share/xfce4/thumbnailers") + ELSE() + SET(THUMBNAIL_DEST_DIR "share/thumbnailers") + ENDIF() + INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.thumbnailer" + RENAME com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service + DESTINATION "${THUMBNAIL_DEST_DIR}" + COMPONENT "plugin" + ) + + # Check if a split debug file should be installed. + IF(INSTALL_DEBUG) + # FIXME: Generator expression $ didn't work with CPack-3.6.1. + GET_TARGET_PROPERTY(DEBUG_FILENAME rp-thumbnailer-dbus PDB) + IF(DEBUG_FILENAME) + INSTALL(FILES "${DEBUG_FILENAME}" + DESTINATION "lib/debug/${DIR_INSTALL_EXE}" + COMPONENT "debug" + ) + ENDIF(DEBUG_FILENAME) + ENDIF(INSTALL_DEBUG) +ENDIF(BUILD_THUMBNAILER_DBUS) diff --git a/src/gtk/xfce/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service.in b/src/gtk/thumbnailer-dbus/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service.in similarity index 100% rename from src/gtk/xfce/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service.in rename to src/gtk/thumbnailer-dbus/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service.in diff --git a/src/gtk/xfce/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.thumbnailer b/src/gtk/thumbnailer-dbus/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.thumbnailer similarity index 100% rename from src/gtk/xfce/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.thumbnailer rename to src/gtk/thumbnailer-dbus/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.thumbnailer diff --git a/src/gtk/xfce/org.freedesktop.thumbnails.SpecializedThumbnailer1.xml b/src/gtk/thumbnailer-dbus/org.freedesktop.thumbnails.SpecializedThumbnailer1.xml similarity index 100% rename from src/gtk/xfce/org.freedesktop.thumbnails.SpecializedThumbnailer1.xml rename to src/gtk/thumbnailer-dbus/org.freedesktop.thumbnails.SpecializedThumbnailer1.xml diff --git a/src/gtk/xfce/rp-thumbnailer-dbus.cpp b/src/gtk/thumbnailer-dbus/rp-thumbnailer-dbus.cpp similarity index 98% rename from src/gtk/xfce/rp-thumbnailer-dbus.cpp rename to src/gtk/thumbnailer-dbus/rp-thumbnailer-dbus.cpp index 27aa75ced..4d6949020 100644 --- a/src/gtk/xfce/rp-thumbnailer-dbus.cpp +++ b/src/gtk/thumbnailer-dbus/rp-thumbnailer-dbus.cpp @@ -1,8 +1,8 @@ /*************************************************************************** - * ROM Properties Page shell extension. (GNOME) * + * ROM Properties Page shell extension. (D-Bus Thumbnailer) * * rp-thumbnailer-dbus.cpp: D-Bus thumbnailer service. * * * - * Copyright (c) 2017 by David Korth. * + * Copyright (c) 2017-2018 by David Korth. * * * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * @@ -14,9 +14,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * ***************************************************************************/ /** diff --git a/src/gtk/xfce/rp-thumbnailer-dbus.hpp b/src/gtk/thumbnailer-dbus/rp-thumbnailer-dbus.hpp similarity index 84% rename from src/gtk/xfce/rp-thumbnailer-dbus.hpp rename to src/gtk/thumbnailer-dbus/rp-thumbnailer-dbus.hpp index e1342d943..ec53eee3b 100644 --- a/src/gtk/xfce/rp-thumbnailer-dbus.hpp +++ b/src/gtk/thumbnailer-dbus/rp-thumbnailer-dbus.hpp @@ -1,8 +1,8 @@ /*************************************************************************** - * ROM Properties Page shell extension. (GNOME) * + * ROM Properties Page shell extension. (D-Bus Thumbnailer) * * rp-thumbnailer-dbus.hpp: D-Bus thumbnailer service. * * * - * Copyright (c) 2017 by David Korth. * + * Copyright (c) 2017-2018 by David Korth. * * * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * @@ -14,13 +14,12 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * ***************************************************************************/ -#ifndef __ROMPROPERTIES_GTK_XFCE_RP_THUMBNAILER_DBUS_HPP__ -#define __ROMPROPERTIES_GTK_XFCE_RP_THUMBNAILER_DBUS_HPP__ +#ifndef __ROMPROPERTIES_GTK_THUMBNAILER_DBUS_RP_THUMBNAILER_DBUS_HPP__ +#define __ROMPROPERTIES_GTK_THUMBNAILER_DBUS_RP_THUMBNAILER_DBUS_HPP__ #include #include @@ -57,4 +56,4 @@ gboolean rp_thumbnailer_is_exported (RpThumbnailer *thumbnailer); G_END_DECLS; -#endif /* __ROMPROPERTIES_GTK_XFCE_RP_THUMBNAILER_DBUS_HPP__ */ +#endif /* __ROMPROPERTIES_GTK_THUMBNAILER_DBUS_RP_THUMBNAILER_DBUS_HPP__ */ diff --git a/src/gtk/xfce/rp-thumbnailer-main.cpp b/src/gtk/thumbnailer-dbus/rp-thumbnailer-main.cpp similarity index 100% rename from src/gtk/xfce/rp-thumbnailer-main.cpp rename to src/gtk/thumbnailer-dbus/rp-thumbnailer-main.cpp diff --git a/src/gtk/xfce/CMakeLists.txt b/src/gtk/xfce/CMakeLists.txt index b6d7a6f5f..38ee937f8 100644 --- a/src/gtk/xfce/CMakeLists.txt +++ b/src/gtk/xfce/CMakeLists.txt @@ -5,12 +5,10 @@ PROJECT(rom-properties-xfce) # Find packages. FIND_PACKAGE(GLib2 ${REQUIRE_XFCE} 2.26.0) FIND_PACKAGE(GObject2 ${REQUIRE_XFCE} 2.26.0) -FIND_PACKAGE(GIO ${REQUIRE_XFCE} 2.26.0) -FIND_PACKAGE(GIO-UNIX ${REQUIRE_XFCE} 2.26.0) FIND_PACKAGE(GdkPixbuf2 ${REQUIRE_XFCE}) # GTK2 minimum is 2.0.0, so no version check is needed. FIND_PACKAGE(GTK2 ${REQUIRE_XFCE} COMPONENTS gtk) -IF(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND AND GdkPixbuf2_FOUND AND GTK2_FOUND) +IF(GLib2_FOUND AND GObject2_FOUND AND GdkPixbuf2_FOUND AND GTK2_FOUND) # Find the ThunarX 2 library. FIND_PACKAGE(ThunarX2 ${REQUIRE_XFCE}) IF(NOT ThunarX2_FOUND) @@ -18,11 +16,11 @@ IF(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND AND GdkPixbuf # Disable the XFCE frontend. SET(BUILD_XFCE OFF CACHE "" INTERNAL FORCE) ENDIF(NOT ThunarX2_FOUND) -ELSE(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND AND GdkPixbuf2_FOUND AND GTK2_FOUND) +ELSE(GLib2_FOUND AND GObject2_FOUND AND GdkPixbuf2_FOUND AND GTK2_FOUND) # GTK+ 2.x (or required dependencies) were not found. # Disable the XFCE frontend. SET(BUILD_XFCE OFF CACHE "" INTERNAL FORCE) -ENDIF(GLib2_FOUND AND GObject2_FOUND AND GIO_FOUND AND GIO-UNIX_FOUND AND GdkPixbuf2_FOUND AND GTK2_FOUND) +ENDIF(GLib2_FOUND AND GObject2_FOUND AND GdkPixbuf2_FOUND AND GTK2_FOUND) # Sources and headers. (GTK+ common) STRING(REGEX REPLACE "([^;]+)" "../\\1" rom-properties-xfce_SRCS "${rom-properties-gtk_SRCS}") @@ -65,32 +63,6 @@ SET(rom-properties-xfce_H rom-properties-page.hpp ) -# D-Bus bindings for the thumbnailer. -ADD_CUSTOM_COMMAND( - OUTPUT SpecializedThumbnailer1.c SpecializedThumbnailer1.h - COMMAND "${GDBUS_CODEGEN}" - --generate-c-code SpecializedThumbnailer1 - "${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.thumbnails.SpecializedThumbnailer1.xml" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS org.freedesktop.thumbnails.SpecializedThumbnailer1.xml - VERBATIM - ) - -SET(rp-thumbnailer-dbus_SRCS - rp-thumbnailer-dbus.cpp - rp-thumbnailer-main.cpp - ${CMAKE_CURRENT_BINARY_DIR}/SpecializedThumbnailer1.c - ) -SET(rp-thumbnailer-dbus_H - rp-thumbnailer-dbus.hpp - ${CMAKE_CURRENT_BINARY_DIR}/SpecializedThumbnailer1.h - ) - -# Process the .service file. -INCLUDE(DirInstallPaths) -CONFIGURE_FILE(com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service.in - com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service) - IF(BUILD_XFCE) ADD_LIBRARY(rom-properties-xfce MODULE ${rom-properties-xfce_SRCS} @@ -119,30 +91,6 @@ IF(BUILD_XFCE) TARGET_COMPILE_DEFINITIONS(rom-properties-xfce PRIVATE G_LOG_DOMAIN=\"rom-properties-xfce\" ) - - # D-Bus thumbnailer. - ADD_EXECUTABLE(rp-thumbnailer-dbus - ${rp-thumbnailer-dbus_SRCS} - ${rp-thumbnailer-dbus_H} - ) - DO_SPLIT_DEBUG(rp-thumbnailer-dbus) - TARGET_INCLUDE_DIRECTORIES(rp-thumbnailer-dbus - PUBLIC $ - $ - PRIVATE $ - $ - $ - $ - ) - TARGET_LINK_LIBRARIES(rp-thumbnailer-dbus unixcommon) - TARGET_LINK_LIBRARIES(rp-thumbnailer-dbus GLib2::gio-unix GLib2::gio GLib2::gobject GLib2::glib) - # Link in libdl if it's required for dlopen(). - IF(CMAKE_DL_LIBS) - TARGET_LINK_LIBRARIES(rp-thumbnailer-dbus ${CMAKE_DL_LIBS}) - ENDIF(CMAKE_DL_LIBS) - TARGET_COMPILE_DEFINITIONS(rp-thumbnailer-dbus - PRIVATE G_LOG_DOMAIN=\"rp-thumbnailer-dbus\" - ) ENDIF(BUILD_XFCE) ####################### @@ -156,41 +104,6 @@ IF(BUILD_XFCE) LIBRARY DESTINATION "${ThunarX2_EXTENSIONS_DIR}" COMPONENT "plugin" ) - INSTALL(TARGETS rp-thumbnailer-dbus - RUNTIME DESTINATION "${DIR_INSTALL_EXE}" - COMPONENT "plugin" - ) - # TODO: Use session_bus_services_dir from dbus-1.pc. - INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service" - DESTINATION "share/dbus-1/services" - COMPONENT "plugin" - ) - - # NOTE: This file must be installed with a ".service" extension. - # NOTE 2: On Ubuntu, this must be installed in share/xfce4/thumbnailers, - # since Ubuntu ends up listing /usr/share/ in $XDG_DATA_DIRS twice, - # which causes tumblerd to load /usr/share/thumbnailers/ twice and - # fail an assertion. - - # Detect Ubuntu. - # Reference: https://stackoverflow.com/questions/26919334/detect-underlying-platform-flavour-in-cmake - FIND_PROGRAM(LSB_RELEASE lsb_release) - IF(LSB_RELEASE) - EXECUTE_PROCESS(COMMAND ${LSB_RELEASE} -is - OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - ENDIF(LSB_RELEASE) - IF(LSB_RELEASE_ID_SHORT STREQUAL Ubuntu) - SET(THUMBNAIL_DEST_DIR "share/xfce4/thumbnailers") - ELSE() - SET(THUMBNAIL_DEST_DIR "share/thumbnailers") - ENDIF() - INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/com.gerbilsoft.rom-properties.SpecializedThumbnailer1.thumbnailer" - RENAME com.gerbilsoft.rom-properties.SpecializedThumbnailer1.service - DESTINATION "${THUMBNAIL_DEST_DIR}" - COMPONENT "plugin" - ) # Check if a split debug file should be installed. IF(INSTALL_DEBUG) @@ -202,13 +115,5 @@ IF(BUILD_XFCE) COMPONENT "debug" ) ENDIF(DEBUG_FILENAME) - - GET_TARGET_PROPERTY(DEBUG_FILENAME rp-thumbnailer-dbus PDB) - IF(DEBUG_FILENAME) - INSTALL(FILES "${DEBUG_FILENAME}" - DESTINATION "lib/debug/${DIR_INSTALL_EXE}" - COMPONENT "debug" - ) - ENDIF(DEBUG_FILENAME) ENDIF(INSTALL_DEBUG) ENDIF(BUILD_XFCE)