]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
Merge from V6_3_BR branch (Windows porting) 27/10/2011
authorvsr <vsr@opencascade.com>
Thu, 27 Oct 2011 15:36:29 +0000 (15:36 +0000)
committervsr <vsr@opencascade.com>
Thu, 27 Oct 2011 15:36:29 +0000 (15:36 +0000)
21 files changed:
src/bases/BL_Exception.hxx
src/engine/BL_Engine.hxx [new file with mode: 0755]
src/engine/BL_Job.hxx
src/engine/BL_JobsManager.cxx
src/engine/BL_JobsManager.hxx
src/engine/BL_SALOMEServices.hxx
src/engine/Makefile.am
src/genericgui/BL_CreateJobWizard.cxx
src/genericgui/BL_GenericGui.hxx
src/genericgui/BL_GenericGuiDefines.hxx [new file with mode: 0755]
src/genericgui/BL_JobTab.cxx
src/genericgui/BL_QModelManager.cxx
src/genericgui/JM_EditSalomeResource.cxx
src/genericgui/Makefile.am
src/salomegui/BL_SalomeGui.cxx
src/salomegui/BL_SalomeGui.hxx
src/salomegui/Makefile.am
src/standalone/Makefile.am
src/wrappers/BL_MainWindows_Qt.hxx
src/wrappers/BL_MainWindows_SALOME.hxx
src/wrappers/Makefile.am

index 439b519e21a86875d6c9e72bf4469db500193540..d69869ac823b3156df1f45e45f07f8ff5c03a97b 100644 (file)
 #ifndef __BL_EXCEPTION_HXX__
 #define __BL_EXCEPTION_HXX__
 
