From 66ab0b6e86c8e1a62d95e0b45d2798c1b4734cbf Mon Sep 17 00:00:00 2001 From: prascle Date: Mon, 6 Mar 2006 14:01:04 +0000 Subject: [PATCH] PR: merge from branch BR_V3_1_0_CCRT tag mergeto_BR_auto_V310_06mar06 --- bin/appliskel/killCurrentPort | 5 +- bin/appliskel/runAppli | 2 +- bin/appliskel/runConsole | 2 +- bin/appliskel/runParam | 2 +- bin/appliskel/runRemote.sh | 13 ++- bin/appliskel/runSession | 15 +-- bin/appliskel/runTests | 15 +-- bin/appliskel/searchFreePort.sh | 14 ++- bin/appliskel/setAppliPath.sh | 2 +- bin/killSalomeWithPort.py | 16 +++- bin/launchConfigureParser.py | 11 +++ bin/runIDLparser.in | 2 +- bin/runSalome.ksh | 77 +++++++++++++++ bin/runSalome.py | 94 ++++++++++++------- salome_adm/unix/DEPRECATED/envScript.in | 12 ++- salome_adm/unix/DEPRECATED/make_conclude.in | 7 +- .../config_files/DEPRECATED/check_Salome.m4 | 6 +- .../config_files/DEPRECATED/check_pthreads.m4 | 8 +- .../unix/config_files/DEPRECATED/install-sh | 2 +- salome_adm/unix/config_files/ac_cxx_option.m4 | 9 +- salome_adm/unix/config_files/check_boost.m4 | 2 +- salome_adm/unix/config_files/check_cas.m4 | 4 +- salome_adm/unix/config_files/check_cppunit.m4 | 6 +- salome_adm/unix/config_files/check_msg2qm.m4 | 2 +- salome_adm/unix/config_files/check_omniorb.m4 | 6 ++ salome_adm/unix/config_files/check_pyqt.m4 | 78 +++++++-------- salome_adm/unix/config_files/check_qwt.m4 | 6 +- salome_adm/unix/config_files/check_sip.m4 | 38 ++++---- salome_adm/unix/config_files/check_vtk.m4 | 4 +- src/Basics/BasicsGenericDestructor.cxx | 4 +- src/Container/Container_i.cxx | 40 ++++---- src/Container/Container_init_python.cxx | 6 +- src/Container/SALOME_Container.cxx | 15 +-- .../SALOME_ContainerManagerServer.cxx | 2 +- src/Container/SALOME_Container_i.hxx | 2 +- src/LifeCycleCORBA/Launchers.cxx | 7 +- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 6 +- src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py | 67 +++++++++++-- src/MPIContainer/MPIContainer_i.cxx | 2 + src/ModuleCatalog/Makefile.am | 1 - src/ModuleGenerator/testIDLparser.in | 2 +- src/ModuleGenerator/tests/test1.sh | 2 +- src/ModuleGenerator/tests/test1b.sh | 2 +- src/ModuleGenerator/tests/test2.sh | 2 +- src/ModuleGenerator/tests/test3.sh | 2 +- src/ModuleGenerator/tests/test4.sh | 2 +- src/ModuleGenerator/tests/test5.sh | 2 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx | 2 +- src/SALOMEDS/SALOMEDS_SObject_i.cxx | 4 +- src/SALOMEDS/SALOMEDS_SObject_i.hxx | 4 +- src/SALOMEDS/SALOMEDS_StudyManager_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_StudyManager_i.hxx | 2 +- src/SALOMEDS/SALOMEDS_Study_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_Study_i.hxx | 2 +- .../SALOMEDSImpl_AttributeComment.cxx | 3 +- .../SALOMEDSImpl_AttributeDrawable.cxx | 3 +- .../SALOMEDSImpl_AttributeExpandable.cxx | 3 +- .../SALOMEDSImpl_AttributeIOR.cxx | 7 +- .../SALOMEDSImpl_AttributeInteger.cxx | 3 +- .../SALOMEDSImpl_StudyManager.cxx | 24 ++--- src/SALOMELocalTrace/BaseTraceCollector.cxx | 6 +- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 8 +- src/TestContainer/Makefile.am | 5 +- src/TestContainer/TestComponentPy.py | 2 +- src/TestContainer/TestContainer.cxx | 3 +- src/TestContainer/TestLogger.py | 5 + src/Utils/Utils_SignalsHandler.cxx | 2 + 68 files changed, 482 insertions(+), 238 deletions(-) create mode 100644 bin/runSalome.ksh create mode 100644 src/TestContainer/TestLogger.py diff --git a/bin/appliskel/killCurrentPort b/bin/appliskel/killCurrentPort index bca506068..cfb87da78 100755 --- a/bin/appliskel/killCurrentPort +++ b/bin/appliskel/killCurrentPort @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # --- retrieve APPLI path, relative to $HOME, set ${APPLI} @@ -14,7 +14,8 @@ myhost=`hostname` fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg if [ -f $fileOmniConfig ]; then - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + export OMNIORB_CONFIG fi currentPort=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` diff --git a/bin/appliskel/runAppli b/bin/appliskel/runAppli index 1d86ad3d5..7146b6b82 100755 --- a/bin/appliskel/runAppli +++ b/bin/appliskel/runAppli @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # --- retrieve APPLI path, relative to $HOME, set ${APPLI} diff --git a/bin/appliskel/runConsole b/bin/appliskel/runConsole index caeabbdd6..1756189ff 100755 --- a/bin/appliskel/runConsole +++ b/bin/appliskel/runConsole @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # --- retrieve APPLI path, relative to $HOME, set ${APPLI} diff --git a/bin/appliskel/runParam b/bin/appliskel/runParam index c858c670f..68e5a25c0 100755 --- a/bin/appliskel/runParam +++ b/bin/appliskel/runParam @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ./KillCurrentPort diff --git a/bin/appliskel/runRemote.sh b/bin/appliskel/runRemote.sh index 594616a07..3ab5a1daf 100755 --- a/bin/appliskel/runRemote.sh +++ b/bin/appliskel/runRemote.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # --- run command in SALOME environment from remote call, ssh or rsh # - SALOME configuration is defined by : @@ -31,9 +31,12 @@ # --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME -export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg -export NSHOST=$1 -export NSPORT=$2 +OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg +export OMNIORB_CONFIG +NSHOST=$1 +export NSHOST +NSPORT=$2 +export NSPORT initref="NameService=corbaname::"$1":$2" echo "ORBInitRef $initref" > $OMNIORB_CONFIG @@ -41,4 +44,4 @@ echo "ORBInitRef $initref" > $OMNIORB_CONFIG shift 2 -${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile $HOME/$APPLI/.bashrc -c "$*" +${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile $HOME/$APPLI/.bashrc -c "$*" diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession index 22d3fdd0f..1f99cce7b 100755 --- a/bin/appliskel/runSession +++ b/bin/appliskel/runSession @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Useful shell to run executable progs or shells under Salome env # Use it with args to run a program : runSession python -i myprog.py @@ -19,19 +19,22 @@ myhost=`hostname` fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg if [ -f $fileOmniConfig ]; then - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + export OMNIORB_CONFIG # --- set environment variables for port and hostname of NamingService - export NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host` - export NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` + NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host` + export NSHOST + NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port` + export NSPORT fi # --- invoque shell with or without args if [ $# -ne 0 ] ; then - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" else - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc fi diff --git a/bin/appliskel/runTests b/bin/appliskel/runTests index 755825d79..4ff2bc186 100755 --- a/bin/appliskel/runTests +++ b/bin/appliskel/runTests @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # --- retrieve APPLI path, relative to $HOME, set ${APPLI} @@ -21,13 +21,16 @@ searchFreePort() { if [ -z "$aRes" ]; then echo ${NSPORT} - Ok local myhost=`hostname` - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + export OMNIORB_CONFIG export NSPORT - export NSHOST=${myhost} + NSHOST=${myhost} + export NSHOST local initref="NameService=corbaname::"`hostname`":$NSPORT" #echo "ORBInitRef $initref" > $OMNIORB_CONFIG echo "InitRef = $initref" > $OMNIORB_CONFIG - export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg + LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg + export LAST_RUNNING_CONFIG rm ${LAST_RUNNING_CONFIG} ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG} break @@ -55,10 +58,10 @@ fi searchFreePort if [ $# -ne 0 ] ; then - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*" else - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc fi rm ${OMNIORB_CONFIG} diff --git a/bin/appliskel/searchFreePort.sh b/bin/appliskel/searchFreePort.sh index 8108a93dc..7333b1ce7 100755 --- a/bin/appliskel/searchFreePort.sh +++ b/bin/appliskel/searchFreePort.sh @@ -1,10 +1,11 @@ -#!/bin/bash +#!/bin/sh # --- define port for CORBA naming service searchFreePort() { echo -n "Searching for a free port for naming service: " - export NSPORT=2810 + NSPORT=2810 + export NSPORT local limit=$NSPORT let limit=limit+100 while [ 1 ] @@ -13,13 +14,16 @@ searchFreePort() { if [ -z "$aRes" ]; then echo ${NSPORT} - Ok local myhost=`hostname` - export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg + export OMNIORB_CONFIG export NSPORT - export NSHOST=${myhost} + NSHOST=${myhost} + export NSHOST local initref="NameService=corbaname::"`hostname`":$NSPORT" #echo "ORBInitRef $initref" > $OMNIORB_CONFIG echo "InitRef = $initref" > $OMNIORB_CONFIG - export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg + export LAST_RUNNING_CONFIG rm ${LAST_RUNNING_CONFIG} ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG} break diff --git a/bin/appliskel/setAppliPath.sh b/bin/appliskel/setAppliPath.sh index d9361ae52..99078065a 100755 --- a/bin/appliskel/setAppliPath.sh +++ b/bin/appliskel/setAppliPath.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # --- retrieve APPLI path, relative to $HOME, set ${APPLI} # on sarge, "which" gives not allways the absolute path... diff --git a/bin/killSalomeWithPort.py b/bin/killSalomeWithPort.py index e52a25f88..9f0cd0dd9 100755 --- a/bin/killSalomeWithPort.py +++ b/bin/killSalomeWithPort.py @@ -34,7 +34,21 @@ def killMyPort(port): pass if found: - a = os.system("pid=`ps -eo pid,command | egrep \"[0-9] omniNames -start "+str(port)+"\" | sed -e \"s%[^0-9]*\([0-9]*\) .*%\\1%g\"`; kill -9 $pid >& /dev/null") + cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start '+str(port)+'"` ; echo $pid > /tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log' + a = os.system(cmd) + try: + fpidomniNames=open('/tmp/logs/'+os.getenv('USER')+"/_"+port+'_Pid_omniNames.log') + prc = fpidomniNames.read() + fpidomniNames.close() + if prc != None : + for field in prc.split(" ") : + if field == "omniNames" : + if pidfield != "egrep" : + print 'stop process '+pidfield+' : omniNames' + os.system('kill -9 '+pidfield) + pidfield = field + except: + pass try: process_ids=pickle.load(fpid) fpid.close() diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index a9d0c273c..99540b3f3 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -161,6 +161,17 @@ class xml_parser: # - command line config_var = appname+'Config' +# set resources variables if not yet set +if os.getenv("GUI_ROOT_DIR"): + if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome" + if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources" + pass +else : + if not os.getenv("SUITRoot"): + os.environ["SUITRoot"] = "" + if not os.getenv("SalomeAppConfig"): + os.environ["SalomeAppConfig"] = "" + dirs = os.environ[config_var] dirs = re.split('[;|:]', dirs ) dirs.reverse() # reverse order, like in "path" variable - FILO-style processing diff --git a/bin/runIDLparser.in b/bin/runIDLparser.in index 3957369af..cb41a7488 100644 --- a/bin/runIDLparser.in +++ b/bin/runIDLparser.in @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # print the help message ==================================== diff --git a/bin/runSalome.ksh b/bin/runSalome.ksh new file mode 100644 index 000000000..970288626 --- /dev/null +++ b/bin/runSalome.ksh @@ -0,0 +1,77 @@ +#!/bin/ksh + +searchFreePort() { + echo -n "Searching for a free port for naming service: " + NSPORT=2810 + export NSPORT + local limit=$NSPORT + let limit=limit+100 + while [ 1 ] + do + aRes=`netstat -ltn | grep -E :${NSPORT}` + if [ -z "$aRes" ]; then + echo ${NSPORT} - Ok + local myhost=`hostname` + OMNIORB_CONFIG=${HOME}/.omniORB_${myhost}_${NSPORT}.cfg + export OMNIORB_CONFIG + local initref="NameService=corbaname::"`hostname`":$NSPORT" + export NSPORT + if [[ `python -c "import CORBA; print CORBA.ORB_ID"` = "omniORB4" ]]; then + echo "InitRef = $initref" > $OMNIORB_CONFIG + else + echo "ORBInitRef $initref" > $OMNIORB_CONFIG + fi + break + fi + echo -n "${NSPORT} " + if [[ $NSPORT -eq $limit ]] ; then + echo + echo "Can't find a free port to launch omniNames" + echo "Try to kill the running servers and then launch SALOME again." + exit + fi + let NSPORT=NSPORT+1 + done +} + +searchFreePort + +if [[ "$*" = "-nothing" ]]; then + echo "port:$NSPORT" +elif [ $# -ne 0 ] ; then + python -i ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $* +else + python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py +fi + +# ----------------------------------------------------------------------------- +# examples: +# --------- +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome +# +# - parameters for launching are taken from $HOME/.salome/salome.launch; +# - if the config file does not exist, it is created with default values. +# +# +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall +# +# parameters from command line supersede those from $HOME/.salome/salome.launch +# +# Some CORBA servers can be launched in the SALOME_Session_Server's process +# (embedded = same process) or in a separate process (standalone): +# --> registry,study,moduleCatalog,cppContainer +# Other CORBA servers could only be launched in separate process (standalone): +# --> pyContainer,supervContainer +# +# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h +# help +# ----------------------------------------------------------------------------- +# +# l'option -i permet de garder l'interpreteur python ouvert : +# par defaut, les differents serveurs ouvrent des fenĂȘtres xterm +# (cf. runSalome.py) +# le serveur Logger n'est pas obligatoire (commentĂ© dans runSalome.py) +# +# ----------------------------------------------------------------------------- +# Example on CCRT (without ihm) : +# ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --terminal --modules=MED,CALCULATOR,COMPONENT --standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer --killall diff --git a/bin/runSalome.py b/bin/runSalome.py index 98ff0a19f..7961b2878 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -56,8 +56,9 @@ def get_config(): modules_list = [] if args.has_key("modules"): modules_list += args["modules"] - # KERNEL must be last in the list to locate it at the first place in PATH - modules_list[:0] = ["GUI"] + # KERNEL must be last in the list to locate it at the first place in PATH + if args["gui"] : + modules_list[:0] = ["GUI"] modules_list[:0] = ["KERNEL"] modules_list.reverse() @@ -103,7 +104,8 @@ def set_env(args, modules_list, modules_root_dir): python_version="python%d.%d" % sys.version_info[0:2] modules_root_dir_list = [] - modules_list = modules_list[:] + ["GUI"] + if args["gui"] : + modules_list = modules_list[:] + ["GUI"] modules_list = modules_list[:] + ["KERNEL"] for module in modules_list : if modules_root_dir.has_key(module): @@ -187,10 +189,10 @@ def set_env(args, modules_list, modules_root_dir): # set environment for SUPERV module os.environ["ENABLE_MACRO_NODE"]="1" # set resources variables if not yet set - if os.getenv("GUI_ROOT_DIR"): - if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome" - if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources" - pass + # Done now by launchConfigureParser.py + #if os.getenv("GUI_ROOT_DIR"): + #if not os.getenv("SUITRoot"): os.environ["SUITRoot"] = os.getenv("GUI_ROOT_DIR") + "/share/salome" + #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources" # set CSF_PluginDefaults variable only if it is not customized # by the user @@ -324,7 +326,11 @@ class CatalogServer(Server): cata_path=[] list_modules = modules_list[:] list_modules.reverse() - for module in ["KERNEL", "GUI"] + list_modules: + if self.args["gui"] : + list_modules = ["KERNEL", "GUI"] + list_modules + else : + list_modules = ["KERNEL"] + list_modules + for module in list_modules: if modules_root_dir.has_key(module): module_root_dir=modules_root_dir[module] module_cata=module+"Catalog.xml" @@ -431,7 +437,11 @@ class SessionServer(Server): cata_path=[] list_modules = modules_list[:] list_modules.reverse() - for module in ["KERNEL", "GUI"] + list_modules: + if self.args["gui"] : + list_modules = ["KERNEL", "GUI"] + list_modules + else : + list_modules = ["KERNEL"] + list_modules + for module in list_modules: module_root_dir=modules_root_dir[module] module_cata=module+"Catalog.xml" #print " ", module_cata @@ -439,7 +449,7 @@ class SessionServer(Server): glob.glob(os.path.join(module_root_dir,"share", salome_subdir,"resources", module_cata))) - if 'moduleCatalog' in self.args['embedded']: + if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']): self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2 else: self.CMD=self.SCMD1 + self.SCMD2 @@ -452,23 +462,26 @@ class ContainerManagerServer(Server): self.initArgs() self.SCMD1=['SALOME_ContainerManagerServer'] self.SCMD2=[] - if 'registry' in self.args['embedded']: - self.SCMD1+=['--with','Registry', - '(','--salome_session','theSession',')'] - if 'moduleCatalog' in self.args['embedded']: - self.SCMD1+=['--with','ModuleCatalog','(','-common'] - self.SCMD2+=['-personal', - '${HOME}/Salome/resources/CatalogModulePersonnel.xml',')'] - if 'study' in self.args['embedded']: - self.SCMD2+=['--with','SALOMEDS','(',')'] - if 'cppContainer' in self.args['embedded']: - self.SCMD2+=['--with','Container','(','FactoryServer',')'] + if args["gui"] : + if 'registry' in self.args['embedded']: + self.SCMD1+=['--with','Registry', + '(','--salome_session','theSession',')'] + if 'moduleCatalog' in self.args['embedded']: + self.SCMD1+=['--with','ModuleCatalog','(','-common'] + self.SCMD2+=['-personal', + '${HOME}/Salome/resources/CatalogModulePersonnel.xml',')'] + if 'study' in self.args['embedded']: + self.SCMD2+=['--with','SALOMEDS','(',')'] + if 'cppContainer' in self.args['embedded']: + self.SCMD2+=['--with','Container','(','FactoryServer',')'] def setpath(self,modules_list,modules_root_dir): cata_path=[] list_modules = modules_list[:] list_modules.reverse() - for module in ["KERNEL", "GUI"] + list_modules: + if self.args["gui"] : + list_modules = ["GUI"] + list_modules + for module in ["KERNEL"] + list_modules: if modules_root_dir.has_key(module): module_root_dir=modules_root_dir[module] module_cata=module+"Catalog.xml" @@ -479,7 +492,7 @@ class ContainerManagerServer(Server): module_cata))) pass pass - if 'moduleCatalog' in self.args['embedded']: + if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']): self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2 else: self.CMD=self.SCMD1 + self.SCMD2 @@ -503,7 +516,13 @@ class NotifyServer(Server): def startGUI(): """Salome Session Graphic User Interface activation""" + import Engines import SALOME + import SALOMEDS + import SALOME_ModuleCatalog + reload(Engines) + reload(SALOME) + reload(SALOMEDS) import SALOME_Session_idl session=clt.waitNS("/Kernel/Session",SALOME.Session) session.GetInterface() @@ -544,7 +563,7 @@ def startSalome(args, modules_list, modules_root_dir): # attente de la disponibilite du Registry dans le Naming Service # - if 'registry' not in args['embedded']: + if ('registry' not in args['embedded']) | (args["gui"] == 0) : myServer=RegistryServer(args) myServer.run() clt.waitNSPID("/Registry",myServer.PID) @@ -555,7 +574,7 @@ def startSalome(args, modules_list, modules_root_dir): # - if 'moduleCatalog' not in args['embedded']: + if ('moduleCatalog' not in args['embedded']) | (args["gui"] == 0): cataServer=CatalogServer(args) cataServer.setpath(modules_list,modules_root_dir) cataServer.run() @@ -568,7 +587,7 @@ def startSalome(args, modules_list, modules_root_dir): # #print "ARGS = ",args - if 'study' not in args['embedded']: + if ('study' not in args['embedded']) | (args["gui"] == 0): print "RunStudy" myServer=SalomeDSServer(args) myServer.run() @@ -629,17 +648,24 @@ def startSalome(args, modules_list, modules_root_dir): # Lancement Session Server # - mySessionServ = SessionServer(args) - mySessionServ.setpath(modules_list,modules_root_dir) - mySessionServ.run() + if args["gui"]: + mySessionServ = SessionServer(args) + mySessionServ.setpath(modules_list,modules_root_dir) + mySessionServ.run() ##---------------- - # Attente de la disponibilite du Session Server dans le Naming Service - # + # Attente de la disponibilite du Session Server dans le Naming Service + # - import SALOME - import SALOME_Session_idl - session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session) + import Engines + import SALOME + import SALOMEDS + import SALOME_ModuleCatalog + reload(Engines) + reload(SALOME) + reload(SALOMEDS) + import SALOME_Session_idl + session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session) end_time = os.times() print diff --git a/salome_adm/unix/DEPRECATED/envScript.in b/salome_adm/unix/DEPRECATED/envScript.in index eaa69845d..3a0574312 100644 --- a/salome_adm/unix/DEPRECATED/envScript.in +++ b/salome_adm/unix/DEPRECATED/envScript.in @@ -6,16 +6,20 @@ SALOME_HOME_DIR=`pwd` cd $EXEC_DIR export SALOME_HOME_DIR -export SALOME_SRC_DIR=@ROOT_SRCDIR@ -export ORB_HOME_DIR=@CORBA_ROOT@ +SALOME_SRC_DIR=@ROOT_SRCDIR@ +export SALOME_SRC_DIR +ORB_HOME_DIR=@CORBA_ROOT@ +export ORB_HOME_DIR -export LD_LIBRARY_PATH=${SALOME_HOME_DIR}/lib:${LD_LIBRARY_PATH} +LD_LIBRARY_PATH=${SALOME_HOME_DIR}/lib:${LD_LIBRARY_PATH} +export LD_LIBRARY_PATH # echo $SALOME_HOME_DIR = SALOME_HOME_DIR # echo $SALOME_SRC_DIR = SALOME_SRC_DIR PYVTK_PATH=@VTKPY_MODULES@ -export PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/idl:${SALOME_HOME_DIR}/bin:${SALOME_HOME_DIR}/lib:${PYVTK_PATH}:${EXEC_DIR} +PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/idl:${SALOME_HOME_DIR}/bin:${SALOME_HOME_DIR}/lib:${PYVTK_PATH}:${EXEC_DIR} +export PYTHONPATH MICORC=/dev/null export MICORC diff --git a/salome_adm/unix/DEPRECATED/make_conclude.in b/salome_adm/unix/DEPRECATED/make_conclude.in index adce12a21..890d75708 100644 --- a/salome_adm/unix/DEPRECATED/make_conclude.in +++ b/salome_adm/unix/DEPRECATED/make_conclude.in @@ -59,7 +59,7 @@ $(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ $(patsubst %.la, %.so, $@).0 || true - if ! test -z $(LIB_SWIG) ; then \ + if test "X$(LIB_SWIG)" != "X"; then \ ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\ fi; @@ -177,7 +177,7 @@ install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \ fi; \ done - @if ! test -z $(LIB_SWIG) ; then \ + @if test "X$(LIB_SWIG)" != "X"; then \ (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ fi; @for f in X $(BIN); do \ @@ -371,8 +371,6 @@ distclean: clean .ui.cxx: $(UIC) -o $@ -i $*.h $< - - #pattern rules %_moc.cxx : %.h $(MOC) $< -o $@ @@ -383,7 +381,6 @@ distclean: clean $(top_builddir)/share/salome/resources/%.qm: %.po $(MSG2QM) $< $@ ; \ - #------------------------------------------------------------------------------ # The following section of this makefile contains dependencies between the # source files and the header files. If GNU make and GCC are being used then diff --git a/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 b/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 index ff12fd6c3..d598c99f9 100644 --- a/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_Salome.m4 @@ -33,7 +33,7 @@ AC_ARG_WITH(salome, --with-salome=DIR root directory path of SALOME installation, SALOME_DIR="$withval",SALOME_DIR="") -if test "x$SALOME_DIR" == "x" ; then +if test "x$SALOME_DIR" = "x" ; then # no --with-salome-dir option used @@ -59,10 +59,10 @@ if test -f ${SALOME_DIR}/bin/libMEDMEM_Swig.py ; then Salome_ok=yes AC_MSG_RESULT(Using Salome distribution in ${SALOME_DIR}) - if test "x$SALOME_ROOT_DIR" == "x" ; then + if test "x$SALOME_ROOT_DIR" = "x" ; then SALOME_ROOT_DIR=${SALOME_DIR} fi - if test "x$SALOME_SITE_DIR" == "x" ; then + if test "x$SALOME_SITE_DIR" = "x" ; then SALOME_SITE_DIR=${SALOME_ROOT_DIR} fi AC_SUBST(SALOME_ROOT_DIR) diff --git a/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 b/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 index 80aef2aad..eb511eca3 100644 --- a/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 +++ b/salome_adm/unix/config_files/DEPRECATED/check_pthreads.m4 @@ -38,9 +38,15 @@ if test $flag = no; then AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="") AC_CHECK_LIB(pthread,pthread_mutex_lock, LIBS_PTHREADS="-lpthread $LIBS_PTHREADS",LIBS_PTHREADS="") +else + case $host_os in + osf*) + LIBS_PTHREADS="-lpthread $LIBS_PTHREADS" + ;; + esac fi -if test $flag = no && x$LIBS_PTHREADS = x; then +if test $flag = no && test x$LIBS_PTHREADS = x; then threads_ok=no else threads_ok=yes diff --git a/salome_adm/unix/config_files/DEPRECATED/install-sh b/salome_adm/unix/config_files/DEPRECATED/install-sh index 56ccb7b5f..51319e83e 100755 --- a/salome_adm/unix/config_files/DEPRECATED/install-sh +++ b/salome_adm/unix/config_files/DEPRECATED/install-sh @@ -33,7 +33,7 @@ done if test x$dirParams = "xyes"; then mkdir -p $dirPath else -cp $args $dirPath +cp -f $args $dirPath for arg in $args; do myArg=`basename $arg` if test x$chmodParams != x; then diff --git a/salome_adm/unix/config_files/ac_cxx_option.m4 b/salome_adm/unix/config_files/ac_cxx_option.m4 index 72ea0ab11..d1f43ea6a 100644 --- a/salome_adm/unix/config_files/ac_cxx_option.m4 +++ b/salome_adm/unix/config_files/ac_cxx_option.m4 @@ -32,13 +32,14 @@ int main() { return 0; } EOF $CXX $1 conftest.cxx > conftest.log 2>&1 var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"` - if ! grep -e $var conftest.log > /dev/null 2>&1 ; then +#CCRT if ! grep -e $var conftest.log > /dev/null 2>&1 ; then + if grep -e $var conftest.log > /dev/null 2>&1 ; then + AC_MSG_RESULT(no) + eval $4 + else AC_MSG_RESULT(yes) $2="${$2} $1" eval $3 - else - AC_MSG_RESULT(no) - eval $4 fi ]) diff --git a/salome_adm/unix/config_files/check_boost.m4 b/salome_adm/unix/config_files/check_boost.m4 index e15447648..6176ef192 100644 --- a/salome_adm/unix/config_files/check_boost.m4 +++ b/salome_adm/unix/config_files/check_boost.m4 @@ -37,7 +37,7 @@ BOOST_LIBTHREAD="" boost_ok=no -if test -z ${BOOSTDIR}; then +if test -z "${BOOSTDIR}"; then AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no) if test boost_ok = no ; then AC_MSG_WARN(You must provide BOOSTDIR variable) diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index 2a0a0ccb9..7acf7f8f8 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -75,7 +75,7 @@ esac AC_MSG_CHECKING(for OpenCascade directories) -if test -z $CASROOT; then +if test -z "$CASROOT"; then AC_MSG_RESULT(CASROOT not defined) for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do if test -f $d/libTKernel.so ; then @@ -101,7 +101,7 @@ fi dnl were is OCC ? -if test -z $CASROOT; then +if test -z "$CASROOT"; then AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual) else occ_ok=yes diff --git a/salome_adm/unix/config_files/check_cppunit.m4 b/salome_adm/unix/config_files/check_cppunit.m4 index d000a1d87..9de130c26 100644 --- a/salome_adm/unix/config_files/check_cppunit.m4 +++ b/salome_adm/unix/config_files/check_cppunit.m4 @@ -19,7 +19,7 @@ AC_ARG_WITH(cppunit_inc, AC_MSG_RESULT("select $withval as path to CPPUNIT includes") ]) -if test -z $CPPUNITHOME; then +if test -z "$CPPUNITHOME"; then AC_MSG_RESULT(CPPUNITHOME not defined) exits_ok=no if test "x$exits_ok" = "xno"; then @@ -43,12 +43,12 @@ if test -z $CPPUNITHOME; then done fi if test "x$exits_ok" = "xyes"; then - if test -z $CPPUNIT_INCLUDES; then + if test -z "$CPPUNIT_INCLUDES"; then CPPUNIT_INCLUDES=$CPPUNITHOME"/include" fi fi else - if test -z $CPPUNIT_INCLUDES; then + if test -z "$CPPUNIT_INCLUDES"; then CPPUNIT_INCLUDES="$CPPUNITHOME/include" fi fi diff --git a/salome_adm/unix/config_files/check_msg2qm.m4 b/salome_adm/unix/config_files/check_msg2qm.m4 index 8d0c5474f..db3b35910 100755 --- a/salome_adm/unix/config_files/check_msg2qm.m4 +++ b/salome_adm/unix/config_files/check_msg2qm.m4 @@ -13,7 +13,7 @@ AC_ARG_WITH(msg2qm, [ --with-msg2qm=DIR root directory path of MSG2QM installation], MSG2QM_DIR="$withval",MSG2QM_DIR="") -if test "x$MSG2QM_DIR" == "x" ; then +if test "x$MSG2QM_DIR" = "x" ; then # no --with-MSG2QM-dir option used diff --git a/salome_adm/unix/config_files/check_omniorb.m4 b/salome_adm/unix/config_files/check_omniorb.m4 index 7a6b6fd6d..392a70aa0 100644 --- a/salome_adm/unix/config_files/check_omniorb.m4 +++ b/salome_adm/unix/config_files/check_omniorb.m4 @@ -70,6 +70,12 @@ then ;; esac case $build_os in + osf*) + AC_DEFINE(__osf1__) + __OSVERSION__=5 + AC_DEFINE(__OSVERSION__) + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__osf1__" + ;; solaris*) AC_DEFINE(__sunos__) __OSVERSION__=5 diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 index ee024efaf..2b6ae67ea 100644 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ b/salome_adm/unix/config_files/check_pyqt.m4 @@ -37,47 +37,47 @@ if test "x$PYUIC" != x; then dnl try withval value AC_CHECK_FILE($PYUIC,pyqt_uic_ok=yes,pyqt_uic_ok=no) fi -if test "x$pyqt_uic_ok" == "xno"; then +if test "x$pyqt_uic_ok" = "xno"; then dnl try ${PYQTDIR} if test "x${PYQTDIR}" != "x"; then if test -d ${PYQTDIR} ; then AC_CHECK_FILE(${PYQTDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then + if test "x$pyqt_uic_ok" = "xyes"; then PYUIC="${PYQTDIR}/pyuic" fi fi fi fi -if test "x$pyqt_uic_ok" == "xno"; then +if test "x$pyqt_uic_ok" = "xno"; then dnl try ${SIPDIR} if test "x${SIPDIR}" != "x"; then if test -d ${SIPDIR} ; then AC_CHECK_FILE(${SIPDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then + if test "x$pyqt_uic_ok" = "xyes"; then PYUIC="${SIPDIR}/pyuic" fi fi fi fi -if test "x$pyqt_uic_ok" == "xno"; then +if test "x$pyqt_uic_ok" = "xno"; then dnl try ${PYTHONHOME}/bin if test "x${PYTHONHOME}" != "x"; then if test -d ${PYTHONHOME}/bin ; then AC_CHECK_FILE(${PYTHONHOME}/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then + if test "x$pyqt_uic_ok" = "xyes"; then PYUIC="${PYTHONHOME}/bin/pyuic" fi fi fi fi -if test "x$pyqt_uic_ok" == "xno"; then +if test "x$pyqt_uic_ok" = "xno"; then dnl try /usr/bin AC_CHECK_FILE(/usr/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no) - if test "x$pyqt_uic_ok" == "xyes"; then + if test "x$pyqt_uic_ok" = "xyes"; then PYUIC="/usr/bin/pyuic" fi fi -if test "x$pyqt_uic_ok" == "xno"; then +if test "x$pyqt_uic_ok" = "xno"; then pyqt_ok=no fi @@ -86,7 +86,7 @@ pyqt_lib_ok=no if test "x${PYQTDIR}" != "x"; then dnl try {PYQTDIR} AC_CHECK_FILE(${PYQTDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then if test "x${PYQTDIR}" = "x/usr/lib" then PYQT_LIBS="-lqtcmodule" @@ -95,7 +95,7 @@ if test "x${PYQTDIR}" != "x"; then fi else AC_CHECK_FILE(${PYQTDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then if test "x${PYQTDIR}" = "x/usr/lib" then PYQT_LIBS="" @@ -104,41 +104,41 @@ if test "x${PYQTDIR}" != "x"; then fi fi fi - if test "x$pyqt_lib_ok" == "xno"; then + if test "x$pyqt_lib_ok" = "xno"; then dnl try {PYQTDIR}/lib if test -d {PYQTDIR}/lib; then AC_CHECK_FILE(${PYQTDIR}/lib/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L${PYQTDIR}/lib -lqtcmodule" else AC_CHECK_FILE(${PYQTDIR}/lib/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L${PYQTDIR}/lib" fi fi fi fi - if test "x$pyqt_lib_ok" == "xno"; then + if test "x$pyqt_lib_ok" = "xno"; then dnl try {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages if test -d {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages; then AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" else AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages" fi fi fi fi fi -if test "x$pyqt_lib_ok" == "xno"; then +if test "x$pyqt_lib_ok" = "xno"; then dnl try ${SIPDIR} if test "x${SIPDIR}" != "x"; then if test -d ${SIPDIR} ; then AC_CHECK_FILE(${SIPDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then if test "x${SIPDIR}" = "x/usr/lib" then PYQT_LIBS="-lqtcmodule" @@ -147,7 +147,7 @@ if test "x$pyqt_lib_ok" == "xno"; then fi else AC_CHECK_FILE(${SIPDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then if test "x${SIPDIR}" = "x/usr/lib" then PYQT_LIBS="" @@ -159,35 +159,35 @@ if test "x$pyqt_lib_ok" == "xno"; then fi fi fi -if test "x$pyqt_lib_ok" == "xno"; then +if test "x$pyqt_lib_ok" = "xno"; then dnl try ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages if test "x${PYTHONHOME}" != "x"; then if test -d ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages ; then AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" else AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages" fi fi fi fi fi -if test "x$pyqt_lib_ok" == "xno"; then +if test "x$pyqt_lib_ok" = "xno"; then dnl try /usr/lib/python${PYTHON_VERSION}/site-packages AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule" else AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) - if test "x$pyqt_lib_ok" == "xyes"; then + if test "x$pyqt_lib_ok" = "xyes"; then PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages" fi fi fi -if test "x$pyqt_lib_ok" == "xno"; then +if test "x$pyqt_lib_ok" = "xno"; then pyqt_ok=no fi @@ -196,60 +196,60 @@ pyqt_sips_ok=no dnl try ${PYQT_SIPS} or ${PYQT_SIPS}/qt if test "x${PYQT_SIPS}" != "x"; then AC_CHECK_FILE(${PYQT_SIPS}/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xno"; then + if test "x$pyqt_sips_ok" = "xno"; then AC_CHECK_FILE(${PYQT_SIPS}/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="${PYQT_SIPS}/qt" fi fi fi -if test "x$pyqt_sips_ok" == "xno"; then +if test "x$pyqt_sips_ok" = "xno"; then dnl try ${PYQTDIR}/sip if test "x${PYQTDIR}" != "x"; then if test -d ${PYQTDIR}/sip ; then AC_CHECK_FILE(${PYQTDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="${PYQTDIR}/sip" else AC_CHECK_FILE(${PYQTDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="${PYQTDIR}/sip/qt" fi fi fi fi fi -if test "x$pyqt_sips_ok" == "xno"; then +if test "x$pyqt_sips_ok" = "xno"; then dnl try ${SIPDIR}/sip if test "x${SIPDIR}" != "x"; then if test -d ${SIPDIR}/sip ; then AC_CHECK_FILE(${SIPDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="${SIPDIR}/sip" else AC_CHECK_FILE(${SIPDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="${SIPDIR}/sip/qt" fi fi fi fi fi -if test "x$pyqt_sips_ok" == "xno"; then +if test "x$pyqt_sips_ok" = "xno"; then dnl try /usr/share/sip if test -d /usr/share/sip ; then AC_CHECK_FILE(/usr/share/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="/usr/share/sip" else AC_CHECK_FILE(/usr/share/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no) - if test "x$pyqt_sips_ok" == "xyes"; then + if test "x$pyqt_sips_ok" = "xyes"; then PYQT_SIPS="/usr/share/sip/qt" fi fi fi fi -if test "x$pyqt_sips_ok" == "xno"; then +if test "x$pyqt_sips_ok" = "xno"; then pyqt_ok=no else PYQT_INCLUDES="-I$PYQT_SIPS" diff --git a/salome_adm/unix/config_files/check_qwt.m4 b/salome_adm/unix/config_files/check_qwt.m4 index 13bf90914..abfccc740 100644 --- a/salome_adm/unix/config_files/check_qwt.m4 +++ b/salome_adm/unix/config_files/check_qwt.m4 @@ -21,7 +21,7 @@ AC_ARG_WITH(qwt_inc, AC_MSG_RESULT("select $withval as path to QWT includes") ]) -if test -z $QWTHOME; then +if test -z "$QWTHOME"; then AC_MSG_RESULT(QWTHOME not defined) exits_ok=no if test "x$exits_ok" = "xno"; then @@ -45,7 +45,7 @@ if test -z $QWTHOME; then done fi if test "x$exits_ok" = "xyes"; then - if test -z $QWT_INCLUDES; then + if test -z "$QWT_INCLUDES"; then QWT_INCLUDES=$QWTHOME"/include/qwt" if test ! -f $QWT_INCLUDES/qwt.h ; then QWT_INCLUDES=$QWTHOME"/include" @@ -56,7 +56,7 @@ if test -z $QWTHOME; then fi fi else - if test -z $QWT_INCLUDES; then + if test -z "$QWT_INCLUDES"; then QWT_INCLUDES="$QWTHOME/include" fi fi diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index 245f2382e..4158e9988 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -53,33 +53,33 @@ else if test "x$SIPDIR" != "x" ; then dnl look for sip.h in ${SIPDIR} AC_CHECK_FILE(${SIPDIR}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then + if test "x$sip_ok" = "xyes" ; then SIP_INCLUDES="-I${SIPDIR}" fi - if test "x$sip_ok" == "xno" ; then + if test "x$sip_ok" = "xno" ; then dnl look for sip.h in ${SIPDIR}/include/python${PYTHON_VERSION} if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then AC_CHECK_FILE(${SIPDIR}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then + if test "x$sip_ok" = "xyes" ; then SIP_INCLUDES="-I${SIPDIR}/include/python${PYTHON_VERSION}" fi fi fi fi - if test "x$sip_ok" == "xno" ; then + if test "x$sip_ok" = "xno" ; then dnl look for sip.h in ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} if test -d ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} ; then AC_CHECK_FILE(${PYTHON_PREFIX}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then + if test "x$sip_ok" = "xyes" ; then SIP_INCLUDES="${PYTHON_INCLUDES}" fi fi fi - if test "x$sip_ok" == "xno" ; then + if test "x$sip_ok" = "xno" ; then dnl look for sip.h in /usr/include/python${PYTHON_VERSION} if test -d /usr/include/python${PYTHON_VERSION} ; then AC_CHECK_FILE(/usr/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no) - if test "x$sip_ok" == "xyes" ; then + if test "x$sip_ok" = "xyes" ; then SIP_INCLUDES="/usr/include/python${PYTHON_VERSION}" fi fi @@ -90,7 +90,7 @@ else if test "x$SIPDIR" != "x" ; then dnl look for (lib)sip.so in ${SIPDIR} AC_CHECK_FILE(${SIPDIR}/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then if test "x${SIPDIR}" = "x/usr/lib" then SIP_LIBS="-lsip" @@ -99,7 +99,7 @@ else fi else AC_CHECK_FILE(${SIPDIR}/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then if test "x${SIPDIR}" = "x/usr/lib" then SIP_LIBS="" @@ -109,50 +109,50 @@ else fi fi - if test "x$sip_lib_ok" == "xno" ; then + if test "x$sip_lib_ok" = "xno" ; then dnl look for (lib)sip.so in ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages if test -d ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages ; then AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip" else AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages" fi fi fi fi fi - if test "x$sip_lib_ok" == "xno" ; then + if test "x$sip_lib_ok" = "xno" ; then dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages if test -d ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages ; then AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip" else AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages" fi fi fi fi - if test "x$sip_lib_ok" == "xno" ; then + if test "x$sip_lib_ok" = "xno" ; then dnl look for (lib)sip.so in /usr/lib/python${PYTHON_VERSION}/site-packages if test -d /usr/lib/python${PYTHON_VERSION}/site-packages ; then AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then SIP_LIBS="-L$/usr/lib/python${PYTHON_VERSION}/site-packages -lsip" else AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no) - if test "x$sip_lib_ok" == "xyes" ; then + if test "x$sip_lib_ok" = "xyes" ; then SIP_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages" fi fi fi fi - if test "x$sip_lib_ok" == "xno" ; then + if test "x$sip_lib_ok" = "xno" ; then sip_ok=no fi fi diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 index df9245b5d..5d06c9132 100644 --- a/salome_adm/unix/config_files/check_vtk.m4 +++ b/salome_adm/unix/config_files/check_vtk.m4 @@ -74,7 +74,7 @@ LOCAL_INCLUDES="$OGL_INCLUDES" LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS $LXLIB -lX11 -lXt" TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS $LXLIB -lX11 -lXt" -if test -z $VTKHOME +if test -z "$VTKHOME" then AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) if test -f /usr/include/vtk/vtkPlane.h ; then @@ -83,7 +83,7 @@ then fi fi -if test ! -z $VTKHOME +if test ! -z "$VTKHOME" then LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES" LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS" diff --git a/src/Basics/BasicsGenericDestructor.cxx b/src/Basics/BasicsGenericDestructor.cxx index 91585a2ae..39d190bd8 100644 --- a/src/Basics/BasicsGenericDestructor.cxx +++ b/src/Basics/BasicsGenericDestructor.cxx @@ -37,7 +37,9 @@ using namespace std; void HouseKeeping(); std::list PROTECTED_DELETE::_objList; -pthread_mutex_t PROTECTED_DELETE::_listMutex; +//CCRT +pthread_mutex_t PROTECTED_DELETE::_listMutex = PTHREAD_MUTEX_INITIALIZER ; +//pthread_mutex_t PROTECTED_DELETE::_listMutex ; std::list *GENERIC_DESTRUCTOR::Destructors = 0; static bool atExitSingletonDone = false ; diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 48b3ac787..96779e09f 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -27,20 +27,10 @@ // $Header$ //#define private public -#include -#ifndef WNT -#include CORBA_SERVER_HEADER(SALOME_Component) -#else -#include -#endif -#include // must be before Python.h ! -#include -#include "SALOME_Container_i.hxx" -#include "SALOME_Component_i.hxx" -#include "SALOME_NamingService.hxx" -#include "OpUtil.hxx" #include #include +#include +#include #ifndef WNT #include #include @@ -50,9 +40,23 @@ #include int SIGUSR1 = 1000; #endif -#include "Container_init_python.hxx" #include "utilities.h" +#include +#ifndef WNT +#include CORBA_SERVER_HEADER(SALOME_Component) +#else +#include +#endif +#include // must be before Python.h ! +#include "SALOME_Container_i.hxx" +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" +#include "OpUtil.hxx" + +#include +#include "Container_init_python.hxx" + using namespace std; bool _Sleeping = false ; @@ -96,7 +100,7 @@ Engines_Container_i::Engines_Container_i () : //============================================================================= Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, + PortableServer::POA_var poa, char *containerName , int argc , char* argv[], bool activAndRegist, @@ -307,10 +311,12 @@ Engines_Container_i::load_component_Library(const char* componentName) } void* handle; -#ifndef WNT - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; -#else +#if defined( WNT ) handle = dlopen( impl_name.c_str() , 0 ) ; +//#elif defined( __osf1__ ) +// handle = dlopen( impl_name.c_str() , RTLD_NOW ) ; +#else + handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; #endif if ( handle ) { diff --git a/src/Container/Container_init_python.cxx b/src/Container/Container_init_python.cxx index 7a4e58527..427d03ec4 100644 --- a/src/Container/Container_init_python.cxx +++ b/src/Container/Container_init_python.cxx @@ -26,9 +26,13 @@ // Module : KERNEL // $Header$ -#include "Container_init_python.hxx" +#include +#include #include "utilities.h" + +#include "Container_init_python.hxx" + using namespace std; PyThreadState *KERNEL_PYTHON::_gtstate = 0; diff --git a/src/Container/SALOME_Container.cxx b/src/Container/SALOME_Container.cxx index d7c62076e..2639ef800 100644 --- a/src/Container/SALOME_Container.cxx +++ b/src/Container/SALOME_Container.cxx @@ -31,8 +31,12 @@ #endif #include +#include #include #include +#include +#include +#include #ifndef WNT #include @@ -66,7 +70,7 @@ int main(int argc, char* argv[]) //CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ; ORB_INIT &init = *SINGLETON_::Instance() ; ASSERT(SINGLETON_::IsAlreadyExisting()); - CORBA::ORB_var orb = init(0 , 0 ) ; + CORBA::ORB_ptr orb = init(0 , 0 ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); INFOS_COMPILATION; @@ -105,9 +109,9 @@ int main(int argc, char* argv[]) // add new container to the kill list #ifndef WNT - char aCommand[40]; - sprintf(aCommand, "addToKillList.py %d SALOME_Container", getpid()); - system(aCommand); + ostrstream aCommand ; + aCommand << "addToKillList.py " << getpid() << " SALOME_Container" << ends ; + system(aCommand.str()); #endif Engines_Container_i * myContainer @@ -119,10 +123,9 @@ int main(int argc, char* argv[]) Utils_Timer timer; timer.Start(); timer.Stop(); - MESSAGE("SALOME_Registry_Server.cxx - orb->run()"); timer.ShowAbsolute(); #endif - + HandleServerSideSignals(orb); } diff --git a/src/Container/SALOME_ContainerManagerServer.cxx b/src/Container/SALOME_ContainerManagerServer.cxx index d6f421608..0faa4f1d3 100644 --- a/src/Container/SALOME_ContainerManagerServer.cxx +++ b/src/Container/SALOME_ContainerManagerServer.cxx @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) PortableServer::POAManager_var pman; CORBA::Object_var obj; - CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ; + CORBA::ORB_ptr orb = CORBA::ORB_init( argc , argv ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); INFOS_COMPILATION; BEGIN_OF(argv[0]); diff --git a/src/Container/SALOME_Container_i.hxx b/src/Container/SALOME_Container_i.hxx index be21173b0..b3b6db4f3 100644 --- a/src/Container/SALOME_Container_i.hxx +++ b/src/Container/SALOME_Container_i.hxx @@ -67,7 +67,7 @@ class CONTAINER_EXPORT Engines_Container_i: public: Engines_Container_i(); Engines_Container_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, + PortableServer::POA_var poa, char * containerName , int argc, char* argv[], bool activAndRegist = true, diff --git a/src/LifeCycleCORBA/Launchers.cxx b/src/LifeCycleCORBA/Launchers.cxx index 3400d4474..048c32c81 100644 --- a/src/LifeCycleCORBA/Launchers.cxx +++ b/src/LifeCycleCORBA/Launchers.cxx @@ -17,9 +17,14 @@ // // See http://www.salome-platform.org/ // -#include + +#include +#include + #include "utilities.h" +#include + using namespace std; static int Launchers_IsLoaded = 0; diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index f5d7d6fc3..60e22e909 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -31,9 +31,11 @@ #include #include +#include +#include + #include "OpUtil.hxx" #include "utilities.h" -#include "Launchers.hxx" #include @@ -46,6 +48,8 @@ #include "SALOME_ContainerManager.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" +#include "Launchers.hxx" + using namespace std; IncompatibleComponent::IncompatibleComponent( void ): diff --git a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py index 147e072d4..a03a556be 100644 --- a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py @@ -1,18 +1,65 @@ +#from TestLifeCycleCORBA import * + +import os import Engines import LifeCycleCORBA +host = os.getenv( 'HOST' ) + lcc = LifeCycleCORBA.LifeCycleCORBA() -#obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") -#comp=obj._narrow(Engines.TestComponent) -#comp.Coucou(1) +try : + obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") + comp=obj._narrow(Engines.TestComponent) + comp.Coucou(1) + param={} + #param['hostname']='cli76cc' + param['hostname']=host + param['container_name']='FactoryServer' + comp=lcc.FindOrLoad_Component(param,'SalomeTestComponent') + engine=lcc.FindComponent(param,'SalomeTestComponent') + engine.Coucou(1) +except : + print 'lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed' + +import sys +import CORBA +import CosNaming +orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) +obj = orb.resolve_initial_references("NameService") +rootContext = obj._narrow(CosNaming.NamingContext) +context_name=[] +context_name.append(CosNaming.NameComponent( 'ContainerManager' , 'object' ) ) +ContainerManager = rootContext.resolve( context_name ) + +try : + myContainerparamsCPP = Engines.MachineParameters( 'myContainer' , host , 'osf' , 0 , 0 , 0 , 0 , 0 ) + computerlistCPP = [host] + containerCPP = ContainerManager.FindOrStartContainer( myContainerparamsCPP , computerlistCPP ) + containerCPP.ping() + ComponentparamsCPP={} + ComponentparamsCPP['hostname']=host + ComponentparamsCPP['container_name']='myContainer' + compCPP=lcc.FindOrLoad_Component(ComponentparamsCPP,'SalomeTestComponent') + compCPP.Coucou(1) + engineCPP=lcc.FindComponent(ComponentparamsCPP,'SalomeTestComponent') + engineCPP.Coucou(1) +except : + print 'ContainerManager.FindOrStartContainer( myContainerparams , computerlist ) C++ failed' -param={} -param['hostname']='cli76cc' -param['container_name']='myContainer' -smesh=lcc.FindOrLoad_Component(param,'PYHELLO') +try : + myContainerparamsPy = Engines.MachineParameters( 'myContainerPy' , host , 'osf' , 0 , 0 , 0 , 0 , 0 ) + computerlistPy = [host] + containerPy = ContainerManager.FindOrStartContainer( myContainerparamsPy , computerlistPy ) + containerPy.ping() + ComponentparamsPy={} + ComponentparamsPy['hostname']=host + ComponentparamsPy['container_name']='myContainerPy' + compPy=lcc.FindOrLoad_Component(ComponentparamsPy,'SALOME_TestComponentPy') + compPy.Coucou(1) + enginePy=lcc.FindComponent(ComponentparamsPy,'SALOME_TestComponentPy') + enginePy.Coucou(1) +except : + print 'ContainerManager.FindOrStartContainer( myContainerparams , computerlist ) Python failed' -container=lcc.FindContainer('myContainer') -engine=lcc.FindComponent(param,'HELLO') -geom=lcc.LoadComponent(param,'GEOM') diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index dfeb178e1..1acd943e3 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -33,6 +33,8 @@ #include "Utils_SINGLETON.hxx" #include "OpUtil.hxx" #include "utilities.h" +#include +#include #include // must be before Python.h ! #include #include "Container_init_python.hxx" diff --git a/src/ModuleCatalog/Makefile.am b/src/ModuleCatalog/Makefile.am index 414ae3c10..5a810d794 100644 --- a/src/ModuleCatalog/Makefile.am +++ b/src/ModuleCatalog/Makefile.am @@ -79,7 +79,6 @@ libSalomeCatalog_la_SOURCES =\ SALOME_ModuleCatalog_Acomponent_impl.cxx libSalomeCatalog_la_CPPFLAGS =\ - -ftemplate-depth-32 \ $(COMMON_CPPFLAGS) libSalomeCatalog_la_LDFLAGS = -no-undefined -version-info=0:0:0 diff --git a/src/ModuleGenerator/testIDLparser.in b/src/ModuleGenerator/testIDLparser.in index 94eccf70c..64709e7ac 100755 --- a/src/ModuleGenerator/testIDLparser.in +++ b/src/ModuleGenerator/testIDLparser.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ROOT_SRCDIR=@ROOT_SRCDIR@ export ROOT_SRCDIR diff --git a/src/ModuleGenerator/tests/test1.sh b/src/ModuleGenerator/tests/test1.sh index 6b659696e..2fbd7754c 100755 --- a/src/ModuleGenerator/tests/test1.sh +++ b/src/ModuleGenerator/tests/test1.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test1b.sh b/src/ModuleGenerator/tests/test1b.sh index e3e41193d..ad837a02c 100755 --- a/src/ModuleGenerator/tests/test1b.sh +++ b/src/ModuleGenerator/tests/test1b.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test2.sh b/src/ModuleGenerator/tests/test2.sh index d534140fb..0a61ddef3 100755 --- a/src/ModuleGenerator/tests/test2.sh +++ b/src/ModuleGenerator/tests/test2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test3.sh b/src/ModuleGenerator/tests/test3.sh index 3689eb162..fe726682e 100755 --- a/src/ModuleGenerator/tests/test3.sh +++ b/src/ModuleGenerator/tests/test3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test4.sh b/src/ModuleGenerator/tests/test4.sh index d7a0bb83d..c6314373c 100755 --- a/src/ModuleGenerator/tests/test4.sh +++ b/src/ModuleGenerator/tests/test4.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/ModuleGenerator/tests/test5.sh b/src/ModuleGenerator/tests/test5.sh index 41b76c091..69a2a20dc 100755 --- a/src/ModuleGenerator/tests/test5.sh +++ b/src/ModuleGenerator/tests/test5.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index dcfc75494..c3a37cdd5 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -131,7 +131,7 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx index def9134a6..16694f7e8 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.hxx @@ -57,7 +57,7 @@ public: static SALOMEDS::GenericAttribute_ptr CreateAttribute(const Handle(TDF_Attribute)& theAttr, CORBA::ORB_ptr theOrb); - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 1a8a25c91..ef0b64640 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -205,7 +205,7 @@ CORBA::Boolean SALOMEDS_SObject_i::ReferencedObject(SALOMEDS::SObject_out obj) * Purpose : */ //============================================================================ -CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(long atag, SALOMEDS::SObject_out obj) +CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj) { SALOMEDS::Locker lock; Handle(SALOMEDSImpl_SObject) aSubObj; @@ -318,7 +318,7 @@ char* SALOMEDS_SObject_i::GetIOR() //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index 4a04250d5..c4e4318fd 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -60,7 +60,7 @@ public: virtual SALOMEDS::SObject_ptr GetFather() ; virtual CORBA::Boolean FindAttribute(SALOMEDS::GenericAttribute_out anAttribute, const char* aTypeOfAttribute); virtual CORBA::Boolean ReferencedObject(SALOMEDS::SObject_out obj) ; - virtual CORBA::Boolean FindSubObject(long atag, SALOMEDS::SObject_out obj ); + virtual CORBA::Boolean FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj ); virtual SALOMEDS::Study_ptr GetStudy() ; virtual char* Name(); @@ -76,7 +76,7 @@ public: virtual CORBA::Short Tag(); virtual CORBA::Short Depth(); - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); }; #endif diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index 1bcaf8caa..0a12c883b 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -456,7 +456,7 @@ PortableServer::POA_ptr SALOMEDS_StudyManager_i::GetPOA(const SALOMEDS::Study_pt //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx index ef428ed4c..2fd961750 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx @@ -142,7 +142,7 @@ public: void ping(){}; - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); static PortableServer::POA_ptr GetPOA(const SALOMEDS::Study_ptr theStudy); }; diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 6db403acb..1679b02d7 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -751,7 +751,7 @@ CORBA::Boolean SALOMEDS_Study_i::DumpStudy(const char* thePath, const char* theB //=========================================================================== // PRIVATE FUNCTIONS //=========================================================================== -long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) +CORBA::Long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal) { #ifdef WIN32 long pid = (long)_getpid(); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index b10719216..33af33eeb 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -283,6 +283,6 @@ public: virtual Handle(SALOMEDSImpl_Study) GetImpl() { return _impl; } - virtual long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); + virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal); }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx index 46d73cf32..55716777c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeComment.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeComment.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeComment, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeComment, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx index c0679aa92..340bd3f7c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeDrawable.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeDrawable.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeDrawable, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeDrawable, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx index 5f4bc9c73..743fa016b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeExpandable.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeExpandable.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeExpandable, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeExpandable, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx index 85b8355a6..c5b1553be 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx @@ -21,14 +21,15 @@ // Author : Sergey RUIN // Module : SALOME -#ifndef WNT -using namespace std; -#endif #include "SALOMEDSImpl_AttributeIOR.hxx" #include #include "SALOMEDSImpl_Study.hxx" #include +#ifndef WNT +using namespace std; +#endif + IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeIOR, SALOMEDSImpl_GenericAttribute ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeIOR, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx index dee0c253d..99075680c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx @@ -21,10 +21,11 @@ // Author : Sergey RUIN // Module : SALOME +#include "SALOMEDSImpl_AttributeInteger.hxx" + #ifndef WNT using namespace std; #endif -#include "SALOMEDSImpl_AttributeInteger.hxx" IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeInteger, SALOMEDSImpl_GenericAttribute) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeInteger, SALOMEDSImpl_GenericAttribute ) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index ebf67aeca..f4a25f644 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -23,8 +23,6 @@ #include "SALOMEDSImpl_StudyManager.hxx" -using namespace std; - #include #include #include @@ -52,6 +50,8 @@ using namespace std; #include #include +using namespace std; + IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_StudyManager, MMgt_TShared ) IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_StudyManager, MMgt_TShared ) @@ -153,16 +153,16 @@ Handle(SALOMEDSImpl_Study) SALOMEDSImpl_StudyManager::Open(const TCollection_Asc } catch (HDFexception) { -#ifndef WNT - char eStr[strlen(aUrl.ToCString())+17]; -#else +//#ifndef WNT +// char eStr[strlen(aUrl.ToCString())+17]; +//#else char *eStr; eStr = new char[strlen(aUrl.ToCString())+17]; -#endif +//#endif sprintf(eStr,"Can't open file %s",aUrl.ToCString()); -#ifdef WNT +//#ifdef WNT delete [] eStr; -#endif +//#endif _errorCode = TCollection_AsciiString(eStr); return NULL; } @@ -195,11 +195,11 @@ Handle(SALOMEDSImpl_Study) SALOMEDSImpl_StudyManager::Open(const TCollection_Asc } catch (HDFexception) { -#ifndef WNT - char eStr[strlen(aUrl.ToCString())+17]; -#else +//#ifndef WNT +// char eStr[strlen(aUrl.ToCString())+17]; +//#else char *eStr = new char [strlen(aUrl.ToCString())+17]; -#endif +//#endif sprintf(eStr,"Can't open file %s", aUrl.ToCString()); _errorCode = TCollection_AsciiString(eStr); return NULL; diff --git a/src/SALOMELocalTrace/BaseTraceCollector.cxx b/src/SALOMELocalTrace/BaseTraceCollector.cxx index de6121897..d70735f67 100644 --- a/src/SALOMELocalTrace/BaseTraceCollector.cxx +++ b/src/SALOMELocalTrace/BaseTraceCollector.cxx @@ -29,15 +29,15 @@ #include #include -using namespace std; - #include "BaseTraceCollector.hxx" #include "LocalTraceBufferPool.hxx" +using namespace std; + // Class attributes initialisation, for class method BaseTraceCollector::run BaseTraceCollector* BaseTraceCollector::_singleton = 0; -pthread_mutex_t BaseTraceCollector::_singletonMutex; +pthread_mutex_t BaseTraceCollector::_singletonMutex = PTHREAD_MUTEX_INITIALIZER ; sem_t BaseTraceCollector::_sem; int BaseTraceCollector::_threadToClose = 0; pthread_t* BaseTraceCollector::_threadId = 0; // used to control single run diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index c7d321ec6..a6ffdb3c0 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -51,12 +51,12 @@ using namespace std; // Class static attributes initialisation LocalTraceBufferPool* LocalTraceBufferPool::_singleton = 0; -#ifndef WNT -pthread_mutex_t LocalTraceBufferPool::_singletonMutex; -#else +//#ifndef WNT +//pthread_mutex_t LocalTraceBufferPool::_singletonMutex; +//#else pthread_mutex_t LocalTraceBufferPool::_singletonMutex = PTHREAD_MUTEX_INITIALIZER; -#endif +//#endif BaseTraceCollector *LocalTraceBufferPool::_myThreadTrace = 0; // ============================================================================ diff --git a/src/TestContainer/Makefile.am b/src/TestContainer/Makefile.am index d7d61756a..9d8599c85 100644 --- a/src/TestContainer/Makefile.am +++ b/src/TestContainer/Makefile.am @@ -36,7 +36,10 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am # # header files # Scripts to be installed -dist_salomescript_DATA = SALOME_TestComponentPy.py TestComponentPy.py +dist_salomescript_DATA = \ + SALOME_TestComponentPy.py \ + TestComponentPy.py \ + TestLogger.py # # =============================================================== diff --git a/src/TestContainer/TestComponentPy.py b/src/TestContainer/TestComponentPy.py index 2dacf6dbb..c1f467441 100755 --- a/src/TestContainer/TestComponentPy.py +++ b/src/TestContainer/TestComponentPy.py @@ -62,7 +62,7 @@ except CosNaming.NamingContext.NotFound, ex: sys.exit(1) container = obj._narrow(Engines.Container) -print container._get_machineName() +print container.getHostName() comp = container.load_impl("SALOME_TestComponentPy","SALOME_TestComponentPy") print comp._get_instanceName() comp.ping() diff --git a/src/TestContainer/TestContainer.cxx b/src/TestContainer/TestContainer.cxx index 06b543ea7..b5604d9d1 100644 --- a/src/TestContainer/TestContainer.cxx +++ b/src/TestContainer/TestContainer.cxx @@ -80,7 +80,7 @@ int main (int argc, char * argv[]) { // Initializing omniORB ORB_INIT &init = *SINGLETON_::Instance() ; - CORBA::ORB_var &orb = init( argc , argv ) ; + CORBA::ORB_ptr orb = init( argc , argv ) ; // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb); try @@ -93,6 +93,7 @@ int main (int argc, char * argv[]) CORBA::Object_var obj = _NS.Resolve(containerName.c_str()) ; Engines::Container_var iGenFact = Engines::Container::_narrow(obj); + iGenFact->ping() ; int nbInstances = 5; diff --git a/src/TestContainer/TestLogger.py b/src/TestContainer/TestLogger.py new file mode 100644 index 000000000..2d1aa7e1f --- /dev/null +++ b/src/TestContainer/TestLogger.py @@ -0,0 +1,5 @@ + +from SALOME_utilities import * + +MESSAGE("TestLogger.py : It's OK") + diff --git a/src/Utils/Utils_SignalsHandler.cxx b/src/Utils/Utils_SignalsHandler.cxx index c96747334..019633f8a 100644 --- a/src/Utils/Utils_SignalsHandler.cxx +++ b/src/Utils/Utils_SignalsHandler.cxx @@ -82,7 +82,9 @@ Utils_SignalsHandler::Utils_SignalsHandler() StoreSignalHandler(mySigHandlerCont,SIGHUP); // floating point exception StoreSignalHandler(mySigHandlerCont,SIGQUIT); // quit StoreSignalHandler(mySigHandlerCont,SIGBUS); // bus error +#ifndef __osf1__ StoreSignalHandler(mySigHandlerCont,SIGSTKFLT); // stack fault. +#endif #endif StoreSignalHandler(mySigHandlerCont,SIGFPE); // floating point exception StoreSignalHandler(mySigHandlerCont,SIGINT); // interrupt -- 2.39.2