add the local path of a file in the python sys.path before executing it (execfile(srcname) in runSalome.py)
remove supervisioncontainer launch
command="""
<parameter name="pyModules" value=""/>
<parameter name="embedded" value="SalomeAppEngine,study,cppContainer,registry,moduleCatalog"/>
- <parameter name="standalone" value="pyContainer,supervContainer"/>
+ <parameter name="standalone" value="pyContainer"/>
</section>
</document>
"""
VERSION=V3_2_0
-for module in KERNEL MED GUI GEOM SMESH VISU SUPERV LIGHT NETGENPLUGIN PYCALCULATOR;
+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}
<parameter name="xterm" value="no"/>
<parameter name="portkill" value="no"/>
<parameter name="killall" value="no"/>
- <parameter name="modules" value="GUI,GEOM,SMESH,VISU,SUPERV,MED,COMPONENT,LIGHT,PYHELLO,PYCALCULATOR"/>
+ <parameter name="modules" value="GUI,GEOM,SMESH,VISU,MED,COMPONENT,LIGHT,PYHELLO,PYCALCULATOR"/>
<parameter name="pyModules" value=""/>
<parameter name="embedded" value="SalomeAppEngine,cppContainer,registry,moduleCatalog,study"/>
<parameter name="standalone" value="pyContainer"/>
<parameter name="GEOM" value="${GEOM_ROOT_DIR}/share/salome/resources/geom"/>
<parameter name="SMESH" value="${SMESH_ROOT_DIR}/share/salome/resources/smesh"/>
<parameter name="VISU" value="${VISU_ROOT_DIR}/share/salome/resources/visu"/>
- <parameter name="SUPERV" value="${SUPERV_ROOT_DIR}/share/salome/resources/superv"/>
<parameter name="MED" value="${MED_ROOT_DIR}/share/salome/resources/med"/>
<parameter name="StdMeshers" value="${SMESH_ROOT_DIR}/share/salome/resources/smesh"/>
<parameter name="NETGENPlugin" value="${NETGENPLUGIN_ROOT_DIR}/share/salome/resources/netgenplugin"/>
<parameter name="name" value="Post-Pro"/>
<parameter name="icon" value="ModuleVisu.png"/>
</section>
- <section name="SUPERV">
- <parameter name="name" value="Supervisor"/>
- <parameter name="icon" value="ModuleSupervision.png"/>
- </section>
<section name="MED">
<parameter name="name" value="Med"/>
<parameter name="icon" value="ModuleMed.png"/>
export GEOM_ROOT_DIR=${REPINST}/GEOM_V301
export MED_ROOT_DIR=${REPINST}/MED_V301
export SMESH_ROOT_DIR=${REPINST}/SMESH_V301
-export SUPERV_ROOT_DIR=${REPINST}/SUPERV_V301
export VISU_ROOT_DIR=${REPINST}/VISU_V301
export NETGENPLUGIN_ROOT_DIR=${REPINST}/NETGENPLUGIN_V301
export COMPONENT_ROOT_DIR=${REPINST}/COMPONENT_V301
# possible choices for the "embedded" and "standalone" parameters
embedded_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "SalomeAppEngine" ]
-standalone_choices = [ "registry", "study", "moduleCatalog", "cppContainer", "pyContainer", "supervContainer"]
+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 the config file does not exist, it is created with default values.
#
#
-# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall
+# $: ${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
#
# (embedded = same process) or in a separate process (standalone):
# --> registry,study,moduleCatalog,cppContainer
# Other CORBA servers could only be launched in separate process (standalone):
-# --> pyContainer,supervContainer
+# --> pyContainer
#
# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h
# help
#
-runSalome --gui --modules=GEOM,SMESH,VISU,SUPERV,MED --killall
+runSalome --gui --modules=GEOM,SMESH,VISU,MED --killall
# - if the config file does not exist, it is created with default values.
#
#
-# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome --modules=GEOM,SMESH,VISU,SUPERV,MED --embedded=registry,study,moduleCatalog,cppContainer --standalone=pyContainer,supervContainer --xterm --killall
+# $: ${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
#
# (embedded = same process) or in a separate process (standalone):
# --> registry,study,moduleCatalog,cppContainer
# Other CORBA servers could only be launched in separate process (standalone):
-# --> pyContainer,supervContainer
+# --> pyContainer
#
# $: ${KERNEL_ROOT_DIR}/bin/salome/runSalome -h
# help
#
# -----------------------------------------------------------------------------
# Example on CCRT (without ihm) :
-# ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --terminal --modules=MED,CALCULATOR,COMPONENT --standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer --killall
+# ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py --terminal --modules=MED,CALCULATOR,COMPONENT --standalone=registry,study,moduleCatalog,cppContainer,pyContainer --killall
import setenv
from server import *
from launchConfigureParser import verbose
-#process_id = {} move to server.py
+from server import process_id
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#
-# Definition des classes d'objets pour le lancement des Server CORBA
+# Class definitions to launch CORBA Servers
#
class InterpServer(Server):
self.args=args
env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")]
self.CMD=['xterm', '-e']+ env_ld_library_path + ['python']
- #self.CMD=['xterm', '-e', 'python']
def run(self):
global process_id
# ---
-class ContainerSUPERVServer(Server):
- def __init__(self,args):
- self.args=args
- self.initArgs()
- # if sys.platform == "win32":
-# self.CMD=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Container' + ".exe",'SuperVisionContainer']
-# else:
- self.CMD=['SALOME_Container','SuperVisionContainer']
-
-# ---
-
class LoggerServer(Server):
def __init__(self,args):
self.args=args
self.SCMD2+=['CPP']
if 'pyContainer' in self.args['standalone'] or 'pyContainer' in self.args['embedded']:
self.SCMD2+=['PY']
- if 'supervContainer' in self.args['standalone']:
- self.SCMD2+=['SUPERV']
if self.args['gui']:
session_gui = True
if self.args.has_key('session_gui'):
import SALOME
import SALOMEDS
import SALOME_ModuleCatalog
- reload(Engines)
- reload(SALOME)
- reload(SALOMEDS)
import SALOME_Session_idl
session=clt.waitNS("/Kernel/Session",SALOME.Session)
session.GetInterface()
if verbose(): print "startSalome ", args
#
- # Initialisation ORB et Naming Service
+ # Initialisation ORB and Naming Service
#
clt=orbmodule.client(args)
f.write(os.environ['NSPORT'])
f.close()
- # (non obligatoire) Lancement Logger Server
- # et attente de sa disponibilite dans le naming service
+ # Launch Logger Server (optional)
+ # and wait until it is registered in naming service
#
if args['logger']:
myServer=NotifyServer(args,modules_root_dir)
myServer.run()
- # Lancement Session Server (to show splash ASAP)
+ # Launch Session Server (to show splash ASAP)
#
if args["gui"]:
mySessionServ.run()
#
- # Lancement Registry Server,
- # attente de la disponibilite du Registry dans le Naming Service
+ # Launch Registry Server,
+ # and wait until it is registered in naming service
#
if ('registry' not in args['embedded']) | (args["gui"] == 0) :
clt.waitNSPID("/Registry",myServer.PID)
#
- # Lancement Catalog Server,
- # attente de la disponibilite du Catalog Server dans le Naming Service
+ # Launch Catalog Server,
+ # and wait until it is registered in naming service
#
-
if ('moduleCatalog' not in args['embedded']) | (args["gui"] == 0):
cataServer=CatalogServer(args)
clt.waitNSPID("/Kernel/ModulCatalog",cataServer.PID,SALOME_ModuleCatalog.ModuleCatalog)
#
- # Lancement SalomeDS Server,
- # attente de la disponibilite du SalomeDS dans le Naming Service
+ # Launch SalomeDS Server,
+ # and wait until it is registered in naming service
#
#print "ARGS = ",args
clt.waitNSPID("/myStudyManager",myServer.PID)
#
- # Lancement LauncherServer
+ # Launch LauncherServer
#
myCmServer = LauncherServer(args)
theComputer = getShortHostName()
#
- # Lancement Container C++ local,
- # attente de la disponibilite du Container C++ local dans le Naming Service
+ # Launch local C++ Container (FactoryServer),
+ # and wait until it is registered in naming service
#
if ('cppContainer' in args['standalone']) | (args["gui"] == 0) :
clt.waitNSPID("/Containers/" + theComputer + "/FactoryServer",myServer.PID)
#
- # Lancement Container Python local,
- # attente de la disponibilite du Container Python local
- # dans le Naming Service
+ # Launch local Python Container (FactoryServerPy),
+ # and wait until it is registered in naming service
#
if 'pyContainer' in args['standalone']:
clt.waitNSPID("/Containers/" + theComputer + "/FactoryServerPy",myServer.PID)
#
- # Lancement Container Supervision local,
- # attente de la disponibilite du Container Supervision local
- # dans le Naming Service
- #
-
- if 'supervContainer' in args['standalone']:
- myServer=ContainerSUPERVServer(args)
- myServer.run()
- if sys.platform == "win32":
- clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer")
- else:
- clt.waitNSPID("/Containers/" + theComputer + "/SuperVisionContainer",myServer.PID)
-
- #
- # Attente de la disponibilite du Session Server dans le Naming Service
+ # Wait until Session Server is registered in naming service
#
if args["gui"]:
import SALOME
import SALOMEDS
import SALOME_ModuleCatalog
- reload(Engines)
- reload(SALOME)
- reload(SALOMEDS)
import SALOME_Session_idl
if sys.platform == "win32":
session=clt.waitNS("/Kernel/Session",SALOME.Session)
anInterp=InterpServer(args)
anInterp.run()
- # set PYTHONINSPECT variable
+ # set PYTHONINSPECT variable (python interpreter in interactive mode)
if args['pinter']:
os.environ["PYTHONINSPECT"]="1"
import readline
"""%filedict
#
- # Impression arborescence Naming Service
+ # Print Naming Service directory list
#
if clt != None:
if toimport[ i ] == 'killall':
clt.showNS()
killAllPorts()
- import sys
sys.exit(0)
else:
scrname = toimport[ i ]
if len(scrname) > 2 and (len(scrname) - string.rfind(scrname, ".py") == 3):
print 'executing',scrname
+ sys.path.insert( 0, os.path.dirname(scrname))
execfile(scrname,globals())
+ del sys.path[0]
else:
print 'importing',scrname
doimport = 'import ' + scrname
def main():
"""Salome launch as a main application"""
- import sys
from salome_utils import getHostName
print "runSalome running on %s" % getHostName()
args, modules_list, modules_root_dir = setenv.get_config()
<plugin name="GHS3DPlugin"/>
</module>
<module name="VISU"/>
- <module name="SUPERV"/>
<module name="MED"/>
<module name="COMPONENT"/>
<module name="PYCALCULATOR"/>
</embedded-list>
<standalone-list>
<standaloneserver>pyContainer</standaloneserver>
- <standaloneserver>supervContainer</standaloneserver>
</standalone-list>
</Configuration-list>
modules_list.remove("GUI")
pass
- if "SUPERV" in modules_list and not 'supervContainer' in args['standalone']:
- args['standalone'].append("supervContainer")
- pass
-
return args, modules_list, modules_root_dir
# -----------------------------------------------------------------------------
if args['logger']:
os.environ["SALOME_trace"]="with_logger"
- # set environment for SUPERV module
- os.environ["ENABLE_MACRO_NODE"]="1"
# set resources variables if not yet set
- # Done now by launchConfigureParser.py
- #if os.getenv("GUI_ROOT_DIR"):
- #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] = os.getenv("GUI_ROOT_DIR") + "/share/salome/resources/gui"
os.environ["CSF_SALOMEDS_ResourcesDefaults"] \
= os.path.join(modules_root_dir["KERNEL"],"share",