]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #41657: OSCAR UB22.04
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 5 Jul 2024 06:46:16 +0000 (08:46 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Fri, 5 Jul 2024 08:11:45 +0000 (10:11 +0200)
products/GUI.pyconf
products/XDATA.pyconf
products/patches/OSCAR-GUI-V9_12_0.patch [new file with mode: 0644]
products/patches/xdata-9.2.1-python-3.10.patch [new file with mode: 0644]

index 787f8edb50a7c3a658fc723f5f5d7c2489f8c7bd..97fef0e49c3d48ee43479df43983aba943dce2a2 100644 (file)
@@ -270,11 +270,57 @@ version_python_async :
     }
 }
 
+version_OSCAR_GUI_V9_12_0 :
+{
+    name : "GUI"
+    build_source : "cmake"
+    cmake_options : "-DSALOME_ON_DEMAND=OFF -DSALOME_USE_VTKVIEWER=OFF -DSALOME_USE_PVVIEWER=OFF -DSALOME_USE_PV3DVIEWER=OFF"
+    get_source : "git"
+    git_info:
+    {
+      repositories :
+      {
+        tuleap : $PROJECTS.projects.salome.git_info.git_server.tuleap.url + "salome/gui.git"
+        github : $PROJECTS.projects.salome.git_info.git_server.github.url + "gui.git"
+        gitpub : $PROJECTS.projects.salome.git_info.git_server.gitpub.url + "modules/gui.git"
+      }
+    }
+    patches : ['OSCAR-GUI-V9_12_0.patch']
+    environ :
+    {
+        SalomeAppConfig_ : $install_dir + $VARS.sep + "share" + $VARS.sep + "salome" + $VARS.sep + "resources" + $VARS.sep + "gui"
+    }
+    depend : ["KERNEL",
+              "Python",
+              "qt",
+              "sip",
+              "PyQt",
+              "boost",
+              "CAS",
+              "qwt",
+              "hdf5",
+              "freetype",
+              "freeimage",
+              "gl2ps",
+              "omniORB",
+              "docutils",
+              "libxml2"
+              ]
+    build_depend : ["cmake", "swig", "doxygen", "cppunit"]
+    source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name
+    build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
+    properties:
+    {
+        is_SALOME_module : "yes"
+        has_unit_tests
+    }
+}
+
 version_oscar :
 {
     name : "GUI"
     build_source : "cmake"
-    cmake_options : "-DSALOME_USE_VTKVIEWER=OFF -DSALOME_USE_PVVIEWER=OFF"
+    cmake_options : "-DSALOME_ON_DEMAND=OFF -DSALOME_USE_VTKVIEWER=OFF -DSALOME_USE_PVVIEWER=OFF -DSALOME_USE_PV3DVIEWER=OFF"
     get_source : "git"
     git_info:
     {
@@ -287,6 +333,7 @@ version_oscar :
     }
     environ :
     {
+        SalomeAppConfig_ : $install_dir + $VARS.sep + "share" + $VARS.sep + "salome" + $VARS.sep + "resources" + $VARS.sep + "gui"
     }
     depend : ["KERNEL",
               "Python",
index 1f5c0fcf33a5bc3af45214e3bd99f0e2fd35cf28..328932ec85a1208c86400a2b0e0f7ada1bf5384a 100644 (file)
@@ -5,7 +5,10 @@ default :
     get_source : "git"
     git_info:
     {
+      repositories :
+      {
         tuleap : $PROJECTS.projects.salome.git_info.git_server.tuleap.url + "oscar/xdata.git"
+      }
     }
     environ :
     {
@@ -22,6 +25,11 @@ default :
     }
 }
 
+version_V9_2_1_UB22_04 :
+{
+  patches: ['xdata-9.2.1-python-3.10.patch']
+}
+
 version_0_9_11 :
 {
     name : "XDATA"
diff --git a/products/patches/OSCAR-GUI-V9_12_0.patch b/products/patches/OSCAR-GUI-V9_12_0.patch
new file mode 100644 (file)
index 0000000..710ccee
--- /dev/null
@@ -0,0 +1,58 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d487b162d..be4a9687e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -53,7 +53,10 @@ ELSE(EXISTS ${KERNEL_ROOT_DIR})
+ ENDIF(EXISTS ${KERNEL_ROOT_DIR})
+ # Find SalomeBootstrap
+-FIND_PACKAGE(SalomeBootstrap REQUIRED)
++
++IF(SALOME_ON_DEMAND)
++  FIND_PACKAGE(SalomeBootstrap REQUIRED)
++ENDIF(SALOME_ON_DEMAND)
+ # Platform setup
+ # ==============
+diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx
+index 89fb8ec12..6c0eb05be 100644
+--- a/src/LightApp/LightApp_Application.cxx
++++ b/src/LightApp/LightApp_Application.cxx
+@@ -2098,15 +2098,10 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType
+       new LightApp_PV3DSelector( vm, mySelMgr );
+     }
++  }
+ #else
+-    viewMgr = new PV3DViewer_ViewManager( activeStudy(), desktop() );
+-    PV3DViewer_ViewModel* vm = dynamic_cast<PV3DViewer_ViewModel*>( viewMgr->getViewModel() );
+-    if ( vm )
+-    {
+-      // vm->setBackground(...); //NYI
+-    }
++    viewMgr = nullptr;
+ #endif
+-  }
+   if ( !viewMgr )
+     return 0;
+diff --git a/src/Qtx/QtxDockWidget.cxx b/src/Qtx/QtxDockWidget.cxx
+index 9247dca99..a96fe2bfe 100644
+--- a/src/Qtx/QtxDockWidget.cxx
++++ b/src/Qtx/QtxDockWidget.cxx
+@@ -368,9 +368,12 @@ myWatcher( 0 )
+ */
+ QtxDockWidget::~QtxDockWidget()
+ {
+-  myWatcher->setParent(nullptr);
+-  delete myWatcher;
+-  myWatcher = 0;
++  if (myWatcher)
++    {
++      myWatcher->setParent(nullptr);
++      delete myWatcher;
++      myWatcher = 0;
++    }
+ }
+ /*!
diff --git a/products/patches/xdata-9.2.1-python-3.10.patch b/products/patches/xdata-9.2.1-python-3.10.patch
new file mode 100644 (file)
index 0000000..8acba4b
--- /dev/null
@@ -0,0 +1,17 @@
+diff --git a/src/XDATA2SALOME/xdata2salome.py b/src/XDATA2SALOME/xdata2salome.py
+index 581fe85..6a2f039 100644
+--- a/src/XDATA2SALOME/xdata2salome.py
++++ b/src/XDATA2SALOME/xdata2salome.py
+@@ -7,7 +7,11 @@ warning_sep  = '-------------------------------------------------------\n'
+ warning_line = 'WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n'
+ from xdata import *
+-from time import clock
++try:
++    from time import clock
++except:
++    from time import time as clock
++
+ from xutilities import verbose
+ def write(code, filename, component_name):