From 122c7b1e73834e7854476588225e3c43eb665622 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sun, 16 Jun 2013 14:01:20 +0200 Subject: [PATCH] Added several macros --- CMakeLists.txt | 30 +----------------------------- src/core/defs.h.in | 10 +++------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8341c3085..7c9f3a049 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,38 +281,10 @@ qt5_use_modules(${EXE_NAME} ) # Installation stage. -#if(APPLE) -# # Mac's bundle install. -# message(STATUS "[qonverter] You will probably install on Mac OS.") -# set_target_properties(${EXE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/resources/macosx/Info.plist.in") -# set(MACOSX_BUNDLE_ICON_FILE qonverter.icns) -# set(MACOSX_BUNDLE_INFO_STRING "${EXE_NAME} ${APP_VERSION}") -# set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.googlecode.qonverter") -# set(MACOSX_BUNDLE_LONG_VERSION_STRING "${APP_VERSION}") -# set(MACOSX_BUNDLE_BUNDLE_NAME "${EXE_NAME}") -# set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${APP_VERSION}") -# set(MACOSX_BUNDLE_BUNDLE_VERSION "${APP_VERSION}") -# set(MACOSX_BUNDLE_COPYRIGHT "(c) Martin Rotter") -# set_source_files_properties(${CMAKE_SOURCE_DIR}/resources/macosx/qonverter.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) -# install(TARGETS ${EXE_NAME} BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}) -# install(FILES ${APP_QM} DESTINATION ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/l10n) -# install(FILES ${APP_SKINS} DESTINATION ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/skins) -# install(FILES ${APP_MISC} DESTINATION ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/information) -# configure_file(resources/macosx/bundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/bundle.cmake @ONLY) -# add_custom_target(bundle ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/bundle.cmake) -#elseif(WIN32) if(WIN32) message(STATUS "[${APP_LOW_NAME}] You will probably install on Windows.") install(TARGETS ${EXE_NAME} RUNTIME DESTINATION ./) - install(FILES ${APP_QM} DESTINATION ./l10n) - install(FILES ${APP_SKIN_PLAIN} DESTINATION ./skins/base) - install(FILES ${APP_SKIN_MODERN} DESTINATION ./skins/base) - install(FILES ${APP_SKIN_DARK} DESTINATION ./skins/fancy) - install(FILES ${APP_SKIN_DARK_IMAGES} DESTINATION ./skins/fancy/images) - install(FILES ${APP_MISC} DESTINATION ./) -elseif(OS2) - message(STATUS "[${APP_LOW_NAME}] You will probably install on OS/2.") - install(TARGETS ${EXE_NAME} RUNTIME DESTINATION ./) + install(FILES resources/graphics/${APP_LOW_NAME}.png DESTINATION ./) install(FILES ${APP_QM} DESTINATION ./l10n) install(FILES ${APP_SKIN_PLAIN} DESTINATION ./skins/base) install(FILES ${APP_SKIN_MODERN} DESTINATION ./skins/base) diff --git a/src/core/defs.h.in b/src/core/defs.h.in index 605d78532..ee708ac69 100644 --- a/src/core/defs.h.in +++ b/src/core/defs.h.in @@ -28,17 +28,13 @@ #define APP_SKIN_PATH APP_PREFIX + QString("/share/rssguard/skins") #define APP_INFO_PATH APP_PREFIX + QString("/share/rssguard/information") #define APP_THEME_PATH APP_PREFIX + QString("/share/rssguard/themes") -#elif defined(Q_OS_MAC) -#define APP_LANG_PATH QApplication::applicationDirPath() + "/../Resources/l10n" -#define APP_SKIN_PATH QApplication::applicationDirPath() + "/../Resources/skins" -#define APP_PLUGIN_PATH QApplication::applicationDirPath() + "/../Resources/plugins" -#define APP_INFO_PATH QApplication::applicationDirPath() + "/../Resources/information" -#define APP_THEME_PATH QApplication::applicationDirPath() + "/../Resources/themes" -#elif defined(Q_OS_WIN) || defined(Q_OS_OS2) +#define APP_ICON_PATH APP_PREFIX + QString("/share/icons/hicolor/256x256/apps/rssguard.png") +#elif defined(Q_OS_WIN) #define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n") #define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins") #define APP_INFO_PATH QApplication::applicationDirPath() #define APP_THEME_PATH QApplication::applicationDirPath() + QString("/themes") +#define APP_ICON_PATH QApplication::applicationDirPath() + QString("/rssguard.png") #endif #endif // DEFS_H