]> Creatis software - cpPlugins.git/commitdiff
load default plugins win32
authorJose Luis Guzman <cycopepe@gmail.com>
Fri, 30 Oct 2015 15:30:04 +0000 (16:30 +0100)
committerJose Luis Guzman <cycopepe@gmail.com>
Fri, 30 Oct 2015 15:30:04 +0000 (16:30 +0100)
CMakeLists.txt
appli/ImageMPR/CMakeLists.txt
appli/ImageMPR/ImageMPR.cxx

index 45ffbb0fd33ce6c0255298bb8d3027f01d9b43d1..823705ed308fc168bc3f9b7f8cc7c865437d136d 100644 (file)
@@ -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}")
 
 ## ===========
index 0ed90acef585a8379cb50721e0dc5da86c28fdbd..7d3c3d85d2bddfefbbd290372175a2b9b08d6873 100644 (file)
@@ -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
index 69970b7ccd8b6c25e7592d25e61c2475a5b2b21c..cc9a01569b7efcaa2d8d926401e628752d4d3314 100644 (file)
@@ -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( ) )
     );