From c296e3c57a91e8bfd1ae11a32b5f5ba89767f7a9 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 22 Nov 2006 08:25:53 +0000 Subject: [PATCH] Improvement PAL13959: improve --splash and --gui options: appy patch from Erwan ADAM --- bin/launchConfigureParser.py | 13 ++++++++++++- bin/runSalome.py | 12 ++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 55e9b5568..0f7ce8b4f 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -458,16 +458,27 @@ def get_env(): # apply command-line options to the arguments BATCHMODE_FORCED = False + NO_SPLASH_FORCED = False args[script_nam] = [] for opt in cmd_opts: if opt in [ 'g', gui_nam ] : if not BATCHMODE_FORCED: args[gui_nam] = 1 + if cmd_opts[opt] == ['0']: + args["session_gui"] = 0 + NO_SPLASH_FORCED = True + pass elif opt in [ 't', terminal_nam ] : args[gui_nam] = 0 args[script_nam] = cmd_opts[opt] BATCHMODE_FORCED = True elif opt in [ 'z', splash_nam ] : - args[splash_nam] = 1 + if not NO_SPLASH_FORCED: + args[splash_nam] = 1 + if cmd_opts[opt] == ['0']: + args[splash_nam] = 0 + pass + pass + pass elif opt in [ 'r', except_nam ] : args[except_nam] = 1 elif opt in [ 'l', logger_nam ] : diff --git a/bin/runSalome.py b/bin/runSalome.py index e965e12aa..c62a0aee9 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -467,7 +467,15 @@ class SessionServer(Server): if 'supervContainer' in self.args['containers'] or 'supervContainer' in self.args['standalone']: self.SCMD2+=['SUPERV'] if self.args['gui']: - self.SCMD2+=['GUI'] + try: + session_gui = self.args['session_gui'] + except KeyError: + session_gui = 1 + pass + if session_gui: + self.SCMD2+=['GUI'] + pass + pass if self.args['splash'] and self.args['gui']: self.SCMD2+=['SPLASH'] if self.args['noexcepthandler']: @@ -929,7 +937,7 @@ def main(): import sys if len(sys.argv) == 2: if sys.argv[1] == "-nothing": - searchFreePort() + searchFreePort({}) import os print "port:%s"%(os.environ['NSPORT']) import sys -- 2.39.2