From cf53d0b4e6d96044b092605221207474f2f72b62 Mon Sep 17 00:00:00 2001 From: asv Date: Thu, 23 Jun 2005 11:48:53 +0000 Subject: [PATCH] Displaying splash on application startup is added to GUI/Session package. In start *.py scripts the following chages were made: 1) added "SPLASH" parameter to SalomeApp.xml resource file and its handling in launchConfigureParser 2) moved section of conversion of "GUI", "CPP", "PY", "SUPERV" parameters (and new "SPLASH") from unused SessionLoader to SessionServer, these parameter are now passed to SessionServer on launch and they are handled there. 3) start of SessionServer is moved to the very beginning of startSalome (to display splash). --- bin/launchConfigureParser.py | 6 ++- bin/runSalome.py | 72 ++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 588630dac..c80e1eb15 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -13,6 +13,7 @@ val_att = "value" # certain values in XML configuration file ("launch" section) lanch_nam = "launch" gui_nam = "gui" +splash_nam = "splash" logger_nam = "logger" xterm_nam = "xterm" file_nam = "file" @@ -33,7 +34,7 @@ appname = "SalomeApp" # values of boolean type (must be '0' or '1'). # xml_parser.boolValue() is used for correct setting -boolKeys = ( gui_nam, logger_nam, file_nam, xterm_nam, portkill_nam, killall_nam, interp_nam ) +boolKeys = ( gui_nam, splash_nam, logger_nam, file_nam, xterm_nam, portkill_nam, killall_nam, interp_nam ) # values of list type listKeys = ( containers_nam, embedded_nam, key_nam, modules_nam, standalone_nam ) @@ -284,6 +285,7 @@ if opts.has_key("h"): --portkill or -p : kill the salome with current port --killall or -k : kill all salome sessions --interp=n or -i=n : number of additional xterm to open, with session environment + -z : display splash screen For each Salome module, the environment variable _ROOT_DIR must be set. The module name () must be uppercase. @@ -296,6 +298,8 @@ if opts.has_key("h"): for opt in opts: if opt == 'g': args[gui_nam] = 1 + elif opt == 'z': + args[splash_nam] = 1 elif opt == 'l': args[logger_nam] = 1 elif opt == 'f': diff --git a/bin/runSalome.py b/bin/runSalome.py index 8738ca558..1a1147a20 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -348,23 +348,23 @@ class LoggerServer(Server): # --- -class SessionLoader(Server): - def __init__(self,args): - self.args=args - self.initArgs() - self.CMD=['SALOME_Session_Loader'] - if "cppContainer" in self.args['standalone'] \ - or "cppContainer" in self.args['embedded']: - self.CMD=self.CMD+['CPP'] - if "pyContainer" in self.args['standalone'] \ - or "pyContainer" in self.args['embedded']: - self.CMD=self.CMD+['PY'] - if "supervContainer" in self.args['containers'] \ - or "supervContainer" in self.args['standalone']: - self.CMD=self.CMD+['SUPERV'] - if self.args['gui']: - self.CMD=self.CMD+['GUI'] - print self.CMD +# class SessionLoader(Server): +# def __init__(self,args): +# self.args=args +# self.initArgs() +# self.CMD=['SALOME_Session_Loader'] +# if "cppContainer" in self.args['standalone'] \ +# or "cppContainer" in self.args['embedded']: +# self.CMD=self.CMD+['CPP'] +# if "pyContainer" in self.args['standalone'] \ +# or "pyContainer" in self.args['embedded']: +# self.CMD=self.CMD+['PY'] +# if "supervContainer" in self.args['containers'] \ +# or "supervContainer" in self.args['standalone']: +# self.CMD=self.CMD+['SUPERV'] +# if self.args['gui']: +# self.CMD=self.CMD+['GUI'] +# print self.CMD # --- @@ -389,6 +389,17 @@ class SessionServer(Server): 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']: + self.SCMD2+=['PY'] + if 'supervContainer' in self.args['containers'] or 'supervContainer' in self.args['standalone']: + self.SCMD2+=['SUPERV'] + if self.args['gui']: + self.SCMD2+=['GUI'] + if self.args['splash']: + self.SCMD2+=['SPLASH'] def setpath(self,modules_list,modules_root_dir): cata_path=[] @@ -485,22 +496,21 @@ def startSalome(args, modules_list, modules_root_dir): """Launch all SALOME servers requested by args""" init_time = os.times() - # - # Lancement Session Loader - # - print "startSalome ", args - #if args['gui']: - # myServer=SessionLoader(args) - # myServer.run() - # # Initialisation ORB et Naming Service # clt=orbmodule.client() + # + # Lancement Session Server + # + mySessionServ = SessionServer(args) + mySessionServ.setpath(modules_list,modules_root_dir) + mySessionServ.run() + # (non obligatoire) Lancement Logger Server # et attente de sa disponibilite dans le naming service # @@ -622,13 +632,6 @@ def startSalome(args, modules_list, modules_root_dir): clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer") ##---------------- - # - # Lancement Session Server - # - mySessionServ = SessionServer(args) - mySessionServ.setpath(modules_list,modules_root_dir) - mySessionServ.run() - #macomm2=['ddd'] #pid = os.spawnvp(os.P_NOWAIT, macomm2[0], macomm2) # @@ -645,9 +648,8 @@ def startSalome(args, modules_list, modules_root_dir): - init_time[4]) # ASV start GUI without Loader - if args['gui']: - session.GetInterface() - + #if args['gui']: + # session.GetInterface() # # additionnal external python interpreters -- 2.39.2