]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Merge from V6_6_BR (V6_6_0rc2) 11/12/2012
authorvsr <vsr@opencascade.com>
Tue, 11 Dec 2012 11:39:10 +0000 (11:39 +0000)
committervsr <vsr@opencascade.com>
Tue, 11 Dec 2012 11:39:10 +0000 (11:39 +0000)
14 files changed:
CMakeLists.txt
bin/killSalomeWithPort.py
bin/salome_utils.py
bin/setenv.py
bin/shutdownSalome.py
configure.ac
doc/docutils/CMakeLists.txt
doc/salome/gui/CMakeLists.txt
doc/salome/tui/CMakeLists.txt
salome_adm/cmake_files/FindPLATFORM.cmake
salome_adm/cmake_files/am2cmake.py
salome_adm/unix/config_files/check_cas.m4
src/Container/SALOME_ContainerManager.cxx
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx

index 80dd89acfa801310a3e62665fadbfd98eb81352e..61bf57ba7dfaeddc0467c70ea2c19d25f395fe38 100755 (executable)
@@ -37,7 +37,7 @@ SET(WITH_LOCAL 1)
 SET(WITH_BATCH 1)
 
 ENABLE_TESTING()
-SET(VERSION "6.5.0")
+SET(VERSION "6.6.0")
 SET(VERSION_DEV "1")
 
 INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
index 705c8e3ca8e87cc6b2cfe0bce780011619b20f0d..c6c128b234aca035c1ac4104a1e6a2441fca083f 100755 (executable)
@@ -137,7 +137,7 @@ def appliCleanOmniOrbConfig(port):
 
 ########## kills all salome processes with the given port ##########
 
