]> SALOME platform Git repositories - modules/jobmanager.git/commitdiff
Salome HOME
Integrate patches for win32 version V6_3_BR
authorana <ana@opencascade.com>
Tue, 20 Sep 2011 14:36:31 +0000 (14:36 +0000)
committerana <ana@opencascade.com>
Tue, 20 Sep 2011 14:36:31 +0000 (14:36 +0000)
22 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.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..22d877c
--- /dev/null
@@ -0,0 +1,32 @@
+//  Copyright (C) 2009-2010  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 9eee2ae4f7be975f1e540854b17e0c2188c92993..db3ff3a94be6284194e7dbf70cfbab1a86208774 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 37ce93682044acfbcafe4b3fd447c02c95e5e226..190f73f93abd70565f9ecb0bbb2f27a2f7ee01b4 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 7c8eb553ed303587e1f14939793ee3b18a6cac60..a2585c432429a3c29cc367bdffd1f0c95ed05830 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 3254484edf01f47549ed697a1beade8921a8754a..ee615f2b34aa137f0aca5cd952cd2c5deef01b14 100644 (file)
 
 #include "BL_GenericGui.hxx"
 
+#ifdef WNT
+#undef ERROR
+#endif
+
 BL::GenericGui::GenericGui(BL::MainWindows_Wrap * wrapper) : QObject(wrapper->getDockParent())
 {
   DEBTRACE("Creating BL::GenericGui");
@@ -307,7 +311,7 @@ BL::GenericGui::updateButtonsStates()
   DEBTRACE("BL::GenericGui::updateButtonsStates slot");
 
   // First case: no job selected
-  if (_job_name_selected == "" and _row_selected == -1)
+  if (_job_name_selected == "" && _row_selected == -1)
   {
     _start_job_action->setEnabled(false);
     _delete_job_action->setEnabled(false);
@@ -320,7 +324,7 @@ BL::GenericGui::updateButtonsStates()
     _restart_job_action->setEnabled(false);
     _buttons->disable_restart_button();
   }
-  else if (_job_name_selected != "" and _row_selected != -1)
+  else if (_job_name_selected != "" && _row_selected != -1)
   {
     BL::Job * job = _jobs_manager->getJob(_job_name_selected.toStdString());
     BL::Job::State job_state = job->getState();
index c5f246088cc7db973e35b6030935869ae582d226..c28ff51d4da2f1e31666be02fac2a5bb0234c632 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..79f4b14
--- /dev/null
@@ -0,0 +1,32 @@
+//  Copyright (C) 2009-2010  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 765b44307ab0873f8568e136071a75376905da24..c24e46bb2aca850ddafb7bba0b0bb1bdf5934e5d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2011  CEA/DEN, EDF R&D
+//  Copyright (C) 2009-2010  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 f3b0ba05e60e4289c66b7341259194e500c265a0..7b8f12da92d058a783f501181151eb7dfc8af394 100644 (file)
 
 #include "BL_QModelManager.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 b4112daff37e4c062a9f7b59f517badb50f89f7a..529d12559836d460a9a41b702279e3d1dcfd941b 100644 (file)
@@ -127,7 +127,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 edd16ef78a6384de67e7b6ffaccecb34786c0096..f3e40fbb0e9872adca9eef78dfbdce364c808416 100644 (file)
@@ -29,7 +29,7 @@ nodist_libJOBMANAGER_la_SOURCES = $(MOC_FILES)
 
 libJOBMANAGER_la_CXXFLAGS = $(qt4_cppflags) \
                                $(BOOST_CPPFLAGS) \
-                               $(OMNIORB_INCLUDES) \
+                               $(OMNIORB_INCLUDES) $(OMNIORB_CXXFLAGS) \
                                -I../../idl \
                                -I$(KERNEL_ROOT_DIR)/include/salome \
                                -I$(GUI_ROOT_DIR)/include/salome \
@@ -54,9 +54,8 @@ libJOBMANAGER_la_LIBADD  = $(qt4_libs) \
 salomeinclude_HEADERS = BL_SalomeGui.hxx
 
 # resources files
-LIBICONS = SalomeApp.xml jobmanager.png
+ICONS = resources/SalomeApp.xml resources/jobmanager.png
 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 993c9a51c170cb5817d4cad211c53d5b98b25201..44cc2ea4ef13df311b8e0b0c1506aba288549097 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 96a96ee66e2293af04cd5cfa28a413106bd0269e..4b2cfd2f65d7ba8ae9e7f5d28e2028d6d207914e 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