From: abd Date: Wed, 25 Oct 2006 08:42:24 +0000 (+0000) Subject: Crossplatfrom execution of salome X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4ae154d420fd7b30881f23ba97cd09f1c7ce3092;p=modules%2Fkernel.git Crossplatfrom execution of salome --- diff --git a/bin/Makefile.am b/bin/Makefile.am index fbb962528..827b9ec38 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -60,7 +60,9 @@ dist_salomescript_SCRIPTS=\ NSparam.py \ setenv.py \ launchSalome.py \ - runNS.py + nameserver.py \ + server.py + EXTRA_DIST = appliskel diff --git a/bin/nameserver.py b/bin/nameserver.py index 78bcdc30c..cb977be89 100755 --- a/bin/nameserver.py +++ b/bin/nameserver.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import sys, os, re +import sys, os, re, socket #import commands from server import * from Utils_Identity import getShortHostName @@ -47,7 +47,11 @@ class NamingServer(Server): print "Name Service... " #hname=os.environ["HOST"] #commands.getoutput("hostname") - hname=getShortHostName() + if sys.platform == "win32": + hname=getShortHostName(); + else: + hname = socket.gethostname(); + print "hname=",hname f=open(os.environ["OMNIORB_CONFIG"]) @@ -69,7 +73,8 @@ class NamingServer(Server): self.CMD=['omniNames -start ' , aPort , ' -logdir ' , '\"' + upath + '\"'] #os.system("start omniNames -start " + aPort + " -logdir " + upath) else: - self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &'] + #self.CMD=['omniNames -start ' , aPort , ' -logdir ' , upath , ' &'] + self.CMD=['omniNames','-start' , aPort, '-logdir' , upath ] #os.system("omniNames -start " + aPort + " -logdir " + upath + " &") print "ok"