-def shutdownMyPort(port):
+def shutdownMyPort(port, cleanup=True):
     """
     Shutdown SALOME session running on the specified port.
     Parameters:
@@ -162,18 +162,25 @@ def shutdownMyPort(port):
                                       with_port=port,
                                       **kwargs)
     os.environ['OMNIORB_CONFIG'] = omniorb_config
+    os.environ['NSPORT'] = str(port)
 
     # give the chance to the servers to shutdown properly
     try:
         import time
-        import salome_kernel
-        orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init()
+        from omniORB import CORBA
+        from LifeCycleCORBA import LifeCycleCORBA
         # shutdown all
+        orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+        lcc = LifeCycleCORBA(orb)
         lcc.shutdownServers()
         # give some time to shutdown to complete
         time.sleep(1)
         # shutdown omniNames and notifd
-        salome_kernel.LifeCycleCORBA.killOmniNames()
+        if cleanup:
+            lcc.killOmniNames()
+            time.sleep(1)
+            pass
+        pass
     except:
         pass
     pass
@@ -188,7 +195,7 @@ def killMyPort(port):
 
     # try to shutdown session nomally
     import threading, time
-    threading.Thread(target=shutdownMyPort, args=(port,)).start()
+    threading.Thread(target=shutdownMyPort, args=(port,False)).start()
     time.sleep(3) # wait a little, then kill processes (should be done if shutdown procedure hangs up)
 
     # new-style dot-prefixed pidict file
@@ -355,10 +362,19 @@ def killMyPortSpy(pid, port):
     return
 
 if __name__ == "__main__":
+    if len(sys.argv) < 2:
+        print "Usage: "
+        print "  %s <port>" % os.path.basename(sys.argv[0])
+        print
+        print "Kills SALOME session running on specified <port>."
+        sys.exit(1)
+        pass
     if sys.argv[1] == "--spy":
-        pid = sys.argv[2]
-        port = sys.argv[3]
-        killMyPortSpy(pid, port)
+        if len(sys.argv) > 3:
+            pid = sys.argv[2]
+            port = sys.argv[3]
+            killMyPortSpy(pid, port)
+            pass
         sys.exit(0)
         pass
     for port in sys.argv[1:]:
index 95e87f42cfdbc871f708f0014f1320c4abf10384..295b05d24db391172e8c3586a57d3b8de9a6a9e5 100644 (file)
@@ -194,8 +194,11 @@ def getPortNumber(use_default=True):
         return int( os.getenv( "NSPORT" ) )
     except:
         pass
-    port = getPortFromORBcfg()
-    if port is not None: return port
+    try:
+        port = int( getPortFromORBcfg() )
+        if port is not None: return port
+    except:
+        pass
     if use_default: return 2809 # '2809' is default port number
     return None
 
index 44ac6dbe7e83fba3630e7db15f6dc34cb579cb27..46bc337bed9a9ddb795f5c9a42a2a77713eee993 100755 (executable)
@@ -172,7 +172,8 @@ def set_env(args, modules_list, modules_root_dir, silent=False):
     for module in modules_list :
         if modules_root_dir.has_key(module):
             module_root_dir = modules_root_dir[module]
-            modules_root_dir_list[:0] = [module_root_dir]
+            if module_root_dir not in modules_root_dir_list:
+              modules_root_dir_list[:0] = [module_root_dir]
             if sys.platform == "win32":
               add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
                      "PATH")
index b7d319696acc7f3926d1cb1e033554689291eb03..ed81e00e83660501e57db3f2e755fc55fc54470e 100755 (executable)
 #
 
 import time
-import salome_kernel
-orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init()
+from omniORB import CORBA
+from LifeCycleCORBA import *
+
+orb = CORBA.ORB_init([''], CORBA.ORB_ID)
+lcc = LifeCycleCORBA(orb)
 lcc.shutdownServers()
-#give some time to shutdown to complete
 time.sleep(1)
-salome_kernel.LifeCycleCORBA.killOmniNames()
+LifeCycleCORBA.killOmniNames()
+time.sleep(1)
index e8d2e1458140314c0460e41efb0b70c0e0aa9dab..65af95169d205075b99a4856ee392d681898c428 100644 (file)
@@ -25,7 +25,7 @@
 # ================================================================
 #AC_PREREQ(2.59)
 #
-AC_INIT([Salome2 Project], [6.5.0], [paul.rascle@edf.fr], [SalomeKERNEL])
+AC_INIT([Salome2 Project], [6.6.0], [paul.rascle@edf.fr], [SalomeKERNEL])
 
 # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
 # scripts such as config.guess, install-sh, ...
index 652bf863b2cea1507a532292db3fe9f8f8841109..71b6d67fbc1bcef09e024ee7338b714b1a3e724c 100755 (executable)
@@ -1,66 +1,66 @@
-# Copyright (C) 2012  CEA/DEN, EDF R&D, OPEN CASCADE\r
-#\r
-# This library is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 2.1 of the License.\r
-#\r
-# This library is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with this library; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
-#\r
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-#\r
-\r
-SET(SPHINXOPTS\r
-)\r
-SET(SOURCEDIR\r
-  ${CMAKE_CURRENT_SOURCE_DIR}\r
-)\r
-SET(PAPEROPT_a4\r
-  -D\r
-  latex_paper_size=a4\r
-)\r
-SET(ALLSPHINXOPTS\r
-  -d\r
-  doctrees\r
-  ${PAPEROPT_a4}\r
-  ${SPHINXOPTS}\r
-  ${SOURCEDIR}\r
-)\r
-\r
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_BINARY_DIR}/conf.py")                \r
-\r
-IF(WINDOWS)\r
-  STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=%KERNEL_ROOT_DIR%/lib/python2.6/site-packages/salome\;%PYTHONPATH%\r
-  @SET PYTHONPATH=%KERNEL_ROOT_DIR%/bin/salome\;%PYTHONPATH%\r
-  @SET PATH=%KERNEL_ROOT_DIR%/lib/salome\;%PATH%\r
-  @SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH%\r
-  @SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python\;%PYTHONPATH%\r
-  @SET PATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PATH%\r
-  ")\r
-  SET(EXT "bat")\r
-  SET(CALL_STR "call")\r
-ELSE(WINDOWS)\r
-  SET(SCR "export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/python2.6/site-packages/salome:\${PYTHONPATH}\r
-  export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PYTHONPATH}\r
-  export LD_LIBRARY_PATH=\${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}\r
-  export PYTHONPATH=\${OMNIORB_ROOT_USER}/omniORB-4.1.5/lib:\${PYTHONPATH}\r
-  export PYTHONPATH=\${OMNIORB_ROOT_USER}/omniORB-4.1.5/lib/python2.6/site-packages:\${PYTHONPATH}\r
-  export LD_LIBRARY_PATH=\${INST_ROOT}/omniORB-4.1.5/lib:\${LD_LIBRARY_PATH}\r
-  ")\r
-  SET(EXT "sh")\r
-  SET(CALL_STR ".")\r
-ENDIF(WINDOWS)\r
-\r
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")\r
-\r
-ADD_CUSTOM_TARGET(html_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} && ${SPHINX_EXECUTABLE} -Q -c ${CMAKE_BINARY_DIR}/doc/docutils -W -b html ${ALLSPHINXOPTS} html\r
-  COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''')\"\r
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}\r
-)\r
+# Copyright (C) 2012  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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
+#
+
+SET(SPHINXOPTS
+)
+SET(SOURCEDIR
+  ${CMAKE_CURRENT_SOURCE_DIR}
+)
+SET(PAPEROPT_a4
+  -D
+  latex_paper_size=a4
+)
+SET(ALLSPHINXOPTS
+  -d
+  doctrees
+  ${PAPEROPT_a4}
+  ${SPHINXOPTS}
+  ${SOURCEDIR}
+)
+
+SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_BINARY_DIR}/conf.py")                
+
+IF(WINDOWS)
+  STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\python2.6\\site-packages\\salome\;%PYTHONPATH%
+  @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
+  @SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
+  @SET PYTHONPATH=${OMNIORB_ROOT_USER}\\lib\\x86_win32\;%PYTHONPATH%
+  @SET PYTHONPATH=${OMNIORB_ROOT_USER}\\lib\\python\;%PYTHONPATH%
+  @SET PATH=${OMNIORB_ROOT_USER}\\lib\\x86_win32\;%PATH%
+  ")
+  SET(EXT "bat")
+  SET(CALL_STR "call")
+ELSE(WINDOWS)
+  SET(SCR "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python2.6/site-packages/salome:\${PYTHONPATH}
+  export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
+  export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
+  export PYTHONPATH=${OMNIORB_ROOT_USER}/lib:\${PYTHONPATH}
+  export PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python2.6/site-packages:\${PYTHONPATH}
+  export LD_LIBRARY_PATH=${OMNIORB_ROOT_USER}/lib:\${LD_LIBRARY_PATH}
+  ")
+  SET(EXT "sh")
+  SET(CALL_STR ".")
+ENDIF(WINDOWS)
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
+
+ADD_CUSTOM_TARGET(html_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} && ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html
+  COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''')\"
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)
index 0d0992e3868233e6e30a8889a30633cbe84a3eeb..8bd8df903d5cacc2748f55af31da0d859c8063cf 100755 (executable)
@@ -32,4 +32,4 @@ ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE}
  VERBATIM 
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
-
+ADD_DEPENDENCIES(usr_docs html_docs)
index ae05910b6b916b49f4fc623ade6d5a89a358054a..51ce739b329929a71dfd5a467755f4a21e6fc00d 100755 (executable)
@@ -25,7 +25,7 @@ SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
 SET(docdir ${datadir}/doc/salome)
 
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html)
 
 ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
   COMMAND ${DOXYGEN_EXECUTABLE}
index 9266320ac7d263f49e2d8f0b97d9cf0ef35711af..fa06d0ec3b343041ebc5b6d59611342819d5a6e6 100644 (file)
@@ -107,6 +107,10 @@ IF(WINDOWS)
   SET(PLATFORM_LIBS ${PLATFORM_LIBS} Ws2_32.lib)
   SET(PLATFORM_LIBS ${PLATFORM_LIBS} Userenv.lib) # At least for GEOM suit
 
+  IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")          # if platform is Windows 64 bit 
+    SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators  # to be removed
+    SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators 
+  ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
 ELSE(WINDOWS)
   # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses)
   # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type)
@@ -117,8 +121,13 @@ ELSE(WINDOWS)
   SET(PLATFORM_LIBS ${PLATFORM_LIBS} -ldl)
 ENDIF(WINDOWS)
 
-SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4") # to be removed
-SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4")
+SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P})            # set sizeof(long) the same as size of pointers, because on all memory models (EXCLUDING WINDOWS 64 bit) it is equivalent values
+IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8"  AND WINDOWS) # if it platform Windows 64 bit
+  SET(SIZE_OF_LONG "4")                             # set sizeof(long) to 4 byte
+ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8"  AND WINDOWS)
+
+SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4") # to be removed
+SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4")
 
 SET(COMPILATION_WITH_CMAKE ON)
 
index 3a1a89a76419cf47bd3166a765c7922674b0fac2..a20dd27e5e5b7d6dd762e4c41d577bb079df10ee 100644 (file)
@@ -619,7 +619,7 @@ class CMakeFile(object):
                             INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
                             INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
                             INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
-                            INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindBLSURF.cmake)
+                            INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCADSURF.cmake)
                             """)
                             pass
                         if self.module in ["ghs3dplugin", "hexoticplugin"]:
