-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
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`
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
-#!/bin/bash
+#!/bin/sh
./KillCurrentPort
-#!/bin/bash
+#!/bin/sh
#
# --- run command in SALOME environment from remote call, ssh or rsh
# - SALOME configuration is defined by :
# --- 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
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 "$*"
-#!/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
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
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
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
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}
-#!/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 ]
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
-#!/bin/bash
+#!/bin/sh
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
# on sarge, "which" gives not allways the absolute path...
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()
# - 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
-#! /bin/bash
+#! /bin/sh
# print the help message ====================================
--- /dev/null
+#!/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
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()
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):
# 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
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"
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
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
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"
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
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()
# 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)
#
- 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()
#
#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()
# 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
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
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;
($(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 \
.ui.cxx:
$(UIC) -o $@ -i $*.h $<
-
-
#pattern rules
%_moc.cxx : %.h
$(MOC) $< -o $@
$(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
--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
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)
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
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
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
])
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)
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
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
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
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
[ --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
;;
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
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
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"
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=""
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"
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=""
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
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"
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
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"
fi
fi
else
- if test -z $QWT_INCLUDES; then
+ if test -z "$QWT_INCLUDES"; then
QWT_INCLUDES="$QWTHOME/include"
fi
fi
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
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"
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=""
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
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
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"
void HouseKeeping();
std::list<PROTECTED_DELETE*> 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*> *GENERIC_DESTRUCTOR::Destructors = 0;
static bool atExitSingletonDone = false ;
// $Header$
//#define private public
-#include <SALOMEconfig.h>
-#ifndef WNT
-#include CORBA_SERVER_HEADER(SALOME_Component)
-#else
-#include <SALOME_Component.hh>
-#endif
-#include <pthread.h> // must be before Python.h !
-#include <Python.h>
-#include "SALOME_Container_i.hxx"
-#include "SALOME_Component_i.hxx"
-#include "SALOME_NamingService.hxx"
-#include "OpUtil.hxx"
#include <string.h>
#include <stdio.h>
+#include <time.h>
+#include <sys/time.h>
#ifndef WNT
#include <dlfcn.h>
#include <unistd.h>
#include <process.h>
int SIGUSR1 = 1000;
#endif
-#include "Container_init_python.hxx"
#include "utilities.h"
+#include <SALOMEconfig.h>
+#ifndef WNT
+#include CORBA_SERVER_HEADER(SALOME_Component)
+#else
+#include <SALOME_Component.hh>
+#endif
+#include <pthread.h> // must be before Python.h !
+#include "SALOME_Container_i.hxx"
+#include "SALOME_Component_i.hxx"
+#include "SALOME_NamingService.hxx"
+#include "OpUtil.hxx"
+
+#include <Python.h>
+#include "Container_init_python.hxx"
+
using namespace std;
bool _Sleeping = false ;
//=============================================================================
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,
}
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 )
{
// Module : KERNEL
// $Header$
-#include "Container_init_python.hxx"
+#include <time.h>
+#include <sys/time.h>
#include "utilities.h"
+
+#include "Container_init_python.hxx"
+
using namespace std;
PyThreadState *KERNEL_PYTHON::_gtstate = 0;
#endif
#include <iostream>
+#include <strstream>
#include <string>
#include <stdio.h>
+#include <time.h>
+#include <sys/time.h>
+#include <dlfcn.h>
#ifndef WNT
#include <unistd.h>
//CORBA::ORB_var orb = CORBA::ORB_init( argc , argv ) ;
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
- CORBA::ORB_var orb = init(0 , 0 ) ;
+ CORBA::ORB_ptr orb = init(0 , 0 ) ;
// LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
INFOS_COMPILATION;
// 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
Utils_Timer timer;
timer.Start();
timer.Stop();
- MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
timer.ShowAbsolute();
#endif
-
+
HandleServerSideSignals(orb);
}
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]);
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,
//
// See http://www.salome-platform.org/
//
-#include <Launchers.hxx>
+
+#include <time.h>
+#include <sys/time.h>
+
#include "utilities.h"
+#include <Launchers.hxx>
+
using namespace std;
static int Launchers_IsLoaded = 0;
#include <sstream>
#include <iomanip>
+#include <time.h>
+#include <sys/time.h>
+
#include "OpUtil.hxx"
#include "utilities.h"
-#include "Launchers.hxx"
#include <ServiceUnreachable.hxx>
#include "SALOME_ContainerManager.hxx"
#include "SALOME_Component_i.hxx"
#include "SALOME_NamingService.hxx"
+#include "Launchers.hxx"
+
using namespace std;
IncompatibleComponent::IncompatibleComponent( void ):
+#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')
#include "Utils_SINGLETON.hxx"
#include "OpUtil.hxx"
#include "utilities.h"
+#include <time.h>
+#include <sys/time.h>
#include <pthread.h> // must be before Python.h !
#include <Python.h>
#include "Container_init_python.hxx"
SALOME_ModuleCatalog_Acomponent_impl.cxx
libSalomeCatalog_la_CPPFLAGS =\
- -ftemplate-depth-32 \
$(COMMON_CPPFLAGS)
libSalomeCatalog_la_LDFLAGS = -no-undefined -version-info=0:0:0
-#!/bin/bash
+#!/bin/sh
ROOT_SRCDIR=@ROOT_SRCDIR@
export ROOT_SRCDIR
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//===========================================================================
// 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();
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
* 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;
//===========================================================================
// 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();
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();
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
//===========================================================================
// 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();
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);
};
//===========================================================================
// 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();
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
// 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 )
// 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 )
// 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 )
// Author : Sergey RUIN
// Module : SALOME
-#ifndef WNT
-using namespace std;
-#endif
#include "SALOMEDSImpl_AttributeIOR.hxx"
#include <TCollection_AsciiString.hxx>
#include "SALOMEDSImpl_Study.hxx"
#include <Standard_GUID.hxx>
+#ifndef WNT
+using namespace std;
+#endif
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeIOR, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeIOR, SALOMEDSImpl_GenericAttribute )
// 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 )
#include "SALOMEDSImpl_StudyManager.hxx"
-using namespace std;
-
#include <CDF_Session.hxx>
#include <CDF_DirectoryIterator.hxx>
#include <TDF_Label.hxx>
#include <iostream>
#include <stdlib.h>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_StudyManager, MMgt_TShared )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_StudyManager, MMgt_TShared )
}
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;
}
}
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;
#include <fstream>
#include <cstdlib>
-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
// 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;
// ============================================================================
#
# header files
# Scripts to be installed
-dist_salomescript_DATA = SALOME_TestComponentPy.py TestComponentPy.py
+dist_salomescript_DATA = \
+ SALOME_TestComponentPy.py \
+ TestComponentPy.py \
+ TestLogger.py
#
# ===============================================================
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()
{
// Initializing omniORB
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
- CORBA::ORB_var &orb = init( argc , argv ) ;
+ CORBA::ORB_ptr orb = init( argc , argv ) ;
// LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
try
CORBA::Object_var obj = _NS.Resolve(containerName.c_str()) ;
Engines::Container_var iGenFact = Engines::Container::_narrow(obj);
+ iGenFact->ping() ;
int nbInstances = 5;
--- /dev/null
+
+from SALOME_utilities import *
+
+MESSAGE("TestLogger.py : It's OK")
+
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