from launchConfigureParser import verbose
from server import process_id, Server
import json
-from salomeLauncherUtils import formatScriptsAndArgs
import subprocess
# -----------------------------------------------------------------------------
else:
clt.waitNSPID("/Containers/" + theComputer + "/FactoryServer",myServer.PID)
- #
- # Launch local Python Container (FactoryServerPy),
- # and wait until it is registered in naming service
- #
-
if 'pyContainer' in args['standalone']:
raise Exception('Python containers no longer supported')
import readline
except ImportError:
pass
-
+
# siman session paramenters and checkout processing
if simanStudyName(args):
print '**********************************************'
mySession = obj._narrow(SALOME.Session)
mySession.emitMessage("simanCheckoutDone " + simanStudyName(args))
print '**********************************************'
-
+
return clt
# -----------------------------------------------------------------------------
if not args['gui'] or not args['session_gui']:
toimport = args['pyscript']
+ from salomeLauncherUtils import formatScriptsAndArgs
command = formatScriptsAndArgs(toimport)
if command:
proc = subprocess.Popen(command, shell=True)
- proc.wait()
+ res = proc.wait()
+ if res: sys.exit(1) # if there's an error when executing script, we should explicitly exit
return clt
def main():
"""Salome launch as a main application"""
- ### TEMP >>> ###
- if not os.getenv("OMNIORB_USER_PATH"):
- homePath = os.path.realpath(os.path.expanduser('~'))
- #defaultOmniorbUserPath = os.path.join(homePath, ".salomeConfig/USERS")
- defaultOmniorbUserPath = homePath
- if os.getenv("APPLI"):
- defaultOmniorbUserPath = os.path.join(homePath, os.getenv("APPLI"), "USERS")
- os.environ["OMNIORB_USER_PATH"] = defaultOmniorbUserPath
- pass
- ### <<< TEMP ###
+ # define folder to store omniorb config (initially in virtual application folder)
+ try:
+ from salomeLauncherUtils import setOmniOrbUserPath
+ setOmniOrbUserPath()
+ except Exception, e:
+ print e
+ sys.exit(1)
from salome_utils import getHostName
print "runSalome running on %s" % getHostName()