]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
windows port
authoradam <adam>
Fri, 18 Sep 2009 13:17:15 +0000 (13:17 +0000)
committeradam <adam>
Fri, 18 Sep 2009 13:17:15 +0000 (13:17 +0000)
src/GUI/BLSURFPluginGUI.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.h
src/GUI/Makefile.am
src/PluginUtils/GeomSelectionTools.h
src/PluginUtils/Makefile.am

index 9414ad1a8aeaa69510ad2a74c8a9029519034c16..1ecc755c56d41ea6c6948dc6a4e589f07742ac65 100755 (executable)
 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA)
 // ---
 //
+#ifdef WNT
+// E.A. : On windows with python 2.6, there is a conflict
+// E.A. : between pymath.h and Standard_math.h which define
+// E.A. : some same symbols : acosh, asinh, ...
+#include <Standard_math.hxx>
+#include <pymath.h>
+#endif
+
 #include "BLSURFPluginGUI_HypothesisCreator.h"
 
 //=============================================================================
index dfaf627bbf3a8ef9af50452d685f80e0f0435f16..c86ce905c2c1ce166b2aea2324b25559f96e37bd 100644 (file)
@@ -233,7 +233,7 @@ BLSURFPluginGUI_HypothesisCreator::BLSURFPluginGUI_HypothesisCreator( const QStr
   aSel = GeomToolSelected->selectionMgr();
 
   /* Initialize the Python interpreter */
-  if (not Py_IsInitialized())
+  if (! Py_IsInitialized())
     throw ("Error: Python interpreter is not initialized");
   PyGILState_STATE gstate;
   gstate = PyGILState_Ensure();
@@ -262,7 +262,7 @@ GeomSelectionTools* BLSURFPluginGUI_HypothesisCreator::getGeomSelectionTool()
   BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
   _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
   MESSAGE("aStudy->StudyId(): " << aStudy->StudyId());
-  if (that->GeomToolSelected == NULL or that->GeomToolSelected->getMyStudy() != aStudy) {
+  if (that->GeomToolSelected == NULL || that->GeomToolSelected->getMyStudy() != aStudy) {
     MESSAGE("GeomToolSelected is created");
     that->GeomToolSelected = new GeomSelectionTools(aStudy);
   }
@@ -1108,16 +1108,16 @@ void BLSURFPluginGUI_HypothesisCreator::onSetSizeMap(int row,int col)
     QString entry   = that->mySizeMapTable->item(row, SMP_ENTRY_COLUMN)->text();
     QString sizeMap = that->mySizeMapTable->item(row, SMP_SIZEMAP_COLUMN)->text().trimmed();
     MESSAGE("entry: " << entry.toStdString() << ", sizeMap: " << sizeMap.toStdString());
-    if (not that->mySMPShapeTypeMap.contains(entry))
+    if (! that->mySMPShapeTypeMap.contains(entry))
       return;
     if (that->mySMPMap.contains(entry))
       if (that->mySMPMap[entry] == sizeMap)
         return;
     QColor* bgColor = new QColor("white");
     QColor* fgColor = new QColor("black");
-    if (not sizeMap.isEmpty()) {
+    if (! sizeMap.isEmpty()) {
       that->mySMPMap[entry] = sizeMap;
-      if (not sizeMapValidationFromRow(row)) {
+      if (! sizeMapValidationFromRow(row)) {
         bgColor->setRgb(255,0,0);
         fgColor->setRgb(255,255,255);
       }
@@ -1220,7 +1220,7 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapsValidation()
   MESSAGE("BLSURFPluginGUI_HypothesisCreator::sizeMapsValidation()");
   int row = 0, nbRows = mySizeMapTable->rowCount();
   for ( ; row < nbRows; ++row )
-    if (not sizeMapValidationFromRow(row))
+    if (! sizeMapValidationFromRow(row))
       return false;
   return true;
 }
@@ -1240,11 +1240,11 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEnt
 
   BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
 
-  if (not that->mySMPMap.contains(myEntry)) {
+  if (! that->mySMPMap.contains(myEntry)) {
     MESSAGE("Geometry with entry "<<myEntry.toStdString()<<" was not found.");
     return false;
   }
-  if (not that->mySMPShapeTypeMap.contains(myEntry)) {
+  if (! that->mySMPShapeTypeMap.contains(myEntry)) {
     MESSAGE("Shape type with entry "<<myEntry.toStdString()<<" was not found.");
     return false;
   }
@@ -1258,9 +1258,9 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEnt
   else if (that->mySMPMap[myEntry].startsWith("ATTRACTOR")) {
     MESSAGE("Attractor" );
 //    if ((that->mySMPMap[myEntry].count(QRegExp("ATTRACTOR([0-9])")) != 1))
-    if ((that->mySMPMap[myEntry].count('(') != 1) or
-        (that->mySMPMap[myEntry].count(')') != 1) or
-        (that->mySMPMap[myEntry].count(';') != 4) or
+    if ((that->mySMPMap[myEntry].count('(') != 1) ||
+        (that->mySMPMap[myEntry].count(')') != 1) ||
+        (that->mySMPMap[myEntry].count(';') != 4) ||
         (that->mySMPMap[myEntry].size() == 15)){
       if (displayError)
         SUIT_MessageBox::warning( dlg(),"Definition of attractor : Error" ,"An attractor is defined with the following pattern: ATTRACTOR(xa;ya;za;a;b)" );
@@ -1284,7 +1284,7 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEnt
       expr = "def f() : return " + that->mySMPMap[myEntry].toStdString();
   }
   //assert(Py_IsInitialized());
-  if (not Py_IsInitialized())
+  if (! Py_IsInitialized())
     throw ("Erreur: Python interpreter is not initialized");
   PyGILState_STATE gstate;
   gstate = PyGILState_Ensure();
index db48e08e2fab018cff1f14197d3c02b8240680c1..b66f74f169d57d90167651cfab2c2f7871704204 100644 (file)
@@ -27,7 +27,7 @@
 #define BLSURFPLUGINGUI_HypothesisCreator_H
 
 #ifdef WIN32
-  #ifdef BLSURFPLUGIN_GUI_EXPORTS
+  #if defined BLSURFPLUGIN_GUI_EXPORTS || defined BLSURFPluginGUI_EXPORTS
     #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllexport )
   #else
     #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllimport )
   #define BLSURFPLUGIN_GUI_EXPORT
 #endif
 
+#ifdef WNT
+// E.A. : On windows with python 2.6, there is a conflict
+// E.A. : between pymath.h and Standard_math.h which define
+// E.A. : some same symbols : acosh, asinh, ...
+#include <Standard_math.hxx>
+#include <pymath.h>
+#endif
+
 #include <Python.h>
 #include <SMESHGUI_Hypotheses.h>
 #include <SALOMEconfig.h>
index 28c611f08d9e14cc4510448f738522f6a8fb29c5..c2d5b2ec4686fffd0f7d2db7db322f11885d841c 100644 (file)
@@ -62,6 +62,7 @@ libBLSURFPluginGUI_la_CPPFLAGS =      \
 libBLSURFPluginGUI_la_LDFLAGS =                        \
        ../BLSURFPlugin/libBLSURFEngine.la      \
        ../PluginUtils/libGeomSelectionTools.la \
+       $(GUI_LDFLAGS) -lqtx -lSalomeApp \
        ${SMESH_LDFLAGS} -lSMESH                \
        $(CAS_KERNEL) $(BLSURF_LIBS)
 
index 8abdf3c0b265b7505a86d6e3ebe1721413ef5b26..85c312d79269509c97efb22f5bb65588b431fc4a 100644 (file)
 #ifndef _GEOMSELECTIONTOOLS_H_
 #define _GEOMSELECTIONTOOLS_H_
 
+#ifdef WIN32
+#  ifdef GeomSelectionTools_EXPORTS
+#    define GEOMSELECTIONTOOLS_EXPORT __declspec( dllexport )
+#  else
+#    define GEOMSELECTIONTOOLS_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define GEOMSELECTIONTOOLS_EXPORT
+#endif
+
 #include "SALOMEDSClient.hxx"
 #include "SALOME_InteractiveObject.hxx"
 #include <SALOME_ListIO.hxx>
@@ -41,7 +51,7 @@ class LightApp_SelectionMgr;
  *
  */
 
-class GeomSelectionTools
+class GEOMSELECTIONTOOLS_EXPORT GeomSelectionTools
 {
 
 private:
@@ -67,4 +77,4 @@ public:
 };
 
 
-#endif // _GEOMSELECTIONTOOLS_H_
\ No newline at end of file
+#endif // _GEOMSELECTIONTOOLS_H_
index 2ba0d1231af049ff90e5b7de11b48833de5e8f2f..7b35669bac818f526fd58e49d0637a301d385857 100644 (file)
@@ -50,8 +50,13 @@ libGeomSelectionTools_la_CPPFLAGS =  \
        -I$(top_builddir)/idl
 
 libGeomSelectionTools_la_LDFLAGS =             \
+       $(QT_LIBS) \
+       $(CORBA_LIBS) \
+       $(KERNEL_LDFLAGS) -lSalomeIDLKernel -lSALOMELocalTrace -lSalomeLifeCycleCORBA \
+       $(GUI_LDFLAGS) -lSalomeObject -lsuit -lLightApp -lSalomeApp \
+       $(GEOM_LDFLAGS) -lSalomeIDLGEOM -lGEOMClient \
        ${SMESH_LDFLAGS} -lSMESH                \
-       $(CAS_KERNEL) 
+       $(CAS_KERNEL) -lTKBRep -lTKG3d
 
 # resources files
 #nodist_salomeres_DATA =               \