From 45fe25eb9833809a1ce3178f8fd882972475074b Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 24 Sep 2012 08:25:47 +0200 Subject: [PATCH] Changed: Install plugins specs in ${NL_SHARE_PREFIX}/object_viewer_qt/plugins under Linux --- code/nel/tools/3d/object_viewer_qt/CMakeLists.txt | 12 ++++++++++-- code/nel/tools/3d/object_viewer_qt/src/main.cpp | 6 +++--- .../src/plugins/bnp_manager/CMakeLists.txt | 1 + .../object_viewer_qt/src/plugins/core/CMakeLists.txt | 1 + .../src/plugins/disp_sheet_id/CMakeLists.txt | 1 + .../src/plugins/example/CMakeLists.txt | 1 + .../src/plugins/georges_editor/CMakeLists.txt | 1 + .../src/plugins/landscape_editor/CMakeLists.txt | 1 + .../object_viewer_qt/src/plugins/log/CMakeLists.txt | 1 + .../src/plugins/mission_compiler/CMakeLists.txt | 1 + .../src/plugins/object_viewer/CMakeLists.txt | 1 + .../src/plugins/ovqt_sheet_builder/CMakeLists.txt | 1 + .../src/plugins/translation_manager/CMakeLists.txt | 1 + .../src/plugins/zone_painter/CMakeLists.txt | 1 + 14 files changed, 25 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/CMakeLists.txt index 9d4a7bd34..b87416280 100644 --- a/code/nel/tools/3d/object_viewer_qt/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/CMakeLists.txt @@ -5,8 +5,16 @@ # #----------------------------------------------------------------------------- -# This tells the application(s) where to fidn the installed data. -ADD_DEFINITIONS(-DDATA_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/object_viewer_qt/\\"") +# This tells the application(s) where to find the installed data. +IF(WIN32) + SET(OVQT_PLUGIN_DIR "plugins") +ELSEIF(APPLE) + # TODO: under Mac OS X, don't install but copy files in application package + SET(OVQT_PLUGIN_DIR "plugins") +ELSE(WIN32) + SET(OVQT_PLUGIN_DIR ${NL_SHARE_PREFIX}/object_viewer_qt/plugins) + ADD_DEFINITIONS(-DDATA_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/object_viewer_qt/\\"") +ENDIF(WIN32) IF(UNIX AND WITH_STATIC) MESSAGE(FATAL_ERROR "OVQT does not work with static NeL builds on Unix atm.") diff --git a/code/nel/tools/3d/object_viewer_qt/src/main.cpp b/code/nel/tools/3d/object_viewer_qt/src/main.cpp index 7e9e05a77..fd5432a3c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/main.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/main.cpp @@ -151,10 +151,10 @@ sint main(int argc, char **argv) ExtensionSystem::PluginManager pluginManager; pluginManager.setSettings(settings); QStringList pluginPaths; -#if !defined(NL_OS_MAC) - pluginPaths << settings->value("PluginPath", "./plugins").toString(); -#else +#if defined(NL_OS_MAC) pluginPaths << settings->value("PluginPath", qApp->applicationDirPath() + QString("/../PlugIns/ovqt")).toString(); +#else + pluginPaths << settings->value("PluginPath", QString("%1/plugins").arg(DATA_DIR)).toString(); #endif pluginManager.setPluginPaths(pluginPaths); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt index 746cc48b6..d84708f23 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/bnp_manager/CMakeLists.txt @@ -45,3 +45,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_bnp_manager) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_bnp_manager LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt index dcd9bd81c..a88c6501c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/core/CMakeLists.txt @@ -56,3 +56,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_core) ADD_DEFINITIONS(-DCORE_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt index 0876d192c..0b31363c0 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/disp_sheet_id/CMakeLists.txt @@ -41,3 +41,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_disp_sheet_id) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt index 9e6b308a6..d0ad34245 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt @@ -39,3 +39,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_example) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt index 2e8610dfa..ac73e5503 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/georges_editor/CMakeLists.txt @@ -45,3 +45,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_georges_editor) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt index ebff67fa5..098b2e086 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/landscape_editor/CMakeLists.txt @@ -46,3 +46,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_landscape_editor) ADD_DEFINITIONS(-DLANDSCAPE_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt index a65fe1b9f..71a6a32fd 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt @@ -37,3 +37,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_log) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt index 61a55a94d..7c0272a7c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/mission_compiler/CMakeLists.txt @@ -47,3 +47,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_mission_compiler) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt index e0a4697c7..61838ff3c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/object_viewer/CMakeLists.txt @@ -164,3 +164,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_object_viewer) ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt index bdb3e68e6..28c8a373d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -30,3 +30,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_sheet_builder) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt index befb70845..e142c9b9d 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/translation_manager/CMakeLists.txt @@ -49,3 +49,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_translation_manager) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt index a40a0eb94..02a4a73fc 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/CMakeLists.txt @@ -43,3 +43,4 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_zone_painter) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS}) INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)