@@ -656,6 +656,11 @@ class CMakeFile(object):
                             INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
                             """)
                             pass
+                        if self.module == "jobmanager":
+                            newlines.append("""
+                            INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
+                            """)
+                            pass
                         if self.module == "hxx2salome":
                             newlines.append("""
                             SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
@@ -797,9 +802,9 @@ class CMakeFile(object):
                 pass
             # --
             newlines.append("""
-            set(VERSION 6.5.0)
-            set(SHORT_VERSION 6.5)
-            set(XVERSION 0x060500)
+            set(VERSION 6.6.0)
+            set(SHORT_VERSION 6.6)
+            set(XVERSION 0x060600)
             set(VERSION_DEV 1)
             """)
             pass
@@ -1114,7 +1119,7 @@ class CMakeFile(object):
             )
             ''')
             self.files.append("static/header.html.in")
-        elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui':
+        elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' or operator.contains(self.root, 'doc') and mod in ['pyhello']:
             newlines.append(r'''
             SET(top_builddir
                 ${CMAKE_BINARY_DIR}
@@ -1135,7 +1140,8 @@ class CMakeFile(object):
                 ${datadir}/doc/salome
             )
             ''')
-            self.files.append("static/header.html.in")
+            if mod not in ['blsurfplugin']:
+                self.files.append("static/header.html.in")
             if mod in ['geom', 'smesh', 'visu','netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin',"ghs3dprlplugin"] and self.root[-len(mod):] == upmod:
               self.files.append("static/header_py.html.in")
      
@@ -1214,7 +1220,7 @@ class CMakeFile(object):
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
             )"""%(input, doc_gui_destination, doc_source, doc_gui_destination, head_source, doc_gui_destination))
         from os import path
-        if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc'):
+        if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin','pyhello'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc')  or  mod in ['pyhello'] and operator.contains(self.root, 'doc'):
             ign = r"""'*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*'"""
             if mod in ['geom', 'smesh']:
                 if mod == 'geom':
@@ -1237,19 +1243,20 @@ class CMakeFile(object):
                 VERBATIM 
                 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
                 )"""%(prepare_generating_doc_src, prepare_generating_doc_src, tmp, upmod, tmp, tmp, input, tmp, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
+                newlines.append(r"""ADD_DEPENDENCIES(usr_docs html_docs)""")
             else:
                 config_f = ""
                if mod in ['netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin', "ghs3dprlplugin"] :
-                    config_f = "doxyfile_py"
-                else:
-                    config_f = "doxyfile_idl"
-                newlines.append("""\t    ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} %s
+                    config_f = "${DOXYGEN_EXECUTABLE} doxyfile_py"
+                elif mod not in ['pyhello']:
+                    config_f = "${DOXYGEN_EXECUTABLE} doxyfile_idl"
+                newlines.append("""\t    ADD_CUSTOM_TARGET(usr_docs %s
                 COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
                 COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')"
                 VERBATIM 
                 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                 )"""%(config_f, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
-        elif mod == 'yacs' and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'):
+        elif mod in ['yacs', 'jobmanager'] and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'):
             from sys import platform
             params = '';
             if platform == "win32":
@@ -1267,21 +1274,19 @@ class CMakeFile(object):
                 params = '-Q';
                 ext = "bat"
                 prf = "call"
+                cmd = "STRING(REPLACE \"/\" \"\\\\\" SCR"
             else:
                 ext = "sh"
                 prf = ". "
+                cmd = "SET(SCR"
             doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/%s/docutils"%(upmod)
             scr = self.writeEnvScript(upmod)                   
             newlines.append(r"""
-            IF(WINDOWS)
-               STRING(REPLACE "/" "\\" SCR "%s")
-           ELSE(WINDOWS)
-               SET(SCR "%s")
-            ENDIF(WINDOWS)
+            %s "%s")
             FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s "${SCR}")
-            ADD_CUSTOM_TARGET(html_docs %s ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s && ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc/docutils -W -b html ${ALLSPHINXOPTS} html
+            ADD_CUSTOM_TARGET(html_docs %s ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s && ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html
             COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''%s''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''%s''')\"
