+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
-
-IF(COMMAND cmake_policy)
- cmake_policy(SET CMP0003 NEW)
-ENDIF(COMMAND cmake_policy)
-
-# Temporary step instead Find Calcium.cmake
-SET(CALCIUM_IDL_INT_F77 long)
-SET(CALCIUM_CORBA_INT_F77 CORBA::Long)
-SET(LONG_OR_INT int)
-
-# Temporary definitions
-SET(DOXYGEN_IS_OK 0)
-IF(WINDOWS)
- SET(CPPUNIT_IS_OK 0)
-ENDIF(WINDOWS)
-SET(WITH_LOCAL 1)
-SET(WITH_BATCH 1)
-
-ENABLE_TESTING()
-SET(VERSION "7.0.0")
-SET(VERSION_DEV "1")
-
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindMPI.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
-
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION}
- OUTPUT_VARIABLE XVERSION)
-
-SET(KERNEL_salomebin_BINS bin/salome)
-
-SET(KERNEL_salomelib_LIBS lib/salome)
-
-SET(KERNEL_salomeidl_IDLS idl/salome)
-
-SET(KERNEL_salomeinclude_HEADERS include/salome)
-
-SET(KERNEL_salomeres_DATA share/salome/resources/kernel)
-
-SET(KERNEL_salomeres_SCRIPTS share/salome/resources/kernel)
-
-SET(KERNEL_salomescript_SCRIPTS bin/salome)
-
-SET(KERNEL_salomescript_DATA bin/salome)
-
-SET(KERNEL_salomescript_PYTHON bin/salome)
-
-SET(KERNEL_appliskel_SCRIPTS bin/salome/appliskel)
-
-SET(KERNEL_appliskel_PYTHON bin/salome/appliskel)
-
-SET(KERNEL_pythondir lib/python${PYTHON_VERSION}/site-packages)
-
-SET(KERNEL_salomepythondir ${KERNEL_pythondir}/salome)
-
-SET(KERNEL_sharedpkgpython_PYTHON ${KERNEL_salomepythondir}/shared_modules)
-
-SET(KERNEL_salomeadmcmake salome_adm/cmake_files)
-
-IF(CORBA_GEN)
- ADD_SUBDIRECTORY(idl)
-ENDIF(CORBA_GEN)
-
-ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(resources)
-
-IF(NOT WITHONLYLAUNCHER)
- ADD_SUBDIRECTORY(bin)
- ADD_SUBDIRECTORY(salome_adm)
- ADD_SUBDIRECTORY(doc)
-ENDIF(NOT WITHONLYLAUNCHER)
-
-SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in)
-SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h)
-MESSAGE(STATUS "Creation of ${output}")
-CONFIGURE_FILE(${input} ${output} @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h DESTINATION ${KERNEL_salomeinclude_HEADERS})
salomeinclude_DATA = KERNEL_version.h
-EXTRA_DIST += \
+EXTRA_DIST = \
build_cmake \
build_cmake.bat \
build_configure \
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(appliskel)
-
-CONFIGURE_FILE(VERSION.in VERSION @ONLY)
-
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${KERNEL_salomebin_BINS})
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are data, module or lib files
-#INSTALL(FILES salome.launch DESTINATION ${KERNEL_salomescript_DATA})
-
-# These files are executable scripts
-SET(SCRIPTS
- appli_clean.sh
- runIDLparser
- addToKillList.py
- appli_gen.py
- envSalome.py
- killSalome.py
- killSalomeWithPort.py
- launchConfigureParser.py
- nameserver.py
- NSparam.py
- orbmodule.py
- ORBConfigFile.py
- parseConfigFile.py
- runSalome.py
- runSession.py
- runConsole.py
- salomeConsole.py
- salomeRunner.py
- salome_session.py
- salome_utils.py
- searchFreePort.py
- server.py
- setenv.py
- showNS.py
- shutdownSalome.py
- virtual_salome.py
- waitContainers.py
- waitNS.py
- )
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_SCRIPTS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# -* Makefile *-
+# -* Makefile *-
# Author : Guillaume Boulant (CSSI)
# Module : KERNEL
# $Header$
#
# These files are data, module or lib files
-dist_salomescript_DATA =
+dist_salomescript_DATA = \
+ config_appli.xml \
+ salome.launch
nodist_salomescript_DATA = \
VERSION
# These files are executable scripts
dist_salomescript_SCRIPTS = \
appli_clean.sh \
- runIDLparser
+ appli_install.sh \
+ createAppli.sh \
+ runIDLparser \
+ runNS.sh \
+ runSalome \
+ runSalome.csh \
+ runSalome.ksh \
+ runSalome.bat \
+ waitNS.sh
# These files are python files
dist_salomescript_PYTHON = \
killSalome.py \
killSalomeWithPort.py \
launchConfigureParser.py \
+ launchSalome.py \
nameserver.py \
NSparam.py \
orbmodule.py \
- ORBConfigFile.py \
- parseConfigFile.py \
+ runNS.py \
runSalome.py \
- runSession.py \
- runConsole.py \
salomeConsole.py \
- salomeRunner.py \
salome_session.py \
- salome_utils.py \
- searchFreePort.py \
+ salome_utils.py \
server.py \
setenv.py \
showNS.py \
install-data-hook:
@for f in $(dist_salomescript_PYTHON) ; do \
- chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \
- done
+ chmod -f a+x $(DESTDIR)$(salomescriptdir)/$$f ; \
+ done
from salome_utils import getORBcfgInfo
my_version, my_host, my_port = getORBcfgInfo()
if info=='host':
+ # keep print, stdout used in shell
+ print my_host
os.environ['NSHOST']=my_host
return my_host
pass
elif info=='port':
+ # keep print, stdout used in shell
+ print my_port
os.environ['NSPORT']=my_port
return my_port
pass
else:
+ # keep print, stdout used in shell
+ print my_host, my_port
return my_host, my_port
pass
-#
# ------------------------------------------------------------------------
if __name__ == "__main__":
- if len(sys.argv) >1:
+ if len(sys.argv) >1:
if sys.argv[1]=='host':
- my_host = getNSparams('host')
- # keep print, stdout used in shell
- print my_host
+ getNSparams('host')
pass
elif sys.argv[1]=='port':
- my_port = getNSparams('port')
- # keep print, stdout used in shell
- print my_port
+ getNSparams('port')
pass
else:
- my_host, my_port = getNSparams()
+ getNSparams()
pass
pass
else:
getNSparams()
- # keep print, stdout used in shell
- print my_host, my_port
pass
pass
-#
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# IMPORTANT NOTE: do not add any print call (cf. note at the bottom of the file)
-def writeORBConfigFile(path, host, port, kwargs={}):
-
- from salome_utils import generateFileName
- omniorb_config = generateFileName(path, prefix="omniORB",
- extension="cfg",
- hidden=True,
- with_hostname=True,
- with_port=port,
- **kwargs)
- import os
- os.environ['OMNIORB_CONFIG'] = omniorb_config
- os.environ['NSPORT'] = "%s"%(port)
- os.environ['NSHOST'] = "%s"%(host)
-
- from omniORB import CORBA
- prefix = "" if CORBA.ORB_ID == "omniORB4" else "ORB"
-
- GIOP_MaxMsgSize=2097152000 # 2 GBytes
-
- orbdata = []
- orbdata.append("%sInitRef = NameService=corbaname::%s:%s"%(prefix,host,port))
- orbdata.append("%sgiopMaxMsgSize = %s # 2 GBytes"%(prefix,GIOP_MaxMsgSize))
- orbdata.append("%straceLevel = 0 # critical errors only"%(prefix))
- orbdata.append("")
-
- f = open(omniorb_config, "w")
- f.write("\n".join(orbdata))
- f.close()
-
- return [ omniorb_config, GIOP_MaxMsgSize ]
-
-# -----------------------------------------------------------------------------
-
-if __name__ == "__main__":
- import sys, getopt
-
- path = sys.argv[1]
- host = sys.argv[2]
- port = sys.argv[3]
- argv = sys.argv[4:]
-
- kwargs = {}
- for a in argv:
- alist = str(a).split("=", 1)
- opt = str(alist[0])
- arg = alist[1]
- kwargs[opt] = arg
- pass
-
- [ filename, msgSize ] = writeORBConfigFile(path, host, port, kwargs)
-
- # :TRICKY: print values so they can be read from caller bash script
- # Example of bash script:
- # RETURN_VALUES=$(python ORBConfigFile.py path host port)
- # RETURN_VALUE_1=$(echo ${RETURN_VALUES} | cut -d' ' -f1)
- # RETURN_VALUE_2=$(echo ${RETURN_VALUES} | cut -d' ' -f2)
- # ...
- # IMPORTANT NOTE: this print call MUST BE the first one!!
- print filename, msgSize
for fn in ('envd',
'getAppliPath.py',
- 'kill_remote_containers.py',
-# 'searchFreePort.sh', # REMOVED
- 'runAppli', # OBSOLETE (replaced by salome.py)
- 'runConsole', # OBSOLETE (replaced by salome.py)
+ 'searchFreePort.sh',
'runRemote.sh',
+ 'runAppli',
+ 'runConsole',
+ 'runSession',
'runSalomeScript',
- 'runSession', # OBSOLETE (replaced by salome.py)
-# 'runTests', # REMOVED
- 'salome.py',
+ 'runTests',
'update_catalogs.py',
+ 'kill_remote_containers.py',
'.bashrc',
):
virtual_salome.symlink("./bin/salome/appliskel/"+fn,os.path.join(home_dir, fn))
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SALOME_ROOT=${HOME}/SALOME2
+INSTALL_ROOT=${SALOME_ROOT}/Install
+
+APPLI_ROOT=`pwd`
+
+# --- clean appli
+rm -rf bin lib share doc envd getAppliPath.py searchFreePort.sh runAppli runConsole runSession env.d
+
+# --- install appli
+
+mkdir -p env.d
+ln -fs bin/salome/appliskel/envd .
+ln -fs bin/salome/appliskel/getAppliPath.py .
+ln -fs bin/salome/appliskel/searchFreePort.sh .
+ln -fs bin/salome/appliskel/runRemote.sh .
+ln -fs bin/salome/appliskel/runAppli .
+ln -fs bin/salome/appliskel/runConsole .
+ln -fs bin/salome/appliskel/runSession .
+ln -fs bin/salome/appliskel/runTests .
+ln -fs bin/salome/appliskel/.bashrc .
+
+# --- prerequisites
+
+if [ x${PREREQUISITE_SH} != x ]; then
+ cp ${PREREQUISITE_SH} env.d/envProducts.sh;
+else
+ # --- unless PREREQUISITE_SH defines the prerequisite script,
+ # edit and uncomment the following line to set it, and comment the echo and exit lines
+ #ln -fs myPathForSalomePrerequisiteScriptToBeSourced env.d/envProducts.sh
+ echo "The file to source for SALOME prerequisite definition is not known:"
+ echo "--> Edit the corresponding line in " $0 ",Comment this message and the following exit command,"
+ exit 1;
+fi
+
+# --- symbolic links creation, from modules_root_dir
+
+VERSION=V3_2_0
+
+for module in KERNEL MED GUI GEOM SMESH VISU LIGHT NETGENPLUGIN PYCALCULATOR;
+do
+ echo " ========= " ${module};
+ python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/${module}_${VERSION}
+ echo "export ${module}_ROOT_DIR=$APPLI_ROOT" >> env.d/configSalome.sh
+done
+
+# --- HELLO module
+
+echo " ========= HELLO1";
+python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/HELLO1_${VERSION}
+echo "export HELLO_ROOT_DIR=$APPLI_ROOT" >> env.d/configSalome.sh
+
+# --- PYHELLO module
+
+echo " ========= PYHELLO1";
+python virtual_salome.py -v --prefix="." --module=$INSTALL_ROOT/PYHELLO1_${VERSION}
+echo "export PYHELLO_ROOT_DIR=$APPLI_ROOT" >> env.d/configSalome.sh
+
+# --- GUI config
+
+echo "export config_var=$APPLI_ROOT:$APPLI_ROOT/share/salome/resources/gui" >> env.d/configGUI.sh
+
+# --- SAMPLES directory
+
+echo "export DATA_DIR=$INSTALL_ROOT/SAMPLES/${VERSION}/SAMPLES_SRC" >> env.d/configSalome.sh
+
+# ---
[ -z "$PS1" ] && return
# prefix prompt with naming server hostname and port
-#export PS1='[NS='${NSHOST}':'${NSPORT}']'${PS1}
-
-NO_COLOR="\[\033[0m\]"
-RED="\[\033[0;31m\]"
-DARK_RED="\[\033[1;31m\]"
-GREEN="\[\033[0;32m\]"
-DARK_GREEN="\[\033[1;32m\]"
-BROWN="\[\033[0;33m\]"
-DARK_BROWN="\[\033[1;33m\]"
-BLUE="\[\033[0;34m\]"
-DARK_BLUE="\[\033[1;34m\]"
-PURPLE="\[\033[0;35m\]"
-DARK_PURPLE="\[\033[1;35m\]"
-CYAN="\[\033[0;36m\]"
-DARK_CYAN="\[\033[1;36m\]"
-
-NS_COLOR=${BROWN}
-HOST_COLOR=${BLUE}
-PORT_COLOR=${PURPLE}
-DEFAULT_COLOR=${NO_COLOR}
-
-export PS1="${DEFAULT_COLOR}[${NS_COLOR}NS=${HOST_COLOR}${NSHOST}${NS_COLOR}:${PORT_COLOR}${NSPORT}${NS_COLOR}${DEFAULT_COLOR}]\$ "
+export PS1='[NS='${NSHOST}':'${NSPORT}']'${PS1}
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are executable scripts
-SET(SCRIPTS
- envd
- runRemote.sh
- runAppli
- runConsole
- runSession
- runSalomeScript
- getAppliPath.py
- update_catalogs.py
- kill_remote_containers.py
- salome.py
-)
-
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_SCRIPTS}/appliskel)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# -* Makefile *-
+# -* Makefile *-
# Author : Renaud Barate (EDF R&D)
# Module : KERNEL
# $Header$
# These files are executable scripts
dist_appliskel_SCRIPTS = \
envd \
+ searchFreePort.sh \
runRemote.sh \
runAppli \
runConsole \
runSession \
runSalomeScript \
+ runTests \
.bashrc
# These files are python files
dist_appliskel_PYTHON = \
getAppliPath.py \
update_catalogs.py \
- kill_remote_containers.py \
- salome.py
+ kill_remote_containers.py
install-data-hook:
@for f in $(dist_appliskel_PYTHON) ; do \
import os
-def get_appli_path(filePath=None):
- if filePath is None:
- filePath = os.path.realpath(os.path.dirname(__file__))
+def relpath(target, base):
+ """ Find relative path from base to target
+ if target== "/local/chris/appli" and base== "/local/chris" the result is appli
+ if target== /tmp/appli and base /local/chris the result is ../../tmp/appli
+ """
+ target=target.split(os.path.sep)
+ base=base.split(os.path.sep)
+ for i in xrange(len(base)):
+ if base[i] != target[i]:
+ i=i-1
+ #not in base
+ break
+ p=['..']*(len(base)-i-1)+target[i+1:]
+ if p == []:
+ return '.'
+ return os.path.join( *p )
- homePath = os.path.realpath(os.getenv('HOME'))
- applipath = os.path.relpath(filePath, homePath)
- return applipath
+def set_var(VAR, strpath):
+ """Set VAR environment variable """
+ value = "%r" % strpath
+ shell = os.getenv('SHELL')
+ if shell and shell.endswith('csh'):
+ return "setenv %s %s" % (VAR, value)
+ else:
+ return "export %s=%s" % (VAR, value)
if __name__ == "__main__":
- applipath = get_appli_path()
- print applipath
+ applipath=relpath(os.path.realpath(os.path.dirname(__file__)),os.path.realpath(os.getenv('HOME')))
+ print applipath
. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
-export NSHOST=$1
-export NSPORT=$2
-# Get (in bash) the configuration filename from (Python) ORBConfigFile return values
-RETURN_VALUES=$(${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ORBConfigFile.py ${HOME}/${APPLI}/USERS ${NSHOST} ${NSPORT} with_username=${USER})
-export OMNIORB_CONFIG=$(echo ${RETURN_VALUES} | cut -d' ' -f1)
+OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_$1_$2.cfg
+export OMNIORB_CONFIG
+NSHOST=$1
+export NSHOST
+NSPORT=$2
+export NSPORT
+initref="NameService=corbaname::"$1":$2"
+echo "InitRef = $initref" > $OMNIORB_CONFIG
#go to the requested working directory if any
if test "x$3" == "xWORKINGDIR"; then
. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
-# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
-# Usage: writeConfigFile PORT HOST
-function writeConfigFile
-{
- if [ $# -ne 2 ]; then
- echo "Usage: $0 PORT HOST"
- return
- fi
- export NSPORT=$1
- export NSHOST=$2
-
- # Get (in bash) the configuration filename from (Python) ORBConfigFile return values
- RETURN_VALUES=$(${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ORBConfigFile.py ${HOME}/${APPLI}/USERS ${NSHOST} ${NSPORT} with_username=${USER})
- export OMNIORB_CONFIG=$(echo ${RETURN_VALUES} | cut -d' ' -f1)
-}
-
-
if test "x${NSPORT}" == "xlast"; then
#PORT is not given
if test "x${NSHOST}" == "xlocalhost"; then
# --- set omniORB configuration to current session if any
fileOmniConfig=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg
if [ -f $fileOmniConfig ]; then
- export OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg
+ OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_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`
+ NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
+ export NSPORT
+ export NSHOST
fi
else
#MACHINE is given PORT is not given
- writeConfigFile 2810 ${NSHOST}
+ NSPORT=2810
+ OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_${NSHOST}_${NSPORT}.cfg
+ export OMNIORB_CONFIG
+ #if omniorb config file exists do not override (perhaps too conservative)
+ if [ ! -f ${OMNIORB_CONFIG} ]; then
+ echo "InitRef = NameService=corbaname::${NSHOST}:${NSPORT}" > ${OMNIORB_CONFIG}
+ fi
+ export NSPORT
+ export NSHOST
fi
else
#PORT is given
if test "x${NSHOST}" == "xlocalhost"; then
#MACHINE is not given PORT is given
- NSHOST=`hostname`
+ NSHOST=`hostname`
fi
- writeConfigFile ${NSPORT} ${NSHOST}
+ OMNIORB_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_${NSHOST}_${NSPORT}.cfg
+ export OMNIORB_CONFIG
+ #if omniorb config file exists do not override (perhaps too conservative)
+ if [ ! -f ${OMNIORB_CONFIG} ]; then
+ echo "InitRef = NameService=corbaname::${NSHOST}:${NSPORT}" > ${OMNIORB_CONFIG}
+ fi
+ export NSPORT
+ export NSHOST
fi
# --- invoke shell with or without args
if [ $# -ne 0 ] ; then
- ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py -exec $*
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py -exec $*
else
- ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
fi
--- /dev/null
+#!/bin/bash
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
+
+APPLI_HOME=`dirname $0`
+export APPLI=`${APPLI_HOME}/getAppliPath.py`
+
+# --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
+
+. ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
+
+# --- define port for CORBA naming service
+
+searchFreePort() {
+ echo -n "Searching for a free port for naming service: "
+ export NSPORT=2810
+ 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}/${APPLI}/USERS/.omniORB_${USER}_${myhost}_${NSPORT}.cfg
+ export OMNIORB_CONFIG
+ export NSPORT
+ NSHOST=${myhost}
+ export NSHOST
+ local initref="NameService=corbaname::"`hostname`":$NSPORT"
+ #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+ echo "InitRef = $initref" > $OMNIORB_CONFIG
+ LAST_RUNNING_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_${myhost}_test.cfg
+ export LAST_RUNNING_CONFIG
+ rm ${LAST_RUNNING_CONFIG}
+ ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
+ 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
+}
+
+# --- if mpi lam, start lam (seems safe to be done several times)
+# arret manuel avec lamhalt
+
+if [ "$LAMBHOST" ]; then
+ lamboot
+fi
+
+# --- invoque shell with or without args
+
+searchFreePort
+
+if [ $# -ne 0 ] ; then
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
+else
+
+ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+fi
+
+rm ${OMNIORB_CONFIG}
+rm ${LAST_RUNNING_CONFIG}
+++ /dev/null
-#! /usr/bin/env python
-
-import os
-import sys
-
-# Preliminary work to initialize path to SALOME Python modules
-def __initialize():
- currentPath = os.path.dirname(__file__)
- homePath = os.path.realpath(os.environ['HOME'])
- appliPath = os.path.relpath(currentPath, homePath)
- absoluteAppliPath = homePath+os.sep+appliPath
- os.environ['APPLI'] = appliPath # needed to convert .sh environment files
- os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath
-
- sys.path[:0] = [absoluteAppliPath+'/bin/salome']
-# End of preliminary work
-
-def __getConfigFileNamesDefault():
- import glob
-
- absoluteAppliPath = os.environ['ABSOLUTE_APPLI_PATH']
- envdDir = absoluteAppliPath + '/env.d'
- if os.path.isdir(envdDir):
- configFileNames = glob.glob(envdDir+os.sep+'*.cfg') + glob.glob(envdDir+os.sep+'*.sh')
- configFileNames = [os.path.basename(x) for x in configFileNames]
- else:
- configFileNames = []
-
- configFileNames = [envdDir+'/'+x for x in configFileNames]
- return configFileNames
-#
-
-def __getConfigFileNames(args):
- # special case: configuration files are provided by user
- # Search for command-line argument(s) --config=file1,file2,..., filen
- configOptionPrefix = "--config="
- configArgs = [ str(x) for x in args if str(x).startswith(configOptionPrefix) ]
-
- if len(configArgs) == 0:
- return __getConfigFileNamesDefault(), args
-
- args = [ x for x in args if not x.startswith(configOptionPrefix) ]
- files = [ x.replace(configOptionPrefix, '') for x in configArgs ]
- configFileNames = []
- for x in files:
- configFileNames += x.split(',')
-
- return configFileNames, args
-#
-
-if __name__ == "__main__":
- args = sys.argv[1:]
-
- # Identify application path then locate configuration files
- __initialize()
- configFileNames, args = __getConfigFileNames(args)
-
- # Create a SalomeRunner which parses configFileNames to initialize environment
- from salomeRunner import SalomeRunner
- runner = SalomeRunner(configFileNames)
-
-
- # Here set specific variables, if needed
- # runner.addToPath('mypath')
- # runner.addToLdLibraryPath('myldlibrarypath')
- # runner.addToPythonPath('mypythonpath')
- # runner.setEnviron('myvarname', 'value')
-
-
- # Start SALOME, parsing command line arguments
- runner.go(args)
-
- print 'Thank you for using SALOME!'
-#
--- /dev/null
+#!/bin/bash
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# --- define port for CORBA naming service
+
+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}/${APPLI}/USERS/.omniORB_${USER}_${myhost}_${NSPORT}.cfg
+ export OMNIORB_CONFIG
+ export NSPORT
+ NSHOST=${myhost}
+ export NSHOST
+ local initref="NameService=corbaname::"`hostname`":$NSPORT"
+ #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+ echo "InitRef = $initref" > $OMNIORB_CONFIG
+ LAST_RUNNING_CONFIG=${HOME}/${APPLI}/USERS/.omniORB_${USER}_last.cfg
+ export LAST_RUNNING_CONFIG
+ rm ${LAST_RUNNING_CONFIG}
+ ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
+ 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
+}
+
--- /dev/null
+<application>
+<prerequisites path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/env_products.sh"/>
+<resources path="myCata.xml"/>
+<modules>
+ <!-- variable name <MODULE>_ROOT_DIR is built with <MODULE> == name attribute value -->
+ <!-- <MODULE>_ROOT_DIR values is set with path attribute value -->
+ <!-- attribute gui (defaults = yes) indicates if the module has a gui interface -->
+ <module name="KERNEL" gui="no" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/KERNEL_INSTALL"/>
+ <module name="GUI" gui="no" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/GUI_4.1.1"/>
+ <module name="MED" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/MED_4.1.1"/>
+ <module name="GEOM" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/GEOM_4.1.1"/>
+ <module name="SMESH" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/SMESH_4.1.1"/>
+ <module name="YACS" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/YACS_4.1.1"/>
+ <module name="VISU" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/VISU_4.1.1"/>
+ <module name="HELLO" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/HELLO1_4.1.1"/>
+ <module name="PYHELLO" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/PYHELLO1_4.1.1"/>
+ <module name="NETGENPLUGIN" gui="no" path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/NETGENPLUGIN_4.1.1"/>
+</modules>
+<samples path="/data/tmplgls/secher/SALOME_V4.1.1_MD08/SAMPLES/4.1.1/SAMPLES_SRC"/>
+</application>
+
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+comName=`which $0`
+rep=`dirname $comName`
+
+if [ $# -ne 1 ]; then
+ echo "--- usage:"
+ echo $0 AppliName
+ echo "--- In which AppliName is a directory to create with SALOME application scripts"
+elif [ -d $1 ]; then
+ echo $1 "directory already exists, nothing done"
+else
+ mkdir -p $1
+ mkdir -p $1/USERS
+ cp -r $rep/appliskel/* $1
+ cp $rep/appliskel/.bashrc $1
+ chmod +x $1/*.sh $1/run* $1/envd
+fi
if __name__ == "__main__":
killAllPorts()
pass
+
os.remove(omniorb_config)
pass
- if os.path.lexists(last_running_config):return
+ if os.path.lexists(last_running_config):return
#try to relink last.cfg to an existing config file if any
files = glob.glob(os.path.join(os.environ["HOME"],Utils_Identity.getapplipath(),
########## kills all salome processes with the given port ##########
-def shutdownMyPort(port, cleanup=True):
+def shutdownMyPort(port):
"""
Shutdown SALOME session running on the specified port.
Parameters:
- port - port number
"""
if not port: return
-
+
from salome_utils import generateFileName
# set OMNIORB_CONFIG variable to the proper file
home = os.getenv("HOME")
appli = os.getenv("APPLI")
kwargs = {}
- if appli is not None:
+ if appli is not None:
home = os.path.join(os.path.realpath(home), appli,"USERS")
kwargs["with_username"]=True
pass
with_port=port,
**kwargs)
os.environ['OMNIORB_CONFIG'] = omniorb_config
- os.environ['NSPORT'] = str(port)
# give the chance to the servers to shutdown properly
try:
import time
- from omniORB import CORBA
- from LifeCycleCORBA import LifeCycleCORBA
+ import salome_kernel
+ orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init()
# shutdown all
- orb = CORBA.ORB_init([''], CORBA.ORB_ID)
- lcc = LifeCycleCORBA(orb)
lcc.shutdownServers()
# give some time to shutdown to complete
time.sleep(1)
# shutdown omniNames and notifd
- if cleanup:
- lcc.killOmniNames()
- time.sleep(1)
- pass
- pass
+ salome_kernel.LifeCycleCORBA.killOmniNames()
except:
pass
pass
-
+
def killMyPort(port):
"""
Kill SALOME session running on the specified port.
- port - port number
"""
from salome_utils import getShortHostName, getHostName
-
+
# try to shutdown session nomally
import threading, time
- threading.Thread(target=shutdownMyPort, args=(port,False)).start()
+ threading.Thread(target=shutdownMyPort, args=(port,)).start()
time.sleep(3) # wait a little, then kill processes (should be done if shutdown procedure hangs up)
-
+
# new-style dot-prefixed pidict file
filedict = getPiDict(port, hidden=True)
# provide compatibility with old-style pidict file (not dot-prefixed)
suffix="Pid_omniNames",
extension="log",
with_port=port)
- if not sys.platform == 'win32':
+ if not sys.platform == 'win32':
cmd = 'pid=`ps -eo pid,command | egrep "[0-9] omniNames -start %s"` ; echo $pid > %s' % ( str(port), fpidomniNames )
a = os.system(cmd)
pass
try:
if sys.platform == "win32":
import win32pm
- win32pm.killpid(int(pid),0)
+ win32pm.killpid(int(pid),0)
else:
os.kill(int(pid),signal.SIGKILL)
pass
#
appliCleanOmniOrbConfig(port)
pass
-
+
def killNotifdAndClean(port):
"""
Kill notifd daemon and clean application running on the specified port.
return
if __name__ == "__main__":
- if len(sys.argv) < 2:
- print "Usage: "
- print " %s <port>" % os.path.basename(sys.argv[0])
- print
- print "Kills SALOME session running on specified <port>."
- sys.exit(1)
- pass
if sys.argv[1] == "--spy":
- if len(sys.argv) > 3:
- pid = sys.argv[2]
- port = sys.argv[3]
- killMyPortSpy(pid, port)
- pass
+ pid = sys.argv[2]
+ port = sys.argv[3]
+ killMyPortSpy(pid, port)
sys.exit(0)
pass
for port in sys.argv[1:]:
# possible choices for the "embedded" and "standalone" parameters
embedded_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "SalomeAppEngine" ]
-standalone_choices = [ "registry", "study", "moduleCatalog", "cppContainer"]
+standalone_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "pyContainer"]
# values of boolean type (must be '0' or '1').
# xml_parser.boolValue() is used for correct setting
if len(vers) > 0: major = int(vers[0])
if len(vers) > 1: minor = int(vers[1])
if len(vers) > 2:
- mr = re.search(r'^([0-9]+)([A-Z]|RC)?([0-9]*)',vers[2], re.I)
+ mr = re.search(r'^([0-9]+)([A-Za-z]?)([0-9]*)',vers[2])
if mr:
release = int(mr.group(1))
- if mr.group(2):
- tag = mr.group(2).strip().lower()
- if tag == "rc":
- dev1 = 49 # release candidate
- elif tag:
- dev1 = ord(tag)-ord('a')+1
- pass
- if mr.group(3):
- dev2 = int(mr.group(3).strip())
+ if mr.group(2).strip(): dev1 = ord(mr.group(2).strip())
+ if mr.group(3).strip(): dev2 = int(mr.group(3).strip())
pass
pass
dev = dev1 * 100 + dev2
ver = ver * 100 + minor
ver = ver * 100 + release
ver = ver * 10000
- if dev > 0: ver = ver - dev
+ if dev > 0: ver = ver - 10000 + dev
return ver
###
# Get default user configuration file name
# For SALOME, it is:
-# - on Linux: ~/.config/salome/SalomeApprc[.<version>]
-# - on Windows: ~/SalomeApp.xml[.<version>]
-# where <version> is an optional version number
+# - on Linux: ~/.config/salome/.SalomeApprc.[version]
+# - on Windows: ~/SalomeApp.xml.[version]
+# where [version] is a version number
###
def defaultUserFile(appname=salomeappname, cfgname=salomecfgname):
v = version()
filename = os.path.join(getHomeDir(), "%s.xml%s" % (appname, v))
else:
if cfgname:
- filename = os.path.join(getHomeDir(), ".config", cfgname, "%src%s" % (appname, v))
+ filename = os.path.join(getHomeDir(), ".config", cfgname, ".%src%s" % (appname, v))
pass
else:
filename = os.path.join(getHomeDir(), ".%src%s" % (appname, v))
# get app version
v = version()
if not v: return None # unknown version
-
+
# get default user file name
filename = defaultUserFile(appname, cfgname)
if not filename: return None # default user file name is bad
-
+
# check that default user file exists
if os.path.exists(filename): return filename # user file is found
# ... calculate default version id
id0 = version_id(v)
if not id0: return None # bad version id -> can't detect appropriate file
-
+
# ... get all existing user preferences files
if sys.platform == "win32":
files = glob.glob(os.path.join(getHomeDir(), "%s.xml.*" % appname))
else:
files = []
- if cfgname:
- # Since v6.6.0 - in ~/.config/salome directory, without dot prefix
- files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, "%src.*" % appname))
- # Since v6.5.0 - in ~/.config/salome directory, dot-prefixed (backward compatibility)
- files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, ".%src.*" % appname))
- pass
- # old style (before v6.5.0) - in ~ directory, dot-prefixed
- files += glob.glob(os.path.join(getHomeDir(), ".%src.*" % appname))
+ if cfgname: files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, ".%src.*" % appname))
+ files += glob.glob(os.path.join(getHomeDir(), ".%src.*" % appname))
pass
# ... loop through all files and find most appopriate file (with closest id)
appr_id = -1
appr_file = ""
for f in files:
- ff = os.path.basename( f )
if sys.platform == "win32":
- match = re.search( r'^%s\.xml\.([a-zA-Z0-9.]+)$'%appname, ff )
+ match = re.search( r'%s\.xml\.([a-zA-Z0-9.]+)$'%appname, f )
else:
- match = re.search( r'^\.?%src\.([a-zA-Z0-9.]+)$'%appname, ff )
+ match = re.search( r'\.%src\.([a-zA-Z0-9.]+)$'%appname, f )
if match:
ver = version_id(match.group(1))
if not ver: continue # bad version id -> skip file
appr_id = ver
appr_file = f
pass
- elif abs(appr_id-id0) == abs(ver-id0):
- if not os.path.basename(f).startswith("."): appr_file = f
- pass
pass
pass
return appr_file
def startElement(self, name, attrs):
self.space.append(name)
self.current = None
-
+
# if we are importing file
if self.space == [doc_tag, import_tag] and nam_att in attrs.getNames():
self.importFile( attrs.getValue(nam_att) )
-
+
# if we are analyzing "section" element and its "name" attribute is
# either "launch" or module name -- set section_name
if self.space == [doc_tag, sec_tag] and nam_att in attrs.getNames():
def endDocument(self):
self.read = None
pass
-
+
def importFile(self, fname):
# get absolute name
if os.path.isabs (fname) :
absfname = fname
else:
absfname = os.path.join(os.path.dirname(self.fileName), fname)
-
+
# check existing and registry file
for ext in ["", ".xml", ".XML"] :
if os.path.exists(absfname + ext) :
else:
if verbose(): print "Configure parser: Error : file %s does not exist" % absfname
return
-
+
# importing file
try:
# copy current options
except:
if verbose(): print "Configure parser: Error : can not read configuration file %s" % absfname
pass
-
+
# -----------------------------------------------------------------------------
# Process --print-port option
if cmd_opts.print_port:
- from searchFreePort import searchFreePort
+ from runSalome import searchFreePort
searchFreePort({})
print "port:%s"%(os.environ['NSPORT'])
sys.exit(0)
--- /dev/null
+#! /usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+import socket
+import os
+import sys
+import shutil
+
+#####################################################################
+def findFreePort(startPort, step) :
+
+ currentPort = startPort;
+ if step < 1:
+ step = 1;
+
+ serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM);
+
+ portFound = 0;
+ while (portFound != 1 and currentPort < 65536):
+ try :
+ serversocket.bind((socket.gethostname(), currentPort));
+ portFound = 1;
+ print str(currentPort) + ": " + "OK";
+# serversocket.shutdown(0);
+# serversocket.close();
+ except Exception, inst:
+ print str(currentPort) + ": " + str(inst.args);
+ currentPort = currentPort+step;
+
+
+
+
+ if (portFound != 1) :
+ currentPort = -1;
+ return currentPort;
+#####################################################################
+
+
+
+## 1. Generate config file for omniORB:
+# content:
+# InitRef = NameService=corbaname::[HOST_NAME]:[PORT_NUMBER]
+
+freePort = findFreePort(2810, 1);
+hostName = socket.gethostname();
+
+if (len(sys.argv) > 1) and sys.argv[1] == "-nothing" :
+ print "port:" + str(freePort);
+ sys.exit(0)
+
+
+
+
+if freePort < 0 :
+ print
+ print "Can't find a free port to launch omniNames"
+ print "Try to kill the running servers and then launch SALOME again."
+ print
+ sys.exit(0)
+
+else :
+ omniCfgFileContent = "InitRef = NameService=corbaname::" + str(hostName) + ":" + str(freePort);
+ omniCfgFilePath = os.environ.get('HOME') + "/" + ".omniORB_" + str(hostName) + "_" + str(freePort) + ".cfg";
+
+ omni_file = file(omniCfgFilePath,'w+');
+ omni_file.write(omniCfgFileContent);
+ omni_file.write("\n");
+ omni_file.close();
+
+ if (len(sys.argv) > 1) and sys.argv[1] == "--save-config" :
+ omniCfgCurrent = os.environ.get('HOME') + "/.omniORB_current.cfg";
+ if os.name == "posix" :
+ #make a symbolic link
+ symlink(omniCfgFilePath, omniCfgCurrent);
+ else :
+ #copy the file
+ shutil.copy(omniCfgFilePath, omniCfgCurrent);
+
+ omniCfgFilePath = omniCfgCurrent;
+
+
+
+
+ ## 2. Set the OMNIORB_CONFIG environment variable
+ os.environ['OMNIORB_CONFIG']=omniCfgFilePath;
+
+
+ ## 3. execute the file runSalome.py
+ runSalomePyFilePath = os.environ.get('KERNEL_ROOT_DIR') + "/bin/salome/runSalome.py";
+
+ if os.path.isfile(runSalomePyFilePath) :
+ execfile(runSalomePyFilePath);
+
"""Client for SALOME"""
def __init__(self,args=None):
+ #set GIOP message size for bug 10560: impossible to get field values in TUI mode
+ sys.argv.extend(["-ORBgiopMaxMsgSize", "104857600"]) ## = 100 * 1024 * 1024
# Initialise the ORB
self.orb=CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
-
# Initialise the Naming Service
self.initNS(args or {})
except (CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE):
self.rootContext = None
if verbose(): print "Launch Naming Service++",
-
+
# On lance le Naming Server (doit etre dans le PATH)
test = True
if args['wake_up_session']:
count += 1
if count > maxcount : raise RuntimeError, "Impossible de trouver %s" % name
obj=self.Resolve(name)
- if obj :
+ if obj :
print " found in %s seconds " % ((count-1)*delta)
break
else:
sys.stdout.write('+')
sys.stdout.flush()
time.sleep(delta)
-
+
if typobj is None:return obj
nobj = obj._narrow(typobj)
raise RuntimeError, "Process %d for %s not found" % (thePID,theName)
aCount += 1
anObj = self.Resolve(theName)
- if anObj:
+ if anObj:
print " found in %s seconds " % ((aCount-1)*aDelta)
break
else:
time.sleep(aDelta)
pass
pass
-
+
if theTypObj is None:
return anObj
except (CORBA.TRANSIENT,CORBA.OBJECT_NOT_EXIST,CORBA.COMM_FAILURE):
obj = None
return obj
-
+
# --------------------------------------------------------------------------
def waitLogger(self,name,typobj=None,maxcount=40):
count += 1
if count > maxcount : raise RuntimeError, "Impossible de trouver %s" % name
obj=self.ResolveLogger(name)
- if obj :
+ if obj :
print " found in %s seconds " % ((count-1)*delta)
break
else:
sys.stdout.write('+')
sys.stdout.flush()
time.sleep(delta)
-
+
if typobj is None:return obj
nobj = obj._narrow(typobj)
if nobj is None:
print "%s exists but is not a %s" % (name,typobj)
return nobj
+
+++ /dev/null
-import ConfigParser
-import os
-import logging
-import re
-from io import StringIO
-
-logging.basicConfig()
-logConfigParser = logging.getLogger(__name__)
-
-RESERVED_PREFIX = 'ADD_TO_'
-
-
-# :TRICKY: So ugly solution...
-class MultiOptSafeConfigParser(ConfigParser.SafeConfigParser):
- def __init__(self):
- ConfigParser.SafeConfigParser.__init__(self)
-
- # copied from python 2.6.8 Lib.ConfigParser.py
- # modified (see code comments) to handle duplicate keys
- def _read(self, fp, name):
- """Parse a sectioned setup file.
-
- The sections in setup file contains a title line at the top,
- indicated by a name in square brackets (`[]'), plus key/value
- options lines, indicated by `name: value' format lines.
- Continuations are represented by an embedded newline then
- leading whitespace. Blank lines, lines beginning with a '#',
- and just about everything else are ignored.
- """
- cursect = None # None, or a dictionary
- optname = None
- lineno = 0
- e = None # None, or an exception
- while True:
- line = fp.readline()
- if not line:
- break
- lineno = lineno + 1
- # comment or blank line?
- if line.strip() == '' or line[0] in '#;':
- continue
- if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR":
- # no leading whitespace
- continue
- # continuation line?
- if line[0].isspace() and cursect is not None and optname:
- value = line.strip()
- if value:
- cursect[optname].append(value)
- # a section header or option header?
- else:
- # is it a section header?
- mo = self.SECTCRE.match(line)
- if mo:
- sectname = mo.group('header')
- if sectname in self._sections:
- cursect = self._sections[sectname]
- elif sectname == ConfigParser.DEFAULTSECT:
- cursect = self._defaults
- else:
- cursect = self._dict()
- cursect['__name__'] = sectname
- self._sections[sectname] = cursect
- # So sections can't start with a continuation line
- optname = None
- # no section header in the file?
- elif cursect is None:
- raise MissingSectionHeaderError(fpname, lineno, line)
- # an option line?
- else:
- mo = self.OPTCRE.match(line)
- if mo:
- optname, vi, optval = mo.group('option', 'vi', 'value')
- optname = self.optionxform(optname.rstrip())
- # This check is fine because the OPTCRE cannot
- # match if it would set optval to None
- if optval is not None:
- if vi in ('=', ':') and ';' in optval:
- # ';' is a comment delimiter only if it follows
- # a spacing character
- pos = optval.find(';')
- if pos != -1 and optval[pos-1].isspace():
- optval = optval[:pos]
- optval = optval.strip()
- # allow empty values
- if optval == '""':
- optval = ''
- # REPLACE following line (original):
- #cursect[optname] = [optval]
- # BY THESE LINES:
- # Check if this optname already exists
- if (optname in cursect) and (cursect[optname] is not None):
- cursect[optname][0] += ','+optval
- else:
- cursect[optname] = [optval]
- # END OF SUBSITUTION
- else:
- # valueless option handling
- cursect[optname] = optval
- else:
- # a non-fatal parsing error occurred. set up the
- # exception but keep going. the exception will be
- # raised at the end of the file and will contain a
- # list of all bogus lines
- if not e:
- e = ParsingError(fpname)
- e.append(lineno, repr(line))
- # if any parsing errors occurred, raise an exception
- if e:
- raise e
-
- # join the multi-line values collected while reading
- all_sections = [self._defaults]
- all_sections.extend(self._sections.values())
- for options in all_sections:
- for name, val in options.items():
- if isinstance(val, list):
- options[name] = '\n'.join(val)
- #
-
-
-# Parse configuration file
-# Input: filename, and a list of reserved keywords (environment variables)
-# Output: a list of pairs (variable, value), and a dictionary associating a list of user-defined values to each reserved keywords
-# Note: Does not support duplicate keys in a same section
-def parseConfigFile(filename, reserved = []):
- config = MultiOptSafeConfigParser()
- config.optionxform = str # case sensitive
-
- # :TODO: test file existence
-
- # Read config file
- try:
- config.read(filename)
- except ConfigParser.MissingSectionHeaderError:
- logConfigParser.error("No section found in file: %s"%(filename))
- return []
-
- return _processConfigFile(config, reserved)
-#
-
-def _processConfigFile(config, reserved = []):
- # :TODO: may detect duplicated variables in the same section (raise a warning)
- # or even duplicate sections
-
- outputVariables = []
- # Get raw items for each section, and make some processing for environment variables management
- reservedKeys = [RESERVED_PREFIX+str(x) for x in reserved] # produce [ 'ADD_TO_reserved_1', 'ADD_TO_reserved_2', ..., ADD_TO_reserved_n ]
- reservedValues = dict([str(i),[]] for i in reserved) # create a dictionary in which keys are the 'ADD_TO_reserved_i' and associated values are empty lists: { 'reserved_1':[], 'reserved_2':[], ..., reserved_n:[] }
- sections = config.sections()
- for section in sections:
- entries = config.items(section, raw=False) # use interpolation
- if len(entries) == 0: # empty section
- logConfigParser.warning("Empty section: %s in file: %s"%(section, filename))
- pass
- for key,val in entries:
- if key in reserved:
- logConfigParser.error("Invalid use of reserved variable: %s in file: %s"%(key, filename))
- else:
- expandedVal = os.path.expandvars(val) # expand environment variables
- # Search for not expanded variables (i.e. non-existing environment variables)
- pattern = re.compile('\${ ( [^}]* ) }', re.VERBOSE) # string enclosed in ${ and }
- expandedVal = pattern.sub(r'', expandedVal) # remove matching patterns
- # Trim colons
- expandedVal = _trimColons(expandedVal)
-
- if key in reservedKeys:
- shortKey = key[len(RESERVED_PREFIX):]
- vals = expandedVal.split(',')
- reservedValues[shortKey] += vals
- # remove left&right spaces on each element
- vals = [v.strip(' \t\n\r') for v in vals]
- else:
- outputVariables.append((key, expandedVal))
- pass
- pass # end if key
- pass # end for key,val
- pass # end for section
-
- return outputVariables, reservedValues
-#
-
-def _trimColons(var):
- v = var
- # Remove leading and trailing colons (:)
- pattern = re.compile('^:+ | :+$', re.VERBOSE)
- v = pattern.sub(r'', v) # remove matching patterns
- # Remove multiple colons
- pattern = re.compile('::+', re.VERBOSE)
- v = pattern.sub(r':', v) # remove matching patterns
- return v
-#
-
-# This class is used to parse .sh environment file
-# It deals with specific treatments:
-# - virtually add a section to configuration file
-# - process shell keywords (if, then...)
-class EnvFileConverter(object):
- def __init__(self, fp, section_name, reserved = [], outputFile=None):
- self.fp = fp
- self.sechead = '[' + section_name + ']\n'
- self.reserved = reserved
- self.outputFile = outputFile
- self.allParsedVariableNames=[]
- # exclude line that begin with:
- self.exclude = [ 'if', 'then', 'fi', '#' ]
- # discard the following keywords if at the beginning of line:
- self.discard = [ 'export' ]
-
- def readline(self):
- if self.sechead:
- try:
- if self.outputFile is not None:
- self.outputFile.write(self.sechead)
- return self.sechead
- finally:
- self.sechead = None
- else:
- line = self.fp.readline()
- # trim whitespaces
- line = line.strip(' \t\n\r')
- # line of interest? (not beginning by a keyword of self.exclude)
- for k in self.exclude:
- if line.startswith(k):
- return '\n'
- # look for substrinsg beginning with sharp charcter ('#')
- line = re.sub(r'#.*$', r'', line)
- # line to be pre-processed? (beginning by a keyword of self.discard)
- for k in self.discard:
- if line.startswith(k):
- line = line[len(k):]
- line = line.strip(' \t\n\r')
- # process reserved keywords
- for k in self.reserved:
- if line.startswith(k) and "=" in line:
- variable, value = line.split('=')
- value = self._purgeValue(value, k)
- line = RESERVED_PREFIX + k + ": " + value
- # Update list of variable names
- if "=" in line:
- variable, value = line.split('=')
- self.allParsedVariableNames.append(variable)
- # Self-extending variables that are not in reserved keywords
- # Example: FOO=something:${FOO}
- # :TODO:
- #
- # replace "${FOO}" and "$FOO" and ${FOO} and $FOO by %(FOO)s if FOO is
- # defined in current file (i.e. it is not an external environment variable)
- for k in self.allParsedVariableNames:
- key = r'\$\{?'+k+'\}?'
- pattern = re.compile(key, re.VERBOSE)
- line = pattern.sub(r'%('+k+')s', line)
- # Remove quotes
- pattern = re.compile(r'\"', re.VERBOSE)
- line = pattern.sub(r'', line)
- #
- # Replace `shell_command` by its result
- def myrep(obj):
- obj = re.sub('`', r'', obj.group(0)) # remove quotes
- import subprocess
- res = subprocess.Popen([obj], stdout=subprocess.PIPE).communicate()[0]
- res = res.strip(' \t\n\r') # trim whitespaces
- return res
- #
- line = re.sub('`[^`]+`', myrep, line)
- #
- if self.outputFile is not None:
- self.outputFile.write(line+'\n')
- return line
-
- def _purgeValue(self, value, name):
- # Replace foo:${PATTERN}:bar or foo:$PATTERN:bar by foo:bar
- key = r'\$\{?'+name+'\}?'
- pattern = re.compile(key, re.VERBOSE)
- value = pattern.sub(r'', value)
-
- # trim colons
- value = _trimColons(value)
-
- return value
- #
-
-# Convert .sh environment file to configuration file format
-def convertEnvFileToConfigFile(envFilename, configFilename):
- #reserved=['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH']
- reserved=['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH', 'MANPATH', 'R_LIBS', 'PV_PLUGIN_PATH']
- fileContents = open(envFilename, 'r').read()
-
- pattern = re.compile('\n[\n]+', re.VERBOSE) # multiple '\n'
- fileContents = pattern.sub(r'\n', fileContents) # replace by a single '\n'
-
- finput = StringIO(unicode(fileContents))
- foutput = open(configFilename, 'w')
-
- config = MultiOptSafeConfigParser()
- config.optionxform = str # case sensitive
- config.readfp(EnvFileConverter(finput, 'SALOME Configuration', reserved, outputFile=foutput))
- foutput.close()
-
- logConfigParser.info('Configuration file generated: %s'%configFilename)
-#
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-def __prompt(vars = None, commands=[], message = "Connecting to SALOME"):
- if vars is None:
- vars = globals()
- import code
- import rlcompleter
- import readline
- readline.parse_and_bind("tab: complete")
- # calling this with globals ensures we can see the environment
- print message
- shell = code.InteractiveConsole(vars)
- for cmd in commands:
- shell.push(cmd)
- return shell.interact
-#
-
-def connect(args=[]):
- p = __prompt(commands=["import salomeConsole"])
- p()
-#
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#log files localization
+#
+import os, commands, sys, re, string, socket
+from Utils_Identity import getShortHostName
+
+if sys.platform == "win32":
+ # temporarily using home directory for Namning Service logs
+ # to be replaced with TEMP later...
+ os.environ["BaseDir"]=os.environ["HOME"]
+else:
+ os.environ["BaseDir"]="/tmp"
+
+os.environ["Username"]=os.environ["USER"]
+
+# kill OmniNames if exists
+
+#killall -q -9 omniNames
+
+# clear log files
+
+def startOmni():
+ try:
+ os.mkdir(os.environ["BaseDir"] + "/logs")
+ os.chmod(os.environ["BaseDir"] + "/logs", 0777)
+ except:
+ #print "Can't create " + os.environ["BaseDir"] + "/logs"
+ pass
+
+ upath = os.environ["BaseDir"] + "/logs/" + os.environ["Username"]
+
+ try:
+ os.mkdir(upath)
+ except:
+ #print "Can't create " + upath
+ pass
+
+ #os.system("touch " + upath + "/dummy")
+ for fname in os.listdir(upath):
+ try:
+ if not fname.startswith("."): os.remove(upath + "/" + fname)
+ except:
+ pass
+ #os.system("rm -f " + upath + "/omninames* " + upath + "/dummy " + upath + "/*.log")
+
+ print "Name Service... "
+ #hname=os.environ["HOST"] #commands.getoutput("hostname")
+ if sys.platform == "win32":
+ hname=getShortHostName()
+ else:
+ hname=socket.gethostname()
+
+ print "hname=",hname
+
+ f=open(os.environ["OMNIORB_CONFIG"])
+ ss=re.findall("NameService=corbaname::" + hname + ":\d+", f.read())
+ print "ss = ", ss
+ f.close()
+ aPort=re.findall("\d+", ss[0])[0]
+
+ #aSedCommand="s/.*NameService=corbaname::" + hname + ":\([[:digit:]]*\)/\1/"
+ #print "sed command = ", aSedCommand
+ #aPort = commands.getoutput("sed -e\"" + aSedCommand + "\"" + os.environ["OMNIORB_CONFIG"])
+ global process_id
+ print "port=", aPort
+ if sys.platform == "win32":
+ #import win32pm
+ #command = ['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"']
+ #os.system("start omniNames -start " + aPort + " -logdir " + "\"" + upath + "\"" )
+ command = "start omniNames -start " + aPort + " -logdir " + "\"" + upath + "\""
+ #print command
+ pid = win32pm.spawnpid( string.join(command, " "), -nc )
+ process_id[pid]=command
+ else:
+ os.system("omniNames -start " + aPort + " -logdir " + upath + " &")
+
+ print "ok"
+ print "to list contexts and objects bound into the context with the specified name : showNS "
+
+# In LifeCycleCORBA, FactoryServer is started with rsh on the requested
+# computer if this Container does not exist. Default is localhost.
+# Others Containers are started with start_impl method of FactoryServer Container.
+# For using rsh it is necessary to have in the ${HOME} directory a .rhosts file
+# Warning : on RedHat the file /etc/hosts contains by default a line like :
+# 127.0.0.1 bordolex bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+# (bordolex is the station name). omniNames on bordolex will be accessible from other
+# computers only if the computer name is removed on that line like :
+# 127.0.0.1 bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+
+# To start dynamically Containers on several computers you need to
+# put in the ${OMNIORB_CONFIG} file a computer name instead of "localhost"
+# example : ORBInitRef NameService=corbaname::dm2s0017
+
+# If you need to use several omniNames running on the same computer, you have to :
+#1. put in your ${OMNIORB_CONFIG} file a computer name and port number
+# example : ORBInitRef NameService=corbaname::dm2s0017:1515
+#2. start omninames with this port number in runNS.sh
+# example : omniNames -start 1515 -logdir ${BaseDir}/logs/${Username} &
--- /dev/null
+#!/bin/sh
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+#log files localization
+#
+BaseDir=/tmp
+Username=`/usr/bin/whoami`
+
+# kill OmniNames if exists
+
+#killall -q -9 omniNames
+
+# clear log files
+
+mkdir -m 777 ${BaseDir}/logs
+mkdir ${BaseDir}/logs/${Username}
+touch ${BaseDir}/logs/${Username}/dummy
+\rm -f ${BaseDir}/logs/${Username}/omninames* ${BaseDir}/logs/${Username}/dummy ${BaseDir}/logs/${Username}/*.log
+
+echo "Name Service... "
+aSedCommand="s/.*NameService=corbaname::`hostname`:\([[:digit:]]*\)/\1/"
+aPort=`cat $OMNIORB_CONFIG | grep NameService | sed -e"$aSedCommand"`
+omniNames -start $aPort -logdir ${BaseDir}/logs/${Username} &
+
+# In LifeCycleCORBA, FactoryServer is started with rsh on the requested
+# computer if this Container does not exist. Default is localhost.
+# Others Containers are started with start_impl method of FactoryServer Container.
+# For using rsh it is necessary to have in the ${HOME} directory a .rhosts file
+# Warning : on RedHat the file /etc/hosts contains by default a line like :
+# 127.0.0.1 bordolex bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+# (bordolex is the station name). omniNames on bordolex will be accessible from other
+# computers only if the computer name is removed on that line like :
+# 127.0.0.1 bordolex.paris1.matra-dtv.fr localhost.localdomain localhost
+
+# To start dynamically Containers on several computers you need to
+# put in the ${OMNIORB_CONFIG} file a computer name instead of "localhost"
+# example : ORBInitRef NameService=corbaname::dm2s0017
+
+# If you need to use several omniNames running on the same computer, you have to :
+#1. put in your ${OMNIORB_CONFIG} file a computer name and port number
+# example : ORBInitRef NameService=corbaname::dm2s0017:1515
+#2. start omninames with this port number in runNS.sh
+# example : omniNames -start 1515 -logdir ${BaseDir}/logs/${Username} &
+
+echo ok
+echo "to list contexts and objects bound int the context with the specified name : showNS "
--- /dev/null
+#!/bin/bash
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py $*
+
+# -----------------------------------------------------------------------------
+# examples:
+# ---------
+# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome
+#
+# - parameters for launching are taken from SalomeApp.xml;
+# - if the config file does not exist, it is created with default values.
+#
+#
+# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer --xterm --killall
+#
+# parameters from command line supersede those from SalomeApp.xml
+#
+# 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
+#
+# $: ${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)
+#
+# -----------------------------------------------------------------------------
--- /dev/null
+@REM Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+@REM
+@REM Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+@REM CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+@REM
+@REM This library is free software; you can redistribute it and/or
+@REM modify it under the terms of the GNU Lesser General Public
+@REM License as published by the Free Software Foundation; either
+@REM version 2.1 of the License.
+@REM
+@REM This library is distributed in the hope that it will be useful,
+@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+@REM Lesser General Public License for more details.
+@REM
+@REM You should have received a copy of the GNU Lesser General Public
+@REM License along with this library; if not, write to the Free Software
+@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+@REM
+@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+@REM
+
+@"%PYTHONBIN%" "%KERNEL_ROOT_DIR%\bin\salome\envSalome.py" "%PYTHONBIN%" "%KERNEL_ROOT_DIR%\bin\salome\runSalome.py" %*\r
--- /dev/null
+#!/bin/csh -f
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+runSalome --gui --modules=GEOM,SMESH,VISU,MED --killall
--- /dev/null
+#!/bin/ksh
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+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 ${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 SalomeApp.xml;
+# - if the config file does not exist, it is created with default values.
+#
+#
+# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer --xterm --killall
+#
+# parameters from command line supersede those from SalomeApp.xml
+#
+# 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
+#
+# $: ${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 --killall
from launchConfigureParser import verbose
from server import process_id, Server
+if sys.platform == "win32":
+ SEP = ";"
+else:
+ SEP = ":"
+
# -----------------------------------------------------------------------------
from killSalome import killAllPorts
kill servers from a previous SALOME exection, if needed,
on the CORBA port given in args of runSalome
"""
-
+
from killSalomeWithPort import killMyPort
my_port=str(args['port'])
try:
print "problem in killLocalPort()"
pass
pass
-
+
def givenPortKill(port):
"""
kill servers from a previous SALOME exection, if needed,
on the same CORBA port
"""
-
+
from killSalomeWithPort import killMyPort
my_port=port
try:
self.CMD=['xterm', '-e']+ env_ld_library_path + ['python']
else:
self.CMD=['cmd', '/c', 'start cmd.exe', '/K', 'python']
-
+
def run(self):
global process_id
command = self.CMD
cata_path.append(cata_file)
modules_cata[module]=cata_file
- for path in os.getenv("SALOME_CATALOGS_PATH","").split(os.pathsep):
+ for path in os.getenv("SALOME_CATALOGS_PATH","").split(SEP):
if os.path.exists(path):
for cata_file in glob.glob(os.path.join(path,"*Catalog.xml")):
module_name= os.path.basename(cata_file)[:-11]
self.SCMD2=[]
home_dir=os.getenv('HOME')
if home_dir is not None:
- self.SCMD2=['-personal',os.path.join(home_dir,'Salome/resources/CatalogModulePersonnel.xml')]
+ self.SCMD2=['-personal',os.path.join(home_dir,'Salome/resources/CatalogModulePersonnel.xml')]
def setpath(self,modules_list,modules_root_dir):
list_modules = modules_list[:]
# ---
+class ContainerPYServer(Server):
+ def __init__(self,args):
+ self.args=args
+ self.initArgs()
+ if sys.platform == "win32":
+ self.CMD=[os.environ["PYTHONBIN"], '\"'+os.environ["KERNEL_ROOT_DIR"] + '/bin/salome/SALOME_ContainerPy.py'+'\"','FactoryServerPy']
+ else:
+ self.CMD=['SALOME_ContainerPy.py','FactoryServerPy']
+
+# ---
+
class LoggerServer(Server):
def __init__(self,args):
self.args=args
self.SCMD1+=['--with','ModuleCatalog','(','-common']
home_dir=os.getenv('HOME')
if home_dir is not None:
- self.SCMD2+=['-personal',os.path.join(home_dir,'Salome/resources/CatalogModulePersonnel.xml')]
+ self.SCMD2+=['-personal',os.path.join(home_dir,'Salome/resources/CatalogModulePersonnel.xml')]
self.SCMD2+=[')']
if 'study' in self.args['embedded']:
self.SCMD2+=['--with','SALOMEDS','(',')']
self.SCMD2+=['--with','Container','(','FactoryServer',')']
if 'SalomeAppEngine' in self.args['embedded']:
self.SCMD2+=['--with','SalomeAppEngine','(',')']
-
+
if 'cppContainer' in self.args['standalone'] or 'cppContainer' in self.args['embedded']:
self.SCMD2+=['CPP']
if 'pyContainer' in self.args['standalone'] or 'pyContainer' in self.args['embedded']:
- raise Exception('Python containers no longer supported')
+ self.SCMD2+=['PY']
if self.args['gui']:
session_gui = True
if self.args.has_key('session_gui'):
self.SCMD2+=['--study-hdf=%s'%self.args['study_hdf']]
pass
pass
- if self.args.has_key('pyscript') and len(self.args['pyscript']) > 0:
- self.SCMD2+=['--pyscript=%s'%(",".join(self.args['pyscript']))]
- pass
- pass
pass
if self.args['noexcepthandler']:
self.SCMD2+=['noexcepthandler']
list_modules.insert(0,m)
list_modules.reverse()
self.SCMD2+=['--modules (%s)' % ":".join(list_modules)]
- pass
- pass
+
+ if self.args.has_key('pyscript') and len(self.args['pyscript']) > 0:
+ self.SCMD2+=['--pyscript=%s'%(",".join(self.args['pyscript']))]
def setpath(self,modules_list,modules_root_dir):
list_modules = modules_list[:]
self.CMD = ["xterm", "-e", "gdb", "--command=.gdbinit4salome", self.CMD[0]]
pass
pass
-
+
if self.args["valgrind_session"]:
l = ["valgrind"]
val = os.getenv("VALGRIND_OPTIONS")
pass
self.CMD = l + self.CMD
pass
-
+
# ---
class LauncherServer(Server):
import SALOME_Session_idl
session=clt.waitNS("/Kernel/Session",SALOME.Session)
session.GetInterface()
-
+
# -----------------------------------------------------------------------------
def startSalome(args, modules_list, modules_root_dir):
init_time = os.times()
if verbose(): print "startSalome ", args
-
+
#
# Set server launch command
#
if args.has_key('server_launch_mode'):
Server.set_server_launch_mode(args['server_launch_mode'])
-
+
#
# Wake up session option
#
home = os.getenv("HOME")
appli = os.getenv("APPLI")
kwargs={}
- if appli is not None:
+ if appli is not None:
home = os.path.join(os.path.realpath(home), appli,"USERS")
kwargs["with_username"] = True
pass
os.environ['OMNIORB_CONFIG'] = last_running_config
pass
pass
-
+
#
# Initialisation ORB and Naming Service
#
-
+
clt=orbmodule.client(args)
#
session.GetInterface()
args["session_object"] = session
return clt
-
+
# Save Naming service port name into
# the file args["ns_port_log_file"]
if args.has_key('ns_port_log_file'):
if sys.platform != "win32":
if verbose(): print "Notify Server to launch"
-
+
myServer=NotifyServer(args,modules_root_dir)
myServer.run()
#
# Launch LauncherServer
#
-
+
myCmServer = LauncherServer(args)
myCmServer.setpath(modules_list,modules_root_dir)
myCmServer.run()
from Utils_Identity import getShortHostName
-
+
if os.getenv("HOSTNAME") == None:
if os.getenv("HOST") == None:
os.environ["HOSTNAME"]=getShortHostName()
os.environ["HOSTNAME"]=os.getenv("HOST")
theComputer = getShortHostName()
-
+
#
# Launch local C++ Container (FactoryServer),
# and wait until it is registered in naming service
#
- if ('cppContainer' in args['standalone']) | (args["gui"] == 0) :
+ if ('cppContainer' in args['standalone']) | (args["gui"] == 0) :
myServer=ContainerCPPServer(args)
myServer.run()
if sys.platform == "win32":
#
if 'pyContainer' in args['standalone']:
- raise Exception('Python containers no longer supported')
+ myServer=ContainerPYServer(args)
+ myServer.run()
+ if sys.platform == "win32":
+ clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy")
+ else:
+ clt.waitNSPID("/Containers/" + theComputer + "/FactoryServerPy",myServer.PID)
#
# Wait until Session Server is registered in naming service
#
-
+
if args["gui"]:
-##----------------
+##----------------
import Engines
import SALOME
import SALOMEDS
# additionnal external python interpreters
#
nbaddi=0
-
+
try:
if 'interp' in args:
nbaddi = args['interp']
print "-------------------------------------------------------------"
print "-- to get an external python interpreter:runSalome --interp=1"
print "-------------------------------------------------------------"
-
+
if verbose(): print "additional external python interpreters: ", nbaddi
if nbaddi:
for i in range(nbaddi):
import readline
except ImportError:
pass
-
+
return clt
# -----------------------------------------------------------------------------
show registered objects in Naming Service.
"""
global process_id
-
+
clt=None
try:
clt = startSalome(args, modules_list, modules_root_dir)
print
print
print "--- Error during Salome launch ---"
-
+
#print process_id
from addToKillList import addToKillList
if verbose(): print """
Saving of the dictionary of Salome processes in %s
To kill SALOME processes from a console (kill all sessions from all ports):
- python killSalome.py
+ python killSalome.py
To kill SALOME from the present interpreter, if it is not closed :
killLocalPort() --> kill this session
(use CORBA port from args of runSalome)
- givenPortKill(port) --> kill a specific session with given CORBA port
+ givenPortKill(port) --> kill a specific session with given CORBA port
killAllPorts() --> kill all sessions
-
+
runSalome, with --killall option, starts with killing
the processes resulting from the previous execution.
"""%filedict
-
+
#
# Print Naming Service directory list
#
-
+
if clt != None:
if verbose():
print
print " --- registered objects tree in Naming Service ---"
clt.showNS()
pass
-
+
if not args['gui'] or not args['session_gui']:
if args['shutdown_servers']:
class __utils__(object):
args['shutdown_servers'] = __utils__(args['port'])
pass
pass
-
+
# run python scripts, passed via --execute option
toimport = []
if args.has_key('pyscript'):
pass
pass
return clt
-
+
def execScript(script_path):
print 'executing', script_path
sys.path.insert(0, os.path.dirname(script_path))
# -----------------------------------------------------------------------------
+def searchFreePort(args, save_config=1):
+ print "Searching for a free port for naming service:",
+ #
+ if sys.platform == "win32":
+ tmp_file = os.getenv('TEMP');
+ else:
+ tmp_file = '/tmp'
+ tmp_file = os.path.join(tmp_file, '.netstat_%s'%os.getpid())
+ #
+ ###status = os.system("netstat -ltn | grep -E :%s > /dev/null 2>&1"%(NSPORT))
+ os.system( "netstat -a -n > %s" % tmp_file );
+ f = open( tmp_file, 'r' );
+ ports = f.readlines();
+ f.close();
+ os.remove( tmp_file );
+ #
+ def portIsUsed(port, data):
+ regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE );
+ for item in data:
+ try:
+ p = int(regObj.match(item).group(1))
+ if p == port: return True
+ pass
+ except:
+ pass
+ pass
+ return False
+ #
+ NSPORT=2810
+ limit=NSPORT+100
+ #
+ while 1:
+ if not portIsUsed(NSPORT, ports):
+ print "%s - OK"%(NSPORT)
+ #
+ from salome_utils import generateFileName, getHostName
+ hostname = getHostName()
+ #
+ home = os.getenv("HOME")
+ appli = os.getenv("APPLI")
+ kwargs={}
+ if appli is not None:
+ home = os.path.join(os.path.realpath(home), appli,"USERS")
+ kwargs["with_username"]=True
+ #
+ omniorb_config = generateFileName(home, prefix="omniORB",
+ extension="cfg",
+ hidden=True,
+ with_hostname=True,
+ with_port=NSPORT,
+ **kwargs)
+ orbdata = []
+ initref = "NameService=corbaname::%s:%s"%(hostname, NSPORT)
+ from omniORB import CORBA
+ if CORBA.ORB_ID == "omniORB4":
+ orbdata.append("InitRef = %s"%(initref))
+ orbdata.append("giopMaxMsgSize = 2097152000 # 2 GBytes")
+ orbdata.append("traceLevel = 0 # critical errors only")
+ else:
+ orbdata.append("ORBInitRef %s"%(initref))
+ orbdata.append("ORBgiopMaxMsgSize = 2097152000 # 2 GBytes")
+ orbdata.append("ORBtraceLevel = 0 # critical errors only")
+ pass
+ orbdata.append("")
+ f = open(omniorb_config, "w")
+ f.write("\n".join(orbdata))
+ f.close()
+ #
+ os.environ['OMNIORB_CONFIG'] = omniorb_config
+ os.environ['NSPORT'] = "%s"%(NSPORT)
+ os.environ['NSHOST'] = "%s"%(hostname)
+ args['port'] = os.environ['NSPORT']
+ #
+ if save_config:
+ last_running_config = generateFileName(home, prefix="omniORB",
+ suffix="last",
+ extension="cfg",
+ hidden=True,
+ **kwargs)
+ try:
+ if sys.platform == "win32":
+ import shutil
+ shutil.copyfile(omniorb_config, last_running_config)
+ else:
+ try:
+ os.remove(last_running_config)
+ except OSError:
+ pass
+ os.symlink(omniorb_config, last_running_config)
+ pass
+ pass
+ except:
+ pass
+ break
+ print "%s"%(NSPORT),
+ if NSPORT == limit:
+ msg = "\n"
+ msg += "Can't find a free port to launch omniNames\n"
+ msg += "Try to kill the running servers and then launch SALOME again.\n"
+ raise RuntimeError, msg
+ NSPORT=NSPORT+1
+ pass
+ return
+
+# -----------------------------------------------------------------------------
+
def no_main():
"""Salome Launch, when embedded in other application"""
fileEnv = os.environ["SALOME_LAUNCH_CONFIG"]
args, modules_list, modules_root_dir = pickle.load(fenv)
fenv.close()
kill_salome(args)
- from searchFreePort import searchFreePort
searchFreePort(args, 0)
clt = useSalome(args, modules_list, modules_root_dir)
return clt
from salome_utils import getHostName
print "runSalome running on %s" % getHostName()
args, modules_list, modules_root_dir = setenv.get_config()
-
kill_salome(args)
save_config = True
if args.has_key('save_config'):
test = False
pass
if test:
- from searchFreePort import searchFreePort
searchFreePort(args, save_config)
pass
# --
server.CMD = [os.getenv("PYTHONBIN"), "-m", "killSalomeWithPort", "--spy", "%s"%(os.getpid()), "%s"%(port)]
else:
server.CMD = ["killSalomeWithPort.py", "--spy", "%s"%(os.getpid()), "%s"%(port)]
- server.run()
+ server.run()
# os.system("killSalomeWithPort.py --spy %s %s &"%(os.getpid(), port))
# --
dt = 1.0
killMyPort(port)
pass
return
-#
-def runSalome():
+# -----------------------------------------------------------------------------
+
+if __name__ == "__main__":
import user
clt,args = main()
# --
pass
# --
pass
-#
-
-# -----------------------------------------------------------------------------
-
-if __name__ == "__main__":
- runSalome()
-#
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-import os
-import sys
-from optparse import OptionParser
-from NSparam import getNSparams
-
-# Use to display newlines (\n) in epilog
-class MyParser(OptionParser):
- def format_epilog(self, formatter):
- return self.epilog
-#
-
-def configureSession(args=[]):
- usage = "Usage: %prog [options]"
- epilog = """\nIf the command is not given a shell is opened.
-If PORT and MACHINE are not given, try to connect to the last active session on the local machine.
-If PORT and MACHINE are given, try to connect to the remote session associated with PORT on MACHINE.
-If MACHINE is not given, try to connect to the session associated to PORT on the local machine.
-If PORT is not given, try to connect to the remote session associated to port 2810 on MACHINE.\n\n"""
- parser = MyParser(usage=usage, epilog=epilog)
- parser.add_option("-p", "--port", metavar="<port>", default=0,
- action="store", type="int", dest="port",
- help="The port to connect to."
- )
- parser.add_option("-m", "--machine", metavar="<machine>", default=0,
- action="store", type="int", dest="machine",
- help="The machine to connect to."
- )
- try:
- (options, args) = parser.parse_args(args)
- except Exception, e:
- print e
- return
-
- port = options.port
- machine = options.machine
-
- # :GLITCH: this code defines specific environment variables (OMNIORB_CONFIG, NSPORT,
- # NSHOST) which are later used by other modules. Working, but not really "safe"...
- if not port:
- if not machine:
- # neither MACHINE nor PORT are given
- # --- set omniORB configuration to current session if any
- absoluteAppliPath = os.environ['ABSOLUTE_APPLI_PATH']
- fileOmniConfig = absoluteAppliPath + '/USERS/.omniORB_' + os.environ['USER'] + '_last.cfg'
- if os.path.isfile(fileOmniConfig):
- os.environ['OMNIORB_CONFIG'] = fileOmniConfig
- # --- set environment variables for port and hostname of NamingService
- host, port = getNSparams()
- os.environ['NSHOST'] = host
- os.environ['NSPORT'] = port
- else:
- # No running session
- os.environ['NSHOST'] = "no_host"
- os.environ['NSPORT'] = "no_port"
- pass
- else:
- # only MACHINE is given
- _writeConfigFile(2810, os.environ['NSHOST'])
- #
- else:
- if not machine:
- # only PORT is given
- os.environ['NSHOST'] = `hostname`
- pass
- # both MACHINE and PORT are given
- _writeConfigFile(os.environ['NSPORT'], os.environ['NSHOST'])
- #
-#
-
-# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
-def _writeConfigFile(port, host):
- os.environ['NSPORT'] = port
- os.environ['NSHOST'] = host
-
- absoluteAppliPath = os.environ['ABSOLUTE_APPLI_PATH']
- path = absoluteAppliPath + '/USERS'
- kwargs = {'with_username' : os.environ['USER']}
-
- from ORBConfigFile import writeORBConfigFile
- [ filename, msgSize ] = writeORBConfigFile(path, host, port, kwargs)
-
- os.environ['OMNIORB_CONFIG'] = filename
-#
--- /dev/null
+<Configuration-list>
+ <launchoptions>
+ <gui>yes</gui>
+ <logger>no</logger>
+ <xterm>no</xterm>
+ <portkill>yes</portkill>
+ <killall>no</killall>
+ </launchoptions>
+ <modules-list>
+ <module name="GEOM"/>
+ <module name="SMESH">
+ <plugin name="NETGENPlugin"/>
+ <plugin name="GHS3DPlugin"/>
+ </module>
+ <module name="VISU"/>
+ <module name="MED"/>
+ <module name="COMPONENT"/>
+ <module name="PYCALCULATOR"/>
+ </modules-list>
+ <embedded-list>
+ <embeddedserver>registry</embeddedserver>
+ <embeddedserver>study</embeddedserver>
+ <embeddedserver>moduleCatalog</embeddedserver>
+ <embeddedserver>cppContainer</embeddedserver>
+ </embedded-list>
+ <standalone-list>
+ <standaloneserver>pyContainer</standaloneserver>
+ </standalone-list>
+</Configuration-list>
if rep == "y":
filename=f
break
-
+
if filename != "":
os.environ['OMNIORB_CONFIG']=filename
else:
rep= raw_input("Do you want to try a local session on port 2810 ? [y|n]")
if rep == "y":
# Try a local session running on port 2810
- sys.argv=sys.argv+['-ORBInitRef','NameService=corbaname::localhost:2810']#+['-ORBgiopMaxMsgSize','2097152000'] # 2 GBytes
+ sys.argv=sys.argv+['-ORBInitRef','NameService=corbaname::localhost:2810']
else:
sys.exit(1)
-#print sys.argv
+print sys.argv
#direct adress from clt.orb.object_to_string(clt.rootContext)
#sys.argv=sys.argv+['-ORBInitRef','NameService=IOR:010000000100000000000000010000000000000023000000010100000a0000006c6f63616c686f737400fa0a0b0000004e616d6553657276696365']
+++ /dev/null
-import os
-import sys
-import logging
-
-from parseConfigFile import parseConfigFile
-from parseConfigFile import convertEnvFileToConfigFile
-
-import tempfile
-import pickle
-import subprocess
-import platform
-
-"""
-The SalomeRunner class in an API to configure SALOME environment then
-start SALOME using a single python command.
-
-"""
-class SalomeRunner:
- """
- Initialize environment from a list of configuration files
- identified by their names.
- These files should be in appropriate (new .cfg) format.
- However you can give old .sh environment files; in this case,
- the SalomeRunner class will try to automatically convert them
- to .cfg format before setting the environment.
- """
- def __init__(self, configFileNames=[]):
- for filename in configFileNames:
- basename, extension = os.path.splitext(filename)
- if extension == ".cfg":
- self.__setEnvironmentFromConfigFile(filename)
- elif extension == ".sh":
- temp = tempfile.NamedTemporaryFile(suffix='.cfg')
- try:
- convertEnvFileToConfigFile(filename, temp.name)
- self.__setEnvironmentFromConfigFile(temp.name)
- finally:
- # Automatically cleans up the file
- temp.close()
- else:
- self._getLogger().warning("Unrecognized extension for configuration file: %s", filename)
- #
-
- def go(self, args):
- # Run this module as a script, in order to use appropriate Python interpreter
- # according to current path (initialized from environment files).
- absoluteAppliPath = os.environ['ABSOLUTE_APPLI_PATH']
- proc = subprocess.Popen(['python', absoluteAppliPath+'/bin/salome/salomeRunner.py', pickle.dumps(self), pickle.dumps(args)], shell=False, close_fds=True)
- proc.wait()
- #
-
- """Append value to PATH environment variable"""
- def addToPath(self, value):
- self.__addToReserved( 'PATH', value)
- #
-
- """Append value to LD_LIBRARY_PATH environment variable"""
- def addToLdLibraryPath(self, value):
- self.__addToReserved('LD_LIBRARY_PATH', value)
- #
-
- """Append value to PYTHONPATH environment variable"""
- def addToPythonPath(self, value):
- self.__addToReserved('PYTHONPATH', value)
- #
-
- """Set environment variable to value"""
- def setEnviron(self, name, value, overwrite=False):
- env = os.getenv(name, '')
- if env and not overwrite:
- self._getLogger().warning("Environment variable already existing and not overwritten: %s", name)
- return
-
- if env:
- self._getLogger().info("Overwriting environment variable: %s", name)
-
- value = os.path.expandvars(value) # expand environment variables
- self._getLogger().debug("Set environment variable: %s=%s", name, value)
- os.environ[name] = value
- #
-
- ###################################
- # This begins the private section #
- ###################################
-
- def _usage(self, unused=[]):
- exeName = os.path.splitext(os.path.basename(__file__))[0]
-
- msg = '''\
-Usage: %s [command] [options] [--config=file1,...,filen]
-
-Commands:
- start Launches SALOME virtual application [DEFAULT]
- shell Executes a script under SALOME application environment
- connect Connects a Python console to the active SALOME session
- killall Kill all SALOME running sessions
- info Display some information about SALOME
- help Show this message
- coffee Yes! SALOME can also make coffee!!"\
-
-'''%exeName
-
- print msg
- #
-
- def __parseArguments(self, args):
- if len(args) == 0 or args[0].startswith("-"):
- return None, args
-
- command = args[0]
- options = args[1:]
-
- availableCommands = {
- 'start' : '_runAppli',
- 'shell' : '_runSession',
- 'connect' : '_runConsole',
- 'killall': '_killAll',
- 'info': '_showInfo',
- 'help': '_usage',
- 'coffee' : '_makeCoffee'
- }
-
- if not command in availableCommands.keys():
- self._getLogger().error("Unrecognized command: %s.", command)
- self._usage()
- sys.exit(1)
-
- return availableCommands[command], options
- #
-
- """
- Run SALOME!
- Args consist in a mandatory command followed by optionnal parameters.
- See usage for details on commands.
- """
- def _getStarted(self, args):
- command, options = self.__parseArguments(args)
- sys.argv = options
-
- if command is None:
- if args and args[0] in ["-h","--help","help"]:
- self._usage()
- sys.exit(0)
- # try to default to "start" command
- command = "_runAppli"
-
- try:
- getattr(self, command)(options) # run appropriate method
- except AttributeError:
- self._getLogger().error("Method %s is not implemented.", command)
- sys.exit(1)
- #
-
- def __setEnvironmentFromConfigFile(self, filename):
- configVars, reservedDict = parseConfigFile(filename, reserved=['PATH', 'LD_LIBRARY_PATH', 'PYTHONPATH'])
-
- # set environment
- for reserved in reservedDict:
- a = filter(None, reservedDict[reserved]) # remove empty elements
- reformattedVals = ':'.join(a)
- self.__addToReserved(reserved, reformattedVals)
- pass
-
- for key,val in configVars:
- self.setEnviron(key, val, overwrite=True)
- pass
-
- sys.path[:0] = os.environ['PYTHONPATH'].split(':')
- #
-
- def __addToReserved(self, name, value):
- if value == '':
- return
-
- value = os.path.expandvars(value) # expand environment variables
- self._getLogger().debug("Add to %s: %s", name, value)
- env = os.getenv(name, None)
- if env is None:
- os.environ[name] = value
- else:
- os.environ[name] = value + os.pathsep + env
- #
-
- def _runAppli(self, args=[]):
- # Initialize SALOME environment
- sys.argv = ['runSalome'] + args
- import setenv
- setenv.main(True)
-
- import runSalome
- runSalome.runSalome()
- #
-
- def _runSession(self, args=[]):
- sys.argv = ['runSession'] + args
- import runSession
- runSession.configureSession(args)
-
- import setenv
- setenv.main(True)
-
- if args:
- exe = args[0]
- # if exe does not contain any slashes (/), search in PATH
- # if exe contains slashes:
- # if exe begins with a slash, use this absolute path
- # else build absolute path relative to current working directory
- if (os.sep in exe) and (exe[0] is not os.sep):
- args[0] = os.getcwd() + os.sep + exe
-
- proc = subprocess.Popen(args, shell=False, close_fds=True)
- proc.wait()
- else:
- absoluteAppliPath = os.environ['ABSOLUTE_APPLI_PATH']
- cmd = ["/bin/bash", "--rcfile", absoluteAppliPath + "/.bashrc" ]
- proc = subprocess.Popen(cmd, shell=False, close_fds=True)
- proc.wait()
- #
-
- def _runConsole(self, args=[]):
- # Initialize SALOME environment
- sys.argv = ['runConsole'] + args
- import setenv
- setenv.main(True)
-
- import runConsole
- runConsole.connect()
- #
-
- def _killAll(self, args=[]):
- #self._runAppli(['-k'] + args)
- from killSalome import killAllPorts
- killAllPorts()
- #
-
- def _showInfo(self, args=[]):
- print "Running with python", platform.python_version()
- self._runAppli(["--version"])
- #
-
- def _makeCoffee(self, args=[]):
- print " ("
- print " ) ("
- print " ___...(-------)-....___"
- print " .-\"\" ) ( \"\"-."
- print " .-\'``\'|-._ ) _.-|"
- print " / .--.| `\"\"---...........---\"\"` |"
- print " / / | |"
- print " | | | |"
- print " \\ \\ | |"
- print " `\\ `\\ | |"
- print " `\\ `| |"
- print " _/ /\\ /"
- print " (__/ \\ /"
- print " _..---\"\"` \\ /`\"\"---.._"
- print " .-\' \\ / \'-."
- print " : `-.__ __.-\' :"
- print " : ) \"\"---...---\"\" ( :"
- print " \'._ `\"--...___...--\"` _.\'"
- print " \\\"\"--..__ __..--\"\"/"
- print " \'._ \"\"\"----.....______.....----\"\"\" _.\'"
- print " `\"\"--..,,_____ _____,,..--\"\"`"
- print " `\"\"\"----\"\"\"`"
- sys.exit(0)
- #
-
- # Add the following two methods since logger is not pickable
- # Ref: http://stackoverflow.com/questions/2999638/how-to-stop-attributes-from-being-pickled-in-python
- def __getstate__(self):
- d = dict(self.__dict__)
- del d['_logger']
- return d
- #
- def __setstate__(self, d):
- self.__dict__.update(d) # I *think* this is a safe way to do it
- #
- # Excluding self._logger from pickle operation imply using the following method to access logger
- def _getLogger(self):
- if not hasattr(self, '_logger'):
- self._logger = logging.getLogger(__name__)
- #self._logger.setLevel(logging.DEBUG)
- return self._logger;
- #
-
-###
-import pickle
-if __name__ == "__main__":
- if len(sys.argv) == 3:
- runner = pickle.loads(sys.argv[1])
- args = pickle.loads(sys.argv[2])
- runner._getStarted(args)
- else:
- SalomeRunner()._usage()
-#
def startSession(modules=[]):
global _session
if _session: return
- from searchFreePort import searchFreePort
searchFreePort()
_session = SalomeSession(modules)
return
from salome_utils import getShortHostName
return getShortHostName()
+def searchFreePort():
+ """
+ Search free port for SALOME session.
+ Returns first found free port number.
+ """
+ print "Searching a free port for naming service:",
+ from salome_utils import generateFileName, getHostName
+ hostname = getHostName()
+ NSPORT = 2810
+ limit = NSPORT+100
+ while 1:
+ print "%s "%(NSPORT),
+ status = os.system("netstat -ltn | grep -E :%s"%(NSPORT))
+ if status:
+ home = os.getenv("HOME")
+ appli = os.getenv("APPLI")
+ kwargs={}
+ if appli is not None:
+ home = os.path.join(os.path.realpath(home), appli,"USERS")
+ kwargs["with_username"]=True
+ omniorb_config = generateFileName(home, prefix="omniORB",
+ extension="cfg",
+ hidden=True,
+ with_hostname=True,
+ with_port=NSPORT,
+ **kwargs)
+ f = open(omniorb_config, "w")
+ f.write("ORBInitRef NameService=corbaname::%s:%s\n"%(hostname, NSPORT))
+ f.close()
+ os.environ['OMNIORB_CONFIG'] = omniorb_config
+ last_running_config = generateFileName(home, prefix="omniORB",
+ suffix="last",
+ extension="cfg",
+ hidden=True,
+ **kwargs)
+ os.environ['LAST_RUNNING_CONFIG'] = last_running_config
+ if os.access(last_running_config,os.F_OK):
+ os.unlink(last_running_config)
+ pass
+ os.symlink(omniorb_config,last_running_config)
+ print "- Ok"
+ break
+ if NSPORT == limit:
+ msg = ""
+ msg += "Can not find a free port to launch omniNames\n"
+ msg += "Kill the running servers and try again.\n"
+ raise RuntimeError, msg
+ NSPORT = NSPORT+1
+ pass
+ os.environ['NSHOST'] = hostname
+ os.environ['NSPORT'] = str(NSPORT)
+ return NSPORT
+
class SalomeSession(object):
"""Salome session launcher"""
return int( os.getenv( "NSPORT" ) )
except:
pass
- try:
- port = int( getPortFromORBcfg() )
- if port is not None: return port
- except:
- pass
+ port = getPortFromORBcfg()
+ if port is not None: return port
if use_default: return 2809 # '2809' is default port number
return None
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-def searchFreePort(args={}, save_config=1):
- """
- Search free port for SALOME session.
- Returns first found free port number.
- """
- import sys, os, re, shutil
- print "Searching for a free port for naming service:",
-
- # :NOTE: Under windows:
- # netstat options -l and -t are unavailable
- # grep command is unavailable
-
- from subprocess import Popen, PIPE
- (stdout, stderr) = Popen(['netstat','-an'], stdout=PIPE).communicate()
- import StringIO
- buf = StringIO.StringIO(stdout)
- ports = buf.readlines()
-
- #
- def portIsUsed(port, data):
- regObj = re.compile( ".*tcp.*:([0-9]+).*:.*listen", re.IGNORECASE );
- for item in data:
- try:
- p = int(regObj.match(item).group(1))
- if p == port: return True
- pass
- except:
- pass
- pass
- return False
- #
- NSPORT=2810
- limit=NSPORT+100
- #
-
- while 1:
- if not portIsUsed(NSPORT, ports):
- print "%s - OK"%(NSPORT)
- #
- from salome_utils import generateFileName, getHostName
- hostname = getHostName()
- #
- home = os.getenv("HOME")
- appli = os.getenv("APPLI")
- kwargs={}
- if appli is not None:
- home = os.path.join(os.path.realpath(home), appli,"USERS")
- kwargs["with_username"]=True
- #
- from ORBConfigFile import writeORBConfigFile
- omniorb_config, giopsize = writeORBConfigFile(home, hostname, NSPORT, kwargs)
-
- args['port'] = os.environ['NSPORT']
- #
- if save_config:
- last_running_config = generateFileName(home, prefix="omniORB",
- suffix="last",
- extension="cfg",
- hidden=True,
- **kwargs)
- os.environ['LAST_RUNNING_CONFIG'] = last_running_config
- try:
- if sys.platform == "win32":
- import shutil
- shutil.copyfile(omniorb_config, last_running_config)
- else:
- try:
- if os.access(last_running_config, os.F_OK):
- os.remove(last_running_config)
- except OSError:
- pass
- os.symlink(omniorb_config, last_running_config)
- pass
- pass
- except:
- pass
- #
- break
- print "%s"%(NSPORT),
- if NSPORT == limit:
- msg = "\n"
- msg += "Can't find a free port to launch omniNames\n"
- msg += "Try to kill the running servers and then launch SALOME again.\n"
- raise RuntimeError, msg
- NSPORT=NSPORT+1
- pass
- return
for module in modules_list :
if modules_root_dir.has_key(module):
module_root_dir = modules_root_dir[module]
- if module_root_dir not in modules_root_dir_list:
- modules_root_dir_list[:0] = [module_root_dir]
+ modules_root_dir_list[:0] = [module_root_dir]
if sys.platform == "win32":
add_path(os.path.join(module_root_dir,get_lib_dir(),salome_subdir),
"PATH")
#
import time
-from omniORB import CORBA
-from LifeCycleCORBA import *
-
-orb = CORBA.ORB_init([''], CORBA.ORB_ID)
-lcc = LifeCycleCORBA(orb)
+import salome_kernel
+orb, lcc, naming_service, cm = salome_kernel.salome_kernel_init()
lcc.shutdownServers()
+#give some time to shutdown to complete
time.sleep(1)
-LifeCycleCORBA.killOmniNames()
-time.sleep(1)
+salome_kernel.LifeCycleCORBA.killOmniNames()
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+status=1
+while [ $status -ne 0 ]; do
+ ls $HOME/$APPLI/USERS/.omniORB_${USER}_last.cfg 2> /dev/null
+ status=$?
+ sleep 1
+ echo -n "#"
+done
+./runSession waitNS.py
# ================================================================
#AC_PREREQ(2.59)
#
-AC_INIT([Salome2 Project], [7.0.0], [paul.rascle@edf.fr], [SalomeKERNEL])
+AC_INIT([Salome2 Project], [6.5.0], [paul.rascle@edf.fr], [SalomeKERNEL])
# AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
# scripts such as config.guess, install-sh, ...
# This could be helpfull to update de configuration.
AC_OUTPUT([ \
KERNEL_version.h \
- salome_adm/SALOMEconfig.ref \
+ salome_adm/unix/SALOMEconfig.ref \
salome_adm/Makefile \
salome_adm/cmake_files/Makefile \
salome_adm/unix/Makefile \
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(salome)
-ADD_SUBDIRECTORY(docutils)
\ No newline at end of file
SUBDIRS = salome docutils
-EXTRA_DIST += configuration_examples README.cluster-CCRT
+EXTRA_DIST = configuration_examples README.cluster-CCRT
docs: usr_docs
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(SPHINXOPTS
-)
-SET(SOURCEDIR
- ${CMAKE_CURRENT_SOURCE_DIR}
-)
-SET(PAPEROPT_a4
- -D
- latex_paper_size=a4
-)
-SET(ALLSPHINXOPTS
- -d
- doctrees
- ${PAPEROPT_a4}
- ${SPHINXOPTS}
- ${SOURCEDIR}
-)
-
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_BINARY_DIR}/conf.py")
-
-IF(WINDOWS)
- STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\python2.6\\site-packages\\salome\;%PYTHONPATH%
- @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
- @SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
- @SET PYTHONPATH=${OMNIORB_ROOT_USER}\\lib\\x86_win32\;%PYTHONPATH%
- @SET PYTHONPATH=${OMNIORB_ROOT_USER}\\lib\\python\;%PYTHONPATH%
- @SET PATH=${OMNIORB_ROOT_USER}\\lib\\x86_win32\;%PATH%
- ")
- SET(EXT "bat")
- SET(CALL_STR "call")
-ELSE(WINDOWS)
- SET(SCR "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python2.6/site-packages/salome:\${PYTHONPATH}
- export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
- export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
- export PYTHONPATH=${OMNIORB_ROOT_USER}/lib:\${PYTHONPATH}
- export PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python2.6/site-packages:\${PYTHONPATH}
- export LD_LIBRARY_PATH=${OMNIORB_ROOT_USER}/lib:\${LD_LIBRARY_PATH}
- ")
- SET(EXT "sh")
- SET(CALL_STR ".")
-ENDIF(WINDOWS)
-
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
-
-ADD_CUSTOM_TARGET(html_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} && ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html
- COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''')\"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
kernel.rst \
parametric.rst
-EXTRA_DIST += archives $(RSTFILES)
+EXTRA_DIST = archives $(RSTFILES)
SPHINXOPTS =
SOURCEDIR = $(srcdir)
-------------------------------------------------------------------------------
In a SALOME application, distributed components, servers and clients use
-the CORBA middleware for communication. CORBA interfaces are defined via idl
+the CORBA middleware for comunication. CORBA interfaces are defined via idl
files. All the different CORBA interfaces are available for users in Python,
see CORBA interfaces below.
For some general purpose services, CORBA interfaces have been encapsulated
in order to provide a simple interface (encapsulation is generally done in
-C++ classes, and a Python SWIG interface is also generated from C++, to
+C++ classes, and a Python SWIG interface is also generated from C++, to
ensure a consistent behavior between C++ modules and Python modules or user
script).
do it several times, so it is preferable to add these instructions
systematically in your scripts, to allow them to work in all configurations.
-Container and component instantiation
+Container and component instanciation
-------------------------------------
See LifeCycleCORBA_ for the C++ interface (Python interface obtained with SWIG
import salome
salome.salome_init()
-
+
import LifeCycleCORBA
lcc = LifeCycleCORBA.LifeCycleCORBA()
obj=lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent")
-
+
import Engines
comp=obj._narrow(Engines.TestComponent)
-
+
comp.Coucou(1)
The answer is something like::
'TestComponent_i : L = 1'
-
-The _narrow() instruction is not always mandatory in Python, but sometimes
+
+The _narrow() instruction is not always mandatory in Python, but sometimes
useful to be sure you have got the right type of object. Here, Testcomponent_
interface is defined in CORBA module Engines. With this example, it works also
without the _narrow() instruction::
A SALOME application is defined by a set of modules (GEOM, SMESH, ASTER...).
A SALOME User can define several SALOME Applications. These applications are
-runnable from the same user account. These applications may share the same
+runnable from the same user account. These applications may share the same
KERNEL and modules. Thus, the application configuration is independant of
KERNEL and must not be put in KERNEL_ROOT_DIR.
''''''''''''''''''''''''''''''''''''''''''''''''''''''
The script createAppli.sh in ${KERNEL_ROOT_DIR}/bin/salome creates an
-application directory with the given path in parameter. ${APPLI} is a path
+application directory with the given path in parameter. ${APPLI} is a path
relative to ${HOME}.
The directory is only a skeleton, the user has to edit several files to
(bin, lib, doc, share...), with, for each file (executable, script, data,
library, resources...), symbolic links to the actual file.
-Providing an existing script for SALOME prerequisites (the same one
+Providing an existing an existing script for SALOME prerequisites (the same one
used for modules compilation, or given with the modules installation), the
installation works without further modification for a single computer (unless
some modules needs a special environment not defined in the above script).
The ${APPLI} directory contains scripts for environment and runs. Environment
scripts must be configured (by the user) on each computer. All the environment
-scripts are in the ${APPLI}/env.d directory.
+scripts are in the ${APPLI}/env.d directory.
The script ${APPLI}/envd sources **all** the files (\*.sh) in ${APPLI}/env.d
in alphanumeric order (after edition, think to remove backup files). the envd
export SalomeAppConfig=${HOME}/${APPLI}
- where SalomeAppConfig designates the directory containing SalomeApp.xml.
- Note that ${APPLI} is already defined by the calling scripts when
+ where SalomeAppConfig designates the directory containing SalomeApp.xml.
+ Note that ${APPLI} is already defined by the calling scripts when
env.d/envSalome.sh is sourced.
User run scripts
It's often easier to develop and try Python scripts outside the GUI embedded
Python interpreter. Imagine, for instance, you are writing a script involving
geometry and mesh modules.
-First, launch a SALOME session with gui, then, on another terminal::
+first, launch a SALOME session with gui, then, on another terminal::
./runSession
python
SALOME_Application
INSTALL
kernel_resources
- KERNEL_Services
userguide"
STYLESHEET=rst.css
Container
definition of a container
-
+
General concepts
================
- personalisation des procédures de construction
Developer' guide - integration tools
-====================================
-- Guide de l'intégrateur (développeur de nouveaux modules) : (on lui montre ici le principe de construction et les ressources à disposition pour faire le travail)
+====================================
+- Guide de l'intégrateur (développeur de nouveaux modules)
+(on lui montre ici le principe de construction et les ressources à
+disposition pour faire le travail)
- création d'un modules
- intégration code boîte noire (perfect, solver)
- - intégration bibliothèque de fonctions (hxx2salome, voir avec N.Crouzet)
- - intégration de modèles de données (xdata)
+ - intégration bibliothèque de fonctions (hxx2salome, voir avec
+ N.Crouzet)
+ - intégration de modèles de données (xdata)
End user's guide
================
- Guide de l'utilisateur
- concept d'application (renvoie doc Paul)
- - commandes avancées (showNS, exemple de contact de la session, d'un engine, utilisation du lifeCycle, du module salome, des modules geompy et smesh)
+ - commandes avancées (showNS, exemple de contact de la
+ session, d'un engine, utilisation du lifeCycle, du module salome,
+ des modules geompy et smesh)
- utilisation en mode distribué (doc de B. Sechet)
- GUI and TUI documentation
RST Exemples
============
-See INSTALL_ for general information on required configuration and
+See INSTALL_ for general information on required configuration and
prerequisites, compilation procedure, setting environment principles.
.. _INSTALL: ./INSTALL.html
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(gui)
-ADD_SUBDIRECTORY(tui)
\ No newline at end of file
echo "Making dev_docs in tui"; \
(cd tui && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
-EXTRA_DIST+= main.dox install.dox \
+EXTRA_DIST= main.dox install.dox \
kernel_resources.dox kernel_services.dox kernel_services_cpphelpers.dox \
salome_application.dox unittests.dox \
- salome_file.dox kernel_salome.dox running_salome.dox \
+ salome_file.dox kernel_salome.dox \
examples
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(top_builddir ${CMAKE_BINARY_DIR})
-SET(top_srcdir ${CMAKE_SOURCE_DIR})
-SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-SET(builddir ${CMAKE_CURRENT_BINARY_DIR})
-SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
-SET(docdir ${datadir}/doc/salome)
-
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html)
-
-ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE}
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/KERNEL''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/KERNEL''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/KERNEL'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/KERNEL''')"
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
-ADD_DEPENDENCIES(usr_docs html_docs)
include $(top_srcdir)/salome_adm/unix/make_common_starter.am
-EXTRA_DIST += images static/footer.html static/doxygen.css
+EXTRA_DIST = images static/footer.html static/doxygen.css
guidocdir = $(docdir)/gui/KERNEL
guidoc_DATA = images/head.png
\page kernel_salome Using salome.py module
-The Python module salome.py provides a functionality to access main
-SALOME features from the Python console (either embedded in GUI
-desktop or external one).
-
-To use salome.py module, import it into the Python interpreter and
-initialize it by calling \c salome_init() function:
-
-\code
-import salome
-salome.salome_init()
-\endcode
-
The salome.py Python module provides a set of variables and functions
allowing access to different elements of the current SALOME
session.
# ...
\endcode
-\anchor salome_myStudy
\li \b myStudy Reference to the current (active) study
This variable can be used to manipulate with the date of the study:
name_1 = salome.generateName("Obj") # name_1 is something like "Obj32"
\endcode
-\li \b GetComponentVersion() Get version of component data stored in
-the study
+\li \b sg SWIG interface to the SALOME GUI
-This function allows to obtain the version of the component data
-stored in the current study.
-\note This function does not provide a current version of the
-component being used but that one initially stored in the study
-document.
-
-The first parameter specifies the name of the component. If the
-specified component data is not stored in the study, the result value
-is "no component data". If the version of data is undefined, the
-result is "unknown".
-
-The second parameter (\c False by default), when set to \c True,
-allows to retrieve all versions of the component data stored in the
-study. This is useful to check if version information is valid (the
-data might be updated and/or re-stored in %SALOME of versions different
-from initial one).
-
-\code
-# get initial version of GEOM module data stored in the study
-geom_version = salome.GetComponentVersion('GEOM')
-# get all versions of GEOM module data stored in the study
-all_geom_versions = salome.GetComponentVersion('GEOM', True)
-\endcode
+This variable provides an access to some GUI functions.
-This function is introduced in %SALOME 6.6.0 (it does not work with
-studies created before version 6.6.0).
+\b Note, that this variable is only available if you use salome.py
+Python module within the GUI desktop (since SWIG library is linked directly to the GUI library).
+See GUI documentation for more information.
-\note The study should be initialized before calling this function
-(see \ref salome_myStudy "salome.myStudy").
*/
application on several computers.
See \subpage SALOME_Application to define your own configuration of %SALOME and run it
on one or several computers. This is the recommended way of configuration.
--# <b>How to launch %SALOME</b>:
- - In a %SALOME application, see \ref SALOME_Application.
- - Using \c runSalome script, see \subpage running_salome_page
+-# <b>How to launch %SALOME in a %SALOME application</b>\n
+ See \ref SALOME_Application.
-# <b>How to use KERNEL services in Python scripts</b>\n
The %SALOME KERNEL offers a list of services available in Python. See \subpage KERNEL_Services.
-# <b>How to use KERNEL services from a C++ context</b>\n
+++ /dev/null
-/*!
-
-\page running_salome_page Running Salome
-
-There are two ways to run %SALOME:
-
-1) Using <b>Salome Application Concept</b> approach.
-
-For more details see \ref SALOME_Application.
-
-2) Using <b>\c %runSalome</b> script supplied with %SALOME KERNEL module distribution.
-
-To launch %SALOME using \c %runSalome script, you have first to
-set-up proper environment for %SALOME. If you installed %SALOME using
-%SALOME Installation Wizard (Linux), you can use \c salome.sh or
-\c salome.csh script (that is located in the \c KERNEL_<version>
-directory of your %SALOME installation), for example:
-
-\code
-cd /home/user/salome_6.5.0/KERNEL_6.5.0
-source salome.csh
-\endcode
-
-Launch %SALOME session using the \c %runSalome script located
-in the \c SALOME/KERNEL/bin/salome directory:
-
-\code
-runSalome [options] [STUDY_FILE] [PYTHON_FILE [PYTHON_FILE ...]]
-\endcode
-
-Optionally, you can specify in the command line:
-- Study (document) file to be opened in %SALOME session passing;
-- One or more Python scripts to be executed after %SALOME
- start-up. Python scripts will be executed in the new or opened study
- in the order they appear in the command line.
-
-The \c %runSalome script supports large set of options that allow
-specifying the way to launch %SALOME session. Complete description of
-all options can be obtained using \c --help or -h option:
-
-\code
-runSalome --help
-\endcode
-
-Here below is a description of most important options:
-
-- \c --help or \c -h
-
-Print detail help information on the \c %runSalome script.
-
-- \c --version
-
-Print version of %SALOME platform.
-
-- \c --gui or \c -g
-
-Launch %SALOME sesssion in GUI mode (with GUI desktop).
-
-- \c --terminal or \c -t
-
-Launch %SALOME session in terminal mode (without GUI).
-
-- \c --resources=<file> or \c -r \c <file>
-
-Parse application settings from the <file> instead of default resource
-file. Default resource file is situated in user's home directory; for
-example, for %SALOME version 6.5.0, the file is ${HOME}/.config/salome/.SalomeApprc.6.5.0
-
-- \c --modules=module1,module2,... or \c -m=module1,module2,...
-
-Specify the list of modules which will be used in the %SALOME session
-being launched. Note, that list of modules is separated be comma
-symbols, with no any spaces.
-
-- \c --xterm or \c -x
-
-The servers open in separate terminal window and log messages are displayed in this window.
-
-- <code>--embedded=registry,study,moduleCatalog,cppContainer/</code> or
- <code>-e=registry,study,moduleCatalog,cppContainer</code>
-
-Run listed %SALOME servers in the GUI embedded mode (default value is
-<code>registry,study,moduleCatalog,cppContainer</code>). Note that logger,
-pyContainer, and supervContainer servers cannot be embedded to
-GUI. Note, that this option implies running %SALOME in GUI mode (\c -g
-option); in terminal mode all servers are running in standalone mode.
-
-- <code>--standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer</code> or
- <code>-s=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer</code>
-
-Standalone CORBA servers (default: <code>pyContainer,supervContainer</code>).
-
-- \c --portkill or \c -p
-
-Kill %SALOME session launched with the current port.
-
-- \c --killall or \c -k
-
-Kill (stop) all running %SALOME sessions before launching new session.
-
-- \c --splash=<1/0> or \c -z <1/0>
-
-Use 1 to display splash screen [default] at start-up, 0 to disable
-splash screen. This option is ignored in the terminal mode.
-
-- \c --pinter
-
-Launch with interactive Python console.
-
-- <code>--interp=n</code> or <code>-i=n</code>
-
-Number of additional Python interpreters to open, with session
-environment propely set-up.
-
-*/
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(top_builddir ${CMAKE_BINARY_DIR})
-SET(top_srcdir ${CMAKE_SOURCE_DIR})
-SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-SET(builddir ${CMAKE_CURRENT_BINARY_DIR})
-SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
-SET(docdir ${datadir}/doc/salome)
-
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile)
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html)
-
-ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
- COMMAND ${DOXYGEN_EXECUTABLE}
- COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/doxyfile.bak''')"
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/KERNEL''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL''')"
- VERBATIM
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
#
include $(top_srcdir)/salome_adm/unix/make_common_starter.am
-EXTRA_DIST += images input static/footer.html static/doxygen.css
+EXTRA_DIST = images input static/footer.html static/doxygen.css
tuidocdir = $(docdir)/tui/KERNEL
tuidoc_DATA = images/head.png
-# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
+# Doxyfile 1.4.6
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "SALOME KERNEL Developer"
-PROJECT_NUMBER =
+PROJECT_NUMBER =
OUTPUT_DIRECTORY = KERNEL
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
+REPEAT_BRIEF = NO
+ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = @top_srcdir@ @top_builddir@
-STRIP_FROM_INC_PATH =
+STRIP_FROM_PATH = @top_builddir@ @top_srcdir@
+STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
-QT_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 5
-ALIASES =
+ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = YES
+OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = @DOXYGEN_SUPPORT_STL@
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
+SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = YES
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
+GENERATE_TODOLIST = NO
+GENERATE_TESTLIST = NO
+GENERATE_BUGLIST = NO
+GENERATE_DEPRECATEDLIST= NO
+ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 25
SHOW_USED_FILES = NO
SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
+FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = @top_srcdir@/src \
- @top_srcdir@/bin \
- @top_srcdir@/idl \
- @top_builddir@/bin \
- @srcdir@/input
-FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc
+INPUT = \
+ @top_srcdir@/src/DSC \
+ @srcdir@/input
+FILE_PATTERNS = *.dox *.idl *.cxx *.hxx *.h *.hh *.i *c *.cc @DOXYGEN_PYTHON_EXTENSION@
RECURSIVE = YES
-EXCLUDE =
+EXCLUDE =
EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
-IMAGE_PATH = @srcdir@/images
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = YES
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = YES
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
+REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = YES
-#USE_HTAGS = NO
+USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 2
-IGNORE_PREFIX =
+COLS_IN_ALPHA_INDEX = 3
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
HTML_STYLESHEET = @srcdir@/static/doxygen.css
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
+CHM_FILE =
+HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = YES
TOC_EXPAND = YES
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
+EXTRA_PACKAGES =
+LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
+XML_SCHEMA =
+XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
+# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
-# Configuration::additions related to external references
+# Configuration::additions related to external references
#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
+TAGFILES =
+GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES
CLASS_GRAPH = YES
-COLLABORATION_GRAPH = NO
-GROUP_GRAPHS = YES
-UML_LOOK = NO
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = NO
+UML_LOOK = YES
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
+INCLUDED_BY_GRAPH = NO
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_FONTNAME = Arial
-DOT_PATH =
-DOTFILE_DIRS =
+DOT_PATH =
+DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1000
+MAX_DOT_GRAPH_HEIGHT = 1200
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
+GENERATE_LEGEND = NO
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
+# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake)
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-CONFIGURE_FILE(Calcium_Ports.idl.in Calcium_Ports.idl @ONLY)
-
-SET(SalomeIDLKernel_IDLSOURCES
- SALOME_Exception.idl
- SALOME_Comm.idl
- SALOME_ModuleCatalog.idl
- SALOME_RessourcesCatalog.idl
- SALOMEDS.idl
- SALOMEDS_Attributes.idl
- SALOME_Component.idl
- SALOME_ContainerManager.idl
- SALOME_Registry.idl
- Logger.idl
- SALOME_GenericObj.idl
- SALOME_Types.idl
- SALOME_Session.idl
- nstest.idl
- DSC_Engines.idl
- SALOME_Ports.idl
- SALOME_PyNode.idl
- Palm_Ports.idl
- SALOME_PACOExtension.idl
- SALOME_ParamPorts.idl
- SALOME_Parametric.idl
- SALOME_MPIObject.idl
- SALOME_TestComponent.idl
- SALOME_TestModuleCatalog.idl
- ${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl
-)
-
-IF(MPI_IS_OK)
- SET(SalomeIDLKernel_IDLSOURCES ${SalomeIDLKernel_IDLSOURCES} SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl)
-ENDIF(MPI_IS_OK)
-
-SET(IDL_INCLUDE_DIRS
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-SET(TYPE)
-IF(WINDOWS)
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
- SET(TYPE STATIC)
-ELSE(WINDOWS)
- SET(TYPE SHARED)
-ENDIF(WINDOWS)
-
-OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
-TARGET_LINK_LIBRARIES(SalomeIDLKernel ${CORBA_LIBS})
-SET_TARGET_PROPERTIES(SalomeIDLKernel PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-
-INSTALL(TARGETS SalomeIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
-
-IF(WITH_PACO_PARALLEL)
- SET(SalomeParallelIDLKernel_IDLSOURCES
- SALOME_ComponentPaCO.idl
- SALOME_PortsPaCO.idl
- DSC_EnginesPaCO.idl
- SALOME_ParamPortsPaCO.idl
- SALOME_PACOExtensionPaCO.idl
- SALOME_GenericObjPaCO.idl
- )
- OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
- TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${CORBA_LIBS})
- SET_TARGET_PROPERTIES(SalomeParallelIDLKernel PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-
- INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
-ENDIF(WITH_PACO_PARALLEL)
TypeData.idl
# all the idl files are needed for make dist
-EXTRA_DIST += $(BASEIDL_FILES) $(MPIIDL_FILES) $(OTHER_IDL_FILES) \
+EXTRA_DIST= $(BASEIDL_FILES) $(MPIIDL_FILES) $(OTHER_IDL_FILES) \
SALOME_Component.xml DSC_Engines.xml SALOME_Ports.xml \
SALOME_PACOExtension.xml SALOME_ParamPorts.xml \
SALOME_GenericObj.xml SALOME_Exception.xml
\return units
*/
string GetUnits();
-
- /*!
- \brief Returns list of components which data was stored
- (after previous sessions) in the study.
- \return list of component names
- */
- StringSeq GetStoredComponents();
-
- /*!
- \brief Returns version of component data stored in the study
- \param comp component name
- \return version of stored component data
- */
- string GetComponentVersion( in string comp );
-
- /*!
- \brief Returns all versions of component data stored in the study
- \param comp component name
- \return versions of stored component data
- */
- StringSeq GetComponentVersions( in string comp );
};
//==========================================================================
\return an information about the given object.
*/
string getObjectInfo(in long studyId, in string entry);
-
- //! Get version of the component
- /*!
- This method is supposed to be implemented in all derived classes; default implementation
- returns "unknown" string that means that no version information about the component is available.
- \note The version of the component is stored to the study, as a part of general persistence
- mechanism; once stored, version information in the study cannot be changed.
-
- \return string containing component's version, e.g. "1.0"
- */
- string getVersion();
} ;
/*!
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are data, module or lib files
-INSTALL(FILES CatalogModulePersonnel.xml_skel DESTINATION ${KERNEL_salomeres_DATA})
-
-CONFIGURE_FILE(CatalogResources.xml.in CatalogResources.xml @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CatalogResources.xml DESTINATION ${KERNEL_salomeres_DATA})
-
-IF(NOT WITHONLYLAUNCHER)
- INSTALL(FILES channel.cfg SALOMEDS_Resources DESTINATION ${KERNEL_salomeres_DATA})
-
- CONFIGURE_FILE(KERNELCatalog.xml.in KERNELCatalog.xml @ONLY)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNELCatalog.xml DESTINATION ${KERNEL_salomeres_DATA})
-
-ENDIF(NOT WITHONLYLAUNCHER)
-
-
-
-
KERNELCatalog.xml
endif
-EXTRA_DIST += CatalogDataType.xml
+EXTRA_DIST = CatalogDataType.xml
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(unix)
-ADD_SUBDIRECTORY(cmake_files)
-
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in" "${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h" INSTALL ${KERNEL_salomeinclude_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in DESTINATION salome_adm/unix RENAME SALOMEconfig.h.in)
\ No newline at end of file
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-include $(top_srcdir)/salome_adm/unix/make_common_starter.am
SUBDIRS = unix cmake_files
AUTOMAKE_OPTIONS=filename-length-max=255
-
-# rules for install and build (see make_common_starter.am)
-salomeadmux_DATA = SALOMEconfig.h.in
-salomeinclude_DATA = SALOMEconfig.h
-BUILT_SOURCES=SALOMEconfig.ref SALOMEconfig.h SALOMEconfig.h.in
-
-mostlyclean-local:
- -rm -rf SALOMEconfig.h SALOMEconfig.h.in
-
-SALOMEconfig.h.in : SALOMEconfig.ref.in
- cp -pf $< $@;
-
-# test if SALOMEconfig.ref has changed (contents), at build time
-SALOMEconfig.h: $(top_builddir)/salome_adm/SALOMEconfig.ref
- @if ! [ -a $@ ]; then \
- echo cp -pf $< $@; \
- cp -pf $< $@; \
- fi; \
- if ! cmp -s $< $@; then \
- echo cp -pf $< $@; \
- cp -pf $< $@; \
- fi;
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/* Debug mode ??? */
-#ifndef DEBUG
-# define DEBUG
-#endif
-
-/* CORBA headers include rules */
-#ifndef CORBA_CLIENT_HEADER
-# define QUOTE(x) #x
-# define CORBA_CLIENT_HEADER(x) QUOTE(x@IDL_CLN_H@)
-# define CORBA_SERVER_HEADER(x) QUOTE(x@IDL_SRV_H@)
-#endif
-
-/* Platform definition */
-#ifndef @MACHINE@
- #define @MACHINE@
-#endif
-
-// This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names)
-#ifdef PACKAGE
-#undef PACKAGE
-#endif
-#ifdef PACKAGE_BUGREPORT
-#undef PACKAGE_BUGREPORT
-#endif
-#ifdef PACKAGE_NAME
-#undef PACKAGE_NAME
-#endif
-#ifdef PACKAGE_STRING
-#undef PACKAGE_STRING
-#endif
-#ifdef PACKAGE_TARNAME
-#undef PACKAGE_TARNAME
-#endif
-#ifdef PACKAGE_VERSION
-#undef PACKAGE_VERSION
-#endif
-#ifdef VERSION
-#undef VERSION
-#endif
-
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
-#endif
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are data, module or lib files
-SET(DATA
- am2cmake.py
- FindBOOST.cmake
- FindCPPUNIT.cmake
- FindDOXYGEN.cmake
- FindHDF5.cmake
- FindKERNEL.cmake
- FindLIBBATCH.cmake
- FindLIBXML2.cmake
- FindMPI.cmake
- FindOMNIORB.cmake
- UseOMNIORB.cmake
- FindPLATFORM.cmake
- FindPTHREADS.cmake
- FindPYTHON.cmake
- FindSWIG.cmake
- FindSPHINX.cmake
- install_python_from_idl.cmake
- install_and_compile_python_file.cmake
- InstallAndCompilePythonFile.cmake
- SalomeMacros.cmake
-)
-INSTALL(FILES ${DATA} DESTINATION ${KERNEL_salomeadmcmake})
-
-# These files are executable scripts
-SALOME_INSTALL_SCRIPTS(prepare_generating_doc.py ${KERNEL_salomescript_SCRIPTS})
IF(CPPUNIT_STATUS)
IF(WITH_CPPUNIT)
SET(CPPUNIT_ROOT_USER ${WITH_CPPUNIT})
- ENDIF(WITH_CPPUNIT)
- IF(NOT CPPUNIT_ROOT_USER)
+ ELSE(WITH_CPPUNIT)
SET(CPPUNIT_ROOT_USER $ENV{CPPUNIT_ROOT})
- ENDIF(NOT CPPUNIT_ROOT_USER)
- IF(NOT CPPUNIT_ROOT_USER)
- SET(CPPUNIT_ROOT_USER $ENV{CPPUNITHOME})
- ENDIF(NOT CPPUNIT_ROOT_USER)
+ ENDIF(WITH_CPPUNIT)
ENDIF(CPPUNIT_STATUS)
# -----
IF(CPPUNIT_ROOT_USER)
MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found in ${CPPUNIT_INCLUDE_PATHS}, check your CPPUNIT installation.")
ELSE(CPPUNIT_ROOT_USER)
- MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT (or CPPUNITHOME) environment variable.")
+ MESSAGE(STATUS "${CPPUNIT_INCLUDE_TO_FIND} not found on system, try to use WITH_CPPUNIT option or CPPUNIT_ROOT environment variable.")
ENDIF(CPPUNIT_ROOT_USER)
ENDIF(CPPUNIT_INCLUDE_DIR)
ENDIF(CPPUNIT_STATUS)
FIND_PATH(LIBBATCH_INCLUDE_DIR ${LIBBATCH_INCLUDE_TO_FIND} PATHS ${LIBBATCH_INCLUDE_PATHS} ${LIBBATCH_FIND_PATHS_OPTION})
IF(LIBBATCH_INCLUDE_DIR)
IF(LIBBATCH_ROOT_USER)
- SET(LIBBATCH_INCLUDES -I${LIBBATCH_INCLUDE_DIR}) # to be removed
- SET(LIBBATCH_INCLUDE_DIRS ${LIBBATCH_INCLUDE_DIR})
+ SET(LIBBATCH_INCLUDES -I${LIBBATCH_INCLUDE_DIR})
ENDIF(LIBBATCH_ROOT_USER)
MESSAGE(STATUS "${LIBBATCH_INCLUDE_TO_FIND} found in ${LIBBATCH_INCLUDE_DIR}")
ELSE(LIBBATCH_INCLUDE_DIR)
ENDIF(NOT MPI_INCLUDES)
GET_FILENAME_COMPONENT(MPI_ROOT ${MPI_INCLUDES} PATH)
ENDIF(MPI_ROOT_USER)
+
+ MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}")
- IF(MPI_INCLUDES)
- MESSAGE(STATUS "MPI include ${MPI_INCLUDE_TO_FIND} found in ${MPI_INCLUDES}")
-
- SET(MPI_INCLUDE_DIR ${MPI_INCLUDES})
- SET(MPI_INCLUDE_DIRS ${MPI_INCLUDES})
- SET(MPI_INCLUDES -I${MPI_INCLUDES})# to remove
- ENDIF(MPI_INCLUDES)
+ SET(MPI_INCLUDE_DIR ${MPI_INCLUDES})
+ SET(MPI_INCLUDE_DIRS ${MPI_INCLUDES})
+ SET(MPI_INCLUDES -I${MPI_INCLUDES})# to remove
# ------
ENDIF(WINDOWS)
ENDIF(CMAKE_BUILD_TYPE)
-SET(PLATFORM_CPPFLAGS) # to be removed
-SET(PLATFORM_LDFLAGS) # to be removed
-SET(PLATFORM_LIBADD) # to be removed
-
-SET(PLATFORM_LIBS)
-SET(PLATFORM_DEFINITIONS)
-
+SET(PLATFORM_CPPFLAGS)
+SET(PLATFORM_LDFLAGS)
+SET(PLATFORM_LIBADD)
IF(WINDOWS)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required # to be removed
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) # to be removed
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit # to be removed
-
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} /W0")
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS") # To disable windows warnings for strcpy, fopen, ...
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SCL_SECURE_NO_WARNINGS") # To disable windows warnings std::copy, std::transform, ...
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DWNT")
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DPPRO_NT") # For medfile
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_USE_MATH_DEFINES") # At least for MEDMEM
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_WIN32_WINNT=0x0500") # Windows 2000 or later API is required
- SET(PLATFORM_LIBS ${PLATFORM_LIBS} Ws2_32.lib)
- SET(PLATFORM_LIBS ${PLATFORM_LIBS} Userenv.lib) # At least for GEOM suit
-
- IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # if platform is Windows 64 bit
- SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators # to be removed
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators
- ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0)
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ...
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ...
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT)
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM
+ SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required
+ SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib)
+ SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit
ELSE(WINDOWS)
# SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses)
# SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type)
# SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wmissing-declarations)
# SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wunused)
# SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wall)
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) # to be removed
- SET(PLATFORM_LIBS ${PLATFORM_LIBS} -ldl)
+ SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl)
ENDIF(WINDOWS)
-SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P}) # set sizeof(long) the same as size of pointers, because on all memory models (EXCLUDING WINDOWS 64 bit) it is equivalent values
-IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8" AND WINDOWS) # if it platform Windows 64 bit
- SET(SIZE_OF_LONG "4") # set sizeof(long) to 4 byte
-ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8" AND WINDOWS)
-
-SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4") # to be removed
-SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${SIZE_OF_LONG} -DSIZEOF_INT=4")
+SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4)
SET(COMPILATION_WITH_CMAKE ON)
FIND_PATH(PTHREADS_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND} PATHS ${PTHREADS_INCLUDE_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
IF(PTHREADS_INCLUDE_DIR)
IF(PTHREADS_ROOT_USER)
- SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR}) # to remove
- SET(PTHREAD_INCLUDE_DIRS ${PTHREADS_INCLUDE_DIR})
+ SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR})
ENDIF(PTHREADS_ROOT_USER)
MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} found in ${PTHREADS_INCLUDE_DIR}")
ELSE(PTHREADS_INCLUDE_DIR)
FIND_PROGRAM(SPHINX_EXECUTABLE ${SPHINX_EXECUTABLE_TO_FIND})
ENDIF(SPHINX_ROOT_USER)
IF(SPHINX_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${SPHINX_EXECUTABLE} -v ERROR_VARIABLE STATUS_CHECK_SPHINX)
- STRING(REGEX MATCH "^Sphinx v[0-9]+\\.[0-9]+\\.[0-9]+" IS_SPHINX_USABLE ${STATUS_CHECK_SPHINX})
- IF(IS_SPHINX_USABLE)
- MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}")
- ELSE(IS_SPHINX_USABLE)
- MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found but NOT usable ! Check coherency between your python and Sphinx ! Sphinx DISABLED !")
- SET(SPHINX_STATUS 0)
- ENDIF(IS_SPHINX_USABLE)
+ MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} found: ${SPHINX_EXECUTABLE}")
ELSE(SPHINX_EXECUTABLE)
MESSAGE(STATUS "${SPHINX_EXECUTABLE_TO_FIND} not found, try to use WITH_SPHINX option or SPHINX_ROOT (or SPHINXHOME) environment variable")
SET(SPHINX_STATUS 0)
FindPYTHON.cmake \
FindSWIG.cmake \
FindSPHINX.cmake \
-SalomeMacros.cmake \
install_python_from_idl.cmake \
install_and_compile_python_file.cmake \
InstallAndCompilePythonFile.cmake
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-#----------------------------------------------------------------------------
-# LIST_CONTAINS is a macro useful for determining whether a list has a
-# particular entry
-#----------------------------------------------------------------------------
-MACRO(LIST_CONTAINS var value)
- SET(${var})
- FOREACH(value2 ${ARGN})
- IF(${value} STREQUAL "${value2}")
- SET(${var} TRUE)
- ENDIF (${value} STREQUAL "${value2}")
- ENDFOREACH (value2)
-ENDMACRO(LIST_CONTAINS)
-
-#----------------------------------------------------------------------------
-# The PARSE_ARGUMENTS macro will take the arguments of another macro and
-# define several variables.
-#
-# USAGE: PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)
-#
-# ARGUMENTS:
-#
-# prefix: IN: a prefix to put on all variables it creates.
-#
-# arg_names: IN: a list of names.
-# For each item in arg_names, PARSE_ARGUMENTS will create a
-# variable with that name, prefixed with prefix_. Each variable will be filled
-# with the arguments that occur after the given arg_name is encountered
-# up to the next arg_name or the end of the arguments. All options are
-# removed from these lists. PARSE_ARGUMENTS also creates a
-# prefix_DEFAULT_ARGS variable containing the list of all arguments up
-# to the first arg_name encountered.
-#
-# options: IN: a list of options.
-# For each item in options, PARSE_ARGUMENTS will create a
-# variable with that name, prefixed with prefix_. So, for example, if prefix is
-# MY_MACRO and options is OPTION1;OPTION2, then PARSE_ARGUMENTS will
-# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These
-# variables will be set to true if the option exists in the command line
-# or false otherwise.
-# arg_names and options lists should be quoted.
-#
-# The rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.
-#----------------------------------------------------------------------------
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- LIST_CONTAINS(is_arg_name ${arg} ${arg_names})
- IF (is_arg_name)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name)
- LIST_CONTAINS(is_option ${arg} ${option_names})
- IF (is_option)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option)
- ENDIF (is_arg_name)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
-
-#----------------------------------------------------------------------------
-# SALOME_INSTALL_SCRIPTS is a macro useful for installing scripts.
-#
-# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [WORKING_DIRECTORY dir] [DEF_PERMS])
-#
-# ARGUMENTS:
-# file_list: IN : list of files to be installed. This list should be quoted.
-# path: IN : full pathname for installing.
-#
-# By default files to be installed as executable scripts.
-# If DEF_PERMS option is provided, than permissions for installed files are
-# only OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ.
-#----------------------------------------------------------------------------
-MACRO(SALOME_INSTALL_SCRIPTS file_list path)
- PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "WORKING_DIRECTORY" "DEF_PERMS" ${ARGN})
- SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- IF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
- SET(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
- ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
- FOREACH(file ${file_list})
- SET(PREFIX "")
- IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
- SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
- ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
- INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})
- GET_FILENAME_COMPONENT(ext ${file} EXT)
- IF(ext STREQUAL .py)
- INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file}\")")
- INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file}')\")")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
- ENDIF(ext STREQUAL .py)
- ENDFOREACH(file ${file_list})
-ENDMACRO(SALOME_INSTALL_SCRIPTS)
-
-#----------------------------------------------------------------------------
-# SALOME_INSTALL_SCRIPTS is a macro useful for installing executable scripts.
-# ARGUMENTS:
-# PYFILE2COMPINST: IN : list of python files to be installed.
-# PYFILELOC: IN : full pathname for installing.
-# Permissions of installed files: OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ
-#----------------------------------------------------------------------------
-MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
- INSTALL(CODE "SET(PYTHON_FILE ${f})")
- FOREACH(input ${PYFILE2COMPINST})
- GET_FILENAME_COMPONENT(inputname ${input} NAME)
- INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
- INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
- INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
- ENDFOREACH(input ${PYFILE2COMPINST})
-ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
-
-#----------------------------------------------------------------------------
-# SALOME_CONFIGURE_FILE is a macro useful for copying a file to another location
-# and modify its contents.
-#
-# USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir])
-#
-# ARGUMENTS:
-# in_file: IN : input file with full paths.
-# out_file: IN : output file with full paths.
-# If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory.
-#----------------------------------------------------------------------------
-MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
- MESSAGE(STATUS "Creation of ${OUT_FILE}")
- CONFIGURE_FILE(${IN_FILE} ${OUT_FILE} @ONLY)
- PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})
- IF(SALOME_CONFIGURE_FILE_INSTALL)
- INSTALL(FILES ${OUT_FILE} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
- ENDIF(SALOME_CONFIGURE_FILE_INSTALL)
-ENDMACRO(SALOME_CONFIGURE_FILE)
\ No newline at end of file
# MYMODULE is a string that will be used to create a target with sources containing *.cc coming from the compilation of ${MYIDLFILES}
# MYIDLFILES containing all idl files to be compiled.
# MYIDLCXXFLAGS containing all directories (only directories) where to find *.idl which depend ${MYIDLFILES}.
-# TYPE contains type of the library
-MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS TYPE)
+MACRO(OMNIORB_ADD_MODULE MYMODULE MYIDLFILES MYIDLCXXFLAGS)
SET(MYSOURCES)
FOREACH(input ${MYIDLFILES})
- GET_FILENAME_COMPONENT(base ${input} NAME_WE)
-# STRING(REGEX REPLACE ".idl" "" base ${input})
+ STRING(REGEX REPLACE ".idl" "" base ${input})
SET(OMNIORB_IDLCXXFLAGS2 "${OMNIORB_IDLCXXFLAGS}")
SET(src ${CMAKE_CURRENT_BINARY_DIR}/${base}SK.cc)
SET(MYSOURCES ${MYSOURCES} ${src})
SET(outputs ${src})
SET(dynsrc ${CMAKE_CURRENT_BINARY_DIR}/${base}DynSK.cc)
- SET(MYSOURCES ${MYSOURCES} ${dynsrc})
SET(outputs ${outputs} ${dynsrc})
SET(inc ${CMAKE_CURRENT_BINARY_DIR}/${base}.hh)
SET(outputs ${outputs} ${inc})
- GET_FILENAME_COMPONENT(path ${input} PATH)
- IF(NOT path)
- SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
- ENDIF(NOT path)
+ SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input})
SET(flags ${OMNIORB_IDLCXXFLAGS2})
STRING(REGEX MATCH "-bcxx" ISBCXX ${flags})
IF(NOT ISBCXX)
STRING(REPLACE "\\" "/" IDLPYFLAGS ${IDLPYFLAGS})
INSTALL(CODE "OMNIORB_COMPILE_IDL_FORPYTHON_ON_INSTALL( \"${OMNIORB_IDL_PYTHON}\" \"${IDLPYFLAGS}\" \"${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_PYIDL_DIR}\" )")
ENDFOREACH(input ${MYIDLFILES})
- ADD_LIBRARY(${MYMODULE} ${TYPE} ${MYSOURCES})
-
+ ADD_LIBRARY(${MYMODULE} SHARED ${MYSOURCES})
ENDMACRO(OMNIORB_ADD_MODULE)
"MEFISTO2D",
"MeshDriverDAT",
"MeshDriverMED",
- "MeshDriverGMF",
"MeshDriver",
"MeshDriverSTL",
"MeshDriverUNV",
INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCADSURF.cmake)
+ INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindBLSURF.cmake)
""")
pass
if self.module in ["ghs3dplugin", "hexoticplugin"]:
INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
""")
pass
- if self.module == "jobmanager":
- newlines.append("""
- INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake)
- """)
- pass
if self.module == "hxx2salome":
newlines.append("""
SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
pass
# --
newlines.append("""
- set(VERSION 7.0.0)
- set(SHORT_VERSION 7.0)
- set(XVERSION 0x070000)
- set(VERSION_DEV 1)
+ set(VERSION 6.5.0)
+ set(SHORT_VERSION 6.5)
+ set(XVERSION 0x060500)
""")
pass
# --
''')
elif self.module == "kernel":
newlines.append(r'''
- SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm -include SALOMEconfig.h)
- SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm -include SALOMEconfig.h)
+ SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm/unix -include SALOMEconfig.h)
+ SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${CMAKE_BINARY_DIR}/salome_adm/unix -include SALOMEconfig.h)
''')
else:
if self.module not in ["yacs"]:
)
''')
self.files.append("static/header.html.in")
- elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui' or operator.contains(self.root, 'doc') and mod in ['pyhello']:
+ elif self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['kernel', 'gui', 'geom', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui':
newlines.append(r'''
SET(top_builddir
${CMAKE_BINARY_DIR}
${datadir}/doc/salome
)
''')
- if mod not in ['blsurfplugin']:
- self.files.append("static/header.html.in")
+ self.files.append("static/header.html.in")
if mod in ['geom', 'smesh', 'visu','netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin',"ghs3dprlplugin"] and self.root[-len(mod):] == upmod:
self.files.append("static/header_py.html.in")
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)"""%(input, doc_gui_destination, doc_source, doc_gui_destination, head_source, doc_gui_destination))
from os import path
- if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin','pyhello'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc') or mod in ['pyhello'] and operator.contains(self.root, 'doc'):
+ if mod in ['geom', 'smesh', 'visu', 'netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin','ghs3dprlplugin'] and self.root[-len(mod):] == upmod and operator.contains(self.root, 'doc'):
ign = r"""'*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*'"""
if mod in ['geom', 'smesh']:
if mod == 'geom':
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)"""%(prepare_generating_doc_src, prepare_generating_doc_src, tmp, upmod, tmp, tmp, input, tmp, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
- newlines.append(r"""ADD_DEPENDENCIES(usr_docs html_docs)""")
else:
config_f = ""
if mod in ['netgenplugin','blsurfplugin','hexoticplugin','ghs3dplugin', "ghs3dprlplugin"] :
- config_f = "${DOXYGEN_EXECUTABLE} doxyfile_py"
- elif mod not in ['pyhello']:
- config_f = "${DOXYGEN_EXECUTABLE} doxyfile_idl"
- newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs %s
+ config_f = "doxyfile_py"
+ else:
+ config_f = "doxyfile_idl"
+ newlines.append("""\t ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} %s
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''%s''', ignore=shutil.ignore_patterns(%s)); shutil.copy(r'''%s''',r'''%s''')"
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)"""%(config_f, doc_gui_destination, doc_gui_destination, ign, head_source, doc_gui_destination))
- elif mod in ['yacs', 'jobmanager'] and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'):
+ elif mod == 'yacs' and operator.contains(self.root, upmod + '_SRC'+path.sep+'doc'):
from sys import platform
params = '';
if platform == "win32":
params = '-Q';
ext = "bat"
prf = "call"
- cmd = "STRING(REPLACE \"/\" \"\\\\\" SCR"
else:
ext = "sh"
prf = ". "
- cmd = "SET(SCR"
doc_gui_destination = "${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/%s/docutils"%(upmod)
scr = self.writeEnvScript(upmod)
newlines.append(r"""
- %s "%s")
+ IF(WINDOWS)
+ STRING(REPLACE "/" "\\" SCR "%s")
+ ELSE(WINDOWS)
+ SET(SCR "%s")
+ ENDIF(WINDOWS)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s "${SCR}")
- ADD_CUSTOM_TARGET(html_docs %s ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s && ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html
+ ADD_CUSTOM_TARGET(html_docs %s ${CMAKE_CURRENT_BINARY_DIR}/env_s.%s && ${SPHINX_EXECUTABLE} %s -c ${CMAKE_BINARY_DIR}/doc/docutils -W -b html ${ALLSPHINXOPTS} html
COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''%s''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''%s''')\"
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(cmd, scr, ext, prf, ext, params, doc_gui_destination, doc_gui_destination))
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})"""%(scr,scr,ext,prf,ext,params, doc_gui_destination, doc_gui_destination))
# --
upmod = self.module.upper()
- if mod in ['kernel', 'gui', 'med', 'smesh', 'visu', 'blsurfplugin'] and self.root[-len('tui'):] == 'tui':
+ if mod in ['kernel', 'gui', 'med', 'smesh', 'visu'] and self.root[-len('tui'):] == 'tui':
if mod == 'kernel':
tmp = """\tADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
COMMAND ${DOXYGEN_EXECUTABLE}
if mod == 'visu':
tmp1= r"""\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/visuscreen.png''', r'''%s''')" """%(doc_tui_destination)
elif mod == 'smesh':
- tmp1= """\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s''')" """%(doc_tui_destination)
+ extra_srcdir = "${CMAKE_CURRENT_SOURCE_DIR}/extra"
+ tmp1= """\n COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/smeshscreen.png''', r'''%s'''); copy(r'''%s/AddNetgenInSalome2.pdf''', r'''%s'''); copy(r'''%s/PluginMeshers.html''', r'''%s''')"
+ COMMAND ${PYTHON_EXECUTABLE} -c "from shutil import copy; copy(r'''%s/AddNetgenInSalome2.ps''', r'''%s'''); copy(r'''%s/AddNetgenInSalome2.sxw''', r'''%s''')" """%(doc_tui_destination, extra_srcdir,doc_destination, extra_srcdir,doc_destination, extra_srcdir,doc_destination,extra_srcdir,doc_destination)
else:
tmp1=""
doc_source = "${CMAKE_CURRENT_BINARY_DIR}/%s"%(upmod)
- inst_head_command=""
- if mod not in ['blsurfplugin']:
- inst_head_command = "; shutil.copy(r'''%s''', r'''%s''')"%(head_source, doc_tui_destination)
newlines.append(tmp + """
- COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s''')%s" """%(doc_tui_destination, doc_source, doc_tui_destination, inst_head_command) + tmp1 + """
+ COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''%s''', True); shutil.copytree(r'''%s''', r'''%s'''); shutil.copy(r'''%s''', r'''%s''')" """%(doc_tui_destination, doc_source, doc_tui_destination, head_source, doc_tui_destination) + tmp1 + """
VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)""")
ENDIF(WINDOWS)
''')
# --
- if self.module in ["geom", "med", "hexoticplugin", "blsurfplugin"]:
+ if self.module in ["geom", "med"]:
newlines.append(r'''
SET(var ${var} -I${CMAKE_CURRENT_SOURCE_DIR})
SET(var ${var} -I${CMAKE_CURRENT_BINARY_DIR})
f.close()
return
- def writeEnvScript(self, upmod, buildmod=True):
- import os, sys
- p_version = sys.version[:3]
- python_path = "PYTHONPATH"
- root_dir = "%s_ROOT_DIR" % upmod
- if sys.platform == "win32":
- script_line = '@SET %(var)s=%(val)s;%%%(var)s%%\n'
- var_line = '%%%s%%'
- lib_path = "PATH"
- omni = "x86_win32"
- omni_py = "python"
- pass
+ def writeEnvScript(self, upmod):
+ from sys import platform, version_info
+ p_version = """%s.%s"""%(version_info[0],version_info[1])
+ python_path ="PYTHONPATH"
+ path = ""
+ begin = ""
+ end = ""
+ delim = ""
+ cmd = ""
+ pdir = ""
+ omni = ""
+ omni_py = ""
+ if platform == "win32" :
+ path = "PATH"
+ begin = "%"
+ end = "%"
+ delim = ";"
+ cmd = "@SET "
+ omni = "/x86_win32"
+ omni_py = "/python"
+ pdir = "PDIR"
else:
- script_line = 'export %(var)s=%(val)s:\$%(var)s\n'
- var_line = '\${%s}'
- lib_path = "LD_LIBRARY_PATH"
- omni = ""
- omni_py = "/".join( ["python%s"%p_version , "site-packages"] )
- pass
- #
- script = ""
- #
- if buildmod:
- script += script_line % { 'var':python_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "lib", "python%s"%p_version, "site-packages", "salome"] ) }
- script += script_line % { 'var':python_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "bin", "salome"] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( ["${CMAKE_INSTALL_PREFIX}", "lib", "salome"] ) }
- pass
- else:
- script += script_line % { 'var':python_path, 'val':"/".join( [var_line % root_dir, "lib", "python%s"%p_version, "site-packages", "salome"] ) }
- script += script_line % { 'var':python_path, 'val':"/".join( [var_line % root_dir, "bin", "salome"] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( [var_line % root_dir, "lib", "salome"] ) }
- pass
- #
+ path = "LD_LIBRARY_PATH"
+ begin = "\${"
+ end = "}"
+ delim = ":"
+ cmd = "export "
+ omni_py = "/python" + p_version + "/" + "site-packages"
+ pdir = "INST_ROOT"
+
+
+ path_ = begin + path + end
+ root_dir_ = begin + upmod + "_ROOT_DIR" + end
+ python_path_ = begin + python_path + end
+ _python_path_ = delim + python_path_+ "\n"
+ _path_ = delim + path_+ "\n"
+ _pdir = begin + pdir + end
+
+
+ script = cmd + " " + python_path + "=" + root_dir_+"/lib/python" + p_version \
+ + "/site-packages/salome" + _python_path_
+
+ script = script + cmd + " " + python_path + "=" + root_dir_+"/bin/salome" + \
+ _python_path_
+
+ script = script + cmd + " "+ path + "=" + root_dir_+"/lib/salome"+ _path_
+
if upmod == "KERNEL" :
- script += "\n"
- if omni:
- script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni] ) }
- pass
- else:
- script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib"] ) }
- script += script_line % { 'var':lib_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib"] ) }
- pass
- script += script_line % { 'var':python_path, 'val':"/".join( ["${OMNIORB_ROOT_USER}", "lib", omni_py] ) }
- pass
- #
+ script = script + cmd + " " + python_path + "=" + _pdir + \
+ "/omniORB-4.1.5/lib" + omni + _python_path_
+
+ script = script + cmd + " " + python_path + "=" + _pdir + \
+ "/omniORB-4.1.5/lib" + omni_py + _python_path_
+
+ script = script + cmd + " "+ path + "=" + _pdir+ "/omniORB-4.1.5/lib" + \
+ omni + _path_
+
if upmod == "GEOM" :
- script = self.writeEnvScript("KERNEL", False) + "\n" + script
- script = self.writeEnvScript("GUI", False) + "\n" + script
- pass
- #
+ script = self.writeEnvScript("KERNEL") + script
+ script = self.writeEnvScript("GUI") + script
+
if upmod == "SMESH" :
- script = self.writeEnvScript("GEOM", False) + "\n" + script
- pass
-
+ script = self.writeEnvScript("GEOM") + script
+
return script
pass
# --
for f in files:
if f in ["Makefile.am", "Makefile.am.cmake"]:
- convert = True # convert files by default
- forced = getenv("AM2CMAKE_FORCE_GENERATION", "0")=="1" or \
- getenv("AM2CMAKE_FORCE_%s_GENERATION"%module.upper(), "0")=="1"
- if not forced:
+ convert = True
+ if getenv("AM2CMAKE_FORCE_GENERATION", "0")=="0":
# detect if conversion should be done
if "CMakeLists.txt" in files:
from os.path import join
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# ...
-# Usage: prepare_generating_doc.py <output_file> <input_file> <myClass>
-# ...
-# 1. myClassDC is replaced by myClass
-# 2. all methods of myClassDC become global methods of Python package
-# ...
-# myClass is passed as command line argument
-# ...
-
-import os, sys, re
-
-# check command line
-if len( sys.argv ) < 4:
- sys.exit("Usage: %s <output_file> <input_file> <myClass>" % os.path.basename(sys.argv[0]))
-
-# open input file
-try:
- infile = open(sys.argv[2], 'rb')
-except:
- sys.exit("File %s is not found" % sys.argv[2])
- pass
-
-# open output file
-try:
- outfile = open(sys.argv[1], 'wb')
-except:
- sys.exit("File %s cannot be opened for write" % sys.argv[1])
- pass
-
-# parse input file
-
-isCom = False
-isShift = False
-
-for line in infile.readlines():
- dc_class = sys.argv[3]
- dc_class_dc = dc_class+'DC'
-
- if isShift and ( re.match('^class\s+', line) or re.match('^def\s+', line) ):
- # stop shifting lines as soon as myClassDC definition is over
- isShift = False
- pass
- if re.match('class\s+%s' % dc_class_dc, line):
- # start shifting lines
- isShift = True
- # omit this line (to remove myClassDC from the package)
+import sys, re
+outfile = open(sys.argv[1], 'wb')
+isCom = False
+for line in open(sys.argv[2], 'rb').readlines():
+ if re.match('class '+sys.argv[3]+'DC', line):
continue
-
- # process documentation
n = line.find('"""')
n1 = line[(n+2):].find('"""')
if (n > -1) and (n1 > -1):
if isCom:
if n > -1:
isCom = False
- pass
continue
else:
if n > -1:
isCom = True
- continue
- pass
-
- # replacements
- if isShift:
- line = re.sub(r'^\s+#', '#', line)
- line = re.sub(r'^\s+def', 'def', line)
- pass
- line = re.sub(dc_class_dc, dc_class, line)
-
- # write resulting line
+ continue
+ line = re.sub(r'^\s+#', '#', line)
+ line = re.sub(r'^\s+def', 'def', line)
+ line = re.sub(sys.argv[3]+'DC', sys.argv[3], line)
outfile.write(line)
-
- pass # end of for
-
-# close input and output files
-infile.close()
-outfile.close()
+outfile.close()
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE\r
-#\r
-# This library is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 2.1 of the License.\r
-#\r
-# This library is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with this library; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-#\r
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-#\r
-\r
-ADD_SUBDIRECTORY(config_files)\r
-\r
-SET(DEPRECATED_FILES\r
- DEPRECATED/F77config.h.in\r
- DEPRECATED/sstream.in\r
- DEPRECATED/envScript.in\r
- DEPRECATED/depend.in\r
- DEPRECATED/make_commence.in\r
- DEPRECATED/make_conclude.in\r
- DEPRECATED/make_module.in\r
- DEPRECATED/make_omniorb.in\r
-)\r
-\r
-# The deprecated files are deprecated for the KERNEL but not for the\r
-# related modules (GUI, MED, ...), for now. Some files have to be installed.\r
-INSTALL(FILES ${DEPRECATED_FILES} DESTINATION salome_adm/unix)\r
DEPRECATED/make_module.in \
DEPRECATED/make_omniorb.in
+# rules for install and build (see make_common_starter.am)
+salomeadmux_DATA = SALOMEconfig.h.in
+salomeinclude_DATA = SALOMEconfig.h
+BUILT_SOURCES=SALOMEconfig.ref SALOMEconfig.h SALOMEconfig.h.in
+
+mostlyclean-local:
+ -rm -rf SALOMEconfig.h SALOMEconfig.h.in
+
+SALOMEconfig.h.in : SALOMEconfig.ref.in
+ cp -pf $< $@;
+
+# test if SALOMEconfig.ref has changed (contents), at build time
+SALOMEconfig.h: $(top_builddir)/salome_adm/unix/SALOMEconfig.ref
+ @if ! [ -a $@ ]; then \
+ echo cp -pf $< $@; \
+ cp -pf $< $@; \
+ fi; \
+ if ! cmp -s $< $@; then \
+ echo cp -pf $< $@; \
+ cp -pf $< $@; \
+ fi;
+
# The deprecated files are deprecated for the KERNEL but not for the
# related modules (GUI, MED, ...), for now. Some files have to be installed.
dist_salomeadmux_DATA=\
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE\r
-#\r
-# This library is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 2.1 of the License.\r
-#\r
-# This library is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with this library; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
-#\r
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-#\r
- \r
-# The deprecated files are deprecated for the KERNEL but not for the\r
-# related modules (GUI, MED, ...). Some files have to be installed.\r
-SET(DEPRECATED_FILES\r
- DEPRECATED/ac_cc_warnings.m4\r
- DEPRECATED/ac_cxx_bool.m4\r
- DEPRECATED/ac_cxx_mutable.m4\r
- DEPRECATED/ac_cxx_partial_specialization.m4\r
- DEPRECATED/ac_cxx_typename.m4\r
- DEPRECATED/check_mico.m4\r
- DEPRECATED/check_pthreads.m4\r
- DEPRECATED/config.sub\r
- DEPRECATED/config.guess\r
- DEPRECATED/install-sh\r
- DEPRECATED/libtool.m4\r
- DEPRECATED/ltconfig\r
- DEPRECATED/ltmain.sh\r
- DEPRECATED/check_Salome.m4\r
- DEPRECATED/check_java.m4\r
- DEPRECATED/missing\r
- DEPRECATED/mkinstalldirs\r
-)\r
-\r
-SET(m4_DATA\r
- ac_cxx_depend_flag.m4\r
- ac_cxx_have_sstream.m4\r
- ac_cxx_namespaces.m4\r
- ac_cxx_option.m4\r
- ac_cxx_template_options.m4\r
- ac_cxx_use_std_iostream.m4\r
- ac_cxx_warnings.m4\r
- ac_linker_options.m4\r
- ac_check_sizeof_fortran.m4\r
- acx_pthread.m4\r
- check_Kernel.m4\r
- check_boost.m4\r
- check_cas.m4\r
- check_corba.m4\r
- check_cppunit.m4\r
- check_f77.m4\r
- check_calcium.m4\r
- check_hdf5.m4\r
- check_htmlgen.m4\r
- check_sphinx.m4\r
- check_lam.m4\r
- check_libbatch.m4\r
- check_mpi.m4\r
- check_openmpi.m4\r
- check_mpich.m4\r
- check_omniorb.m4\r
- check_sockets.m4\r
- check_swig.m4\r
- check_vtk.m4\r
- check_withihm.m4\r
- enable_pthreads.m4\r
- production.m4\r
- pyembed.m4\r
- python.m4\r
- check_libxml.m4\r
- check_paco++.m4\r
- local_install.m4\r
- hack_libtool.m4\r
- check_tbb.m4\r
-)\r
-INSTALL(FILES ${DEPRECATED_FILES} DESTINATION salome_adm/unix/config_files/DEPRECATED)\r
-INSTALL(FILES ${m4_DATA} DESTINATION salome_adm/unix/config_files)\r
done
fi
if test "x${boost_lib_dir_ok}" = "xyes" ; then
- LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX} -lboost_system${BOOST_LIBSUFFIX}"
+ LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}"
AC_TRY_LINK([#include <boost/thread/thread.hpp>],
[struct TBody{ void operator()(){} }; boost::thread(TBody())],
boost_binaries_ok=yes,
AC_MSG_RESULT(\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX})
AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS})
AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so,
- BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX} -lboost_system${BOOST_LIBSUFFIX}",
+ BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}",
BOOST_LIB_THREAD="")
AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so,
BOOST_LIB_SIGNALS="${BOOST_LIBS} -lboost_signals${BOOST_LIBSUFFIX}",
CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema"
CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema"
- if test -f ${CAS_LIBDIR}/libStdPlugin.so ; then
+ if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then
# standard plugin library libStdPlugin has been added in CASCADE 5.2.3
CAS_STDPLUGIN="StdPlugin"
CAS_OCAFVIS="$CAS_OCAFVIS -lStdPlugin -lStdLPlugin"
- elif test -f ${CAS_LIBDIR}/libTKStdSchema.so ; then
+ elif test -f $CASROOT/$casdir/lib/libTKStdSchema.so ; then
# standard plugin has been renamed in CASCADE 6.5
CAS_STDPLUGIN=TKStdSchema
CAS_OCAFVIS="$CAS_OCAFVIS -lTKStdSchema -lTKStdLSchema"
# ============================================================
if !WITHONLYLAUNCHER
- AM_CXXFLAGS = -I$(top_builddir)/salome_adm -include SALOMEconfig.h
- AM_CPPFLAGS = -I$(top_builddir)/salome_adm -include SALOMEconfig.h
+ AM_CXXFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h
+ AM_CPPFLAGS = -I$(top_builddir)/salome_adm/unix -include SALOMEconfig.h
else WITHONLYLAUNCHER
AM_CXXFLAGS =
AM_CPPFLAGS =
# Documentation directory
docdir = $(datadir)/doc/salome
-
-# Cmake files
-CMAKEFILES = $(notdir $(wildcard $(srcdir)/CMakeLists.txt))
-EXTRA_DIST = $(CMAKEFILES)
free (strings);
}
-#else
- #if (_MSC_VER >= 1400) // Visual Studio 2005
- #include <sstream>
- int setenv(const char *name, const char *value, int rewrite)\r
- {\r
- std::stringstream sstr;\r
- sstr<<name<<'='<<value;\r
- if(rewrite || std::string(getenv(name)).length() == 0)\r
- return _putenv(sstr.str().c_str());\r
- else return -1;\r
- }
- #endif
#endif
}
BASICS_EXPORT std::string GetGUID( GUIDtype );
#ifndef WIN32
BASICS_EXPORT void print_traceback();
-#else
-#if (_MSC_VER >= 1400) // Visual Studio 2005
- BASICS_EXPORT int setenv(const char*, const char*, int);
-#endif
#endif
}
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
-)
-
-SET(SALOMEBasics_SOURCES
- BasicsGenericDestructor.cxx
- Basics_Utils.cxx
- Basics_DirUtils.cxx
- SALOME_Basics.hxx
- BasicsGenericDestructor.hxx
- Basics_Utils.hxx
- Basics_DirUtils.hxx
-)
-
-ADD_LIBRARY(SALOMEBasics SHARED ${SALOMEBasics_SOURCES})
-INSTALL(TARGETS SALOMEBasics DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET_TARGET_PROPERTIES(SALOMEBasics PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMEBasics ${PTHREAD_LIBS} ${PLATFORM_LIBS})
-
-FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(SUBDIR_BASE
- Basics
- SALOMELocalTrace
- HDFPersist
- KERNEL_PY
-)
-
-SET(SUBDIR_CORBA
- DF
- Logger
- SALOMETraceCollector
- Utils
- NamingService
- GenericObj
- Registry
- ModuleCatalog
- ResourcesManager
- Notification
- NOTIFICATION_SWIG
- Container
- TestContainer
- Launcher
- LifeCycleCORBA
- LifeCycleCORBA_SWIG
- SALOMEDSClient
- TOOLSDS
- SALOMEDSImpl
- SALOMEDS
- KernelHelpers
- ModuleGenerator
- Communication
- Communication_SWIG
- DSC
-)
-
-SET(SUBDIR_CPPUNIT_BASE
- Basics/Test
- SALOMELocalTrace/Test
-)
-
-SET(SUBDIR_CPPUNIT_CORBA
- Logger/Test
- SALOMETraceCollector/Test
- Utils/Test
- NamingService/Test
- LifeCycleCORBA/Test
- LifeCycleCORBA_SWIG/Test
- SALOMEDSImpl/Test
- SALOMEDS/Test
- KernelHelpers/Test
-)
-
-SET(SUBDIR_CPPUNIT_GENERAL UnitTests)
-SET(SUBDIR_MPI MPIContainer TestMPIContainer)
-SET(SUBDIR_PARALLEL ParallelContainer)
-
-IF(WITHONLYLAUNCHER)
- SET(SUBDIRS Basics ResourcesManager Launcher)
-ELSE(WITHONLYLAUNCHER)
- SET(SUBDIRS ${SUBDIR_BASE})
-ENDIF(WITHONLYLAUNCHER)
-
-IF(CORBA_GEN)
- SET(SUBDIRS ${SUBDIRS} ${SUBDIR_CORBA})
-ENDIF(CORBA_GEN)
-
-IF(MPI_IS_OK)
- SET(SUBDIRS
- ${SUBDIRS}
- ${SUBDIR_MPI}
- )
-ENDIF(MPI_IS_OK)
-
-IF(CPPUNIT_IS_OK)
- IF(CORBA_GEN)
- SET(SUBDIRS
- ${SUBDIRS}
- ${SUBDIR_CPPUNIT_BASE}
- ${SUBDIR_CPPUNIT_CORBA}
- ${SUBDIR_CPPUNIT_GENERAL}
- )
- ELSE(CORBA_GEN)
- SET(SUBDIRS
- ${SUBDIRS}
- ${SUBDIR_CPPUNIT_BASE}
- ${SUBDIR_CPPUNIT_GENERAL}
- )
- ENDIF(CORBA_GEN)
-ENDIF(CPPUNIT_IS_OK)
-
-IF(WITH_PACO_PARALLEL)
- SET(SUBDIRS
- ${SUBDIRS}
- ${SUBDIR_PARALLEL}
- )
-ENDIF(WITH_PACO_PARALLEL)
-
-FOREACH(DIR ${SUBDIRS})
- ADD_SUBDIRECTORY(${DIR})
-ENDFOREACH(DIR ${SUBDIRS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${MPI_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_LIBS
- OpUtil
- SALOMELocalTrace
- SalomeIDLKernel
-)
-
-SET(SalomeCommunication_SOURCES
- SALOME_Comm_i.cxx
- SALOME_Matrix_i.cxx
- SenderFactory.cxx
- MultiCommException.cxx
- SALOMEMultiComm.cxx
- ReceiverFactory.cxx
- MatrixClient.cxx
- MultiCommException.hxx
- SALOME_Comm_i.hxx
- SALOME_Matrix_i.hxx
- SenderFactory.hxx
- ReceiverFactory.hxx
- MatrixClient.hxx
- SALOMEMultiComm.hxx
- Receivers.hxx
- Receiver.hxx
-)
-
-ADD_LIBRARY(SalomeCommunication SHARED ${SalomeCommunication_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCommunication PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCommunication ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS})
-INSTALL(TARGETS SalomeCommunication DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(COMMON_HEADERS_HXX
- MatrixClient.hxx
- MultiCommException.hxx
- Receiver.hxx
- ReceiverFactory.hxx
- Receivers.hxx
- Receivers.cxx
- SALOMEMultiComm.hxx
- SALOME_Comm_i.hxx
- SALOME_Communication.hxx
- SALOME_Matrix_i.hxx
- SenderFactory.hxx
-)
-
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
Receiver.hxx
# the following file is needed by an include file (VERY DIRTY!)
-EXTRA_DIST += Receivers.cxx
+EXTRA_DIST = Receivers.cxx
libSalomeCommunication_la_CPPFLAGS = $(COMMON_CPPFLAGS) $(OPT_CPPFLAGS)
libSalomeCommunication_la_LDFLAGS = -no-undefined -version-info=0:0:0 $(OPT_LDFLAGS)
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-
-SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(libSALOME_Comm.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
-INCLUDE_DIRECTORIES(
- ${PYTHON_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Communication
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-SET(_libSALOME_Comm_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-SET(_libSALOME_Comm_LIBS
- SalomeCommunication
- ${PYTHON_LIBS}
-)
-
-IF(MPI_IS_OK)
- INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIRS})
-
- SET(_libSALOME_Comm_FLAGS "${_libSALOME_Comm_FLAGS} ${MPI_DEFINITIONS}")
- SET(_libSALOME_Comm_LIBS
- ${_libSALOME_Comm_LIBS}
- ${MPI_LIBS}
- )
-ENDIF(MPI_IS_OK)
-
-SWIG_ADD_MODULE(libSALOME_Comm python libSALOME_Comm.i)
-SWIG_LINK_LIBRARIES(libSALOME_Comm ${_libSALOME_Comm_LIBS})
-SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES COMPILE_FLAGS "${_libSALOME_Comm_FLAGS}")
-
-IF(${MACHINE} STREQUAL WINDOWS)
- SET_TARGET_PROPERTIES(_libSALOME_Comm PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Comm_d)
-ENDIF(${MACHINE} STREQUAL WINDOWS)
-
-INSTALL(TARGETS _libSALOME_Comm DESTINATION ${KERNEL_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Comm.py DESTINATION ${KERNEL_salomepythondir})
\ No newline at end of file
CLEANFILES = swig_wrap.cpp
-EXTRA_DIST += $(SWIGSOURCES)
+EXTRA_DIST = $(SWIGSOURCES)
#
# ===============================================================
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${HDF5_INCLUDE_DIRS}
- ${LIBXML_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(SCRIPTS
- SALOME_ComponentPy.py
- SALOME_PyNode.py
- SALOME_Container.py
-)
-
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-SET(COMMON_LIBS
- Registry
- SalomeNotification
- SalomeResourcesManager
- ResourcesManager
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeHDFPersist
- SalomeGenericObj
- SalomeIDLKernel
- ${CORBA_LIBS}
- ${PYTHON_LIBS}
-)
-
-IF(WITH_MPI_SEQ_CONTAINER)
- SET(COMMON_FLAGS
- ${COMMON_FLAGS}
- ${MPI_DEFINITIONS}
- )
- SET(COMMON_LIBS
- ${COMMON_LIBS}
- ${MPI_LIBS}
- )
-ENDIF(WITH_MPI_SEQ_CONTAINER)
-
-IF(WITH_PACO_PARALLEL)
- SET(COMMON_FLAGS
- ${COMMON_FLAGS}
- -DWITH_PACO_PARALLEL
- ${PACO_DEFINITIONS}
- )
- SET(COMMON_LIBS
- ${COMMON_LIBS}
- ${PACO_LIBS}
- )
-ENDIF(WITH_PACO_PARALLEL)
-
-SET(SalomeContainer_SOURCES
- Component_i.cxx
- Container_i.cxx
- SALOME_FileTransfer_i.cxx
- SALOME_FileRef_i.cxx
- Container_init_python.cxx
- SALOME_ContainerManager.cxx
- Salome_file_i.cxx
-)
-
-ADD_LIBRARY(SalomeContainer SHARED ${SalomeContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SalomeContainer ${COMMON_LIBS})
-INSTALL(TARGETS SalomeContainer DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(SALOME_Container_LIBS
- SalomeContainer
- SALOMEBasics
- ${COMMON_LIBS}
- ${HDF5_LIBS}
-)
-
-ADD_EXECUTABLE(SALOME_Container SALOME_Container.cxx SALOME_Container_SignalsHandler.cxx)
-SET_TARGET_PROPERTIES(SALOME_Container PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOME_Container ${SALOME_Container_LIBS})
-
-ADD_EXECUTABLE(TestSalome_file TestSalome_file.cxx)
-SET_TARGET_PROPERTIES(TestSalome_file PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestSalome_file SALOMETraceCollectorTest ${SALOME_Container_LIBS})
-
-INSTALL(TARGETS SALOME_Container DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
name[slash]='_';
_containerName=name;
}
-
-//=============================================================================
-/*!
- \brief Get version of the component
-
- This method is supposed to be implemented in all derived classes; default implementation
- returns empty string that means that no version information about the component is available.
-
- \note The version of the component is stored to the study, as a part of general persistence
- mechanism; once stored, version information in the study cannot be changed.
-
- \return string containing component's version, e.g. "1.0"
-*/
-char* Engines_Component_i::getVersion()
-{
- return CORBA::string_dup( "" );
-}
# Header to be installed
# ===============================================================
#
-# header files
+# header files
salomeinclude_HEADERS = \
SALOME_Component_i.hxx \
SALOME_Container_i.hxx \
SALOME_Container.py
# These files are executable scripts
-dist_salomescript_SCRIPTS=
+dist_salomescript_SCRIPTS=\
+ SALOME_ContainerPy.py
#
# ===============================================================
@CORBA_LIBS@ \
$(PYTHON_LIBS)
-if WITH_MPI_SEQ_CONTAINER
+if WITH_MPI_SEQ_CONTAINER
COMMON_CPPFLAGS += @MPI_INCLUDES@
COMMON_LIBS += @MPI_LIBS@
endif
$(CORBA_LIBS) \
$(PYTHON_LIBS)
-if WITH_MPI_SEQ_CONTAINER
+if WITH_MPI_SEQ_CONTAINER
SALOME_Container_LDADD += $(MPI_LIBS)
endif
def getObjectInfo(self, studyId, entry):
return ""
- #-------------------------------------------------------------------------
-
- def getVersion(self):
- return "" # empty string means "unknown" version
-
- pass # end of SALOME_ComponentPy_i
virtual bool hasObjectInfo() { return false; }
virtual char* getObjectInfo(CORBA::Long studyId, const char* entry) { return CORBA::string_dup(""); }
- // Version information
- virtual char* getVersion();
-
// --- local C++ methods
PortableServer::ObjectId * getId();
#include <sstream>
#include <string>
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(SALOME_Session)
-
#ifdef WNT
#include <process.h>
#define getpid _getpid
void SALOME_ContainerManager::ShutdownContainers()
{
MESSAGE("ShutdownContainers");
-
- SALOME::Session_var session = SALOME::Session::_nil();
- CORBA::Long pid = 0;
- CORBA::Object_var objS = _NS->Resolve("/Kernel/Session");
- if (!CORBA::is_nil(objS))
- {
- session = SALOME::Session::_narrow(objS);
- if (!CORBA::is_nil(session))
- pid = session->getPID();
- }
-
bool isOK;
isOK = _NS->Change_Directory("/Containers");
if( isOK ){
try
{
Engines::Container_var cont=Engines::Container::_narrow(obj);
- if(!CORBA::is_nil(cont) && pid != cont->getPID())
+ if(!CORBA::is_nil(cont))
lstCont.push_back((*iter));
}
catch(const CORBA::Exception& e)
--- /dev/null
+#! /usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# SALOME Container : implementation of container and engine for Kernel
+# File : SALOME_ContainerPy.py
+# Author : Paul RASCLE, EDF
+# Module : SALOME
+# $Header$
+#
+import os
+import sys
+import string
+
+from omniORB import CORBA, PortableServer
+import SALOMEDS
+import Engines, Engines__POA
+from SALOME_NamingServicePy import *
+from SALOME_ComponentPy import *
+
+from SALOME_utilities import *
+from Utils_Identity import getShortHostName
+from launchConfigureParser import verbose
+
+#=============================================================================
+
+#define an implementation of the container interface for the container implemented in Python
+
+class SALOME_ContainerPy_i (Engines__POA.Container):
+ _orb = None
+ _poa = None
+ _numInstance = 0
+ _listInstances_map = {}
+
+ #-------------------------------------------------------------------------
+
+ def __init__(self, orb, poa, containerName):
+ MESSAGE( "SALOME_ContainerPy_i::__init__" )
+ self._orb = orb
+ self._poa = poa
+ myMachine=getShortHostName()
+ Container_path = "/Containers/" + myMachine + "/" + containerName
+ self._containerName = Container_path
+ if verbose(): print "container name ",self._containerName
+
+ naming_service = SALOME_NamingServicePy_i(self._orb)
+ self._naming_service = naming_service
+ MESSAGE( str(Container_path) )
+ naming_service.Register(self._this(), Container_path)
+
+ #-------------------------------------------------------------------------
+
+ def start_impl(self, ContainerName):
+ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) )
+ myMachine=getShortHostName()
+ theContainer = "/Containers/" + myMachine + "/" + ContainerName
+ try:
+ obj = self._naming_service.Resolve(theContainer)
+ except :
+ obj = None
+ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object not found in Naming Service" )
+ if obj is None:
+ container = None
+ else:
+ container = obj._narrow(Engines.Container)
+ if container is None:
+ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(containerName) + ".object exists but is not a Container" )
+ else :
+ MESSAGE( "SALOME_ContainerPy_i::start_impl " + str(ContainerName) + ".object found without new launch" )
+ return container
+ #shstr = os.getenv( "PWD" ) + "/"
+ #shstr += "runSession ./SALOME_ContainerPy.py "
+ shstr = os.getenv("KERNEL_ROOT_DIR") + "/bin/salome/SALOME_ContainerPy.py ";
+ #shstr = "runSession SALOME_ContainerPy.py "
+ shstr += ContainerName
+
+ # mpv: fix for SAL4731 - allways create new file to write log of server
+ num = 1
+ fileName = ""
+ while 1:
+ fileName = "/tmp/"+ContainerName+"_%i.log"%num
+ if not os.path.exists(fileName):
+ break
+ num += 1
+ pass
+
+ shstr += " > "
+ shstr += fileName
+ shstr += " 2>&1 &"
+
+ #shstr += " > /tmp/"
+ #shstr += ContainerName
+ #shstr += ".log 2>&1 &"
+
+ MESSAGE( "SALOME_ContainerPy_i::start_impl " + "os.system(" + str(shstr) + ")" )
+ os.system( shstr )
+ count = 21
+ while container is None :
+ time.sleep(1)
+ count = count - 1
+ MESSAGE( str(count) + ". Waiting for " + str(theContainer) )
+ try :
+ obj = self._naming_service.Resolve(theContainer)
+ except :
+ obj = None
+ if obj is None:
+ container = None
+ else:
+ container = obj._narrow(Engines.Container)
+ if container is None:
+ MESSAGE( str(containerName) + ".object exists but is not a Container" )
+ return container
+ if count == 0 :
+ return container
+
+ #-------------------------------------------------------------------------
+
+ def instance(self, nameToRegister, componentName):
+ MESSAGE( "SALOME_ContainerPy_i::instance " + str(nameToRegister) + ' ' + str(componentName) )
+ self._numInstance = self._numInstance +1
+ instanceName = nameToRegister + "_inst_" + `self._numInstance`
+
+ component=__import__(componentName)
+ factory=getattr(component,componentName)
+ comp_i=factory(self._orb, self._poa, self._this(), self._containerName,
+ instanceName, nameToRegister)
+
+ MESSAGE( "SALOME_ContainerPy_i::instance : component created")
+ comp_o = comp_i._this()
+ return comp_o
+
+ #-------------------------------------------------------------------------
+
+ def load_impl(self, nameToRegister, componentName):
+ MESSAGE( "SALOME_ContainerPy_i::load_impl " + str(nameToRegister) + ' ' + str(componentName) )
+ self._numInstance = self._numInstance +1
+ instanceName = nameToRegister + "_inst_" + `self._numInstance`
+ interfaceName = nameToRegister
+ the_command = "import " + nameToRegister + "\n"
+ the_command = the_command + "comp_i = " + nameToRegister + "." + nameToRegister
+ the_command = the_command + "(self._orb, self._poa, self._this(), self._containerName, instanceName, interfaceName)\n"
+ MESSAGE( "SALOME_ContainerPy_i::load_impl :" + str (the_command) )
+ exec the_command
+ comp_o = comp_i._this()
+ return comp_o
+
+ #-------------------------------------------------------------------------
+
+ def import_component(self, componentName):
+ MESSAGE( "SALOME_Container_i::import_component" )
+ reason = ""
+ try:
+ if verbose(): print "try import %s" % componentName
+ # try import component
+ module=__import__(componentName)
+ if verbose(): print "import %s is done successfully" % componentName
+ # if import successfully, check that component is loadable
+ if not hasattr(module, componentName):
+ reason = "module %s is not loadable" % componentName
+ print reason
+ pass
+ pass
+ except:
+ import traceback
+ print "cannot import %s" % componentName
+ traceback.print_exc()
+ reason = "cannot import %s" % componentName
+ return reason
+
+ #-------------------------------------------------------------------------
+
+ def load_component_Library(self, componentName):
+ MESSAGE( "SALOME_ContainerPy_i::load_component_Library " + str(componentName) )
+ ret = 0
+ instanceName = componentName + "_inst_" + `self._numInstance`
+ interfaceName = componentName
+ reason = self.import_component(componentName)
+ return reason == "", reason
+
+ #-------------------------------------------------------------------------
+
+ def create_component_instance_env(self, componentName, studyId, env):
+ return self.create_component_instance(componentName, studyId), ""
+
+ def create_component_instance(self, componentName, studyId):
+ MESSAGE( "SALOME_ContainerPy_i::create_component_instance ==> " + str(componentName) + ' ' + str(studyId) )
+ if studyId < 0:
+ MESSAGE( "Study ID is lower than 0!" )
+ return None
+ else:
+ self._numInstance = self._numInstance +1
+ instanceName = componentName + "_inst_" + `self._numInstance`
+ comp_iors=""
+ try:
+ component=__import__(componentName)
+ factory=getattr(component,componentName)
+ comp_i=factory(self._orb,
+ self._poa,
+ self._this(),
+ self._containerName,
+ instanceName,
+ componentName)
+
+ MESSAGE( "SALOME_Container_i::create_component_instance : OK")
+ comp_o = comp_i._this()
+ self._listInstances_map[instanceName] = comp_i
+ except:
+ import traceback
+ traceback.print_exc()
+ MESSAGE( "SALOME_Container_i::create_component_instance : NOT OK")
+ return comp_o
+
+ #-------------------------------------------------------------------------
+
+ def find_component_instance(self, registeredName, studyId):
+ anEngine = None
+ keysList = self._listInstances_map.keys()
+ i = 0
+ while i < len(keysList):
+ instance = keysList[i]
+ if find(instance,registeredName) == 0:
+ anEngine = self._listInstances_map[instance]
+ if studyId == anEngine.getStudyId():
+ return anEngine._this()
+ i = i + 1
+ return anEngine._this()
+
+
+ #-------------------------------------------------------------------------
+
+ def remove_impl(self, component):
+ MESSAGE( "SALOME_ContainerPy_i::remove_impl" )
+ instanceName = component._get_instanceName()
+ MESSAGE( "unload component " + str(instanceName) )
+ self._listInstances_map.remove(instanceName)
+ component.destroy()
+ self._naming_service.Destroy_Name(str(instanceName))
+
+ #-------------------------------------------------------------------------
+
+ def finalize_removal(self):
+ MESSAGE( "SALOME_ContainerPy_i::finalize_removal" )
+ return None
+
+ #-------------------------------------------------------------------------
+
+ def ping(self):
+ MESSAGE( "SALOME_ContainerPy_i::ping() pid " + str(os.getpid()) )
+ return None
+
+ #-------------------------------------------------------------------------
+
+ def getPID(self):
+ return os.getpid()
+
+ #-------------------------------------------------------------------------
+
+ def _get_name(self):
+ MESSAGE( "SALOME_ContainerPy_i::_get_name" )
+ return self._containerName
+
+ #-------------------------------------------------------------------------
+
+ def getHostName(self):
+ MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" )
+ self._machineName = "localhost"
+ return self._machineName
+
+ #-------------------------------------------------------------------------
+
+ def _get_machineName(self):
+ MESSAGE( "SALOME_ContainerPy_i::_get_MachineName" )
+ self._machineName = "localhost"
+ return self._machineName
+
+ #-------------------------------------------------------------------------
+
+ def Shutdown(self):
+ self._naming_service.Destroy_Name(self._containerName);
+ self._naming_service.Destroy_FullDirectory(self._containerName);
+ self._orb.shutdown(0)
+ pass
+
+ def _get_logfilename(self):
+ return self._logfilename
+ def _set_logfilename(self,logfilename):
+ self._logfilename=logfilename
+ def _get_workingdir(self):
+ return os.getcwd()
+
+#=============================================================================
+
+if __name__ == "__main__":
+ # change the stdout buffering to line buffering (same as C++ cout buffering)
+ sys.stdout=os.fdopen(1,"w",1)
+ #initialise the ORB and find the root POA
+ if verbose():print "Starting ",sys.argv[1]
+ orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
+ poa = orb.resolve_initial_references("RootPOA")
+ if verbose():print "ORB and POA initialized"
+
+ #create an instance of SALOME_ContainerPy_i and a Container reference
+ #containerName = "FactoryServerPy"
+ MESSAGE( str(sys.argv) )
+ containerName = sys.argv[1]
+ cpy_i = SALOME_ContainerPy_i(orb, poa, containerName)
+ if verbose():print "SALOME_ContainerPy_i instance created ",cpy_i
+ cpy_o = cpy_i._this()
+ if verbose():print "SALOME_ContainerPy_i instance activated ",cpy_o
+ sys.stdout.flush()
+ sys.stderr.flush()
+
+ #activate the POA
+ poaManager = poa._get_the_POAManager()
+ poaManager.activate()
+
+ #Block for ever
+ orb.run()
+ if verbose():print "SALOME_ContainerPy_i shutdown"
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
-)
-
-SET(DF_SOURCES
- DF_Attribute.cxx
- DF_Label.cxx
- DF_Document.cxx
- DF_Application.cxx
- DF_ChildIterator.cxx
- DF_Container.cxx
- DF_Attribute.hxx
- DF_Label.hxx
- DF_Application.hxx
- DF_Document.hxx
- DF_ChildIterator.hxx
- DF_Container.hxx
- DF_definitions.hxx
-)
-
-ADD_LIBRARY(DF SHARED ${DF_SOURCES})
-SET_TARGET_PROPERTIES(DF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
-INSTALL(TARGETS DF DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(testDF testDF.cxx)
-SET_TARGET_PROPERTIES(testDF PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(testDF DF)
-INSTALL(TARGETS testDF DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(SUBDIRS_COMMON
- DSC_Basic
-)
-
-IF(NOT WINDOWS)
- SET(SUBDIRS_ADD
- DSC_User
- DSC_Python
- )
-ENDIF(NOT WINDOWS)
-
-IF(WITH_PACO_PARALLEL)
- SET(SUBDIR_PAR
- ParallelDSC
- )
-ENDIF(WITH_PACO_PARALLEL)
-
-SET(SUBDIRS
- ${SUBDIRS_COMMON}
- ${SUBDIRS_ADD}
- ${SUBDIR_PAR}
-)
-
-FOREACH(DIR ${SUBDIRS})
- ADD_SUBDIRECTORY(${DIR})
-ENDFOREACH(DIR ${SUBDIRS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/NamingService
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(SalomeDSCContainer_SOURCES
- DSC_i.cxx
- DSC_interface.cxx
- PortProperties_i.cxx
-)
-
-ADD_LIBRARY(SalomeDSCContainer SHARED ${SalomeDSCContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDSCContainer SalomeContainer ${OMNIORB_LIBS})
-INSTALL(TARGETS SalomeDSCContainer DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(SALOME_ConnectionManagerServer_SOURCES
- SALOME_ConnectionManagerServer.cxx
- ConnectionManager_i.cxx
-)
-
-SET(SALOME_ConnectionManagerServer_LIBS
- SalomeIDLKernel
- SalomeNS
- SALOMELocalTrace
- SalomeContainer
- ${OMNIORB_LIBS}
-)
-
-ADD_EXECUTABLE(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_SOURCES})
-SET_TARGET_PROPERTIES(SALOME_ConnectionManagerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ConnectionManagerServer ${SALOME_ConnectionManagerServer_LIBS})
-INSTALL(TARGETS SALOME_ConnectionManagerServer DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-
-SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
-SET(CMAKE_SWIG_FLAGS "-noexcept")
-SET_SOURCE_FILES_PROPERTIES(calciumPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Basic
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_BINARY_DIR}/idl
- )
-
-SET(_calcium_LIBS
- CalciumC
- SalomeDatastream
- SalomeDSCSupervBasic
- SalomeDSCSuperv
- SalomeDSCContainer
- SalomeContainer
- ${CORBA_LIBS}
-)
-
-SWIG_ADD_MODULE(calcium python calcium.i)
-SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS})
-SET_TARGET_PROPERTIES(_calcium PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
-INSTALL(TARGETS _calcium DESTINATION ${KERNEL_salomepythondir})
-
-SET(SCRIPTS
- dsccalcium.py
-)
-SALOME_INSTALL_SCRIPTS( ${SCRIPTS} ${KERNEL_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/calcium.py DESTINATION ${KERNEL_salomepythondir})
_calcium_la_CPPFLAGS = $(PYTHON_INCLUDES) $(COMMON_CPPFLAGS)
-EXTRA_DIST+=calcium_wrap.cpp calcium.i
+EXTRA_DIST=calcium_wrap.cpp calcium.i
calcium_wrap.cpp calcium.py:calcium.i
$(SWIG) $(MY_SWIG_FLAGS) -o calcium_wrap.cpp $<
int cp_een(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval);
int cp_edb(Superv_Component_i *component,int dep,double t,int n,char *nom,int nval,double *eval);
int cp_ere(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *eval);
-int cp_erd(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *eval);
int cp_ecp(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,float *ecpval);
int cp_elo(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,int *eval);
int cp_ech(Superv_Component_i *component,int dep,float t,int n,char *nom,int nval,char** eval,int strSize);
int cp_len(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval);
int cp_ldb(Superv_Component_i *component,int dep,double *ti,double *tf,int *niter,char *nom,int nmax,int *nval,double *lval);
int cp_lre(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval);
-int cp_lrd(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lval);
int cp_lcp(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,float *lcpval);
int cp_llo(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,int *lval);
int cp_lch(Superv_Component_i *component,int dep,float *ti,float *tf,int *niter,char *nom,int nmax,int *nval,char** lval,int strSize);
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/Utils)
-
-SET(SalomeDSCSupervBasic_SOURCES
- basic_port_factory.cxx
- data_short_port_uses.cxx
- data_short_port_provides.cxx
-)
-
-ADD_LIBRARY(SalomeDSCSupervBasic SHARED ${SalomeDSCSupervBasic_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCSupervBasic PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDSCSupervBasic SalomeDSCSuperv)
-INSTALL(TARGETS SalomeDSCSupervBasic DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(Basic)
-ADD_SUBDIRECTORY(Datastream)
-
-INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_FLAGS
- ${OMNIORB_DEFINITIONS}
- ${BOOST_DEFINITIONS}
-)
-SET(SalomeDSCSuperv_SOURCES
- base_port.cxx
- uses_port.cxx
- provides_port.cxx
- Superv_Component_i.cxx
-)
-
-ADD_LIBRARY(SalomeDSCSuperv SHARED ${SalomeDSCSuperv_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSCSuperv PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDSCSuperv SalomeDSCContainer ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeDSCSuperv DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(test_DSC_Exception test_DSC_Exception.cxx)
-SET_TARGET_PROPERTIES(test_DSC_Exception PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DSC_Exception OpUtil SALOMELocalTrace ${OMNIORB_FLAGS} ${PLATFORM_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(Palm)
-ADD_SUBDIRECTORY(Calcium)
-
-INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
- ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Palm
- ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${CMAKE_CURRENT_SOURCE_DIR}/..
-)
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- SalomePalm
- SalomeCalcium
- SalomeDSCSuperv
-)
-
-ADD_LIBRARY(SalomeDatastream SHARED fake.cc)
-SET_TARGET_PROPERTIES(SalomeDatastream PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDatastream ${COMMON_LIBS})
-INSTALL(TARGETS SalomeDatastream DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(COMMON_HEADERS_HXX
- AdjacentFunctor.hxx
- ConstTraits.hxx
- CorbaTypeManipulator.hxx
- CouplingPolicy.hxx
- DataIdFilter.hxx
- DisplayPair.hxx
- FindKeyPredicate.hxx
- GenericPort.hxx
- GenericProvidesPort.hxx
- GenericUsesPort.hxx
- IteratorTraits.hxx
-)
-
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${BOOST_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Basic
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
-)
-
-SET(SalomeCalcium_SOURCES
- calcium_port_factory.cxx
- calcium_uses_port.cxx
- calcium_provides_port.cxx
- calcium_repository_types.cxx
- CalciumCouplingPolicy.cxx
- CorbaTypes2CalciumTypes.cxx
- CalciumCxxInterface.cxx
- CalciumTypes2CorbaTypes.cxx
- CalciumCInterface.cxx
- CalciumProvidesPort.cxx
- Calcium.cxx
- calcium_destructors_port_uses.cxx
-)
-ADD_LIBRARY(SalomeCalcium SHARED ${SalomeCalcium_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCalcium PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCalcium ${PTHREAD_LIBS} ${CORBA_LIBS} ${PLATFORM_LIBS})
-
-SET(CalciumC_SOURCES
- CalciumC.c
- Calcium.cxx
- calciumf.c
-)
-ADD_LIBRARY(CalciumC SHARED ${CalciumC_SOURCES})
-SET_TARGET_PROPERTIES(CalciumC PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
-INSTALL(TARGETS CalciumC DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx)
-SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DataIdContainer SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${CORBA_LIBS} ${PLATFORM_LIBS})
-
-CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx @ONLY)
-CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx @ONLY)
-CONFIGURE_FILE(CalciumFortranInt.h.in CalciumFortranInt.h @ONLY)
-
-SET(COMMON_HEADERS
- Calcium.hxx
- CalciumCInterface.hxx
- CalciumCouplingPolicy.hxx
- CalciumCxxInterface.hxx
- CalciumException.hxx
- CalciumGenericProvidesPort.hxx
- CalciumGenericUsesPort.hxx
- CalciumInterface.hxx
- CalciumMacroCInterface.hxx
- CalciumPortTraits.hxx
- CalciumTypes.hxx
- CalciumTypes2CorbaTypes.hxx
- Copy2CorbaSpace.hxx
- Copy2UserSpace.hxx
- CorbaTypes2CalciumTypes.hxx
- calcium_complex_port_uses.hxx
- calcium_double_port_uses.hxx
- calcium_intc_port_uses.hxx
- calcium_logical_port_uses.hxx
- calcium_long_port_uses.hxx
- calcium_port_factory.hxx
- calcium_provides_port.hxx
- calcium_real_port_uses.hxx
- calcium_string_port_uses.hxx
- calcium_uses_port.hxx
- calcium.h
- calcium.hf
- calciumE.h
- calciumP.h
- calciumf.h
- fortoc.h
- version.h
- ${CMAKE_CURRENT_BINARY_DIR}/CalciumFortranInt.h
- ${CMAKE_CURRENT_BINARY_DIR}/CalciumProvidesPort.hxx
- ${CMAKE_CURRENT_BINARY_DIR}/calcium_integer_port_uses.hxx
-)
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
/*REVERIFIER MAINTENANT 0 COPY avec int2integer*/
CALCIUM_EXT_LECT_INTERFACE_C_(len,float,int,int2integer,);
CALCIUM_EXT_LECT_INTERFACE_C_(lre,float,float,float,);
-/*Permet d'envoyer/recevoir des réels sur un port Double */
-CALCIUM_EXT_LECT_INTERFACE_C_(lrd,float ,float ,float2double,);
CALCIUM_EXT_LECT_INTERFACE_C_(ldb,double,double,double,);
-
CALCIUM_EXT_LECT_INTERFACE_C_(llo,float,int,bool,);
CALCIUM_EXT_LECT_INTERFACE_C_(lcp,float,float,cplx,);
/* CALCIUM_EXT_LECT_INTERFACE_C_(lch,float,char,STAR[]); */
-
/**************************************/
/* INTERFACES DE LECTURE AVEC RECOPIE */
/**************************************/
CALCIUM_LECT_INTERFACE_C_(lln,float ,int,long ,long,,);
CALCIUM_LECT_INTERFACE_C_(lre,float ,int,float ,float,,);
-/*Permet d'envoyer/recevoir des réels sur un port Double */
-CALCIUM_LECT_INTERFACE_C_(lrd,float ,int,float ,float2double,,);
CALCIUM_LECT_INTERFACE_C_(ldb,double,int,double ,double,,);
-
CALCIUM_LECT_INTERFACE_C_(llo,float ,int,int ,bool,,);
CALCIUM_LECT_INTERFACE_C_(lcp,float ,int,float ,cplx,,);
#define STAR *
CALCIUM_LECT_INTERFACE_C_(llg_fort_,float ,cal_int,long ,long2integer,,);
CALCIUM_LECT_INTERFACE_C_(lre_fort_,float ,cal_int,float ,float,,);
-CALCIUM_LECT_INTERFACE_C_(lrd_fort_,float ,cal_int,float ,float2double,,);
CALCIUM_LECT_INTERFACE_C_(ldb_fort_,double,cal_int,double ,double,,);
CALCIUM_LECT_INTERFACE_C_(llo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */
CALCIUM_LECT_INTERFACE_C_(lcp_fort_,float ,cal_int,float ,cplx,,);
sinon problème de conversion de 64bits vers 32bits */
CALCIUM_ECR_INTERFACE_C_(elg,float ,int,long ,long2integer,,);
CALCIUM_ECR_INTERFACE_C_(ere,float ,int,float ,float,,);
-/*Permet d'envoyer/recevoir des réels sur un port Double */
-CALCIUM_ECR_INTERFACE_C_(erd,float ,int,float ,float2double,,);
CALCIUM_ECR_INTERFACE_C_(edb,double,int,double,double,,);
-
CALCIUM_ECR_INTERFACE_C_(elo,float ,int,int ,bool,,);
CALCIUM_ECR_INTERFACE_C_(ecp,float ,int,float ,cplx,,);
CALCIUM_ECR_INTERFACE_C_(ech,float ,int,char ,str,STAR,LCH_LAST_PARAM );
CALCIUM_ECR_INTERFACE_C_(elg_fort_,float ,cal_int,long ,long2integer,,);
CALCIUM_ECR_INTERFACE_C_(ein_fort_,float ,cal_int,int ,int2integer,,);
CALCIUM_ECR_INTERFACE_C_(ere_fort_,float ,cal_int,float ,float,,);
-CALCIUM_ECR_INTERFACE_C_(erd_fort_,float ,cal_int,float ,float2double,,);
CALCIUM_ECR_INTERFACE_C_(edb_fort_,double,cal_int,double,double,,);
CALCIUM_ECR_INTERFACE_C_(elo_fort_,float ,cal_int,int ,bool,,);
CALCIUM_ECR_INTERFACE_C_(ecp_fort_,float ,cal_int,float ,cplx,,);
CALCIUM_C2CPP_INTERFACE_CXX_(float,float,float, );
CALCIUM_C2CPP_INTERFACE_CXX_(double,double,double,);
-
-CALCIUM_C2CPP_INTERFACE_CXX_(float2double,double,float, );
-
/* Fonnctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,);*/
CALCIUM_C2CPP_INTERFACE_CXX_(bool,bool,int,);
CALCIUM_C2CPP_INTERFACE_CXX_(cplx,cplx,float,);
CALCIUM_C2CPP_INTERFACE_HXX_(float,float,float, );
CALCIUM_C2CPP_INTERFACE_HXX_(double,double,double,);
-
-CALCIUM_C2CPP_INTERFACE_HXX_(float2double,double,float, );
-
/* Fonctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,);*/
CALCIUM_C2CPP_INTERFACE_HXX_(bool,bool,int,);
CALCIUM_C2CPP_INTERFACE_HXX_(cplx,cplx,float,);
nodist_salomeinclude_HEADERS = calcium_integer_port_uses.hxx CalciumProvidesPort.hxx CalciumFortranInt.h
-EXTRA_DIST+=fortoc.h calcium_integer_port_uses.hxx.in CalciumProvidesPort.hxx.in CalciumFortranInt.h.in
+EXTRA_DIST=fortoc.h calcium_integer_port_uses.hxx.in CalciumProvidesPort.hxx.in CalciumFortranInt.h.in
calcium_integer_port_uses.hxx: calcium_integer_port_uses.hxx.in
CalciumProvidesPort.hxx : CalciumProvidesPort.hxx.in
#endif
);
-extern int cp_lrd(
-/* ------ */
-#if CPNeedPrototype
- void * component /* Pointeur de type Superv_Component_i* sur le */
- /* composant SALOME Supervisable */,
- int /* E Type de dependance ou de lecture */
- /* CP_TEMPS, CP_ITERATION, CP_SEQUENTIEL */,
- float * /* E/S Borne inf de l'intervalle de lecture */
- /* Retourne le pas lu dans le cas de */
- /* lecture sequentielle */,
- float * /* E Borne Sup de l'intervalle de lecture */,
- int * /* E/S Pas d'iteration a lire */
- /* Retourne le pas lu dans le cas de */
- /* lecture sequentielle */,
- char * /* E Nom de la variable a lire */,
- int /* E Nombre max de valeurs a lire */,
- int * /* S Nombre de valeurs rellement lues */,
- float * /* S Tableau de flottants pour stocker les */
- /* valeurs lues */
-#endif
-);
-
-
extern int cp_ldb(
/* ------ */
#if CPNeedPrototype
#endif
);
-extern int cp_erd(
-/* ------ */
-#if CPNeedPrototype
- void * component /* Pointeur de type Superv_Component_i* sur le */
- /* composant SALOME Supervisable */,
- int /* E Type de dependance */
- /* CP_TEMPS, CP_ITERATION */,
- float /* E Pas de temps a ecrire */,
- int /* E Pas d'iteration a ecrire */,
- char * /* E Nom de la variable a ecrire */,
- int /* E Nombre de valeurs a ecrire */,
- float * /* E Tableau de flottants a ecrire */
-#endif
-);
-
-
extern int cp_edb(
/* ------ */
#if CPNeedPrototype
cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cplre,CPLRE)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
-void F_FUNC(cplrd,CPLRD)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
- cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
free_str1(cnom);
}
-void F_FUNC(cplrd,CPLRD)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
- cal_int *max,cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
-{
- char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
- *err=cp_lrd_fort_((void *)*compo,*dep,ti,tf,iter,cnom,*max,n,(float *)tab);
- free_str1(cnom);
-}
-
void F_FUNC(cplcp,CPLCP)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *iter,STR_PSTR(nom),
cal_int *max,cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
{
STR_PLEN(nom) STR_PLEN(tab));
void F_FUNC(cpedb,CPEDB)(long *compo,cal_int *dep,double *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cpere,CPERE)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
-void F_FUNC(cperd,CPERD)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cpecp,CPECP)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cpein,CPEIN)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, int *tab,cal_int *err STR_PLEN(nom));
void F_FUNC(cpelg,CPELG)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, long *tab,cal_int *err STR_PLEN(nom));
free_str1(cnom);
}
-void F_FUNC(cperd,CPERD)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, double *tab,cal_int *err STR_PLEN(nom))
-{
- float tti=0.;
- if(*dep == CP_TEMPS)tti=*ti;
- char* cnom=fstr1(STR_PTR(nom),STR_LEN(nom));
- *err=cp_erd_fort_((void *)*compo,*dep,tti,*iter,cnom,*n,(float *)tab);
- free_str1(cnom);
-}
-
void F_FUNC(cpecp,CPECP)(long *compo,cal_int *dep,float *ti,cal_int *iter,STR_PSTR(nom),cal_int *n, float *tab,cal_int *err STR_PLEN(nom))
{
float tti=0.;
CALCIUM_ECR_INTERFACE_C_H(eln_fort_,float ,cal_int,long ,long,,);
CALCIUM_ECR_INTERFACE_C_H(ein_fort_,float ,cal_int,int ,int2integer,,);
CALCIUM_ECR_INTERFACE_C_H(ere_fort_,float ,cal_int,float ,float,,);
-CALCIUM_ECR_INTERFACE_C_H(erd_fort_,float ,cal_int,float ,float2double,,);
CALCIUM_ECR_INTERFACE_C_H(edb_fort_,double,cal_int,double,double,,);
CALCIUM_ECR_INTERFACE_C_H(elo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */
CALCIUM_ECR_INTERFACE_C_H(ecp_fort_,float ,cal_int,float ,cplx,,);
CALCIUM_LECT_INTERFACE_C_H(lln_fort_,float ,cal_int,long ,long,,);
CALCIUM_LECT_INTERFACE_C_H(lin_fort_,float ,cal_int,int ,int2integer,,);
CALCIUM_LECT_INTERFACE_C_H(lre_fort_,float ,cal_int,float ,float,,);
-CALCIUM_LECT_INTERFACE_C_H(lrd_fort_,float ,cal_int,float ,float2double,,);
CALCIUM_LECT_INTERFACE_C_H(ldb_fort_,double,cal_int,double ,double,,);
CALCIUM_LECT_INTERFACE_C_H(llo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */
CALCIUM_LECT_INTERFACE_C_H(lcp_fort_,float ,cal_int,float ,cplx,,);
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(SalomePalm SHARED palm_port_factory.cxx)
-SET_TARGET_PROPERTIES(SalomePalm PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-
-ADD_EXECUTABLE(test_DataIdContainer test_DataIdContainer.cxx)
-SET_TARGET_PROPERTIES(test_DataIdContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(test_DataIdContainer ${OMNIORB_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
-
# Author : André RIBES (EDF)
# Module : KERNEL
#
-include $(top_srcdir)/salome_adm/unix/make_common_starter.am
-
SUBDIRS_COMMON = DSC_Basic
if !WINDOWS
SUBDIRS = $(SUBDIRS_COMMON) $(SUBDIRS_ADD) $(SUBDIR_PAR)
-EXTRA_DIST+= DSC.dox
+EXTRA_DIST= DSC.dox
DIST_SUBDIRS = DSC_Basic DSC_User DSC_Python ParallelDSC
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${MPI_INCLUDE_DIRS}
- ${PACO_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/ParallelContainer
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/NamingService
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_SOURCE_DIR}/src/Registry
- ${CMAKE_SOURCE_DIR}/src/Utils
-)
-
-SET(COMMON_FLAGS
- ${OMNIORB_DEFINITIONS}
- ${MPI_DEFINITIONS}
- ${PACO_DEFINITIONS}
-)
-SET(SalomeParallelDSCContainer_SOURCES
- ParallelDSC_i.cxx
- Param_Double_Port_provides_i.cxx
- Param_Double_Port_uses_i.cxx
-)
-
-ADD_LIBRARY(SalomeParallelDSCContainer SHARED ${SalomeParallelDSCContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeParallelDSCContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-INSTALL(TARGETS SalomeParallelDSCContainer DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(SalomeGenericObj SHARED SALOME_GenericObj_i.cc)
-SET_TARGET_PROPERTIES(SalomeGenericObj PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeGenericObj SALOMELocalTrace SalomeIDLKernel)
-INSTALL(TARGETS SalomeGenericObj DESTINATION ${KERNEL_salomelib_LIBS})
-
-INSTALL(FILES SALOME_GenericObj_i.hh DESTINATION ${KERNEL_salomeinclude_HEADERS})
-
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${HDF5_INCLUDE_DIRS}
-)
-
-SET(SalomeHDFPersist_SOURCES
- HDFfileCreate.c
- HDFfileClose.c
- HDFfileOpen.c
- HDFfileMount.c
- HDFfileUmount.c
- HDFgroupCreate.c
- HDFgroupOpen.c
- HDFgroupClose.c
- HDFdatasetOpen.c
- HDFdatasetClose.c
- HDFdatasetCreate.c
- HDFdatasetWrite.c
- HDFdatasetRead.c
- HDFdatasetGetDim.c
- HDFdatasetGetSize.c
- HDFdatasetGetType.c
- HDFdatasetGetnDim.c
- HDFdatasetGetOrder.c
- HDFarrayGetType.c
- HDFarrayGetTypeId.c
- HDFarrayCreate.c
- HDFarrayClose.c
- HDFarrayGetnDim.c
- HDFarrayGetDim.c
- HDFattrOpen.c
- HDFattrClose.c
- HDFattrWrite.c
- HDFattrCreate.c
- HDFattrRead.c
- HDFattrGetType.c
- HDFattrGetSize.c
- HDFerrorModeLock.c
- HDFnObjects.c
- HDFobjectIdentify.c
- HDFobjectType.c
- HDFobject.cc
- HDFarray.cc
- HDFinternalObject.cc
- HDFattribute.cc
- HDFcontainerObject.cc
- HDFdataset.cc
- HDFfile.cc
- HDFgroup.cc
- HDFexplorer.cc
- HDFconvert.cc
- HDFascii.cc
-)
-
-ADD_LIBRARY(SalomeHDFPersist SHARED ${SalomeHDFPersist_SOURCES})
-SET_TARGET_PROPERTIES(SalomeHDFPersist PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeHDFPersist ${HDF5_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeHDFPersist DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
-SET(COMMON_HEADERS
- ${COMMON_HEADERS_HXX}
- ${COMMON_HEADERS_H}
-)
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
fscanf(fp, "%s", id_of_end);
if(strcmp(id_of_end, ASCIIHDF_ID_END) != 0) {
std::cout << "ConvertFromASCIIToHDF : Can not find the end ASCII token " << std::endl;
- return NULL;
+ return false;
}
hdf_file->CloseOnDisk();
libSalomeHDFPersist_la_LIBADD = @HDF5_LIBS@
-EXTRA_DIST += \
+EXTRA_DIST = \
test1.c \
test2.c \
test3.cxx \
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(kernel)
-
-SET(salomepython_PYTHON
- salome_shared_modules.py
- import_hook.py
- omnipatch.py
-)
-
-IF(CORBA_GEN)
- SET(salomepython_PYTHON
- ${salomepython_PYTHON}
- Help.py
- PyInterp.py
- batchmode_salome.py
- salome_test.py
- salome_kernel.py
- salome_study.py
- salome_iapp.py
- salome_ComponentGUI.py
- iparameters.py
- salome_version.py
- salome_notebook.py
- salome_pynode.py
- salome_genericobj.py
- )
-ENDIF(CORBA_GEN)
-
-SALOME_INSTALL_SCRIPTS("${salomepython_PYTHON}" ${KERNEL_salomepythondir})
-SALOME_INSTALL_SCRIPTS(kernel_shared_modules.py ${KERNEL_sharedpkgpython_PYTHON})
-SALOME_INSTALL_SCRIPTS(__init__.py ${KERNEL_salomepythondir}/salome)
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-ADD_SUBDIRECTORY(parametric)
-
-CONFIGURE_FILE(logconfig.py.in logconfig.py @ONLY)
-CONFIGURE_FILE(kernelpy_autotest.sh.in kernelpy_autotest.sh @ONLY)
-
-# This first set of modules could be used in any context, you just
-# have to get a python environement.
-SET(mypkgpython_PYTHON
- __init__.py
- deprecation.py
- logger.py
- termcolor.py
- unittester.py
- pyunittester.py
- enumerate.py
- uiexception.py
- datamodeler.py
- testdata.py
- diclookup.py
- threadhelper.py
- syshelper.py
-)
-# This set of modules required a running SALOME application.
-SET(mypkgpython_PYTHON
- ${mypkgpython_PYTHON}
- studyedit.py
- services.py
-)
-SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${KERNEL_salomepythondir}/salome/kernel)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/logconfig.py DESTINATION ${KERNEL_salomepythondir}/salome/kernel)
\ No newline at end of file
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(mypkgpython_PYTHON
- __init__.py
- study_exchange_vars.py
- compo_utils.py
- pyscript_utils.py
-)
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${KERNEL_salomepythondir}/salome/kernel/parametric)
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# ================================================================================
+# WARNING: this file is deprecated and should not be used any more. It has been
+# replaced by the file __init__.py of the python package named "salome".
+# To prevent any error, a warning is raised in the case where this file is imported
+raise RuntimeError("WRN - the file salome.py is deprecated. It should NOT be used any more.")
+# ================================================================================
+
+
+# File : salome.py
+# Author : Paul RASCLE, EDF
+# Module : SALOME
+# $Header$
+#
+"""
+Module salome gives access to Salome ressources.
+
+variables:
+
+ - salome.orb : CORBA
+ - salome.naming_service : instance of naming Service class
+ - methods:
+ - Resolve(name) : find a CORBA object (ior) by its pathname
+ - Register(name) : register a CORBA object under a pathname
+
+ - salome.lcc : instance of lifeCycleCORBA class
+ - methods:
+ - FindOrLoadComponent(server,name) :
+ obtain an Engine (CORBA object)
+ or launch the Engine if not found,
+ with a Server name and an Engine name
+
+ - salome.sg : salome object to communicate with the graphical user interface (if any)
+ - methods:
+ - updateObjBrowser(bool):
+ - getActiveStudyId():
+ - getActiveStudyName():
+
+ - SelectedCount(): returns number of selected objects
+ - getSelected(i): returns entry of selected object number i
+ - getAllSelected(): returns list of entry of selected objects
+ - AddIObject(Entry): select an existing Interactive object
+ - RemoveIObject(Entry): remove object from selection
+ - ClearIObjects(): clear selection
+
+ - Display(*Entry):
+ - DisplayOnly(Entry):
+ - Erase(Entry):
+ - DisplayAll():
+ - EraseAll():
+
+ - IDToObject(Entry): returns CORBA reference from entry
+
+ - salome.myStudyName : active Study Name
+ - salome.myStudyId : active Study Id
+ - salome.myStudy : the active Study itself (CORBA ior)
+ - methods : defined in SALOMEDS.idl
+
+"""
+## @package salome
+# Module salome gives access to Salome ressources.
+#
+# \param salome.orb : CORBA orb object
+# \param salome.naming_service : instance of naming Service class (SALOME_NamingServicePy::SALOME_NamingServicePy_i)
+# \param salome.lcc : instance of lifeCycleCORBA class (SALOME_LifeCycleCORBA)
+# \param salome.sg : Salome object to communicate with the graphical user interface, if running (see interface in salome_iapp::SalomeOutsideGUI)
+# \param salome.myStudyName : active Study Name
+# \param salome.myStudyId : active Study Id
+# \param salome.myStudy : the active Study (interface SALOMEDS::Study)
+
+#
+from salome_kernel import *
+from salome_study import *
+from salome_iapp import *
+
+
+#
+# The next block is workaround for the problem of shared symbols loading for the extension modules (e.g. SWIG-generated)
+# that causes RTTI unavailable in some cases. To solve this problem, sys.setdlopenflags() function is used.
+# Depending on the Python version and platform, the dlopen flags can be defined in the dl, DLFUN or ctypes module.
+#
+import sys
+flags = None
+if not flags:
+ try:
+ # dl module can be unavailable
+ import dl
+ flags = dl.RTLD_NOW | dl.RTLD_GLOBAL
+ except:
+ pass
+ pass
+if not flags:
+ try:
+ # DLFCN module can be unavailable
+ import DLFCN
+ flags = DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL
+ except:
+ pass
+ pass
+if not flags:
+ try:
+ # ctypes module can be unavailable
+ import ctypes
+ flags = ctypes.RTLD_GLOBAL
+ except:
+ pass
+ pass
+
+if flags:
+ sys.setdlopenflags(flags)
+ pass
+
+orb, lcc, naming_service, cm,sg=None,None,None,None,None
+myStudyManager, myStudyId, myStudy, myStudyName=None,None,None,None
+
+salome_initial=1
+def salome_init(theStudyId=0,embedded=0):
+ """
+ Performs only once SALOME general purpose intialisation for scripts.
+ optional argument : theStudyId
+ When in embedded interpreter inside IAPP, theStudyId is not used
+ When used without GUI (external interpreter)
+ 0 : create a new study (default).
+ n (>0) : try connection to study with Id = n, or create a new one
+ if study not found.
+ If study creation, its Id may be different from theStudyId !
+ Provides:
+ orb reference to CORBA
+ lcc a LifeCycleCorba instance
+ naming_service a naming service instance
+ cm reference to the container manager
+ sg access to SALOME GUI (when linked with IAPP GUI)
+ myStudyManager the study manager
+ myStudyId active study identifier
+ myStudy active study itself (CORBA reference)
+ myStudyName active study name
+ """
+ global salome_initial
+ global orb, lcc, naming_service, cm
+ global sg
+ global myStudyManager, myStudyId, myStudy, myStudyName
+
+ try:
+ if salome_initial:
+ salome_initial=0
+ sg = salome_iapp_init(embedded)
+ orb, lcc, naming_service, cm = salome_kernel_init()
+ myStudyManager, myStudyId, myStudy, myStudyName =salome_study_init(theStudyId)
+ pass
+ pass
+ except RuntimeError, inst:
+ # wait a little to avoid trace mix
+ import time
+ time.sleep(0.2)
+ x = inst
+ print "salome.salome_init():", x
+ print """
+ ============================================
+ May be there is no running SALOME session
+ salome.salome_init() is intented to be used
+ within an already running session
+ ============================================
+ """
+ raise
+
+#to expose all objects to pydoc
+__all__=dir()
#--------------------------------------------------------------------------
-def GetComponentVersion(theComponent, all_versions = False):
- # returns the document list tree (as list)
- props = myStudy.GetProperties()
- stored_components = props.GetStoredComponents()
- version = "no component data" # vsr: better raise an exception in this case?
- if theComponent in stored_components:
- if all_versions:
- version = props.GetComponentVersions(theComponent)
- for i in range(len(version)):
- if not version[i]: version[i] = "unknown"
- pass
- pass
- else:
- version = props.GetComponentVersion(theComponent)
- if not version: version = "unknown"
- pass
- pass
- return version
-
- #--------------------------------------------------------------------------
-
def FindFileInDataDir(filename):
import os
datadir = os.getenv("DATA_DIR")
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(SalomeKernelHelpers_LIBS
- ${OMNIORB_LIBS}
- SalomeNS
- SALOMELocalTrace
- SALOMEBasics
- OpUtil
- SalomeLifeCycleCORBA
- SalomeContainer
- SalomeNotification
- SalomeGenericObj
- SalomeIDLKernel
-)
-
-SET(SalomeKernelHelpers_SOURCES
- SALOME_KernelServices.cxx
- SALOME_StudyEditor.cxx
- SALOMEDS_DriverDefaultImpl.cxx
-)
-
-ADD_LIBRARY(SalomeKernelHelpers SHARED ${SalomeKernelHelpers_SOURCES})
-SET_TARGET_PROPERTIES(SalomeKernelHelpers PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
-INSTALL(TARGETS SalomeKernelHelpers DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(KernelHelpersUseCases KernelHelpersUseCases.cxx)
-SET_TARGET_PROPERTIES(KernelHelpersUseCases PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(KernelHelpersUseCases SalomeKernelHelpers ${SalomeKernelHelpers_LIBS})
-INSTALL(TARGETS KernelHelpersUseCases DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${CPPUNIT_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/..
- ${CMAKE_SOURCE_DIR}/src/NamingService
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_SOURCE_DIR}/src/LifeCycleCORBA
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(SalomeKernelHelpersTest_LIBS
- ${CPPUNIT_LIBS}
- SalomeKernelHelpers
- ${OMNIORB_LIBS}
- SalomeNS
- SALOMELocalTrace
- SALOMEBasics
- OpUtil
- SalomeLifeCycleCORBA
- SalomeContainer
- SalomeNotification
- SalomeGenericObj
- SalomeIDLKernel
-)
-
-ADD_LIBRARY(SalomeKernelHelpersTest SHARED KernelHelpersUnitTests.cxx)
-SET_TARGET_PROPERTIES(SalomeKernelHelpersTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
-INSTALL(TARGETS SalomeKernelHelpersTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestKernelHelpers TestKernelHelpers.cxx)
-SET_TARGET_PROPERTIES(TestKernelHelpers PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestKernelHelpers SalomeKernelHelpersTest ${SalomeKernelHelpersTest_LIBS})
-ADD_TEST(TestKernelHelpers TestKernelHelpers)
-INSTALL(TARGETS TestKernelHelpers DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestKernelHelpers.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include <cppunit/extensions/HelperMacros.h>
-#ifdef WIN32
-# if defined KERNELHELPERSTEST_EXPORTS || defined SalomeKernelHelpersTest_EXPORTS
-# define KERNELHELPERSTEST_EXPORT __declspec( dllexport )
-# else
-# define KERNELHELPERSTEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define KERNELHELPERSTEST_EXPORT
-#endif
-
-class KERNELHELPERSTEST_EXPORT KernelHelpersUnitTests : public CppUnit::TestFixture
+class KernelHelpersUnitTests : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( KernelHelpersUnitTests );
CPPUNIT_TEST( TEST_corba );
mpiImpl = new MpiImpl_MPICH2();
else if(mpi_type == "openmpi")
mpiImpl = new MpiImpl_OPENMPI();
- else if(mpi_type == "ompi")
- mpiImpl = new MpiImpl_OMPI();
else if(mpi_type == "slurmmpi")
mpiImpl = new MpiImpl_SLURM();
else
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${LIBXML_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${MPI_INCLUDE_DIRS}
- ${LIBBATCH_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_BINARY_DIR}/idl
-)
-SET(WITH_LIBBATCH_FLAG)
-IF(WITH_LIBBATCH)
- SET(WITH_LIBBATCH_FLAG "-DWITH_LIBBATCH")
-ENDIF(WITH_LIBBATCH)
-
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- Registry
- SalomeNotification
- SalomeContainer
- SalomeResourcesManager
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeIDLKernel
- ${LIBBATCH_LIBS}
- ${MPI_LIBS}
- ${OMNIORB_LIBS}
- ${LIBXML_LIBS}
- ${PYTHON_LIBS}
-)
-
-SET(Launcher_SOURCES
- SALOME_Launcher_Parser.cxx
- SALOME_Launcher_Handler.cxx
- Launcher_Utils.hxx
- Launcher_Job.cxx
- Launcher_Job_Command.cxx
- Launcher_Job_SALOME.cxx
- Launcher_Job_PythonSALOME.cxx
- Launcher_Job_YACSFile.cxx
- Launcher.cxx
-)
-SET(Launcher_FLAGS "${MPI_DEFINITIONS} ${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
-
-ADD_LIBRARY(Launcher SHARED ${Launcher_SOURCES})
-SET_TARGET_PROPERTIES(Launcher PROPERTIES COMPILE_FLAGS "${Launcher_FLAGS}")
-TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBS} ${MPI_LIBS} ${LIBXML_LIBS})
-INSTALL(TARGETS Launcher DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(TestLauncher_LIBS
- ${LIBXML_LIBS}
- ResourcesManager
- Launcher
- OpUtil
- ${LIBBATCH_LIBS}
-)
-
-ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
-SET_TARGET_PROPERTIES(TestLauncher PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${LIBBATCH_DEFINITIONS} ${WITH_LIBBATCH_FLAG} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
-INSTALL(TARGETS TestLauncher DESTINATION ${KERNEL_salomebin_BINS})
-
-IF(NOT WITHONLYLAUNCHER)
- ADD_LIBRARY(SalomeLauncher SHARED BatchTest.cxx SALOME_Launcher.cxx)
- SET_TARGET_PROPERTIES(SalomeLauncher PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
- TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
- INSTALL(TARGETS SalomeLauncher DESTINATION ${KERNEL_salomelib_LIBS})
-
- SET(SALOME_LauncherServer_LIBS
- Launcher
- SalomeLauncher
- SALOMEBasics
- SALOMELocalTrace
- ${LIBBATCH_LIBS}
- ${MPI_LIBS}
- ${OMNIORB_LIBS}
- ${LIBXML_LIBS}
- ${PYTHON_LIBS}
- )
-
-
-
- ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
- SET_TARGET_PROPERTIES(SALOME_LauncherServer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
- TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
- INSTALL(TARGETS SALOME_LauncherServer DESTINATION ${KERNEL_salomebin_BINS})
-ENDIF(NOT WITHONLYLAUNCHER)
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
case openmpi:
mpi = "openmpi";
break;
- case ompi:
- mpi = "ompi";
- break;
case slurmmpi:
mpi = "slurmmpi";
break;
// Author: André RIBES - EDF R&D
//
#include "Launcher_Job_Command.hxx"
-#include "Basics_DirUtils.hxx"
#ifdef WITH_LIBBATCH
#include <Batch/Batch_Constants.hxx>
// File name
std::string launch_date_port_file = launch_date;
- std::string launch_script = Kernel_Utils::GetTmpDir() + "runCommand_" + _job_file_name + "_" + launch_date + ".sh";
+ std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh";
std::ofstream launch_script_stream;
launch_script_stream.open(launch_script.c_str(), std::ofstream::out);
// Author: André RIBES - EDF R&D
//
#include "Launcher_Job_SALOME.hxx"
-#include "Basics_DirUtils.hxx"
#ifdef WITH_LIBBATCH
#include <Batch/Batch_Constants.hxx>
// parameters
std::string work_directory = params[Batch::WORKDIR].str();
- std::string launch_script = Kernel_Utils::GetTmpDir() + "runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
+ std::string launch_script = "/tmp/runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
std::ofstream launch_script_stream;
launch_script_stream.open(launch_script.c_str(),
std::ofstream::out
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${LIBXML_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../Batch
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_LIBS
- SalomeContainer
- SalomeResourcesManager
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeGenericObj
- SalomeIDLKernel
-)
-
-ADD_LIBRARY(SalomeLifeCycleCORBA SHARED SALOME_LifeCycleCORBA.cxx SALOME_FileTransferCORBA.cxx)
-SET_TARGET_PROPERTIES(SalomeLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeLifeCycleCORBA ${COMMON_LIBS})
-INSTALL(TARGETS SalomeLifeCycleCORBA DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(Test_LifeCycleCORBA Test_LifeCycleCORBA.cxx)
-SET_TARGET_PROPERTIES(Test_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(Test_LifeCycleCORBA SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-ADD_EXECUTABLE(TestContainerManager TestContainerManager.cxx)
-SET_TARGET_PROPERTIES(TestContainerManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestContainerManager SalomeLifeCycleCORBA Registry SalomeNotification SalomeContainer ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-INSTALL(TARGETS Test_LifeCycleCORBA TestContainerManager DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
CORBA::Object_var obj =
_NS->Resolve(SALOME_ContainerManager::_ContainerManagerNameInNS);
- if (CORBA::is_nil(obj))
- throw SALOME_Exception("Error: Cannot resolve ContainerManager in Naming Service");
+ ASSERT( !CORBA::is_nil(obj));
_ContManager=Engines::ContainerManager::_narrow(obj);
obj = _NS->Resolve(SALOME_ResourcesManager::_ResourcesManagerNameInNS);
- if (CORBA::is_nil(obj))
- throw SALOME_Exception("Error: Cannot resolve ResourceManager in Naming Service");
+ ASSERT( !CORBA::is_nil(obj));
_ResManager=Engines::ResourcesManager::_narrow(obj);
}
if (!CORBA::is_nil(session))
{
pid = session->getPID();
- session->Shutdown();
}
}
// ignore and continue
}
- /*
// 6) Session
if ( !CORBA::is_nil( session ) ) {
try
// ignore and continue
}
}
- */
// 7) Logger
int argc = 0;
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
- SALOMEBasics
- SalomeResourcesManager
- SalomeContainer
- SalomeNS
- Registry
- SalomeNotification
- UtilsTest
- OpUtil
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- SalomeIDLKernel
- SalomeLifeCycleCORBA
- ${OMNIORB_LIBS}
-)
-
-ADD_LIBRARY(LifeCycleCORBATest SHARED LifeCycleCORBATest.cxx)
-SET_TARGET_PROPERTIES(LifeCycleCORBATest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(LifeCycleCORBATest ${COMMON_LIBS})
-INSTALL(TARGETS LifeCycleCORBATest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestLifeCycleCORBA TestLifeCycleCORBA.cxx)
-SET_TARGET_PROPERTIES(TestLifeCycleCORBA PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestLifeCycleCORBA LifeCycleCORBATest NamingServiceTest SalomeLifeCycleCORBA ${COMMON_LIBS})
-INSTALL(TARGETS TestLifeCycleCORBA DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestLifeCycleCORBA.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#define MYDEVTRACE
#define DEVTRACE(msg)
#endif
-#ifdef WIN32
-#define setenv Kernel_Utils::setenv
-#endif
#define TRACEFILE "/tmp/traceUnitTest.log"
#include CORBA_CLIENT_HEADER(SALOME_TestComponent)
#include "SALOME_NamingService.hxx"
-#ifdef WIN32
-# if defined LIFECYCLECORBATEST_EXPORTS || defined LifeCycleCORBATest_EXPORTS
-# define LIFECYCLECORBATEST_EXPORT __declspec( dllexport )
-# else
-# define LIFECYCLECORBATEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define LIFECYCLECORBATEST_EXPORT
-#endif
-
-class LIFECYCLECORBATEST_EXPORT LifeCycleCORBATest : public CppUnit::TestFixture
+class LifeCycleCORBATest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( LifeCycleCORBATest );
CPPUNIT_TEST( testFindOrLoad_Component_LaunchContainer );
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBA.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET_SOURCE_FILES_PROPERTIES(libSALOME_LifeCycleCORBAPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-
-INCLUDE_DIRECTORIES(
- ${PYTHON_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
- )
-
-SWIG_ADD_MODULE(libSALOME_LifeCycleCORBA python libSALOME_LifeCycleCORBA.i)
-SWIG_LINK_LIBRARIES(libSALOME_LifeCycleCORBA ${PYTHON_LIBS} SalomeLifeCycleCORBA)
-SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_LIBS}")
-SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
-
-IF(${MACHINE} STREQUAL WINDOWS)
- SET_TARGET_PROPERTIES(_libSALOME_LifeCycleCORBA PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_LifeCycleCORBA_d)
-ENDIF(${MACHINE} STREQUAL WINDOWS)
-
-INSTALL(TARGETS _libSALOME_LifeCycleCORBA DESTINATION ${KERNEL_salomepythondir})
-SET(SCRIPTS
- LifeCycleCORBA.py
- TestLifeCycleCORBA.py
-)
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_LifeCycleCORBA.py DESTINATION ${KERNEL_salomepythondir})
CLEANFILES = swig_wrap.cpp
-EXTRA_DIST += $(SWIGSOURCES)
+EXTRA_DIST = $(SWIGSOURCES)
#
# ===============================================================
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-# Scripts to be installed
-SET(SCRIPTS
- LifeCycleCORBA_SWIGTest.py
- testresourcemanager.py
- testcontainermanager.py
- TestLifeCycleCORBA_SWIG.py
-)
-
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(SalomeLoggerServer SHARED SALOME_Trace.cxx SALOME_Logger_Server.cxx)
-SET_TARGET_PROPERTIES(SalomeLoggerServer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeLoggerServer SalomeIDLKernel ${OMNIORB_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeLoggerServer DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(SALOME_Logger_Server_SOURCES
- SALOME_Logger_Server_main.cxx
- SALOME_Logger_Server.hxx
-)
-
-SET(SALOME_Logger_Server_LIBS
- SalomeLoggerServer
- SalomeIDLKernel
- ${OMNIORB_LIBS}
-)
-
-ADD_EXECUTABLE(SALOME_Logger_Server ${SALOME_Logger_Server_SOURCES})
-SET_TARGET_PROPERTIES(SALOME_Logger_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_Logger_Server ${SALOME_Logger_Server_LIBS})
-INSTALL(TARGETS SALOME_Logger_Server DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(SALOME_Trace.py ${KERNEL_salomescript_PYTHON})
-
-INSTALL(FILES SALOME_Trace.hxx DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestKiller.py ${KERNEL_salomescript_PYTHON})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${MPI_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_LIBS
- Registry
- SalomeNotification
- SalomeResourcesManager
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeContainer
- SalomeGenericObj
- SalomeIDLKernel
- ${CORBA_LIBS}
-)
-
-ADD_LIBRARY(SalomeMPIContainer SHARED MPIObject_i.cxx MPIContainer_i.cxx)
-SET_TARGET_PROPERTIES(SalomeMPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeMPIContainer ${COMMON_LIBS})
-INSTALL(TARGETS SalomeMPIContainer DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(SALOME_MPIContainer SALOME_MPIContainer.cxx)
-SET_TARGET_PROPERTIES(SALOME_MPIContainer PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_MPIContainer SalomeMPIContainer ${COMMON_LIBS} ${PYTHON_LIBS} ${MPI_LIBS})
-
-ADD_EXECUTABLE(testMPI2 testMPI2.cxx)
-SET_TARGET_PROPERTIES(testMPI2 PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(testMPI2 ${MPI_LIBS})
-
-INSTALL(TARGETS SALOME_MPIContainer testMPI2 DESTINATION ${KERNEL_salomebin_BINS})
-
-INSTALL(FILES launch_testMPI2.csh DESTINATION ${KERNEL_salomescript_SCRIPTS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include <time.h>
#include <sys/time.h>
#include <pthread.h> // must be before Python.h !
-
-#ifdef _XOPEN_SOURCE
-#undef _XOPEN_SOURCE
-#endif
-
#include <Python.h>
#include "Container_init_python.hxx"
# Module : KERNEL
# $Header$
#
-
-include $(top_srcdir)/salome_adm/unix/make_common_starter.am
-
SUBDIR_BASE = \
Basics \
SALOMELocalTrace \
endif
endif
-EXTRA_DIST += win32pm
+EXTRA_DIST = win32pm
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${LIBXML_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeIDLKernel
- ${LIBXML_LIBS}
-)
-
-SET(SalomeCatalog_SOURCES
- SALOME_ModuleCatalog_Handler.cxx
- SALOME_ModuleCatalog_Parser_IO.cxx
- SALOME_ModuleCatalog_impl.cxx
- SALOME_ModuleCatalog_Acomponent_impl.cxx
-)
-
-ADD_LIBRARY(SalomeCatalog SHARED ${SalomeCatalog_SOURCES})
-SET_TARGET_PROPERTIES(SalomeCatalog PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeCatalog ${COMMON_LIBS})
-INSTALL(TARGETS SalomeCatalog DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Server.cxx)
-SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Server PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Server SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-ADD_EXECUTABLE(SALOME_ModuleCatalog_Client SALOME_ModuleCatalog_Client.cxx)
-SET_TARGET_PROPERTIES(SALOME_ModuleCatalog_Client PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ModuleCatalog_Client SalomeCatalog ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-INSTALL(TARGETS SALOME_ModuleCatalog_Server SALOME_ModuleCatalog_Client DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestModuleCatalog.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-CONFIGURE_FILE(testIDLparser.in testIDLparser @ONLY)
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-SALOME_INSTALL_SCRIPTS(IDLparser.py ${KERNEL_salomescript_PYTHON})
dist_salomescript_PYTHON = IDLparser.py
-EXTRA_DIST += tests
+EXTRA_DIST = tests
install-data-hook:
@for f in $(dist_salomescript_PYTHON) ; do \
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATION.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET_SOURCE_FILES_PROPERTIES(NOTIFICATIONPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} -DHAVE_CONFIG_H")
-
-INCLUDE_DIRECTORIES(
- ${PYTHON_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- )
-
-SWIG_ADD_MODULE(libNOTIFICATION python NOTIFICATION.i NOTIFICATION_Swig.cxx)
-SWIG_LINK_LIBRARIES(libNOTIFICATION ${PYTHON_LIBS} SalomeNotification)
-SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
-IF(${MACHINE} STREQUAL WINDOWS)
- SET_TARGET_PROPERTIES(_libNOTIFICATION PROPERTIES DEBUG_OUTPUT_NAME _libNOTIFICATION_d)
-ENDIF(${MACHINE} STREQUAL WINDOWS)
-
-INSTALL(TARGETS _libNOTIFICATION DESTINATION ${KERNEL_salomepythondir})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libNOTIFICATION.py DESTINATION ${KERNEL_salomepythondir})
\ No newline at end of file
CLEANFILES = swig_wrap.cpp
-EXTRA_DIST += $(SWIGSOURCES)
+EXTRA_DIST = $(SWIGSOURCES)
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
- )
-
-SET(SalomeNS_SOURCES
- SALOME_NamingService.cxx
- ServiceUnreachable.cxx
- NamingService_WaitForServerReadiness.cxx
-)
-
-ADD_LIBRARY(SalomeNS SHARED ${SalomeNS_SOURCES})
-SET_TARGET_PROPERTIES(SalomeNS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeNS OpUtil)
-INSTALL(TARGETS SalomeNS DESTINATION ${KERNEL_salomelib_LIBS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(SALOME_NamingServicePy.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
-)
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
- SalomeNS
- ${OMNIORB_LIBS}
-)
-
-ADD_LIBRARY(NamingServiceTest SHARED NamingServiceTest.cxx)
-SET_TARGET_PROPERTIES(NamingServiceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(NamingServiceTest ${COMMON_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS NamingServiceTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(TestNamingService_LIBS
- NamingServiceTest
- SalomeNS
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- UtilsTest
- OpUtil
- SALOMEBasics
- SalomeIDLKernel
- ${COMMON_LIBS}
-)
-
-ADD_EXECUTABLE(TestNamingService TestNamingService.cxx)
-SET_TARGET_PROPERTIES(TestNamingService PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestNamingService ${TestNamingService_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS TestNamingService DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestNamingService.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include "NamingServiceTest.hxx"
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
-#include "Basics_Utils.hxx"
#include <iostream>
#include <fstream>
#define DEVTRACE(msg)
#endif
-#ifdef WIN32
-#define setenv Kernel_Utils::setenv
-#endif
-
#define TRACEFILE "/tmp/traceUnitTest.log"
// ============================================================================
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(nstest)
-#ifdef WIN32
-# if defined NAMINGSERVICETEST_EXPORTS || defined NamingServiceTest_EXPORTS
-# define NAMINGSERVICETEST_EXPORT __declspec( dllexport )
-# else
-# define NAMINGSERVICETEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define NAMINGSERVICETEST_EXPORT
-#endif
-
-class NAMINGSERVICETEST_EXPORT NSTEST_echo_i : public virtual POA_NSTEST::echo,
+class NSTEST_echo_i : public virtual POA_NSTEST::echo,
public virtual PortableServer::ServantBase
{
public:
int _num;
};
-class NAMINGSERVICETEST_EXPORT NamingServiceTest : public CppUnit::TestFixture
+class NamingServiceTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( NamingServiceTest );
CPPUNIT_TEST( testConstructorDefault );
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- )
-
-SET(COMMON_LIBS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- ${OMNIORB_LIBS}
-)
-
-SET(SalomeNotification_SOURCES
- NOTIFICATION.cxx
- NOTIFICATION_Supplier.cxx
- NOTIFICATION_Consumer.cxx
-)
-
-ADD_LIBRARY(SalomeNotification SHARED ${SalomeNotification_SOURCES})
-SET_TARGET_PROPERTIES(SalomeNotification PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeNotification ${COMMON_LIBS})
-INSTALL(TARGETS SalomeNotification DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-SET(COMMON_HEADERS ${COMMON_HEADERS_HXX} CosNotifyShorthands.h)
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${MPI_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
- ${PACO_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_SOURCE_DIR}/src/Container
- ${CMAKE_SOURCE_DIR}/src/Notification
- ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
- ${CMAKE_SOURCE_DIR}/src/Basics
- ${CMAKE_SOURCE_DIR}/src/NamingService
- ${CMAKE_SOURCE_DIR}/src/Registry
- ${CMAKE_SOURCE_DIR}/src/Utils
- ${CMAKE_SOURCE_DIR}/src/GenericObj
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_SOURCE_DIR}/src/SALOMETraceCollector
- ${PACOPATH}/lib
-)
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- SalomeContainer
- SalomeNS
- SALOMELocalTrace
- SALOMEBasics
- SalomeHDFPersist
- SalomeParallelIDLKernel
- SalomeIDLKernel
- ${CORBA_LIBS}
- ${PACO_LIBS}
- ${PYTHON_LIBS}
-)
-
-SET(SalomeParallelContainer_SOURCES
- SALOME_ParallelComponent_i.cxx
- SALOME_ParallelContainer_i.cxx
- SALOME_ParallelContainerProxy_i.cxx
- Parallel_Salome_file_i.cxx
- SALOME_ParallelGlobalProcessVar_i.cxx
-)
-
-ADD_LIBRARY(SalomeParallelContainer SHARED ${SalomeParallelContainer_SOURCES})
-SET_TARGET_PROPERTIES(SalomeParallelContainer PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeParallelContainer ${COMMON_LIBS} ${MPI_LIBS})
-INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS})
-
-IF(MPI_IS_OK)
- SET(SALOME_ParallelContainerProxyMpi_LIBS
- SalomeParallelContainer
- ${PaCO_dummy}
- ${PaCO_mpi}
- ${PaCO_omnithread}
- ${MPI_LIBS}
- ${COMMON_LIBS}
- )
- ADD_EXECUTABLE(SALOME_ParallelContainerProxyMpi SALOME_Registry_Server.cxx)
- SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
- TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
-
- ADD_EXECUTABLE(SALOME_ParallelContainerNodeMpi SALOME_ParallelContainerNodeMpi.cxx)
- SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeMpi PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
- TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeMpi ${SALOME_ParallelContainerProxyMpi_LIBS})
-
- INSTALL(TARGETS SALOME_ParallelContainerProxyMpi SALOME_ParallelContainerNodeMpi DESTINATION ${KERNEL_salomebin_BINS})
-ENDIF(MPI_IS_OK)
-
-SET(SALOME_ParallelContainerProxyDummy_LIBS
- SalomeParallelContainer
- ${PaCO_dummy}
- ${PaCO_omnithread}
- ${COMMON_LIBS}
-)
-
-ADD_EXECUTABLE(SALOME_ParallelContainerProxyDummy SALOME_ParallelContainerProxyDummy.cxx)
-SET_TARGET_PROPERTIES(SALOME_ParallelContainerProxyDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ParallelContainerProxyDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
-
-ADD_EXECUTABLE(SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerNodeDummy.cxx)
-SET_TARGET_PROPERTIES(SALOME_ParallelContainerNodeDummy PROPERTIES COMPILE_FLAGS "${ONMIORB_DEFINITIONS} ${MPI_DEFINITIONS} ${PACO_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_ParallelContainerNodeDummy ${SALOME_ParallelContainerProxyDummy_LIBS})
-
-INSTALL(TARGETS SALOME_ParallelContainerNodeDummy SALOME_ParallelContainerProxyDummy DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
-
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(Registry SHARED RegistryConnexion.cxx RegistryService.cxx)
-SET_TARGET_PROPERTIES(Registry PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(Registry SalomeNS OpUtil SALOMELocalTrace SalomeIDLKernel ${PLATFORM_LIBS})
-INSTALL(TARGETS Registry DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(SALOME_Registry_Server_LIBS
- SalomeIDLKernel
- Registry
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- ${OMNIORB_LIBS}
- ${PLATFORM_LIBS}
-)
-
-ADD_EXECUTABLE(SALOME_Registry_Server SALOME_Registry_Server.cxx)
-SET_TARGET_PROPERTIES(SALOME_Registry_Server PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOME_Registry_Server ${SALOME_Registry_Server_LIBS})
-INSTALL(TARGETS SALOME_Registry_Server DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${LIBXML_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- SalomeNS
- OpUtil
- SALOMEBasics
- SalomeIDLKernel
- ${LIBXML_LIBS}
-)
-
-SET(ResourcesManager_SOURCES
- SALOME_ResourcesCatalog_Parser.cxx
- SALOME_ResourcesCatalog_Handler.cxx
- SALOME_LoadRateManager.cxx
- ResourcesManager.cxx
-)
-
-ADD_LIBRARY(ResourcesManager SHARED ${ResourcesManager_SOURCES})
-SET_TARGET_PROPERTIES(ResourcesManager PROPERTIES COMPILE_FLAGS "${LIBXML_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(ResourcesManager SALOMEBasics OpUtil ${LIBXML_LIBS})
-INSTALL(TARGETS ResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
-
-IF(NOT WITHONLYLAUNCHER)
- ADD_LIBRARY(SalomeResourcesManager SHARED SALOME_ResourcesManager.cxx)
- SET_TARGET_PROPERTIES(SalomeResourcesManager PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
- TARGET_LINK_LIBRARIES(SalomeResourcesManager ResourcesManager ${COMMON_LIBS})
- INSTALL(TARGETS SalomeResourcesManager DESTINATION ${KERNEL_salomelib_LIBS})
-ENDIF(NOT WITHONLYLAUNCHER)
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
resource.mpi = mpich2;
else if (anMpi == "openmpi")
resource.mpi = openmpi;
- else if (anMpi == "ompi")
- resource.mpi = ompi;
else if (anMpi == "slurmmpi")
resource.mpi = slurmmpi;
else if (anMpi == "prun")
resource.mpi = mpich2;
else if (anMpi == "openmpi")
resource.mpi = openmpi;
- else if (anMpi == "ompi")
- resource.mpi = ompi;
else if (anMpi == "slurmmpi")
resource.mpi = slurmmpi;
else if (anMpi == "prun")
case openmpi:
xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "openmpi");
break;
- case ompi:
- xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "ompi");
- break;
case slurmmpi:
xmlNewProp(node, BAD_CAST test_mpi, BAD_CAST "slurmmpi");
break;
return "mpich2";
else if (mpi == openmpi)
return "openmpi";
- else if (mpi == ompi)
- return "ompi";
else if (mpi == slurmmpi)
return "slurmmpi";
else
enum BatchType {none, pbs, lsf, sge, ssh_batch, ccc, ll, slurm, vishnu};
-enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, ompi, slurmmpi, prun};
+enum MpiImplType {nompi, lam, mpich1, mpich2, openmpi, slurmmpi, prun};
class RESOURCESMANAGER_EXPORT ResourceDataToSort
{
p_ptr->mpiImpl = "mpich2";
else if( resource.mpi == openmpi )
p_ptr->mpiImpl = "openmpi";
- else if( resource.mpi == ompi )
- p_ptr->mpiImpl = "ompi";
else if( resource.mpi == slurmmpi )
p_ptr->mpiImpl = "slurmmpi";
else if( resource.mpi == prun )
resource.mpi = mpich2;
else if (anMpi == "openmpi")
resource.mpi = openmpi;
- else if (anMpi == "ompi")
- resource.mpi = ompi;
else if (anMpi == "slurmmpi")
resource.mpi = slurmmpi;
else if (anMpi == "prun")
cluster_it++;
}
}
- else if ((resource.mpi == openmpi) || (resource.mpi == ompi))
+ else if (resource.mpi == openmpi)
{
// Creating machine file
machine_file_name = tmpnam(NULL);
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${HDF5_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../DF
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSImpl
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSClient
- ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-SET(COMMON_LIBS
- TOOLSDS
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeHDFPersist
- DF
- SalomeDSImpl
- SalomeGenericObj
- SalomeLifeCycleCORBA
- SalomeIDLKernel
- ${HDF5_LIBS}
-)
-
-SET(SalomeDS_SOURCES
- SALOMEDS.cxx
- SALOMEDS_Driver_i.cxx
- SALOMEDS_StudyManager_i.cxx
- SALOMEDS_UseCaseBuilder_i.cxx
- SALOMEDS_UseCaseIterator_i.cxx
- SALOMEDS_ChildIterator_i.cxx
- SALOMEDS_SComponentIterator_i.cxx
- SALOMEDS_Study_i.cxx
- SALOMEDS_StudyBuilder_i.cxx
- SALOMEDS_SObject_i.cxx
- SALOMEDS_SComponent_i.cxx
- SALOMEDS_GenericAttribute_i.cxx
- SALOMEDS_AttributeComment_i.cxx
- SALOMEDS_AttributeExternalFileDef_i.cxx
- SALOMEDS_AttributeFileType_i.cxx
- SALOMEDS_AttributeIOR_i.cxx
- SALOMEDS_AttributeInteger_i.cxx
- SALOMEDS_AttributeName_i.cxx
- SALOMEDS_AttributePersistentRef_i.cxx
- SALOMEDS_AttributeReal_i.cxx
- SALOMEDS_AttributeSequenceOfReal_i.cxx
- SALOMEDS_AttributeSequenceOfInteger_i.cxx
- SALOMEDS_AttributeDrawable_i.cxx
- SALOMEDS_AttributeSelectable_i.cxx
- SALOMEDS_AttributeOpened_i.cxx
- SALOMEDS_AttributeFlags_i.cxx
- SALOMEDS_AttributeGraphic_i.cxx
- SALOMEDS_AttributeExpandable_i.cxx
- SALOMEDS_AttributeTextColor_i.cxx
- SALOMEDS_AttributeTextHighlightColor_i.cxx
- SALOMEDS_AttributePixMap_i.cxx
- SALOMEDS_AttributeTreeNode_i.cxx
- SALOMEDS_AttributeLocalID_i.cxx
- SALOMEDS_AttributeUserID_i.cxx
- SALOMEDS_AttributeTarget_i.cxx
- SALOMEDS_AttributeTableOfInteger_i.cxx
- SALOMEDS_AttributeTableOfReal_i.cxx
- SALOMEDS_AttributeTableOfString_i.cxx
- SALOMEDS_AttributeStudyProperties_i.cxx
- SALOMEDS_AttributePythonObject_i.cxx
- SALOMEDS_AttributeParameter_i.cxx
- SALOMEDS_AttributeString_i.cxx
- SALOMEDS_SObject.cxx
- SALOMEDS_SComponent.cxx
- SALOMEDS_GenericAttribute.cxx
- SALOMEDS_ChildIterator.cxx
- SALOMEDS_SComponentIterator.cxx
- SALOMEDS_UseCaseIterator.cxx
- SALOMEDS_UseCaseBuilder.cxx
- SALOMEDS_StudyBuilder.cxx
- SALOMEDS_Study.cxx
- SALOMEDS_StudyManager.cxx
- SALOMEDS_AttributeStudyProperties.cxx
- SALOMEDS_AttributeComment.cxx
- SALOMEDS_AttributeDrawable.cxx
- SALOMEDS_AttributeExpandable.cxx
- SALOMEDS_AttributeExternalFileDef.cxx
- SALOMEDS_AttributeFileType.cxx
- SALOMEDS_AttributeFlags.cxx
- SALOMEDS_AttributeGraphic.cxx
- SALOMEDS_AttributeIOR.cxx
- SALOMEDS_AttributeInteger.cxx
- SALOMEDS_AttributeLocalID.cxx
- SALOMEDS_AttributeName.cxx
- SALOMEDS_AttributeOpened.cxx
- SALOMEDS_AttributePythonObject.cxx
- SALOMEDS_AttributeReal.cxx
- SALOMEDS_AttributeSelectable.cxx
- SALOMEDS_AttributeSequenceOfInteger.cxx
- SALOMEDS_AttributePersistentRef.cxx
- SALOMEDS_AttributePixMap.cxx
- SALOMEDS_AttributeSequenceOfReal.cxx
- SALOMEDS_AttributeTableOfInteger.cxx
- SALOMEDS_AttributeTableOfReal.cxx
- SALOMEDS_AttributeTableOfString.cxx
- SALOMEDS_AttributeTarget.cxx
- SALOMEDS_AttributeTextColor.cxx
- SALOMEDS_AttributeTextHighlightColor.cxx
- SALOMEDS_AttributeTreeNode.cxx
- SALOMEDS_AttributeUserID.cxx
- SALOMEDS_TMPFile_i.cxx
- SALOMEDS_AttributeParameter.cxx
- SALOMEDS_AttributeString.cxx
- SALOMEDS_IParameters.cxx
- SALOMEDS_AttLong_i.hxx
- SALOMEDS_AttReal_i.hxx
- SALOMEDS_AttributeComment.hxx
- SALOMEDS_AttributeComment_i.hxx
- SALOMEDS_AttributeDrawable.hxx
- SALOMEDS_AttributeDrawable_i.hxx
- SALOMEDS_AttributeExpandable.hxx
- SALOMEDS_AttributeExpandable_i.hxx
- SALOMEDS_AttributeExternalFileDef.hxx
- SALOMEDS_AttributeExternalFileDef_i.hxx
- SALOMEDS_AttributeFileType.hxx
- SALOMEDS_AttributeFileType_i.hxx
- SALOMEDS_AttributeFlags.hxx
- SALOMEDS_AttributeFlags_i.hxx
- SALOMEDS_AttributeGraphic.hxx
- SALOMEDS_AttributeGraphic_i.hxx
- SALOMEDS_AttributeInteger.hxx
- SALOMEDS_AttributeInteger_i.hxx
- SALOMEDS_AttributeIOR.hxx
- SALOMEDS_AttributeIOR_i.hxx
- SALOMEDS_AttributeLocalID.hxx
- SALOMEDS_AttributeLocalID_i.hxx
- SALOMEDS_AttributeName.hxx
- SALOMEDS_AttributeName_i.hxx
- SALOMEDS_AttributeOpened.hxx
- SALOMEDS_AttributeOpened_i.hxx
- SALOMEDS_AttributePersistentRef.hxx
- SALOMEDS_AttributePersistentRef_i.hxx
- SALOMEDS_AttributePixMap.hxx
- SALOMEDS_AttributePixMap_i.hxx
- SALOMEDS_AttributePythonObject.hxx
- SALOMEDS_AttributePythonObject_i.hxx
- SALOMEDS_AttributeReal.hxx
- SALOMEDS_AttributeReal_i.hxx
- SALOMEDS_AttributeSelectable.hxx
- SALOMEDS_AttributeSelectable_i.hxx
- SALOMEDS_AttributeSequenceOfInteger.hxx
- SALOMEDS_AttributeSequenceOfInteger_i.hxx
- SALOMEDS_AttributeSequenceOfReal.hxx
- SALOMEDS_AttributeSequenceOfReal_i.hxx
- SALOMEDS_Attributes.hxx
- SALOMEDS_AttributeStudyProperties.hxx
- SALOMEDS_AttributeStudyProperties_i.hxx
- SALOMEDS_AttributeTableOfInteger.hxx
- SALOMEDS_AttributeTableOfInteger_i.hxx
- SALOMEDS_AttributeTableOfReal.hxx
- SALOMEDS_AttributeTableOfReal_i.hxx
- SALOMEDS_AttributeTableOfString.hxx
- SALOMEDS_AttributeTableOfString_i.hxx
- SALOMEDS_AttributeTarget.hxx
- SALOMEDS_AttributeTarget_i.hxx
- SALOMEDS_AttributeTextColor.hxx
- SALOMEDS_AttributeTextColor_i.hxx
- SALOMEDS_AttributeTextHighlightColor.hxx
- SALOMEDS_AttributeTextHighlightColor_i.hxx
- SALOMEDS_AttributeTreeNode.hxx
- SALOMEDS_AttributeTreeNode_i.hxx
- SALOMEDS_AttributeUserID.hxx
- SALOMEDS_AttributeUserID_i.hxx
- SALOMEDS_BasicAttributeFactory.hxx
- SALOMEDS_BasicAttribute_i.hxx
- SALOMEDS_Callback_i.hxx
- SALOMEDS_ChildIterator.hxx
- SALOMEDS_ChildIterator_i.hxx
- SALOMEDS_ClientAttributes.hxx
- SALOMEDS_Driver_i.hxx
- SALOMEDS_GenericAttribute.hxx
- SALOMEDS_GenericAttribute_i.hxx
- SALOMEDS.hxx
- SALOMEDS_SComponent.hxx
- SALOMEDS_SComponent_i.hxx
- SALOMEDS_SComponentIterator.hxx
- SALOMEDS_SComponentIterator_i.hxx
- SALOMEDS_SObject.hxx
- SALOMEDS_SObject_i.hxx
- SALOMEDS_StudyBuilder.hxx
- SALOMEDS_StudyBuilder_i.hxx
- SALOMEDS_Study.hxx
- SALOMEDS_Study_i.hxx
- SALOMEDS_StudyManager.hxx
- SALOMEDS_StudyManager_i.hxx
- SALOMEDS_UseCaseBuilder.hxx
- SALOMEDS_UseCaseBuilder_i.hxx
- SALOMEDS_UseCaseIterator.hxx
- SALOMEDS_UseCaseIterator_i.hxx
- SALOMEDS_AttributeParameter.hxx
- SALOMEDS_AttributeParameter_i.hxx
- SALOMEDS_AttributeString.hxx
- SALOMEDS_AttributeString_i.hxx
- SALOMEDS_TMPFile_i.hxx
-)
-
-IF(WINDOWS)
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
-ENDIF(WINDOWS)
-
-ADD_LIBRARY(SalomeDS SHARED ${SalomeDS_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SalomeDS ${COMMON_LIBS})
-INSTALL(TARGETS SalomeDS DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(SALOMEDS_Server SALOMEDS_Server.cxx)
-SET_TARGET_PROPERTIES(SALOMEDS_Server PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDS_Server SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-ADD_EXECUTABLE(SALOMEDS_Client SALOMEDS_Client.cxx)
-SET_TARGET_PROPERTIES(SALOMEDS_Client PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDS_Client SalomeDS SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-INSTALL(TARGETS SALOMEDS_Server SALOMEDS_Client DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(SALOME_DriverPy.py ${KERNEL_salomescript_PYTHON})
-
-SET(COMMON_HEADERS_HXX
- SALOMEDS_StudyManager_i.hxx
- SALOMEDS_Driver_i.hxx
- SALOMEDS_StudyManager.hxx
- SALOMEDS_Study_i.hxx
- SALOMEDS_Study.hxx
- SALOMEDS_SObject_i.hxx
- SALOMEDS_SObject.hxx
- SALOMEDS_SComponent_i.hxx
- SALOMEDS_SComponent.hxx
- SALOMEDS_GenericAttribute_i.hxx
- SALOMEDS_GenericAttribute.hxx
- SALOMEDS_IParameters.hxx
- SALOMEDS_Defines.hxx
-)
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
# This local variable defines the list of dependant libraries common to all target in this package.
COMMON_LIBS =\
+ ../TOOLSDS/libTOOLSDS.la \
../NamingService/libSalomeNS.la \
../Utils/libOpUtil.la \
../SALOMELocalTrace/libSALOMELocalTrace.la \
anUnits = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetUnits();
return anUnits;
}
-
-std::vector<std::string> SALOMEDS_AttributeStudyProperties::GetStoredComponents()
-{
- std::vector<std::string> aComponents;
- if (_isLocal) {
- SALOMEDS::Locker lock;
- aComponents = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->GetStoredComponents();
- }
- else {
- SALOMEDS::StringSeq_var components = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetStoredComponents();
- int length = components->length();
- for (int i = 0; i < length; i++) {
- aComponents.push_back(components[i].in());
- }
- }
- return aComponents;
-}
-
-std::string SALOMEDS_AttributeStudyProperties::GetComponentVersion( const std::string& theComponent )
-{
- std::string aVersion;
- if (_isLocal) {
- SALOMEDS::Locker lock;
- aVersion = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->GetComponentVersion(theComponent);
- }
- else
- aVersion = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetComponentVersion(theComponent.c_str());
- return aVersion;
-}
-
-std::vector<std::string> SALOMEDS_AttributeStudyProperties::GetComponentVersions( const std::string& theComponent )
-{
- std::vector<std::string> aVersions;
- if (_isLocal) {
- SALOMEDS::Locker lock;
- aVersions = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->GetComponentVersions(theComponent);
- }
- else {
- SALOMEDS::StringSeq_var versions = ((SALOMEDS::AttributeStudyProperties_var)SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl))->GetComponentVersions(theComponent.c_str());
- int length = versions->length();
- for (int i = 0; i < length; i++) {
- aVersions.push_back(versions[i].in());
- }
- }
- return aVersions;
-}
virtual void SetComment(const std::string& theComment);
virtual std::string GetComment();
- virtual std::vector<std::string> GetStoredComponents();
- virtual std::string GetComponentVersion( const std::string& theComponent );
- virtual std::vector<std::string> GetComponentVersions( const std::string& theComponent );
+
};
return c_s._retn();
}
-SALOMEDS::StringSeq* SALOMEDS_AttributeStudyProperties_i::GetStoredComponents()
-{
- SALOMEDS::Locker lock;
- std::vector<std::string> components = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetStoredComponents();
- SALOMEDS::StringSeq_var c_components = new SALOMEDS::StringSeq();
- c_components->length(components.size());
- for (int i = 0; i < components.size(); i++) {
- c_components[i] = CORBA::string_dup(components[i].c_str());
- }
- return c_components._retn();
-}
-
-char* SALOMEDS_AttributeStudyProperties_i::GetComponentVersion(const char* theComponent)
-{
- SALOMEDS::Locker lock;
- std::string version = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetComponentVersion(theComponent);
- CORBA::String_var c_version = CORBA::string_dup(version.c_str());
- return c_version._retn();
-}
-
-SALOMEDS::StringSeq* SALOMEDS_AttributeStudyProperties_i::GetComponentVersions(const char* theComponent)
-{
- SALOMEDS::Locker lock;
- std::vector<std::string> versions = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetComponentVersions(theComponent);
- SALOMEDS::StringSeq_var c_versions = new SALOMEDS::StringSeq();
- c_versions->length(versions.size());
- for (int i = 0; i < versions.size(); i++) {
- c_versions[i] = CORBA::string_dup(versions[i].c_str());
- }
- return c_versions._retn();
-}
virtual void SetUnits(const char* theUnits);
virtual char* GetUnits();
-
- virtual SALOMEDS::StringSeq* GetStoredComponents();
- virtual char* GetComponentVersion(const char* theComponent);
- virtual SALOMEDS::StringSeq* GetComponentVersions(const char* theComponent);
};
#include "SALOMEDS.hxx"
#include <stdlib.h>
-SALOMEDS_Driver_i::SALOMEDS_Driver_i(Engines::EngineComponent_ptr theEngine, CORBA::ORB_ptr theORB)
+SALOMEDS_Driver_i::SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB)
{
- // engine should not be null - component is supposed to be inherited from Engines::EngineComponent
- _engine = Engines::EngineComponent::_duplicate(theEngine);
- // driver can be null - if component interface does not inherit SALOMEDS::Driver
- _driver = SALOMEDS::Driver::_narrow(theEngine);
- _orb = CORBA::ORB::_duplicate(theORB);
-}
-
-SALOMEDS_Driver_i::SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB)
-{
- // driver can be null - if component interface does not inherit SALOMEDS::Driver
_driver = SALOMEDS::Driver::_duplicate(theDriver);
- // engine can be null - since it is narrowed from SALOMEDS::Driver ptr which can be null
- _engine = Engines::EngineComponent::_narrow(theDriver);
- _orb = CORBA::ORB::_duplicate(theORB);
+ _orb = CORBA::ORB::_duplicate(theORB);
}
SALOMEDS_Driver_i::~SALOMEDS_Driver_i()
{
}
-std::string SALOMEDS_Driver_i::GetIOR()
+std::string SALOMEDS_Driver_i::GetIOR()
{
std::string ior = "";
- if ( !CORBA::is_nil(_engine) ) {
- CORBA::String_var cior = _orb->object_to_string(_engine);
+ if ( !CORBA::is_nil(_driver) ) {
+ CORBA::String_var cior = _orb->object_to_string(_driver);
ior = cior;
}
return ior;
const std::string& theURL,
long& theStreamLength,
bool isMultiFile)
-{
+{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
CORBA::String_var url = CORBA::string_dup(theURL.c_str());
return aTMPFile;
}
-
+
bool SALOMEDS_Driver_i::Load(const SALOMEDSImpl_SComponent& theComponent,
const unsigned char* theStream,
const long theStreamLength,
CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream;
SALOMEDS::TMPFile_var aStream;
- if (theStreamLength > 0)
- aStream = new SALOMEDS::TMPFile(theStreamLength, theStreamLength, anOctetBuf, 0);
- else
+ if (theStreamLength > 0)
+ aStream = new SALOMEDS::TMPFile(theStreamLength, theStreamLength, anOctetBuf, 0);
+ else
aStream = new SALOMEDS::TMPFile(0);
SALOMEDS::unlock();
CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream;
SALOMEDS::TMPFile_var aStream;
- if(theStreamLength > 0)
- aStream = new SALOMEDS::TMPFile(theStreamLength, theStreamLength, anOctetBuf, 0);
- else
+ if(theStreamLength > 0)
+ aStream = new SALOMEDS::TMPFile(theStreamLength, theStreamLength, anOctetBuf, 0);
+ else
aStream = new SALOMEDS::TMPFile(0);
SALOMEDS::unlock();
SALOMEDS::lock();
}
-std::string SALOMEDS_Driver_i::ComponentDataType()
+std::string SALOMEDS_Driver_i::ComponentDataType()
{
std::string dtype = "";
if ( !CORBA::is_nil(_driver) ) {
return dtype;
}
-std::string SALOMEDS_Driver_i::Version()
-{
- return !CORBA::is_nil( _engine ) ? _engine->getVersion() : std::string("");
-}
-
std::string SALOMEDS_Driver_i::IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
const std::string& IORString,
bool isMultiFile,
}
-SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::CopyFrom(const SALOMEDSImpl_SObject& theObject,
+SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::CopyFrom(const SALOMEDSImpl_SObject& theObject,
int& theObjectID,
long& theStreamLength)
{
CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream;
SALOMEDS::TMPFile_var aStream;
- if(theStreamLength > 0)
- aStream = new SALOMEDS::TMPFile(theStreamLength, theStreamLength, anOctetBuf, 0);
- else
+ if(theStreamLength > 0)
+ aStream = new SALOMEDS::TMPFile(theStreamLength, theStreamLength, anOctetBuf, 0);
+ else
aStream = new SALOMEDS::TMPFile(0);
SALOMEDS::unlock();
return entry;
}
-SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(SALOMEDSImpl_Study* theStudy,
- bool isPublished,
+SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(SALOMEDSImpl_Study* theStudy,
+ bool isPublished,
bool isMultiFile,
bool& isValidScript,
long& theStreamLength)
Engines::TMPFile_var aStream;
CORBA::Boolean aValidScript = true; // VSR: maybe should be false by default ???
- if ( !CORBA::is_nil( _engine ) )
- aStream = _engine->DumpPython(st.in(), isPublished, isMultiFile, aValidScript);
+ Engines::EngineComponent_ptr aComponent = Engines::EngineComponent::_narrow(_driver);
+ if ( !CORBA::is_nil( aComponent ) )
+ aStream = aComponent->DumpPython(st.in(), isPublished, isMultiFile, aValidScript);
SALOMEDSImpl_TMPFile* aTMPFile = new Engines_TMPFile_i(aStream._retn());
theStreamLength = aTMPFile->Size();
// SALOMEDS_DriverFactory
//###############################################################################################################
-SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB)
+SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB)
{
_orb = CORBA::ORB::_duplicate(theORB);
_name_service = new SALOME_NamingService(_orb);
}
-SALOMEDS_DriverFactory_i::~SALOMEDS_DriverFactory_i()
+SALOMEDS_DriverFactory_i::~SALOMEDS_DriverFactory_i()
{
delete _name_service;
}
SALOMEDS::lock();
if (CORBA::is_nil(obj)) {
- obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component("FactoryServer", theComponentType.c_str());
+ obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component("FactoryServerPy", theComponentType.c_str());
}
if (!CORBA::is_nil(obj)) {
- Engines::EngineComponent_var anEngine = Engines::EngineComponent::_narrow(obj);
- return new SALOMEDS_Driver_i(anEngine, _orb);
+ SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
+ return new SALOMEDS_Driver_i(aDriver, _orb);
}
return NULL;
{
CORBA::Object_var obj;
obj = _orb->string_to_object(theIOR.c_str());
-
+
if (!CORBA::is_nil(obj)) {
- Engines::EngineComponent_var anEngine = Engines::EngineComponent::_narrow(obj);
- return new SALOMEDS_Driver_i(anEngine, _orb);
+ SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
+ return new SALOMEDS_Driver_i(aDriver, _orb);
}
return NULL;
{
protected:
SALOMEDS::Driver_var _driver;
- Engines::EngineComponent_var _engine;
CORBA::ORB_var _orb;
public:
- SALOMEDS_Driver_i(Engines::EngineComponent_ptr theEngine, CORBA::ORB_ptr theORB);
+
SALOMEDS_Driver_i(SALOMEDS::Driver_ptr theDriver, CORBA::ORB_ptr theORB);
+
~SALOMEDS_Driver_i();
virtual std::string GetIOR();
virtual std::string ComponentDataType();
- virtual std::string Version();
-
virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
const std::string& IORString,
bool isMultiFile,
SALOMEDS_SComponent* aSCO = dynamic_cast<SALOMEDS_SComponent*>(theSCO.get());
CORBA::Object_var obj = _orb->string_to_object(theIOR.c_str());
- Engines::EngineComponent_var anEngine = Engines::EngineComponent::_narrow(obj);
SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
if (_isLocal) {
SALOMEDS::Locker lock;
- SALOMEDS_Driver_i* drv = new SALOMEDS_Driver_i(anEngine, _orb);
+ SALOMEDS_Driver_i* drv = new SALOMEDS_Driver_i(aDriver, _orb);
SALOMEDSImpl_SComponent aSCO_impl = *(dynamic_cast<SALOMEDSImpl_SComponent*>(aSCO->GetLocalImpl()));
bool isDone = _local_impl->LoadWith(aSCO_impl, drv);
delete drv;
std::string IOREngine = aSCO.GetIOR();
if(!IOREngine.empty()) {
CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str());
- Engines::EngineComponent_var Engine = Engines::EngineComponent::_narrow(obj) ;
+ SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ;
driver = new SALOMEDS_Driver_i(Engine, orb);
}
}
std::string IOREngine = aSCO.GetIOR();
if(!IOREngine.empty()) {
CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str());
- Engines::EngineComponent_var Engine = Engines::EngineComponent::_narrow(obj) ;
+ SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ;
driver = new SALOMEDS_Driver_i(Engine, orb);
}
}
def ComponentDataType(self):
return self._ComponentDataType
- def Version(self):
- try:
- return self.getVersion()
- except:
- return ""
-
def Save(self, theComponent, theURL, isMultiFile):
return ""
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDS
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSClient
- ${CMAKE_CURRENT_SOURCE_DIR}/../../DF
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSImpl
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSImpl/Test
- ${CMAKE_BINARY_DIR}/idl
-)
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
- SALOMEBasics
- SalomeResourcesManager
- SalomeContainer
- SalomeNS
- Registry
- SalomeNotification
- UtilsTest
- OpUtil
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- SALOMEDSImplTest
- DF
- SalomeDSImpl
- SalomeDSClient
- SalomeDS
- SalomeIDLKernel
-)
-
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-IF(WINDOWS)
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
-ENDIF(WINDOWS)
-
-ADD_LIBRARY(SALOMEDSTest SHARED SALOMEDSTest.cxx)
-SET_TARGET_PROPERTIES(SALOMEDSTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDSTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMEDSTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestSALOMEDS TestSALOMEDS.cxx)
-SET_TARGET_PROPERTIES(TestSALOMEDS PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSALOMEDS SALOMEDSTest SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
-INSTALL(TARGETS TestSALOMEDS DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMEDS.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
libSALOMEDSTest_la_LDFLAGS = -no-undefined -version-info=0:0:0
libSALOMEDSTest_la_LIBADD = $(COMMON_LIBS)
-EXTRA_DIST += \
+EXTRA_DIST = \
SALOMEDSTest_AttributeComment.cxx \
SALOMEDSTest_AttributeDrawable.cxx \
SALOMEDSTest_AttributeExpandable.cxx \
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
-#ifdef WIN32
-# if defined SALOMEDSTEST_EXPORTS || defined SALOMEDSTest_EXPORTS
-# define SALOMEDSTEST_EXPORT __declspec( dllexport )
-# else
-# define SALOMEDSTEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define SALOMEDSTEST_EXPORT
-#endif
-
-class SALOMEDSTEST_EXPORT SALOMEDSTest : public CppUnit::TestFixture
+class SALOMEDSTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( SALOMEDSTest );
-class SALOMEDSTEST_EXPORT SALOMEDSTest_Embedded : public SALOMEDSTest
+class SALOMEDSTest_Embedded : public SALOMEDSTest
{
CPPUNIT_TEST_SUITE( SALOMEDSTest_Embedded );
#include "NamingService_WaitForServerReadiness.hxx"
#include "SALOMEDS_StudyManager_i.hxx"
-#ifdef WIN32
-#define setenv Kernel_Utils::setenv
-#endif
// ============================================================================
/*!
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
CORBA::ORB_var orb = init(argc , argv ) ;
-
- #ifndef WIN32
- sleep(15);
- #else
- Sleep(15000);
- #endif
-
+
+ sleep(15);
std::string host; // = Kernel_Utils::GetHostname();
char* wait_Superv = getenv("SALOMEDS_UNITTESTS_WAIT_SUPERVISOR");
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(SalomeDSClient SHARED SALOMEDSClient_ClientFactory.cxx)
-SET_TARGET_PROPERTIES(SalomeDSClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel)
-INSTALL(TARGETS SalomeDSClient DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
virtual void SetComment(const std::string& theComment) = 0;
virtual std::string GetComment() = 0;
- virtual std::vector<std::string> GetStoredComponents() = 0;
- virtual std::string GetComponentVersion( const std::string& theComponent ) = 0;
- virtual std::vector<std::string> GetComponentVersions( const std::string& theComponent ) = 0;
+
};
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${HDF5_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
- ${CMAKE_CURRENT_SOURCE_DIR}/../DF
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_BINARY_DIR}
-)
-
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- SALOMEBasics
- SalomeHDFPersist
- DF
- SalomeGenericObj
- SalomeIDLKernel
- ${HDF5_LIBS}
-)
-
-SET(SalomeDSImpl_SOURCES
- SALOMEDSImpl_Tool.cxx
- SALOMEDSImpl_Callback.cxx
- SALOMEDSImpl_StudyHandle.cxx
- SALOMEDSImpl_GenericAttribute.cxx
- SALOMEDSImpl_SObject.cxx
- SALOMEDSImpl_SComponent.cxx
- SALOMEDSImpl_ChildIterator.cxx
- SALOMEDSImpl_AttributeIOR.cxx
- SALOMEDSImpl_AttributeExternalFileDef.cxx
- SALOMEDSImpl_AttributeFileType.cxx
- SALOMEDSImpl_AttributePersistentRef.cxx
- SALOMEDSImpl_AttributeSequenceOfReal.cxx
- SALOMEDSImpl_AttributeSequenceOfInteger.cxx
- SALOMEDSImpl_AttributeDrawable.cxx
- SALOMEDSImpl_AttributeSelectable.cxx
- SALOMEDSImpl_AttributeExpandable.cxx
- SALOMEDSImpl_AttributeOpened.cxx
- SALOMEDSImpl_AttributeFlags.cxx
- SALOMEDSImpl_AttributeGraphic.cxx
- SALOMEDSImpl_AttributeTextColor.cxx
- SALOMEDSImpl_AttributeTextHighlightColor.cxx
- SALOMEDSImpl_AttributePixMap.cxx
- SALOMEDSImpl_AttributeLocalID.cxx
- SALOMEDSImpl_AttributeTarget.cxx
- SALOMEDSImpl_AttributeTableOfInteger.cxx
- SALOMEDSImpl_AttributeTableOfReal.cxx
- SALOMEDSImpl_AttributeTableOfString.cxx
- SALOMEDSImpl_AttributeStudyProperties.cxx
- SALOMEDSImpl_AttributePythonObject.cxx
- SALOMEDSImpl_AttributeReal.cxx
- SALOMEDSImpl_AttributeInteger.cxx
- SALOMEDSImpl_AttributeUserID.cxx
- SALOMEDSImpl_AttributeTreeNode.cxx
- SALOMEDSImpl_AttributeName.cxx
- SALOMEDSImpl_AttributeComment.cxx
- SALOMEDSImpl_AttributeReference.cxx
- SALOMEDSImpl_AttributeParameter.cxx
- SALOMEDSImpl_AttributeString.cxx
- SALOMEDSImpl_ChildNodeIterator.cxx
- SALOMEDSImpl_UseCaseBuilder.cxx
- SALOMEDSImpl_UseCaseIterator.cxx
- SALOMEDSImpl_SComponentIterator.cxx
- SALOMEDSImpl_StudyBuilder.cxx
- SALOMEDSImpl_Study.cxx
- SALOMEDSImpl_StudyManager.cxx
- SALOMEDSImpl_IParameters.cxx
- SALOMEDSImpl_TMPFile.cxx
- SALOMEDSImpl_GenericVariable.cxx
- SALOMEDSImpl_ScalarVariable.cxx
- SALOMEDSImpl_AttributeComment.hxx
- SALOMEDSImpl_AttributeDrawable.hxx
- SALOMEDSImpl_AttributeExpandable.hxx
- SALOMEDSImpl_AttributeExternalFileDef.hxx
- SALOMEDSImpl_AttributeFileType.hxx
- SALOMEDSImpl_AttributeFlags.hxx
- SALOMEDSImpl_AttributeGraphic.hxx
- SALOMEDSImpl_AttributeInteger.hxx
- SALOMEDSImpl_AttributeIOR.hxx
- SALOMEDSImpl_AttributeLocalID.hxx
- SALOMEDSImpl_AttributeName.hxx
- SALOMEDSImpl_AttributeOpened.hxx
- SALOMEDSImpl_AttributePersistentRef.hxx
- SALOMEDSImpl_AttributePixMap.hxx
- SALOMEDSImpl_AttributePythonObject.hxx
- SALOMEDSImpl_AttributeReal.hxx
- SALOMEDSImpl_AttributeReference.hxx
- SALOMEDSImpl_AttributeSelectable.hxx
- SALOMEDSImpl_AttributeSequenceOfInteger.hxx
- SALOMEDSImpl_AttributeSequenceOfReal.hxx
- SALOMEDSImpl_Attributes.hxx
- SALOMEDSImpl_AttributeStudyProperties.hxx
- SALOMEDSImpl_AttributeTable.hxx
- SALOMEDSImpl_AttributeTableOfInteger.hxx
- SALOMEDSImpl_AttributeTableOfReal.hxx
- SALOMEDSImpl_AttributeTableOfString.hxx
- SALOMEDSImpl_AttributeTarget.hxx
- SALOMEDSImpl_AttributeTextColor.hxx
- SALOMEDSImpl_AttributeTextHighlightColor.hxx
- SALOMEDSImpl_AttributeTreeNode.hxx
- SALOMEDSImpl_AttributeUserID.hxx
- SALOMEDSImpl_AttributeParameter.hxx
- SALOMEDSImpl_AttributeString.hxx
- SALOMEDSImpl_Callback.hxx
- SALOMEDSImpl_ChildIterator.hxx
- SALOMEDSImpl_ChildNodeIterator.hxx
- SALOMEDSImpl_Defines.hxx
- SALOMEDSImpl_Driver.hxx
- SALOMEDSImpl_GenericAttribute.hxx
- SALOMEDSImpl_SComponent.hxx
- SALOMEDSImpl_SComponentIterator.hxx
- SALOMEDSImpl_SObject.hxx
- SALOMEDSImpl_StudyBuilder.hxx
- SALOMEDSImpl_StudyHandle.hxx
- SALOMEDSImpl_Study.hxx
- SALOMEDSImpl_StudyManager.hxx
- SALOMEDSImpl_Tool.hxx
- SALOMEDSImpl_UseCaseBuilder.hxx
- SALOMEDSImpl_UseCaseIterator.hxx
- SALOMEDSImpl_GenericVariable.hxx
- SALOMEDSImpl_ScalarVariable.hxx
-)
-
-ADD_LIBRARY(SalomeDSImpl SHARED ${SalomeDSImpl_SOURCES})
-SET_TARGET_PROPERTIES(SalomeDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SalomeDSImpl SALOMELocalTrace ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS SalomeDSImpl DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(testDS testDS.cxx)
-SET_TARGET_PROPERTIES(testDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(testDS SalomeDSImpl ${COMMON_LIBS} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS testDS DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-SET(NOINST_HEADERS_HXX
- SALOMEDSImpl_Tool.hxx
- SALOMEDSImpl_StudyHandle.hxx
-)
-FOREACH(HEADER ${NOINST_HEADERS_HXX})
- LIST(REMOVE_ITEM COMMON_HEADERS_HXX ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER})
-ENDFOREACH(HEADER ${NOINST_HEADERS_HXX})
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
myMonth.clear();
myYear.clear();
myMode = 0; // none
- myComponentVersions.clear();
}
void SALOMEDSImpl_AttributeStudyProperties::SetModification(const std::string& theUserName,
std::string SALOMEDSImpl_AttributeStudyProperties::GetCreatorName() const
{
- return myUserName.empty() ? std::string("") : myUserName[0];
+ if (myUserName.size() == 0)
+ return std::string("");
+ return myUserName[0];
}
bool SALOMEDSImpl_AttributeStudyProperties::GetCreationDate
void SALOMEDSImpl_AttributeStudyProperties::SetCreationMode(const int theMode)
{
- if (theMode == myMode) return;
CheckLocked();
Backup();
myMode = theMode;
return myLocked;
}
-bool SALOMEDSImpl_AttributeStudyProperties::IsLockChanged(const bool theErase)
-{
+bool SALOMEDSImpl_AttributeStudyProperties::IsLockChanged(const bool theErase) {
if (!myLockChanged) return false;
if (theErase) myLockChanged = false;
return true;
myYear.push_back(aYears[i]);
}
myMode = aProp->GetCreationMode();
- myComponentVersions = aProp->GetComponentsVersions();
// myModified = aProp->GetModified();
// myLocked = aProp->IsLocked();
}
}
aProp->SetCreationMode(myMode);
- aProp->SetComponentsVersions( myComponentVersions );
// aProp->SetModified(myModified);
// aProp->SetLocked(myLocked);
}
std::string units = GetUnits();
std::string comment = GetComment();
-
- int aLength1 = 0;
- std::map<std::string, std::string> versions;
- versionMap::const_iterator it;
- for (aLength1 = 0, it = myComponentVersions.begin(); it != myComponentVersions.end(); ++it ) {
- std::string vlist = "";
- versionList vl = it->second;
- versionList::const_iterator vlit;
- for ( vlit = vl.begin(); vlit != vl.end(); ++vlit ) {
- if ( vlist != "" ) vlist += ";";
- vlist += *vlit;
- }
- versions[ it->first ] = vlist;
- aLength1 += it->first.size() + vlist.size() + 2;
- }
unitsSize = units.size();
commentSize = comment.size();
- char* aProperty = new char[3 + aLength + 12 * aNames.size() + 1 + unitsSize + 1 + commentSize + 1 + aLength1 ];
+ char* aProperty = new char[3 + aLength + 12 * aNames.size() + 1 + unitsSize + 1 + commentSize];
char crMode = (char)GetCreationMode();
if(comment.size() > 0) {
sprintf(&(aProperty[a]),"%s",comment.c_str());
a = strlen(aProperty);
+ a++;
}
- aProperty[a++] = 30; //delimeter of the component versions
-
- std::map<std::string, std::string>::const_iterator versionsIt;
- for ( versionsIt = versions.begin(); versionsIt != versions.end(); ++versionsIt ) {
- sprintf(&(aProperty[a]),"%s=%s",
- (char*)(versionsIt->first.c_str()),
- (char*)(versionsIt->second.c_str()));
- a = strlen(aProperty);
- aProperty[a++] = 1;
- }
-
aProperty[a] = 0;
std::string prop(aProperty);
delete aProperty;
return prop;
}
-void SALOMEDSImpl_AttributeStudyProperties::SetUnits(const std::string& theUnits)
-{
+void SALOMEDSImpl_AttributeStudyProperties::SetUnits(const std::string& theUnits) {
if(myUnits == theUnits)
return;
-
- CheckLocked();
- Backup();
-
myUnits = theUnits;
}
-std::string SALOMEDSImpl_AttributeStudyProperties::GetUnits() const
-{
+std::string SALOMEDSImpl_AttributeStudyProperties::GetUnits() {
return myUnits;
}
-void SALOMEDSImpl_AttributeStudyProperties::SetComment(const std::string& theComment)
-{
+void SALOMEDSImpl_AttributeStudyProperties::SetComment(const std::string& theComment) {
if(myComment == theComment)
return;
-
- CheckLocked();
- Backup();
-
myComment = theComment;
}
-std::string SALOMEDSImpl_AttributeStudyProperties::GetComment() const
-{
+std::string SALOMEDSImpl_AttributeStudyProperties::GetComment() {
return myComment;
}
-void SALOMEDSImpl_AttributeStudyProperties::SetComponentVersion(const std::string& theComponent, const std::string& theVersion)
-{
- if (!theComponent.empty()) {
- CheckLocked();
- Backup();
- if (myComponentVersions.find(theComponent) == myComponentVersions.end()) myComponentVersions[theComponent] = versionList();
- if (myComponentVersions[theComponent].empty() || myComponentVersions[theComponent].back() != theVersion)
- myComponentVersions[theComponent].push_back(theVersion);
- }
-}
-
-std::vector<std::string> SALOMEDSImpl_AttributeStudyProperties::GetStoredComponents() const
-{
- std::vector<std::string> components;
- versionMap::const_iterator it;
- for (it = myComponentVersions.begin(); it != myComponentVersions.end(); ++it)
- components.push_back(it->first);
- return components;
-}
-
-std::string SALOMEDSImpl_AttributeStudyProperties::GetComponentVersion(const std::string& theComponent) const
-{
- versionList versions = GetComponentVersions(theComponent);
- return versions.size() > 0 ? versions[0] : std::string("");
-}
-
-std::vector<std::string> SALOMEDSImpl_AttributeStudyProperties::GetComponentVersions(const std::string& theComponent) const
-{
- versionList versions;
- versionMap::const_iterator it = myComponentVersions.find(theComponent);
- if ( it != myComponentVersions.end() ) versions = it->second;
- return versions;
-}
-
-std::map< std::string, std::vector<std::string> > SALOMEDSImpl_AttributeStudyProperties::GetComponentsVersions() const
-{
- return myComponentVersions;
-}
-
-void SALOMEDSImpl_AttributeStudyProperties::SetComponentsVersions( const std::map< std::string, std::vector<std::string> >& theVersions )
-{
- myComponentVersions = theVersions;
-}
void SALOMEDSImpl_AttributeStudyProperties::Load(const std::string& value)
{
SetCreationMode(crMode);
int anIndex;
- // number 13 below is minimal size of modification data record, which has form:
- // mmhhddMMyyyyname1, where
- // - mm: minute = 2 bytes
- // - hh: hour = 2 bytes
- // - dd: day = 2 bytes
- // - MM: month = 2 bytes
- // - yyyy: year = 4 bytes
- // - name: user's name = arbitrary value, minimal length is 0 bytes
- // - 1 : records delimiter = 1 byte
- for (anIndex = 2; anIndex + 13 < value.size() ;) {
+ for (anIndex = 2; anIndex + 2 < value.size() ;) {
char str[10];
int aMinute, aHour, aDay, aMonth, aYear;
str[0] = aCopy[anIndex++];
break;
}
- //Case when study contains units and comment properties
+ //Case then study contains units and comment properties
if( anIndex < value.size() ) {
anIndex++; //skip the delimeter of the sections: char(30)
int unitsSize;
anIndex += unitsSize + 1;
int commentSize;
- for(commentSize = 0; aCopy[anIndex+commentSize] != 0 && aCopy[anIndex+commentSize] != 30; commentSize++);
+ for(commentSize = 0; aCopy[anIndex+commentSize] != 0; commentSize++);
if(commentSize > 0) {
char *aComment = new char[commentSize+1];
SetComment(aComment);
delete [] (aComment);
}
- anIndex += commentSize + 1;
- }
-
- //Case when study contains components versions
- if( anIndex < value.size() ) {
- while ( anIndex < value.size() && aCopy[anIndex] != 0 ) {
- int modSize;
- for(modSize = 0; aCopy[anIndex+modSize] != '='; modSize++);
- int verSize;
- for(verSize = 0; aCopy[anIndex+modSize+1+verSize] != 1; verSize++);
-
- if(modSize > 0) {
- char *aModule = new char[modSize+1];
- strncpy(aModule, &(aCopy[anIndex]), modSize);
- aModule[modSize] = 0;
- char *aVersions = new char[verSize+1];
- if ( verSize > 0 )
- strncpy(aVersions, &(aCopy[anIndex+modSize+1]), verSize);
- aVersions[verSize] = 0;
-
- std::string mVersions = aVersions;
- int start = 0, idx = mVersions.find( ';', start );
- while ( idx != std::string::npos ) {
- SetComponentVersion( aModule, mVersions.substr( start, idx-start ) );
- start = idx + 1;
- idx = mVersions.find( ';', start );
- }
- SetComponentVersion( aModule, mVersions.substr( start ) );
-
- delete [] (aModule);
- delete [] (aVersions);
- anIndex += modSize + 1 + verSize + 1;
- }
- }
+ anIndex += commentSize;
}
if (aCopy[1] == 'l') {
#include "DF_Label.hxx"
#include <string>
#include <vector>
-#include <map>
#include "SALOMEDSImpl_GenericAttribute.hxx"
class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeStudyProperties : public SALOMEDSImpl_GenericAttribute
void ChangeCreatorName(const std::string& theUserName);
void SetUnits(const std::string& theUnits);
- std::string GetUnits() const;
+ std::string GetUnits();
void SetComment(const std::string& theComment);
- std::string GetComment() const;
+ std::string GetComment();
void SetCreationMode(const int theMode);
int GetCreationMode() const;
bool IsLocked() const;
bool IsLockChanged(const bool theErase);
- void SetComponentsVersions( const std::map< std::string, std::vector<std::string> >& theVersions );
- void SetComponentVersion(const std::string& theComponent, const std::string& theVersion);
- std::vector<std::string> GetStoredComponents() const;
- std::string GetComponentVersion(const std::string& theComponent) const;
- std::vector<std::string> GetComponentVersions(const std::string& theComponent) const;
- std::map< std::string, std::vector<std::string> > GetComponentsVersions() const;
-
void Restore(DF_Attribute* with);
DF_Attribute* NewEmpty() const;
void Paste(DF_Attribute* into);
private:
- typedef std::vector<std::string> versionList;
- typedef std::map<std::string, versionList> versionMap;
std::vector<std::string> myUserName;
std::vector<int> myMinute;
std::vector<int> myYear;
std::string myUnits;
std::string myComment;
- int myMode;
- int myModified;
- bool myLocked;
- bool myLockChanged;
- versionMap myComponentVersions;
+ int myMode;
+ int myModified;
+ bool myLocked;
+ bool myLockChanged;
+
};
#endif
virtual std::string ComponentDataType() = 0;
- virtual std::string Version() = 0;
virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
const std::string& IORString,
#include "SALOMEDSImpl_SComponent.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
#include "SALOMEDSImpl_ScalarVariable.hxx"
-#include "SALOMEDSImpl_IParameters.hxx"
#include <map>
#include "HDFOI.hxx"
SALOMEDSImpl_Driver*, bool isMultiFile, bool isASCII);
static void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup);
-namespace {
- class StudyUnlocker
- {
- public:
- StudyUnlocker( SALOMEDSImpl_Study* study ): myStudy( study ), myLocked( false )
- {
- myPrevLocked = myStudy->GetProperties()->IsLocked();
- resume();
- }
- ~StudyUnlocker()
- {
- suspend();
- }
- void suspend()
- {
- if (myLocked) {
- myStudy->GetProperties()->SetLocked(true);
- myPrevLocked = myLocked;
- myLocked = false;
- }
- }
- void resume()
- {
- if (myPrevLocked) {
- myStudy->GetProperties()->SetLocked(false);
- myLocked = myPrevLocked;
- myPrevLocked = false;
- }
- }
- private:
- SALOMEDSImpl_Study* myStudy;
- bool myLocked;
- bool myPrevLocked;
- };
-}
-
//============================================================================
/*! Function : SALOMEDSImpl_StudyManager
* Purpose : SALOMEDSImpl_StudyManager constructor
delete hdf_file; // all related hdf objects will be deleted
- // unlock study if it is locked, to set components versions
- StudyUnlocker unlock(Study);
-
- //For old studies we have to add "unknown" version tag for all stored components
- SALOMEDSImpl_SComponentIterator itcomponent = Study->NewComponentIterator();
- for (; itcomponent.More(); itcomponent.Next())
- {
- SALOMEDSImpl_SComponent sco = itcomponent.Value();
- std::string aCompType = sco.GetComment();
- if ( aCompType == SALOMEDSImpl_IParameters::getDefaultVisualComponent() ) continue;
- if ( Study->GetProperties()->GetComponentVersions( aCompType ).empty() )
- Study->GetProperties()->SetComponentVersion( aCompType, "" ); // empty version means "unknown"
- }
-
return Study;
}
// add modifications list (user and date of save)
SALOMEDSImpl_AttributeStudyProperties* aProp = aStudy->GetProperties();
+ int aLocked = aProp->IsLocked();
+ if (aLocked) aProp->SetLocked(false);
- // unlock study if it is locked, to set modification date
- StudyUnlocker unlock(aStudy);
-
int month=0,day=0,year=0,hh=0,mn=0,ss=0;
SALOMEDSImpl_Tool::GetSystemDate(year, month, day, hh, mn, ss);
aProp->SetModification(SALOMEDSImpl_Tool::GetUserName(),
- mn, hh, day, month, year);
-
- // lock study back if it was locked initially, to write correct value of Locked flag
- unlock.suspend();
+ mn, hh, day, month, year);
+
+ if (aLocked) aProp->SetLocked(true);
std::vector<std::string> aNames;
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
std::string units = aProp->GetUnits();
std::string comment = aProp->GetComment();
- std::map< std::string, std::vector<std::string> > allVersions = aProp->GetComponentsVersions();
- std::map<std::string, std::string> versions;
-
- int aLength = 0, aLength1 = 0, anIndex, i, unitsSize = 0, commentSize = 0;
-
+ int aLength = 0, anIndex, i, unitsSize = 0, commentSize = 0;
for(i=1; i<=aNames.size(); i++)
aLength += aNames[i-1].size() + 1;
-
- std::map< std::string, std::vector<std::string> >::const_iterator it;
- for (it = allVersions.begin(); it != allVersions.end(); ++it ) {
- std::string vlist = "";
- std::vector<std::string> vl = it->second;
- std::vector<std::string>::const_iterator vlit;
- for ( vlit = vl.begin(); vlit != vl.end(); ++vlit ) {
- if ( vlist != "" ) vlist += ";";
- vlist += *vlit;
- }
- versions[ it->first ] = vlist;
- aLength1 += it->first.size() + vlist.size() + 2;
- }
-
+
unitsSize = units.size();
commentSize = comment.size();
//.....................................................,
//.....................................................,
//minutes, hours, day, months, year, user name, char(1), char(30) <- !!!! used to define end of section with modifications !!!!
- //units, char(1), comment, char(30) <- !!!! used to define start of section with components' versions !!!!
- //component=versions, char(1),
- //component=versions, char(1),
- //...........................,
- //component=versions, char(1), char(0)
+ //units, char(1), comment, char(0)
//string length: 1 byte = locked flag, 1 byte = modified flag, (12 + name length + 1) for each name and date, 1 byte (char(30) section delimeter)
// unit length + 1, comment length, "zero" byte
- char* aProperty = new char[3 + aLength + 12 * aNames.size() + 1 + unitsSize + 1 + commentSize + 1 + aLength1 ];
+ char* aProperty = new char[3 + aLength + 12 * aNames.size() + 1 + unitsSize + 1 + commentSize ];
+
sprintf(aProperty,"%c%c", (char)aProp->GetCreationMode(), (aProp->IsLocked())?'l':'u');
if(comment.size() > 0) {
sprintf(&(aProperty[a]),"%s",comment.c_str());
a = strlen(aProperty);
- }
-
- aProperty[a++] = 30; //delimeter of the component versions
-
- std::map<std::string, std::string>::const_iterator versionsIt;
- for ( versionsIt = versions.begin(); versionsIt != versions.end(); ++versionsIt ) {
- sprintf(&(aProperty[a]),"%s=%s",
- (char*)(versionsIt->first.c_str()),
- (char*)(versionsIt->second.c_str()));
- a = a + versionsIt->first.size() + versionsIt->second.size() + 1;
- aProperty[a++] = 1;
+ a++;
}
aProperty[a] = 0;
-
+
name_len = (hdf_int32) a;
size[0] = name_len + 1 ;
hdf_dataset = new HDFdataset("AttributeStudyProperties",hdf_group,HDF_STRING,size,1);
// Store previous URL
std::string anOldName = aStudy->Name();
- // Map to store components' versions
- std::map<std::string, std::string> componentVersions;
-
//Create a temporary url to which the study is saved
std::string aUrl = SALOMEDSImpl_Tool::GetTmpDir() + SALOMEDSImpl_Tool::GetNameFromPath(aStudyUrl);
- // unlock study if it is locked, as some attributes need to be modified
- StudyUnlocker unlock(aStudy);
+ int aLocked = aStudy->GetProperties()->IsLocked();
+ if (aLocked) aStudy->GetProperties()->SetLocked(false);
SALOMEDSImpl_StudyBuilder* SB= aStudy->NewBuilder();
std::map<std::string, SALOMEDSImpl_Driver*> aMapTypeDriver;
try
{
// mpv 15.12.2003: for saving components we have to load all data from all modules
- SALOMEDSImpl_SComponentIterator itcomponent = aStudy->NewComponentIterator();
- for (; itcomponent.More(); itcomponent.Next())
+ SALOMEDSImpl_SComponentIterator itcomponent1 = aStudy->NewComponentIterator();
+ for (; itcomponent1.More(); itcomponent1.Next())
{
- SALOMEDSImpl_SComponent sco = itcomponent.Value();
+ SALOMEDSImpl_SComponent sco = itcomponent1.Value();
// if there is an associated Engine call its method for saving
std::string IOREngine;
try {
- SALOMEDSImpl_Driver* aDriver = NULL;
- std::string aCompType = sco.GetComment();
if (!sco.ComponentIOR(IOREngine)) {
+ std::string aCompType = sco.GetComment();
if (!aCompType.empty()) {
- aDriver = aFactory->GetDriverByType(aCompType);
+ SALOMEDSImpl_Driver* aDriver = aFactory->GetDriverByType(aCompType);
+ aMapTypeDriver[aCompType] = aDriver;
if (aDriver != NULL) {
if(!SB->LoadWith(sco, aDriver)) {
}
}
}
- else {
- aDriver = aFactory->GetDriverByIOR(IOREngine);
- }
- aMapTypeDriver[aCompType] = aDriver;
} catch(...) {
_errorCode = "Can not restore information to resave it";
return false;
hdf_group_datacomponent = new HDFgroup("DATACOMPONENT",hdf_file);
hdf_group_datacomponent->CreateOnDisk();
- for (itcomponent.Init(); itcomponent.More(); itcomponent.Next())
+ SALOMEDSImpl_SComponentIterator itcomponent = aStudy->NewComponentIterator();
+
+ for (; itcomponent.More(); itcomponent.Next())
{
SALOMEDSImpl_SComponent sco = itcomponent.Value();
std::string IOREngine;
if (sco.ComponentIOR(IOREngine))
{
- // Engine should be already in the map as it was to added before
- SALOMEDSImpl_Driver* Engine = aMapTypeDriver[componentDataType];
+ SALOMEDSImpl_Driver* Engine = NULL;
+ if(aMapTypeDriver.find(componentDataType) != aMapTypeDriver.end()) {
+ // we have found the associated engine to write the data
+ Engine = aMapTypeDriver[componentDataType];
+ }
+ else {
+ Engine = aFactory->GetDriverByIOR(IOREngine);
+ }
+
if (Engine != NULL)
{
SALOMEDSImpl_TMPFile* aStream = NULL;
long length = 0;
- componentVersions[ componentDataType ] = Engine->Version();
-
if (theASCII) aStream = Engine->SaveASCII(sco,
SALOMEDSImpl_Tool::GetDirFromPath(aUrl),
length,
hdf_group_study_structure = new HDFgroup("STUDY_STRUCTURE",hdf_file);
hdf_group_study_structure->CreateOnDisk();
// save component attributes
- for (itcomponent.Init(); itcomponent.More(); itcomponent.Next())
+ SALOMEDSImpl_SComponentIterator itcomp = aStudy->NewComponentIterator();
+ for (; itcomp.More(); itcomp.Next())
{
- SALOMEDSImpl_SComponent SC = itcomponent.Value();
+ SALOMEDSImpl_SComponent SC = itcomp.Value();
std::string scid = SC.GetID();
hdf_sco_group2 = new HDFgroup((char*)scid.c_str(), hdf_group_study_structure);
hdf_sco_group2->CreateOnDisk();
}
hdf_notebook_vars->CloseOnDisk();
hdf_notebook_vars = 0; //will be deleted by hdf_sco_group destructor
-
- // record component versions
- std::map<std::string, std::string>::const_iterator itVersions;
- for ( itVersions = componentVersions.begin(); itVersions != componentVersions.end(); ++itVersions )
- aStudy->GetProperties()->SetComponentVersion( itVersions->first, itVersions->second );
-
- // lock study back if it was locked initially, to write correct value of Locked flag
- unlock.suspend();
-
+
+ if (aLocked) aStudy->GetProperties()->SetLocked(true);
//-----------------------------------------------------------------------
//6 - Write the Study Properties
//-----------------------------------------------------------------------
DF_Label aFatherLabel = theFather.GetLabel(), aLabel = theObject.GetLabel();
if(aFatherLabel == aLabel) return false;
- SALOMEDSImpl_AttributeTreeNode *aFather = NULL, *aNode = NULL;
+ SALOMEDSImpl_AttributeTreeNode *aFather = false, *aNode = false;
if(aFatherLabel.IsNull()) return false;
if(!(aFather=(SALOMEDSImpl_AttributeTreeNode*)aFatherLabel.FindAttribute(_root->ID()))) return false;
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../../NamingService/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../../LifeCycleCORBA
- ${CMAKE_CURRENT_SOURCE_DIR}/../../DF
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMEDSImpl
- ${CMAKE_BINARY_DIR}/idl
-)
-
-# This local variable defines the list of FLAGS common to all target in this package.
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
-# This local variable defines the list of dependant libraries common to all target in this package.
-SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
- SALOMEBasics
- SalomeResourcesManager
- SalomeContainer
- SalomeNS
- Registry
- SalomeNotification
- UtilsTest
- OpUtil
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- DF
- SalomeDSImpl
- SalomeHDFPersist
- SalomeIDLKernel
-)
-
-ADD_LIBRARY(SALOMEDSImplTest SHARED SALOMEDSImplTest.cxx)
-SET_TARGET_PROPERTIES(SALOMEDSImplTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SALOMEDSImplTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMEDSImplTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestSALOMEDSImpl TestSALOMEDSImpl.cxx)
-SET_TARGET_PROPERTIES(TestSALOMEDSImpl PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestSALOMEDSImpl SALOMEDSImplTest SalomeDSImpl NamingServiceTest ${COMMON_LIBS})
-INSTALL(TARGETS TestSALOMEDSImpl DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMEDSImpl.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include <cppunit/extensions/HelperMacros.h>
-#ifdef WIN32
-# if defined SALOMEDSIMPLTEST_EXPORTS || defined SALOMEDSImplTest_EXPORTS
-# define SALOMEDSIMPLTEST_EXPORT __declspec( dllexport )
-# else
-# define SALOMEDSIMPLTEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define SALOMEDSIMPLTEST_EXPORT
-#endif
-
-class SALOMEDSIMPLTEST_EXPORT SALOMEDSImplTest : public CppUnit::TestFixture
+class SALOMEDSImplTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( SALOMEDSImplTest );
CPPUNIT_TEST( testAttributeParameter );
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${PTHREAD_INCLUDE_DIRS}
-)
-
-SET(COMMON_HEADERS
- utilities.h
- LocalTraceBufferPool.hxx
- BaseTraceCollector.hxx
- SALOME_LocalTrace.hxx
-)
-
-SET(SALOMELocalTrace_SOURCES
- BaseTraceCollector.cxx
- BaseTraceCollector.hxx
- LocalTraceCollector.cxx
- LocalTraceCollector.hxx
- FileTraceCollector.cxx
- FileTraceCollector.hxx
- LocalTraceBufferPool.cxx
- LocalTraceBufferPool.hxx
- SALOME_LocalTrace.hxx
-)
-
-ADD_LIBRARY(SALOMELocalTrace SHARED ${SALOMELocalTrace_SOURCES})
-SET_TARGET_PROPERTIES(SALOMELocalTrace PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMELocalTrace SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBS})
-INSTALL(TARGETS SALOMELocalTrace DESTINATION ${KERNEL_salomelib_LIBS})
-
-INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${CPPUNIT_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
-)
-
-ADD_LIBRARY(SALOMELocalTraceTest SHARED SALOMELocalTraceTest.cxx)
-SET_TARGET_PROPERTIES(SALOMELocalTraceTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMELocalTraceTest SALOMELocalTrace ${CPPUNIT_LIBS} ${PTHREAD_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS SALOMELocalTraceTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestSALOMELocalTrace TestSALOMELocalTrace.cxx)
-SET_TARGET_PROPERTIES(TestSALOMELocalTrace PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSALOMELocalTrace SALOMELocalTraceTest SALOMELocalTrace SALOMEBasics ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS TestSALOMELocalTrace DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMELocalTrace.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include <cstdlib>
#include "LocalTraceBufferPool.hxx"
#include "utilities.h"
-#include "Basics_Utils.hxx"
-#ifdef WIN32
-#define setenv Kernel_Utils::setenv
-#endif
// ============================================================================
/*!
std::string s = "local";
CPPUNIT_ASSERT(! setenv("SALOME_trace",s.c_str(),1)); // 1: overwrite
- // --- NUM_THREADS thread creation for trace generation.
- pthread_t threads[NUM_THREADS];
+ // --- numThread thread creation for trace generation.
+ int numThread = 2;
+ pthread_t threads[numThread];
int rc, t;
- for(t=0;t<NUM_THREADS;t++)
+ for(t=0;t<numThread;t++)
{
MESSAGE("Creating thread " << t);
rc = pthread_create(&threads[t], NULL, PrintHello, &t) ;
// --- wait for end of each thread producing trace.
- for(t=0;t<NUM_THREADS;t++)
+ for(t=0;t<numThread;t++)
{
pthread_join(threads[t], NULL);
MESSAGE("--------------------- end of PrintHello thread " << t);
<< " - iter " << i);
#endif
pthread_exit(NULL);
- #ifdef WIN32\r
- return NULL;\r
- #endif
}
#include <cppunit/extensions/HelperMacros.h>
-#ifdef WIN32
-# if defined SALOMELOCALTRACETEST_EXPORTS || defined SALOMELocalTraceTest_EXPORTS
-# define SALOMELOCALTRACETEST_EXPORT __declspec( dllexport )
-# else
-# define SALOMELOCALTRACETEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define SALOMELOCALTRACETEST_EXPORT
-#endif
-
-class SALOMELOCALTRACETEST_EXPORT SALOMELocalTraceTest : public CppUnit::TestFixture
+class SALOMELocalTraceTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( SALOMELocalTraceTest );
CPPUNIT_TEST( testSingletonBufferPool );
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(with_loggerTraceCollector SHARED SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
-SET_TARGET_PROPERTIES(with_loggerTraceCollector PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-
-TARGET_LINK_LIBRARIES(with_loggerTraceCollector SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS})
-INSTALL(TARGETS with_loggerTraceCollector DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${CPPUNIT_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector
-)
-
-SET(COMMON_LIBS
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMEBasics
- ${PTHREAD_LIBS}
- ${PLATFORM_LIBS}
-)
-
-ADD_LIBRARY(SALOMETraceCollectorTest SHARED SALOMETraceCollectorTest.cxx)
-SET_TARGET_PROPERTIES(SALOMETraceCollectorTest PROPERTIES COMPILE_FLAGS "${PTHREAD_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SALOMETraceCollectorTest ${COMMON_LIBS})
-INSTALL(TARGETS SALOMETraceCollectorTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestSALOMETraceCollector TestSALOMETraceCollector.cxx)
-SET_TARGET_PROPERTIES(TestSALOMETraceCollector PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSALOMETraceCollector SALOMETraceCollectorTest ${COMMON_LIBS})
-INSTALL(TARGETS TestSALOMETraceCollector DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(TestSALOMETraceCollector.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
#include <cstdlib>
#include "LocalTraceBufferPool.hxx"
#include "utilities.h"
-#include "Basics_Utils.hxx"
-#ifdef WIN32
-#define setenv Kernel_Utils::setenv
-#endif
// ============================================================================
/*!
<< " - iter " << i);
#endif
pthread_exit(NULL);
- #ifdef WIN32\r
- return NULL;\r
- #endif
}
#include <cppunit/extensions/HelperMacros.h>
-#ifdef WIN32
-# if defined SALOMETRACECOLLECTORTEST_EXPORTS || defined SALOMETraceCollectorTest_EXPORTS
-# define SALOMETRACECOLLECTORTEST_EXPORT __declspec( dllexport )
-# else
-# define SALOMETRACECOLLECTORTEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define SALOMETRACECOLLECTORTEST_EXPORT
-#endif
-
-class SALOMETRACECOLLECTORTEST_EXPORT SALOMETraceCollectorTest : public CppUnit::TestFixture
+class SALOMETraceCollectorTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( SALOMETraceCollectorTest );
CPPUNIT_TEST( testLoadBufferPoolCORBA );
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${HDF5_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_BINARY_DIR}/idl
-)
-
-ADD_LIBRARY(TOOLSDS SHARED SALOMEDS_Tool.cxx)
-SET_TARGET_PROPERTIES(TOOLSDS PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TOOLSDS OpUtil SalomeIDLKernel ${OMNIORB_LIBS})
-INSTALL(TARGETS TOOLSDS DESTINATION ${KERNEL_salomelib_LIBS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(SalomeTestComponentEngine_SOURCES
- SALOME_TestComponent.hxx
- SALOME_TestComponent_i.cxx
- SALOME_TestComponent_i.hxx
-)
-
-SET(COMMON_LIBS
- SalomeContainer
- Registry
- SalomeNotification
- SalomeResourcesManager
- SalomeNS
- SALOMELocalTrace
- SALOMEBasics
- SalomeGenericObj
- SalomeIDLKernel
-)
-
-ADD_LIBRARY(SalomeTestComponentEngine SHARED ${SalomeTestComponentEngine_SOURCES})
-SET_TARGET_PROPERTIES(SalomeTestComponentEngine PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(SalomeTestComponentEngine ${COMMON_LIBS})
-INSTALL(TARGETS SalomeTestComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestLogger TestLogger.cxx)
-SET_TARGET_PROPERTIES(TestLogger PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestLogger SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
-
-ADD_EXECUTABLE(TestContainer TestContainer.cxx)
-SET_TARGET_PROPERTIES(TestContainer PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestContainer SalomeTestComponentEngine SALOMEBasics ${COMMON_LIBS} ${OMNIORB_LIBS})
-INSTALL(TARGETS TestLogger TestContainer DESTINATION ${KERNEL_salomebin_BINS})
-
-# Executable scripts to be installed
-SET(SCRIPTS
- SALOME_TestComponentPy.py
- TestLogger.py
-)
-SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${KERNEL_salomescript_PYTHON})
# Files to be installed
# ===============================================================
#
-# header files
+# header files
# Scripts to be installed
dist_salomescript_PYTHON = \
SALOME_TestComponentPy.py \
+ TestComponentPy.py \
TestLogger.py
#
--- /dev/null
+#! /usr/bin/env python
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# SALOME TestContainer : test of container creation and its life cycle
+# File : TestComponentPy.py
+# Author : Paul RASCLE, EDF
+# Module : SALOME
+# $Header$
+#
+import os
+import sys
+import string
+from omniORB import CORBA
+import CosNaming
+import Engines
+from Utils_Identity import getShortHostName
+
+
+#initialise the ORB
+orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
+
+#obtain a reference to the root naming context
+obj = orb.resolve_initial_references("NameService")
+rootContext = obj._narrow(CosNaming.NamingContext)
+
+if rootContext is None:
+ print "Name Service Reference is invalid"
+ sys.exit(1)
+
+#resolve the name /Containers.dir/FactoryServerPy.object
+machineName=getShortHostName()
+containerName = "FactoryServerPy"
+name = [CosNaming.NameComponent("Containers","dir"),
+ CosNaming.NameComponent(machineName,"dir"),
+ CosNaming.NameComponent(containerName,"object")]
+
+try:
+ obj = rootContext.resolve(name)
+except CosNaming.NamingContext.NotFound, ex:
+ print containerName , " not found in Naming Service"
+ sys.exit(1)
+
+container = obj._narrow(Engines.Container)
+print container.getHostName()
+comp = container.load_impl("SALOME_TestComponentPy","SALOME_TestComponentPy")
+print comp._get_instanceName()
+comp.ping()
+comptest = comp._narrow(Engines.TestComponent)
+if comptest is None:
+ print "probleme cast"
+print comptest.Coucou(1)
+
+
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${MPI_INCLUDE_DIRS}
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- ${CMAKE_CURRENT_SOURCE_DIR}/../Container
- ${CMAKE_CURRENT_SOURCE_DIR}/../MPIContainer
- ${CMAKE_CURRENT_SOURCE_DIR}/../GenericObj
- ${CMAKE_BINARY_DIR}/idl
-)
-
-SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${MPI_DEFINITIONS}")
-
-SET(COMMON_LIBS
- Registry
- SalomeNotification
- SalomeResourcesManager
- SalomeNS
- OpUtil
- SALOMELocalTrace
- SALOMEBasics
- SalomeContainer
- SalomeMPIContainer
- SalomeGenericObj
- SalomeIDLKernel
- ${OMNIORB_LIBS}
-)
-
-ADD_LIBRARY(SalomeTestMPIComponentEngine SHARED TestMPIComponentEngine.cxx)
-SET_TARGET_PROPERTIES(SalomeTestMPIComponentEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(SalomeTestMPIComponentEngine ${COMMON_LIBS})
-INSTALL(TARGETS SalomeTestMPIComponentEngine DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestMPIContainer TestMPIContainer.cxx)
-SET_TARGET_PROPERTIES(TestMPIContainer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(TestMPIContainer SalomeTestMPIComponentEngine ${COMMON_LIBS} ${MPI_LIBS})
-INSTALL(TARGETS TestMPIContainer DESTINATION ${KERNEL_salomebin_BINS})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace/Test
-)
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# Executable scripts to be installed
-SALOME_INSTALL_SCRIPTS(UnitTests.py ${KERNEL_salomescript_SCRIPTS})
-
-# ===============================================================
-# Executables targets
-# ===============================================================
-
-SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
- SALOMEBasics
- SALOMELocalTrace
- SALOMELocalTraceTest
-)
-
-IF(CORBA_GEN)
- INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMETraceCollector/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
- ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../Utils/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA
- ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMDESImpl
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSImpl/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMDES
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDS/Test
- ${CMAKE_BINARY_DIR}/idl
- ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
- ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
- ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
- )
- SET(COMMON_FLAGS "${COMMON_FLAGS} -DWITH_CORBA ${OMNIORB_DEFINITIONS}")
-
- SET(COMMON_LIBS
- ${COMMON_LIBS}
- Registry
- SalomeNotification
- SalomeResourcesManager
- SalomeNS
- NamingServiceTest
- SalomeContainer
- SALOMETraceCollectorTest
- OpUtil
- UtilsTest
- SalomeLifeCycleCORBA
- LifeCycleCORBATest
- SalomeDSImpl
- SALOMEDSImplTest
- SalomeDS
- SALOMEDSTest
- SalomeIDLKernel
- ${OMNIORB_LIBS}
- )
-ENDIF(CORBA_GEN)
-
-ADD_EXECUTABLE(UnitTests UnitTests.cxx)
-SET_TARGET_PROPERTIES(UnitTests PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
-TARGET_LINK_LIBRARIES(UnitTests ${COMMON_LIBS})
-INSTALL(TARGETS UnitTests DESTINATION ${KERNEL_salomebin_BINS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${OMNIORB_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIRS}
- ${CMAKE_BINARY_DIR}/salome_adm
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
- ${CMAKE_BINARY_DIR}/idl
-)
-SET(OpUtil_SOURCES
- Utils_Timer.cxx
- duplicate.cxx
- Utils_CommException.cxx
- Utils_SALOME_Exception.cxx
- Utils_Identity.cxx
- Utils_ORB_INIT.cxx
- Utils_DESTRUCTEUR_GENERIQUE.cxx
- Utils_ExceptHandlers.cxx
- Utils_Mutex.cxx
-)
-
-ADD_LIBRARY(OpUtil SHARED ${OpUtil_SOURCES})
-SET_TARGET_PROPERTIES(OpUtil PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(OpUtil SALOMELocalTrace SalomeIDLKernel ${OMNIORB_LIBS} ${PTHREAD_LIBS})
-INSTALL(TARGETS OpUtil DESTINATION ${KERNEL_salomelib_LIBS})
-
-SET(COMMON_SCRIPTS
- Utils_Identity.py
- SALOME_utilities.py
-)
-SALOME_INSTALL_SCRIPTS("${COMMON_SCRIPTS}" ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
+++ /dev/null
-# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIRS}
- ${CPPUNIT_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Basics/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMELocalTrace/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector
- ${CMAKE_CURRENT_SOURCE_DIR}/../../SALOMETraceCollector/Test
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils
- ${CMAKE_CURRENT_SOURCE_DIR}/../../Utils/Test
-)
-
-SET(COMMON_LIBS
- ${CPPUNIT_LIBS}
- OpUtil
- SALOMELocalTraceTest
- SALOMELocalTrace
- SALOMETraceCollectorTest
- SALOMEBasics
-)
-
-ADD_LIBRARY(UtilsTest SHARED UtilsTest.cxx)
-SET_TARGET_PROPERTIES(UtilsTest PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(UtilsTest ${COMMON_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS UtilsTest DESTINATION ${KERNEL_salomelib_LIBS})
-
-ADD_EXECUTABLE(TestUtils TestUtils.cxx)
-SET_TARGET_PROPERTIES(TestUtils PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestUtils ${COMMON_LIBS} UtilsTest ${OMNIORB_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS TestUtils DESTINATION ${KERNEL_salomebin_BINS})
-
-SALOME_INSTALL_SCRIPTS(TestUtils.py ${KERNEL_salomescript_PYTHON})
-
-FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${KERNEL_salomeinclude_HEADERS})
command = ['TestUtils']
ret = os.spawnvp(os.P_WAIT, command[0], command)
-# kill Test process
+# kill Test process
TestKiller.killProcess(runSalome.process_id)
#include <string>
#include <cstdlib>
#include "Utils_SALOME_Exception.hxx"
-#include "Basics_Utils.hxx"
#include "utilities.h"
-#ifdef WIN32
-#define setenv Kernel_Utils::setenv
-#endif
#define TRACEFILE "/tmp/traceUnitTest.log"
#include <cppunit/extensions/HelperMacros.h>
-#ifdef WIN32
-# if defined UTILSTEST_EXPORTS || defined UtilsTest_EXPORTS
-# define UTILSTEST_EXPORT __declspec( dllexport )
-# else
-# define UTILSTEST_EXPORT __declspec( dllimport )
-# endif
-#else
-# define UTILSTEST_EXPORT
-#endif
-
-class UTILSTEST_EXPORT UtilsTest : public CppUnit::TestFixture
+class UtilsTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( UtilsTest );
CPPUNIT_TEST( testSALOME_ExceptionThrow );