+#ifdef WNT
+#  if defined BL_Bases_EXPORTS
+#    define BL_Bases_EXPORT __declspec( dllexport )
+#  else
+#    define BL_Bases_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define BL_Bases_EXPORT
+#endif
+
 #include <string>
 #include <exception>
 
 namespace BL
 {
-  class Exception : public std::exception
+  class BL_Bases_EXPORT Exception : public std::exception
   {
   protected:
     std::string _what;
diff --git a/src/engine/BL_Engine.hxx b/src/engine/BL_Engine.hxx
new file mode 100755 (executable)
index 0000000..1299914
--- /dev/null
@@ -0,0 +1,32 @@
+//  Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __BL_ENGINE_HXX__
+#define __BL_ENGINE_HXX__
+
+#ifdef WNT
+#  if defined BL_Engine_EXPORTS
+#    define BL_Engine_EXPORT __declspec( dllexport )
+#  else
+#    define BL_Engine_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define BL_Engine_EXPORT
+#endif
+
+#endif
index 031ec2493613b7f7487364df6291373096686d0b..d1355b2a0b2ec426604ab08c0fcf685efe6caf0f 100644 (file)
 #ifndef _BL_JOB_HXX_
 #define _BL_JOB_HXX_
 
+#include "BL_Engine.hxx"
 #include "BL_Traces.hxx"
 
 #include <string>
 #include <list>
 
+#ifdef WNT
+#undef ERROR
+#endif
+
 namespace BL{
 
-  class Job
+  class BL_Engine_EXPORT Job
   {
     public:
       Job();
index 071154ac7c45be8a23b8bb5b9c6cad091f05e8e6..92bfc68182a751a740174c37f3d357aa689475ec 100644 (file)
 #include "BL_JobsManager.hxx"
 #include <sstream>
 
+#ifdef WNT
+#undef ERROR
+#endif
+
 BL::JobsManager::JobsManager(BL::SALOMEServices * salome_services)
 {
   DEBTRACE("Creating BL::JobsManager");
index e782551dd3c44ff487380171407728210be27450..12621fa27ef2002805c2c15e4850185a986cf302 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef _BL_JOBSMANAGER_HXX_
 #define _BL_JOBSMANAGER_HXX_
 
+#include "BL_Engine.hxx"
 #include "BL_Job.hxx"
 #include "BL_SALOMEServices.hxx"
 #include "BL_Traces.hxx"
@@ -34,7 +35,7 @@ namespace BL{
 
   class SALOMEServices;
 
-  class JobsManager
+  class BL_Engine_EXPORT JobsManager
   {
     public:
       JobsManager(BL::SALOMEServices * salome_services);
index 83295b52e0c1a54c5e4b107765ea0fdc6d59fadb..a69a3c11f313d7e2805abadd564fa62d6d9f001a 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef _BL_SALOMESERVICES_HXX_
 #define _BL_SALOMESERVICES_HXX_
 
+#include "BL_Engine.hxx"
 #include "BL_Traces.hxx"
 #include "BL_Job.hxx"
 
@@ -39,7 +40,7 @@ namespace BL{
 
   class JobsManager;
 
-  struct ResourceDescr
+  struct BL_Engine_EXPORT ResourceDescr
   {
     std::string name;
     std::string hostname;
@@ -58,7 +59,7 @@ namespace BL{
     std::string iprotocol;
   };
 
-  class SALOMEServices :
+  class BL_Engine_EXPORT SALOMEServices :
     public POA_JOBMANAGER::LauncherObserver
   {
     public:
index 50ea66fb348aa02941178b3f273df42f886f540e..84fc25746e9f0f325afc43085553cd7127339dc8 100644 (file)
@@ -27,11 +27,11 @@ libBL_Engine_la_SOURCES = BL_JobsManager.hxx BL_JobsManager.cxx \
                          BL_Observer.hxx
 
 libBL_Engine_la_CXXFLAGS = -I$(top_srcdir)/src/bases \
-                          $(OMNIORB_INCLUDES) \
+                          $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
                           -I$(KERNEL_ROOT_DIR)/include/salome \
                           -I../../idl
 
-libBL_Engine_la_LIBADD = $(top_builddir)/src/bases/libBL_Bases.la \
-                        $(top_builddir)/idl/libJOBMANAGER_IDL.la \
+libBL_Engine_la_LIBADD = $(top_builddir)/src/bases/libBL_Bases.la  $(top_builddir)/idl/libJOBMANAGER_IDL.la $(OMNIORB_LIBS) \
+                        $(KERNEL_LDFLAGS) -lSalomeIDLKernel -lSalomeNS -lSalomeLifeCycleCORBA \
                          @OMNIORB_LIBS@
 
index 4416bd640956dc8dbc10eed79782375a83a7a803..a97c52d8b180aec7afa863d6274c110e34a0d280 100644 (file)
 
 #include "BL_CreateJobWizard.hxx"
 #include "BL_JobsManager_QT.hxx"
+#ifndef WNT
 #include <unistd.h>
-#include <sys/types.h>
 #include <pwd.h>
+#endif
+#include <sys/types.h>
 #include <stdlib.h>
 
+#ifdef WNT
+#undef ERROR
+#endif
+
 BL::CreateJobWizard::CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALOMEServices * salome_services)
 {
   DEBTRACE("Creating BL::CreateJobWizard");
@@ -364,7 +370,7 @@ BL::JobNamePage::validatePage()
 
   // Check if job name already exists
   else {
-    if (_jobs_manager->job_already_exist(job_name.toStdString()) == false or _check_name == false)
+    if (_jobs_manager->job_already_exist(job_name.toStdString()) == false || _check_name == false)
     {
       return_value = true;
     }
@@ -651,7 +657,7 @@ BL::BatchParametersPage::validatePage()
 
   int time_hour = field("duration_hour").toInt();
   int time_min = field("duration_min").toInt();
-  if (time_hour == 0 and time_min == 0)
+  if (time_hour == 0 && time_min == 0)
   {
     QMessageBox::warning(NULL, "Time Error", "Please enter an expected during time");
     return false;
@@ -721,6 +727,9 @@ BL::FilesPage::FilesPage(BL::CreateJobWizard * parent)
 
   // Default result directory is home directory (if we found it)
   // First try -> HOME
+#ifdef WNT
+  _result_directory->setText(getenv("HOME"));
+#else
   if (getenv("HOME"))
     _result_directory->setText(getenv("HOME"));
   else {
@@ -729,6 +738,7 @@ BL::FilesPage::FilesPage(BL::CreateJobWizard * parent)
     if (pass_struct)
       _result_directory->setText(pass_struct->pw_dir);
   }
+#endif
   registerField("result_directory", _result_directory);
 
   QGridLayout * output_box = new QGridLayout;
@@ -766,7 +776,7 @@ BL::FilesPage::validatePage()
     }
   }
 
-  if (result_directory == "" and _output_files_list->count() != 0)
+  if (result_directory == "" && _output_files_list->count() != 0)
   {
     QMessageBox::warning(NULL, "Result Directory Error", "Please enter a result directory or remove output files");
     return false;
index a30882835254302279daf3e397686614c06c8115..79d93d36dd4566bec8b900b9717effd64d2eb490 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <QtGui>
 
+#include "BL_GenericGuiDefines.hxx"
+
 #include "BL_Traces.hxx"
 
 #include "BL_SALOMEServices.hxx"
@@ -38,7 +40,7 @@
 
 namespace BL 
 {
-  class GenericGui: public QObject
+  class BL_GenericGui_EXPORT GenericGui: public QObject
   {
     Q_OBJECT
 
diff --git a/src/genericgui/BL_GenericGuiDefines.hxx b/src/genericgui/BL_GenericGuiDefines.hxx
new file mode 100755 (executable)
index 0000000..f193413
--- /dev/null
@@ -0,0 +1,32 @@
+//  Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __BL_GENERICGUIDEFINES_HXX__
+#define __BL_GENERICGUIDEFINES_HXX__
+
+#ifdef WNT
+#  if defined BL_GenericGui_EXPORTS
+#    define BL_GenericGui_EXPORT __declspec( dllexport )
+#  else
+#    define BL_GenericGui_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define BL_GenericGui_EXPORT
+#endif
+
+#endif
index 9b1baed15dd1067fdc24b3bad58b8dc5c0fef963..31ce3c120af5980d885a7c0731ad55fded7e723d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//  Copyright (C) 2009-2011  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include "BL_JobTab.hxx"
 #include "BL_Traces.hxx"
 
+#ifdef WNT
+#undef ERROR
+#endif
+
 BL::JobTab::JobTab(QWidget *parent, BL::JobsManager_QT * jobs_manager) : QTabWidget(parent)
 {
   DEBTRACE("Creating BL::JobTab");
index d46199bc2ae1dad3727d72fc5f89c64f6e0e0b54..43b481c29f8f1f7ea4ddb3a0c09073abaf7f1875 100644 (file)
 #include "BL_QModelManager.hxx"
 #include "BL_JobsManager_QT.hxx"
 
+#ifdef WNT
+#undef ERROR
+#endif
+
 BL::QModelManager::QModelManager(QObject * parent, BL::JobsManager_QT * jobs_manager) : QObject(parent)
 {
   DEBTRACE("Creating BL::QModelManager");
index 8fac9cb4a4330f2c64ba77710664cc2ec70ea7e6..d6ec6a6845b82c092abfd1cd5ad74b8aca20dd49 100644 (file)
@@ -333,8 +333,8 @@ JM::EditSalomeResource::accept()
   resource.nb_node = _nb_node_line->value();
   resource.nb_proc_per_node = _nb_proc_per_node_line->value();
 
-  if (resource.name != "" and
-      resource.hostname != "" and
+  if (resource.name != "" &&
+      resource.hostname != "" &&
       resource.protocol != "")
   {
     _salome_services->addResource(resource);
index 6a874da5470e4a71d9771cbaee3dbdebb9c92c49..e9f276818ce0d53d169cf0f25711246c578d7194 100644 (file)
@@ -46,7 +46,7 @@ libBL_GenericGui_la_CXXFLAGS = $(qt4_cppflags) \
                               -I$(top_srcdir)/src/bases \
                               -I$(top_srcdir)/src/engine \
                               -I$(KERNEL_ROOT_DIR)/include/salome \
-                              $(OMNIORB_INCLUDES) \
+                              $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
                               -I../../idl \
                               -I$(top_srcdir)/src/wrappers
 
index d1518ee8b9ec808e7799337d10d577d40a23fdbe..f107ceb81206870f05f852f6b00917ff24c2a668 100644 (file)
@@ -128,7 +128,7 @@ BL::SalomeGui::onWindowActivated( SUIT_ViewWindow* svw)
 // --- Export the module
 extern "C"
 {
-  CAM_Module* createModule()
+  JOBMANAGER_EXPORT CAM_Module* createModule()
   {
     return new BL::SalomeGui();
   }
index f066f36b9f884b426a3a9d224d2166e02551eeb9..aa24ddc5e9430c9f8b5c22e89ec8c8c85ecce61f 100644 (file)
 #ifndef _BL_SALOMEGUI_HXX_
 #define _BL_SALOMEGUI_HXX_
 
+#ifdef WNT
+#  if defined JOBMANAGER_EXPORTS
+#    define JOBMANAGER_EXPORT __declspec( dllexport )
+#  else
+#    define JOBMANAGER_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define JOBMANAGER_EXPORT
+#endif
+
 #include <SALOMEconfig.h>
 
 #include <SalomeApp_Module.h>
index db042175aebc7583d91f917b042fca7d74cb6e5d..2059ce0d0b59c72eae784caa886587dd34ff0197 100644 (file)
@@ -29,9 +29,9 @@ nodist_libJOBMANAGER_la_SOURCES = $(MOC_FILES)
 
 libJOBMANAGER_la_CXXFLAGS = $(qt4_cppflags) \
                                $(BOOST_CPPFLAGS) \
-                               $(OMNIORB_INCLUDES) \
+                               $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
                                -I$(top_builddir)/idl \
-                           -I. \
+                               -I. \
                                -I$(KERNEL_ROOT_DIR)/include/salome \
                                -I$(GUI_ROOT_DIR)/include/salome \
                                -I$(top_srcdir)/src/genericgui \
@@ -56,13 +56,11 @@ salomeinclude_HEADERS = BL_SalomeGui.hxx \
                        JOBMANAGER_version.h
 
 # resources files
-LIBICONS = jobmanager.png
 ICONS = resources/jobmanager.png
 
 nodist_salomeres_SCRIPTS = resources/SalomeApp.xml
 
 dist_salomeres_DATA = ${ICONS}
-#ICONS = $(LIBICONS:%=resources/%)
 
 # --------------------------------------------
 # *.h --> *_moc.cxx
index a388a991732a016755625d6b7aa10b407f4cbd92..2abec4c72b25c875ab513dc746d216a2669502bc 100644 (file)
@@ -27,7 +27,7 @@ jobmanager_gui_CXXFLAGS = $(qt4_cppflags) \
                              -I$(top_srcdir)/src/bases \
                              -I$(top_srcdir)/src/engine \
                              -I$(KERNEL_ROOT_DIR)/include/salome \
-                               $(OMNIORB_INCLUDES) \
+                               $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
                               -I../../idl \
                              -I$(top_srcdir)/src/wrappers \
                              -I$(top_srcdir)/src/genericgui
index a84e0f0599f4c28ffd775628ec7de11f38b426ea..19a9b68f52bc1f338b44f2c0a8c95bb5465d32ed 100644 (file)
 #ifndef _BL_MAINWINDOWS_QT_HXX_
 #define _BL_MAINWINDOWS_QT_HXX_
 
+#ifdef WNT
+#  if defined BL_Wrappers_Qt_EXPORTS
+#    define BL_Wrappers_Qt_EXPORT __declspec( dllexport )
+#  else
+#    define BL_Wrappers_Qt_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define BL_Wrappers_Qt_EXPORT
+#endif
+
 #include "BL_MainWindows_Wrap.hxx"
 #include <map>
 
 namespace BL
 {
-  class MainWindows_Qt : public MainWindows_Wrap, public QObject
+  class BL_Wrappers_Qt_EXPORT MainWindows_Qt : public MainWindows_Wrap, public QObject
   {
     public:
       MainWindows_Qt(QMainWindow * main_window);
index 32c6f14de73fe9fa0925e43dbf00aff9bd9b7df4..31b7428f5b48cf68f9adb74c80f9c99107735603 100644 (file)
 #ifndef _BL_MAINWINDOWS_SALOME_HXX_
 #define _BL_MAINWINDOWS_SALOME_HXX_
 
+#ifdef WNT
+#  if defined BL_Wrappers_SALOME_EXPORTS
+#    define BL_Wrappers_SALOME_EXPORT __declspec( dllexport )
+#  else
+#    define BL_Wrappers_SALOME_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define BL_Wrappers_SALOME_EXPORT
+#endif
+
 #include "BL_MainWindows_Wrap.hxx"
 
 #include <SalomeApp_Application.h>
@@ -33,7 +43,7 @@
 
 namespace BL
 {
-  class MainWindows_SALOME : virtual public MainWindows_Wrap, 
+  class BL_Wrappers_SALOME_EXPORT MainWindows_SALOME : virtual public MainWindows_Wrap, 
                              virtual public SalomeApp_Module
   {
     public:
index 3f2c9ac786dd64b63d73ef25b075fdd7482df9b7..e741f90b38f423bb0fd9f4878b2d4dc8f84d2951 100644 (file)
@@ -44,11 +44,12 @@ libBL_Wrappers_SALOME_la_SOURCES = BL_MainWindows_Wrap.hxx \
 nodist_libBL_Wrappers_SALOME_la_SOURCES =
 
 libBL_Wrappers_SALOME_la_CXXFLAGS = $(qt4_cppflags) -I$(top_srcdir)/src/bases \
-                                   $(OMNIORB_INCLUDES) $(BOOST_CPPFLAGS) \
+                                   $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) $(BOOST_CPPFLAGS) \
                                    -I$(KERNEL_ROOT_DIR)/include/salome \
                                    -I$(GUI_ROOT_DIR)/include/salome
 
 libBL_Wrappers_SALOME_la_LDFLAGS = $(qt4_ldflags) 
 
-libBL_Wrappers_SALOME_la_LIBADD = -lQtGui -lQtCore $(top_builddir)/src/bases/libBL_Bases.la
+libBL_Wrappers_SALOME_la_LIBADD = -lQtGui -lQtCore $(top_builddir)/src/bases/libBL_Bases.la $(OMNIORB_LIBS) \
+                                 $(KERNEL_LDFLAGS) -lSalomeIDLKernel $(GUI_LDFLAGS) -lLightApp -lSalomeApp -lCAM -lsuit