-            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(scr,scr,ext,prf,ext,params, doc_gui_destination, doc_gui_destination))
+            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(cmd, scr, ext, prf, ext, params, doc_gui_destination, doc_gui_destination))
 
 
 
@@ -1291,7 +1296,7 @@ class CMakeFile(object):
   # --
   
         upmod = self.module.upper()
-        if mod in ['kernel', 'gui', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui':
+        if mod in ['kernel', 'gui', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui':
             if mod == 'kernel':
                 tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
             COMMAND ${DOXYGEN_EXECUTABLE}
@@ -1302,14 +1307,15 @@ class CMakeFile(object):
                 if mod == 'visu':
                     tmp1= r"""\n           COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/visuscreen.png''', r'''%s''')" """%(doc_tui_destination)
                 elif mod == 'smesh':
-                    extra_srcdir = "${CMAKE_CURRENT_SOURCE_DIR}/extra"
-                    tmp1= """\n            COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s'''); copy(r'''%s/AddNetgenInSalome2.pdf''', r'''%s'''); copy(r'''%s/PluginMeshers.html''', r'''%s''')" 
-            COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''%s/AddNetgenInSalome2.ps''', r'''%s'''); copy(r'''%s/AddNetgenInSalome2.sxw''', r'''%s''')" """%(doc_tui_destination, extra_srcdir,doc_destination, extra_srcdir,doc_destination, extra_srcdir,doc_destination,extra_srcdir,doc_destination)
+                    tmp1= """\n            COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s''')" """%(doc_tui_destination)
                 else:
                     tmp1=""
             doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod)
+            inst_head_command=""
+            if mod not in ['blsurfplugin']:
+                inst_head_command = "; shutil.copy(r'''%s''', r'''%s''')"%(head_source, doc_tui_destination)
             newlines.append(tmp + """
-            COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s''')" """%(doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination) + tmp1 + """
+            COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s''')%s" """%(doc_tui_destination, doc_source, doc_tui_destination, inst_head_command) + tmp1 + """
             VERBATIM 
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
             )""")
@@ -2444,70 +2450,61 @@ class CMakeFile(object):
         f.close()
         return
 
-    def writeEnvScript(self, upmod):
-        from sys import platform, version_info
-        p_version = """%s.%s"""%(version_info[0],version_info[1])
-        python_path ="PYTHONPATH"
-        path = ""
-        begin = ""
-        end = ""
-        delim = ""
-        cmd = ""
-        pdir = ""
-        omni = ""
-       omni_py = ""
-        if platform == "win32" :               
-            path = "PATH"
-            begin = "%"
-            end = "%"
-            delim = ";"
-            cmd = "@SET "
-            omni = "/x86_win32"
-            omni_py = "/python"
-            pdir = "PDIR"
+    def writeEnvScript(self, upmod, buildmod=True):
+        import os, sys
+        p_version = sys.version[:3]
+        python_path = "PYTHONPATH"
+        root_dir    = "%s_ROOT_DIR" % upmod
+        if sys.platform == "win32":
+            script_line = '@SET %(var)s=%(val)s;%%%(var)s%%\n'
+            var_line    = '%%%s%%'
+            lib_path = "PATH"
+            omni = "x86_win32"
+            omni_py = "python"
+            pass
         else:
-            path = "LD_LIBRARY_PATH"
-            begin = "\${"
-            end = "}"
-            delim = ":"
-            cmd = "export "
-            omni_py = "/python" + p_version + "/" + "site-packages"
-            pdir = "INST_ROOT"
-
-            
-        path_ = begin + path + end
-        root_dir_ = begin + upmod + "_ROOT_DIR" + end  
-        python_path_ = begin + python_path + end
-        _python_path_ = delim + python_path_+ "\n"
-        _path_ = delim + path_+ "\n" 
-        _pdir = begin + pdir + end 
-           
-        
-        script = cmd + " " + python_path + "=" + root_dir_+"/lib/python" + p_version \
-        + "/site-packages/salome" + _python_path_ 
-        
-        script = script + cmd + " " + python_path + "=" + root_dir_+"/bin/salome" + \
-        _python_path_
-
-        script = script + cmd + " "+ path + "=" + root_dir_+"/lib/salome"+ _path_
-
+            script_line = 'export %(var)s=%(val)s:\$%(var)s\n'
+            var_line    = '\${%s}'
+            lib_path = "LD_LIBRARY_PATH"
+            omni = ""
+            omni_py = "/".join( ["python%s"%p_version , "site-packages"] )
+            pass
+        #
+        script = ""
+        #
+        if buildmod:
+            script += script_line % { 'var':python_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "lib", "python%s"%p_version, "site-packages", "salome"] ) }
+            script += script_line % { 'var':python_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "bin", "salome"] ) }
+            script += script_line % { 'var':lib_path,    'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "lib", "salome"] ) }
+            pass
+        else:
+            script += script_line % { 'var':python_path, 'val':"/".join( [var_line % root_dir, "lib", "python%s"%p_version, "site-packages", "salome"] ) }
+            script += script_line % { 'var':python_path, 'val':"/".join( [var_line % root_dir, "bin", "salome"] ) }
+            script += script_line % { 'var':lib_path,    'val':"/".join( [var_line % root_dir, "lib", "salome"] ) }
+            pass
+        #
        if upmod == "KERNEL" :
-            script = script + cmd + " " +  python_path + "=" + _pdir + \
-            "/omniORB-4.1.5/lib" + omni + _python_path_
-        
-            script = script + cmd + " " + python_path + "=" + _pdir + \
-            "/omniORB-4.1.5/lib" + omni_py + _python_path_
-        
-            script = script + cmd + " "+ path + "=" + _pdir+ "/omniORB-4.1.5/lib" + \
-            omni + _path_
-
+            script += "\n"
+            if omni:
+                script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni] ) }
+                script += script_line % { 'var':lib_path,    'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni] ) }
+                pass
+            else:
+                script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib"] ) }
+                script += script_line % { 'var':lib_path,    'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib"] ) }
+                pass
+            script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni_py] ) }
+            pass
+        #
         if upmod == "GEOM" :
