From e5252bb2a580fa1ed9e597ee7ec238345370444d Mon Sep 17 00:00:00 2001 From: caremoli Date: Tue, 15 Sep 2009 11:56:21 +0000 Subject: [PATCH] CCAR: translate some comments in english add the local path of a file in the python sys.path before executing it (execfile(srcname) in runSalome.py) remove supervisioncontainer launch --- bin/appli_gen.py | 2 +- bin/appli_install.sh | 2 +- bin/appliskel/SalomeApp.xml | 7 +-- bin/appliskel/env.d/envSalome.sh | 1 - bin/launchConfigureParser.py | 2 +- bin/runSalome | 4 +- bin/runSalome.csh | 2 +- bin/runSalome.ksh | 6 +-- bin/runSalome.py | 80 +++++++++----------------------- bin/salome.launch | 2 - bin/setenv.py | 9 ---- 11 files changed, 32 insertions(+), 85 deletions(-) diff --git a/bin/appli_gen.py b/bin/appli_gen.py index e6d035518..4e0220908 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -253,7 +253,7 @@ def install(prefix,config_file,verbose=0): command=""" - + """ diff --git a/bin/appli_install.sh b/bin/appli_install.sh index e587c1251..68e505a73 100644 --- a/bin/appli_install.sh +++ b/bin/appli_install.sh @@ -58,7 +58,7 @@ fi 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} diff --git a/bin/appliskel/SalomeApp.xml b/bin/appliskel/SalomeApp.xml index 7caea4e03..267d9272e 100644 --- a/bin/appliskel/SalomeApp.xml +++ b/bin/appliskel/SalomeApp.xml @@ -16,7 +16,7 @@ - + @@ -39,7 +39,6 @@ - @@ -62,10 +61,6 @@ -
- - -
diff --git a/bin/appliskel/env.d/envSalome.sh b/bin/appliskel/env.d/envSalome.sh index e85232ef1..b97e88343 100644 --- a/bin/appliskel/env.d/envSalome.sh +++ b/bin/appliskel/env.d/envSalome.sh @@ -35,7 +35,6 @@ export SalomeAppConfig=${HOME}/${APPLI} 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 diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index fc8012784..004ac6b7a 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -70,7 +70,7 @@ script_nam = "pyscript" # 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 diff --git a/bin/runSalome b/bin/runSalome index b56fbc634..dba8a38de 100755 --- a/bin/runSalome +++ b/bin/runSalome @@ -32,7 +32,7 @@ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ # - 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 # @@ -40,7 +40,7 @@ ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python ${KERNEL_ROOT_DIR}/bin/salome/ # (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 diff --git a/bin/runSalome.csh b/bin/runSalome.csh index e88c3fe6c..7a76d17e8 100755 --- a/bin/runSalome.csh +++ b/bin/runSalome.csh @@ -22,4 +22,4 @@ # -runSalome --gui --modules=GEOM,SMESH,VISU,SUPERV,MED --killall +runSalome --gui --modules=GEOM,SMESH,VISU,MED --killall diff --git a/bin/runSalome.ksh b/bin/runSalome.ksh index 58d0edef6..719fb0576 100644 --- a/bin/runSalome.ksh +++ b/bin/runSalome.ksh @@ -75,7 +75,7 @@ fi # - 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 # @@ -83,7 +83,7 @@ fi # (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 @@ -96,4 +96,4 @@ fi # # ----------------------------------------------------------------------------- # 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 diff --git a/bin/runSalome.py b/bin/runSalome.py index a0bc81696..071340362 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -30,7 +30,7 @@ import orbmodule import setenv from server import * from launchConfigureParser import verbose -#process_id = {} move to server.py +from server import process_id # ----------------------------------------------------------------------------- @@ -80,7 +80,7 @@ def kill_salome(args): # ----------------------------------------------------------------------------- # -# Definition des classes d'objets pour le lancement des Server CORBA +# Class definitions to launch CORBA Servers # class InterpServer(Server): @@ -88,7 +88,6 @@ 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 @@ -195,17 +194,6 @@ class ContainerPYServer(Server): # --- -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 @@ -258,8 +246,6 @@ class SessionServer(Server): 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'): @@ -411,9 +397,6 @@ def startGUI(): 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() @@ -427,7 +410,7 @@ def startSalome(args, modules_list, modules_root_dir): if verbose(): print "startSalome ", args # - # Initialisation ORB et Naming Service + # Initialisation ORB and Naming Service # clt=orbmodule.client(args) @@ -444,8 +427,8 @@ def startSalome(args, modules_list, modules_root_dir): 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']: @@ -462,7 +445,7 @@ def startSalome(args, modules_list, modules_root_dir): 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"]: @@ -471,8 +454,8 @@ def startSalome(args, modules_list, modules_root_dir): 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) : @@ -484,10 +467,9 @@ def startSalome(args, modules_list, modules_root_dir): 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) @@ -500,8 +482,8 @@ def startSalome(args, modules_list, modules_root_dir): 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 @@ -515,7 +497,7 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNSPID("/myStudyManager",myServer.PID) # - # Lancement LauncherServer + # Launch LauncherServer # myCmServer = LauncherServer(args) @@ -541,8 +523,8 @@ def startSalome(args, modules_list, modules_root_dir): 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) : @@ -554,9 +536,8 @@ def startSalome(args, modules_list, modules_root_dir): 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']: @@ -568,21 +549,7 @@ def startSalome(args, modules_list, modules_root_dir): 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"]: @@ -591,9 +558,6 @@ def startSalome(args, modules_list, modules_root_dir): 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) @@ -630,7 +594,7 @@ def startSalome(args, modules_list, modules_root_dir): 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 @@ -682,7 +646,7 @@ def useSalome(args, modules_list, modules_root_dir): """%filedict # - # Impression arborescence Naming Service + # Print Naming Service directory list # if clt != None: @@ -703,13 +667,14 @@ def useSalome(args, modules_list, modules_root_dir): 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 @@ -860,7 +825,6 @@ def no_main(): 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() diff --git a/bin/salome.launch b/bin/salome.launch index 1b5bbdd1b..5c71df7ef 100644 --- a/bin/salome.launch +++ b/bin/salome.launch @@ -13,7 +13,6 @@ - @@ -26,6 +25,5 @@ pyContainer - supervContainer diff --git a/bin/setenv.py b/bin/setenv.py index 411148712..1ec62d8e5 100755 --- a/bin/setenv.py +++ b/bin/setenv.py @@ -142,10 +142,6 @@ def get_config(silent=False): 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 # ----------------------------------------------------------------------------- @@ -228,12 +224,7 @@ def set_env(args, modules_list, modules_root_dir, silent=False): 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", -- 2.39.2