From: Jose Luis Guzman Date: Fri, 30 Oct 2015 15:30:04 +0000 (+0100) Subject: load default plugins win32 X-Git-Tag: v0.1~311^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=76b51bf0b9a6dba11f471474eb589721efa39902;p=cpPlugins.git load default plugins win32 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 45ffbb0..823705e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ ENDFOREACH(policy) PROJECT(cpPlugins) SET(prj_MAJ_VER "0") SET(prj_MIN_VER "0") -SET(prj_REL_VER "1") +SET(prj_REL_VER "2") SET(prj_VERSION "${prj_MAJ_VER}.${prj_MIN_VER}.${prj_REL_VER}") ## =========== diff --git a/appli/ImageMPR/CMakeLists.txt b/appli/ImageMPR/CMakeLists.txt index 0ed90ac..7d3c3d8 100644 --- a/appli/ImageMPR/CMakeLists.txt +++ b/appli/ImageMPR/CMakeLists.txt @@ -1,20 +1,26 @@ IF(USE_QT4) - find_package(ITK REQUIRED) - include(${ITK_USE_FILE}) - find_package(VTK REQUIRED) - include(${VTK_USE_FILE}) + SET(App_NAME "ImageMPR") + IF(WIN32) CONFIGURE_FILE( + Plugins.cfg.in + ${PROJECT_BINARY_DIR}/appli/${App_NAME}/Plugins.cfg + @ONLY + ) + ELSE(WIN32) + CONFIGURE_FILE( Plugins.cfg.in ${PROJECT_BINARY_DIR}/Plugins.cfg @ONLY ) + ENDIF(WIN32) + ## ==================================================== ## = Source code, user interafaces and resources here = ## ==================================================== - SET(App_NAME "ImageMPR") + SET(App_SOURCE_DIR "${PROJECT_SOURCE_DIR}/appli/${App_NAME}") SET(App_BINARY_DIR "${PROJECT_BINARY_DIR}/appli/${App_NAME}") @@ -84,6 +90,10 @@ ENDIF(USE_QT4) ## TODO: check rpm and deb configuration for linux ## +set(CONFIG_FILE + ${PROJECT_BINARY_DIR}/appli/ImageMPR/Plugins.cfg +) + set(QT_PACKAGE_LIBRARIES C:/src/qt/qt4.8.6/bin/QtCore4.dll C:/src/qt/qt4.8.6/bin/QtCored4.dll @@ -257,6 +267,7 @@ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${QT_PACKAGE_LIBRARIES} ${ITK_PACKAGE_LIBRARIES} ${VTK_PACKAGE_LIBRARIES} + ${CONFIG_FILE} ) # Tell CMake to copy CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS content into the package @@ -264,12 +275,12 @@ include(InstallRequiredSystemLibraries) set(CPACK_PACKAGE_NAME "cpPluginsMprViewer") -set(CPACK_PACKAGE_VENDOR "Creatis") +set(CPACK_PACKAGE_VENDOR "Creatis & Pontificia Universidad Javeriana") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "cpPlugins - MPR-Viewer") -set(CPACK_PACKAGE_VERSION "1.0.0") -set(CPACK_PACKAGE_VERSION_MAJOR "1") +set(CPACK_PACKAGE_VERSION "0.0.2") +set(CPACK_PACKAGE_VERSION_MAJOR "0") set(CPACK_PACKAGE_VERSION_MINOR "0") -set(CPACK_PACKAGE_VERSION_PATCH "0") +set(CPACK_PACKAGE_VERSION_PATCH "2") set(CPACK_PACKAGE_INSTALL_DIRECTORY "MPR-Viewer") install(TARGETS ImageMPR diff --git a/appli/ImageMPR/ImageMPR.cxx b/appli/ImageMPR/ImageMPR.cxx index 69970b7..cc9a015 100644 --- a/appli/ImageMPR/ImageMPR.cxx +++ b/appli/ImageMPR/ImageMPR.cxx @@ -33,8 +33,13 @@ ImageMPR( QWidget* parent ) ImageMPR_ConnectAction( LoadPlugins ); ImageMPR_ConnectAction( ShowPlugins ); - // Try to load default plugins - this->m_Plugins->LoadPluginsConfigurationFile( "Plugins.cfg" ); + // Try to load default plugins +#ifdef WIN32 + this->m_Plugins->LoadPlugins("cpPluginsIO.dll"); + this->m_Plugins->LoadPlugins("cpPluginsBasicFilters.dll"); +#else + this->m_Plugins->LoadPluginsConfigurationFile("Plugins.cfg"); +#endif this->m_Plugins->AssociatePluginsToMenu( this->m_UI->MenuFilters, this, SLOT( _execPlugin( ) ) );