-            script = self.writeEnvScript("KERNEL") + script
-            script = self.writeEnvScript("GUI") + script
-
+            script = self.writeEnvScript("KERNEL", False) + "\n" + script
+            script = self.writeEnvScript("GUI",    False) + "\n" + script
+            pass
+        #
         if upmod == "SMESH" :
-            script = self.writeEnvScript("GEOM") + script
-
+            script = self.writeEnvScript("GEOM", False) + "\n" + script
+            pass
+        
         return script    
     pass
 
index 7646fd377d561ac27ae894d1df570b6303d9f0ae..98fa0bc5d4f92346edaf6279dd8f334d66d71b38 100644 (file)
@@ -240,11 +240,11 @@ else
   CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema"
   CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema"
 
-  if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then
+  if test -f ${CAS_LIBDIR}/libStdPlugin.so ; then
     # standard plugin library libStdPlugin has been added in CASCADE 5.2.3
     CAS_STDPLUGIN="StdPlugin"
     CAS_OCAFVIS="$CAS_OCAFVIS -lStdPlugin -lStdLPlugin"
-  elif test -f $CASROOT/$casdir/lib/libTKStdSchema.so ; then
+  elif test -f ${CAS_LIBDIR}/libTKStdSchema.so ; then
     # standard plugin has been renamed in CASCADE 6.5
     CAS_STDPLUGIN=TKStdSchema
     CAS_OCAFVIS="$CAS_OCAFVIS -lTKStdSchema -lTKStdLSchema"
