Solving issue #540 (at last) : Complete integration to linux desktop

+ modification of CMakeLists.txt to let the developper chose the bundle installtion directory
This commit is contained in:
natureh
2011-07-14 18:48:56 +02:00
parent 9ab7b2da91
commit 706e4c3ea6
10 changed files with 46 additions and 1 deletions

View File

@@ -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

View File

@@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -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;

View File

@@ -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})