diff --git a/CMakeLists.txt b/CMakeLists.txt index 21beda5b6..485da6528 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,9 +68,13 @@ if (WIN32 OR APPLE) set (BUILD_BUNDLE ON FORCE) endif(WIN32 OR APPLE) +if (NOT DEFINED BUNDLE_BASE_INSTALL_DIR) + set (BUNDLE_BASE_INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_BUILD_TYPE}) +endif (NOT DEFINED BUNDLE_BASE_INSTALL_DIR) + if (BUILD_BUNDLE) set (BINDIR .) - set (CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_BUILD_TYPE}) + set (CMAKE_INSTALL_PREFIX ${BUNDLE_BASE_INSTALL_DIR}) endif (BUILD_BUNDLE) if (NOT DEFINED BINDIR) @@ -126,6 +130,18 @@ if (NOT DEFINED LICENCEDIR) endif (BUILD_BUNDLE) endif (NOT DEFINED LICENCEDIR) +if (NOT DEFINED DESKTOPDIR) + if (UNIX) + set (DESKTOPDIR ${CMAKE_INSTALL_PREFIX}/share/applications) + endif (UNIX) +endif (NOT DEFINED DESKTOPDIR) + +if (NOT DEFINED ICONSDIR) + if (UNIX) + set (ICONSDIR ${CMAKE_INSTALL_PREFIX}/share/icons) + endif (UNIX) +endif (NOT DEFINED ICONSDIR) + # non-bundle builds has to use absolute paths if (NOT BUILD_BUNDLE AND NOT (IS_ABSOLUTE ${BINDIR} AND IS_ABSOLUTE ${DATADIR} AND IS_ABSOLUTE ${LIBDIR} AND diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt index 654c40198..aa6faec36 100644 --- a/rtdata/CMakeLists.txt +++ b/rtdata/CMakeLists.txt @@ -14,6 +14,16 @@ else (WIN32) set(OPTIONSFILE "options/options.lin") endif (WIN32) +if (UNIX) + configure_file (${CMAKE_CURRENT_SOURCE_DIR}/icons/rawtherapee.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/icons/rawtherapee.desktop DESTINATION ${DESKTOPDIR}) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/hi16-app-rawtherapee.png DESTINATION ${ICONSDIR}/hicolor/16x16/apps RENAME rawtherapee.png) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/hi24-app-rawtherapee.png DESTINATION ${ICONSDIR}/hicolor/24x24/apps RENAME rawtherapee.png) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/hi32-app-rawtherapee.png DESTINATION ${ICONSDIR}/hicolor/32x32/apps RENAME rawtherapee.png) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/hi48-app-rawtherapee.png DESTINATION ${ICONSDIR}/hicolor/48x48/apps RENAME rawtherapee.png) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/hi128-app-rawtherapee.png DESTINATION ${ICONSDIR}/hicolor/128x128/apps RENAME rawtherapee.png) + install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/hi256-app-rawtherapee.png DESTINATION ${ICONSDIR}/hicolor/256x256/apps RENAME rawtherapee.png) +endif (UNIX) install (FILES ${IMAGEFILES} DESTINATION ${DATADIR}/images) install (FILES ${LANGUAGEFILES} DESTINATION ${DATADIR}/languages) diff --git a/rtdata/icons/hi128-app-rawtherapee.png b/rtdata/icons/hi128-app-rawtherapee.png new file mode 100644 index 000000000..9df11b375 Binary files /dev/null and b/rtdata/icons/hi128-app-rawtherapee.png differ diff --git a/rtdata/icons/hi16-app-rawtherapee.png b/rtdata/icons/hi16-app-rawtherapee.png new file mode 100644 index 000000000..9bb1c934a Binary files /dev/null and b/rtdata/icons/hi16-app-rawtherapee.png differ diff --git a/rtdata/icons/hi24-app-rawtherapee.png b/rtdata/icons/hi24-app-rawtherapee.png new file mode 100644 index 000000000..b3e1fedf6 Binary files /dev/null and b/rtdata/icons/hi24-app-rawtherapee.png differ diff --git a/rtdata/icons/hi256-app-rawtherapee.png b/rtdata/icons/hi256-app-rawtherapee.png new file mode 100644 index 000000000..0d1a0e182 Binary files /dev/null and b/rtdata/icons/hi256-app-rawtherapee.png differ diff --git a/rtdata/icons/hi32-app-rawtherapee.png b/rtdata/icons/hi32-app-rawtherapee.png new file mode 100644 index 000000000..c9f36792f Binary files /dev/null and b/rtdata/icons/hi32-app-rawtherapee.png differ diff --git a/rtdata/icons/hi48-app-rawtherapee.png b/rtdata/icons/hi48-app-rawtherapee.png new file mode 100644 index 000000000..2dfac235b Binary files /dev/null and b/rtdata/icons/hi48-app-rawtherapee.png differ diff --git a/rtdata/icons/rawtherapee.desktop.in b/rtdata/icons/rawtherapee.desktop.in new file mode 100644 index 000000000..e63e944b2 --- /dev/null +++ b/rtdata/icons/rawtherapee.desktop.in @@ -0,0 +1,17 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=RawTherapee +GenericName=RAW image editor +GenericName[cs]=Editor RAW obrázků +GenericName[fr]=Éditeur d'images RAW +Comment=The RAW converter and digital photo processing software. +Comment[cs]=Program pro konverzi a zpracování digitálních RAW fotografií. +Comment[fr]=Logiciel de conversion et de traitement de photos numériques de format RAW (but de capteur). +Exec=${BINDIR}/rawtherapee +Icon=rawtherapee +Terminal=false +Encoding=UTF-8 +Categories=Graphics;Photography;GTK; + +MimeType=image/jpeg;image/png;image/tiff;image/x-adobe-dng;image/x-canon-crw;image/x-canon-cr2;image/x-fuji-raf;image/x-kodak-dcr;image/x-kodak-kdc;image/x-kodak-k25;image/x-minolta-mrw;image/x-nikon-nef;image/x-olympus-orf;image/x-panasonic-raw;image/x-pentax-pef;image/x-sony-arw;image/x-sony-srf;image/x-sony-sr2; diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 868ee85ec..57f6d3fe1 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -46,6 +46,8 @@ else (WIN32) ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS} ${GIOMM_LIBRARY_DIRS} ${IPTCDATA_LIBRARY_DIRS} ${LCMS_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS} ${GOBJECT_LIBRARY_DIRS}) endif (WIN32) # create config.h which defines where data are stored +message (STATUS --- CMAKE_CURRENT_SOURCE_DIR = ${CMAKE_CURRENT_SOURCE_DIR}) +message (STATUS --- CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) add_executable (rth ${EXTRA_SRC} ${BASESOURCEFILES})