index a513af413c8cd3e596b4054ab29a951dfac8b221..3a6cebdf786e5d30a2066f21041844c147752644 100644 (file)
@@ -36,6 +36,9 @@
 #include <sstream>
 #include <string>
 
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(SALOME_Session)
+
 #ifdef WNT
 #include <process.h>
 #define getpid _getpid
@@ -187,6 +190,17 @@ void SALOME_ContainerManager::Shutdown()
 void SALOME_ContainerManager::ShutdownContainers()
 {
   MESSAGE("ShutdownContainers");
+
+  SALOME::Session_var session = SALOME::Session::_nil();
+  CORBA::Long pid = 0;
+  CORBA::Object_var objS = _NS->Resolve("/Kernel/Session");
+  if (!CORBA::is_nil(objS))
+  {
+    session = SALOME::Session::_narrow(objS);
+    if (!CORBA::is_nil(session))
+      pid = session->getPID();
+  }
+
   bool isOK;
   isOK = _NS->Change_Directory("/Containers");
   if( isOK ){
@@ -199,7 +213,7 @@ void SALOME_ContainerManager::ShutdownContainers()
         try
           {
             Engines::Container_var cont=Engines::Container::_narrow(obj);
-            if(!CORBA::is_nil(cont))
+            if(!CORBA::is_nil(cont) && pid != cont->getPID())
               lstCont.push_back((*iter));
           }
         catch(const CORBA::Exception& e)
index 2afca3b7f4efe1a69ded3a74b3be8f59e249f54f..afd7e6f6315a921882ed94678b39af9c6d247922 100644 (file)
@@ -550,6 +550,7 @@ void SALOME_LifeCycleCORBA::shutdownServers()
     if (!CORBA::is_nil(session))
     {
       pid = session->getPID();
+      session->Shutdown();
     }
   }
 
@@ -644,6 +645,7 @@ void SALOME_LifeCycleCORBA::shutdownServers()
        // ignore and continue
     }
 
+  /*
   // 6) Session
   if ( !CORBA::is_nil( session ) ) {
     try
@@ -655,6 +657,7 @@ void SALOME_LifeCycleCORBA::shutdownServers()
       // ignore and continue
     }
   }
+  */
 
   // 7) Logger
   int argc = 0;