]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
IMP SWP12334
authorabd <abd@opencascade.com>
Fri, 5 May 2006 13:37:23 +0000 (13:37 +0000)
committerabd <abd@opencascade.com>
Fri, 5 May 2006 13:37:23 +0000 (13:37 +0000)
New project structure. Detail description see in bug attachments

bin/nameserver.py
bin/runSalome.py
bin/setenv.py [new file with mode: 0755]
src/Communication/Receivers.cxx
src/Communication/SALOME_Comm_i.cxx
src/Container/SALOME_Container_SignalsHandler.cxx
src/SALOMEDS/SALOMEDS_Driver_i.hxx
src/SALOMETraceCollector/SALOMETraceCollector.cxx
src/SALOMETraceCollector/SALOMETraceCollector.hxx
src/SALOMETraceCollector/TraceCollector_WaitForServerReadiness.hxx
src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx

index c07a3fbfa58891dad37323a6ac68879f9b6b9121..155a323f486b719f534110a95f909a3cbd07d17c 100755 (executable)
@@ -72,7 +72,10 @@ class NamingServer(Server):
 
    def initArgs(self):
         Server.initArgs(self)
-        env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")]
+        if sys.platform == "win32":
+          env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("PATH")]
+        else:
+          env_ld_library_path=['env', 'LD_LIBRARY_PATH=' + os.getenv("LD_LIBRARY_PATH")]
         self.CMD=['xterm', '-e']+ env_ld_library_path + ['python']
         self.initNSArgs()
 
index edcdeb241e0a5956194528eaf9045e5db2aed899..434169c86c3603413348193be3ac2b2bb533f218 100755 (executable)
@@ -3,226 +3,7 @@
 import sys, os, string, glob, time, pickle
 from server import *
 import orbmodule
-
-#process_id = {}
-
-# salome_subdir variable is used for composing paths like $KERNEL_ROOT_DIR/share/salome/resources, etc.
-# before moving to SUIT-based gui, instead of salome_subdir there was args['appname'] used.
-# but after - 'appname'  = "SalomeApp", so using it in making the subdirectory is an error.
-salome_subdir = "salome"
-
-# -----------------------------------------------------------------------------
-
-def add_path(directory, variable_name):
-    """Function helper to add environment variables"""
-    if sys.platform == "win32":
-       splitsym = ";"
-    else:
-       splitsym = ":"
-    if not os.environ.has_key(variable_name):
-        os.environ[variable_name] = ""
-        pass
-    if os.path.exists(directory):
-        newpath=[]
-        for _dir in os.environ[variable_name].split(splitsym):
-            if os.path.exists(_dir):
-               try:
-                  if not os.path.samefile(_dir, directory):
-                    newpath.append(_dir)
-               except:
-                  if _dir != directory:
-                    newpath.append(_dir)
-                 
-            else:
-                if os.path.abspath(_dir) != os.path.abspath(directory):
-                  newpath.append(_dir)
-            pass
-        import string
-        newpath[:0] = [ directory ]
-        newpath = string.join(newpath, splitsym)
-        os.environ[variable_name] = newpath
-        if variable_name == "PYTHONPATH":
-            sys.path[:0] = [directory]
-
-# -----------------------------------------------------------------------------
-
-def get_config():
-    """
-    Get list of modules, paths.
-    
-    Read args from launch configure xml file and command line options.
-    Check variables <module>_ROOT_DIR and set list of used modules.
-    Return args, modules_list, modules_root_dir    
-    """
-    
-    # read args from launch configure xml file and command line options
-    
-    import launchConfigureParser
-    args = launchConfigureParser.args
-    
-    # Check variables <module>_ROOT_DIR
-    # and set list of used modules (without KERNEL)
-
-    modules_list = []
-    if args.has_key("modules"):
-        modules_list += args["modules"]
-    # KERNEL must be last in the list to locate it at the first place in PATH
-    if args["gui"] :
-        modules_list[:0] = ["GUI"]
-    modules_list[:0] = ["KERNEL"]
-    modules_list.reverse()
-
-    modules_root_dir = {}
-
-    to_remove_list=[]
-    for module in modules_list :
-        module_variable=module.upper()+"_ROOT_DIR"
-        if not os.environ.has_key(module_variable):
-            print "*******************************************************"
-            print "*"
-            print "* Environment variable",module_variable,"must be set"
-            print "* Module", module, "will be not available"
-            print "*"
-            print "********************************************************"
-            to_remove_list.append(module)
-            continue
-            pass
-        module_root_dir = os.environ[module_variable]
-        modules_root_dir[module]=module_root_dir
-
-    for to_remove in to_remove_list:
-        modules_list.remove(to_remove)
-
-    while "KERNEL" in modules_list:
-        modules_list.remove("KERNEL")
-        pass
-
-    while "GUI" in modules_list:
-        modules_list.remove("GUI")
-        pass
-
-    if "SUPERV" in modules_list and not 'superv' in args['standalone']:
-        args['standalone'].append("superv")
-        pass
-   
-    return args, modules_list, modules_root_dir
-
-# -----------------------------------------------------------------------------
-
-def set_env(args, modules_list, modules_root_dir):
-    """Add to the PATH-variables modules specific paths"""
-    
-    python_version="python%d.%d" % sys.version_info[0:2]
-    modules_root_dir_list = []
-    if args["gui"] :
-        modules_list = modules_list[:] + ["GUI"] 
-    modules_list = modules_list[:] + ["KERNEL"] 
-    for module in modules_list :
-        if modules_root_dir.has_key(module):
-            module_root_dir = modules_root_dir[module]
-            modules_root_dir_list[:0] = [module_root_dir]
-            add_path(os.path.join(module_root_dir,"lib",salome_subdir),
-                     "LD_LIBRARY_PATH")
-            add_path(os.path.join(module_root_dir,"bin",salome_subdir),
-                     "PATH")
-            if os.path.exists(module_root_dir + "/examples") :
-                add_path(os.path.join(module_root_dir,"examples"),
-                         "PYTHONPATH")
-                pass
-            add_path(os.path.join(module_root_dir,"bin",salome_subdir),
-                     "PYTHONPATH")
-            add_path(os.path.join(module_root_dir,"lib",
-                                  python_version,"site-packages",
-                                  salome_subdir),
-                     "PYTHONPATH")
-            add_path(os.path.join(module_root_dir,"lib",salome_subdir),
-                     "PYTHONPATH")
-            add_path(os.path.join(module_root_dir,"lib",
-                                  python_version,"site-packages",
-                                  salome_subdir,
-                                  "shared_modules"),
-                     "PYTHONPATH")
-            pass
-        pass
-
-
-    os.environ["SALOMEPATH"]=":".join(modules_root_dir_list)
-    
-    # set trace environment variable
-    
-    if not os.environ.has_key("SALOME_trace"):
-        os.environ["SALOME_trace"]="local"
-    if args['file']:
-        os.environ["SALOME_trace"]="file:"+args['file'][0]
-    if args['logger']:
-        os.environ["SALOME_trace"]="with_logger"
-
-    # set environment for SMESH plugins
-
-    if "SMESH" in modules_list:
-        os.environ["SMESH_MeshersList"]="StdMeshers"
-        if not os.environ.has_key("SALOME_StdMeshersResources"):
-            os.environ["SALOME_StdMeshersResources"] \
-            = modules_root_dir["SMESH"]+"/share/"+args["appname"]+"/resources"
-            pass
-        if args.has_key("SMESH_plugins"):
-            for plugin in args["SMESH_plugins"]:
-                plugin_root = ""
-                if os.environ.has_key(plugin+"_ROOT_DIR"):
-                    plugin_root = os.environ[plugin+"_ROOT_DIR"]
-                else:
-                    # workaround to avoid modifications of existing environment
-                    if os.environ.has_key(plugin.upper()+"_ROOT_DIR"):
-                        plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"]
-                        pass
-                    pass
-                if plugin_root != "":
-                    os.environ["SMESH_MeshersList"] \
-                    = os.environ["SMESH_MeshersList"]+":"+plugin
-                    if not os.environ.has_key("SALOME_"+plugin+"Resources"):
-                        os.environ["SALOME_"+plugin+"Resources"] \
-                        = plugin_root+"/share/"+args["appname"]+"/resources"
-                    add_path(os.path.join(plugin_root,"lib",python_version,
-                                          "site-packages",salome_subdir),
-                             "PYTHONPATH")
-                    add_path(os.path.join(plugin_root,"lib",salome_subdir),
-                             "PYTHONPATH")
-                    add_path(os.path.join(plugin_root,"lib",salome_subdir),
-                             "LD_LIBRARY_PATH")
-                    add_path(os.path.join(plugin_root,"bin",salome_subdir),
-                             "PYTHONPATH")
-                    add_path(os.path.join(plugin_root,"bin",salome_subdir),
-                             "PATH")
-            pass
-        pass
-
-    # 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("SUITRoot"): os.environ["SUITRoot"] =  os.getenv("GUI_ROOT_DIR") + "/share/salome"
-        #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] =  os.getenv("GUI_ROOT_DIR") + "/share/salome/resources"
-
-    # set CSF_PluginDefaults variable only if it is not customized
-    # by the user
-    if not os.getenv("CSF_PluginDefaults"):
-        os.environ["CSF_PluginDefaults"] \
-        = os.path.join(modules_root_dir["KERNEL"],"share",
-                       salome_subdir,"resources")
-    os.environ["CSF_SALOMEDS_ResourcesDefaults"] \
-    = os.path.join(modules_root_dir["KERNEL"],"share",
-                   salome_subdir,"resources")
-
-    if "GEOM" in modules_list:
-        print "GEOM OCAF Resources"
-        os.environ["CSF_GEOMDS_ResourcesDefaults"] \
-        = os.path.join(modules_root_dir["GEOM"],"share",
-                       salome_subdir,"resources")
-       print "GEOM Shape Healing Resources"
-        os.environ["CSF_ShHealingDefaults"] \
-        = os.path.join(modules_root_dir["GEOM"],"share",
-                       salome_subdir,"resources")
+import setenv
 
 # -----------------------------------------------------------------------------
 
@@ -284,7 +65,7 @@ class InterpServer(Server):
         print "command = ", command
        if sys.platform == "win32":
           import win32pm
-          pid = win32pm.spawnpid( string.join(command, " ") )
+          pid = win32pm.spawnpid( string.join(command, " "),'-nc' )
        else:
           pid = os.spawnvp(os.P_NOWAIT, command[0], command)
         process_id[pid]=self.CMD
@@ -296,10 +77,10 @@ class CatalogServer(Server):
     def __init__(self,args):
         self.args=args
         self.initArgs()
-       if sys.platform == "win32":
-          self.SCMD1=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_ModuleCatalog_Server' + ".exe",'-common']
-       else:
-          self.SCMD1=['SALOME_ModuleCatalog_Server','-common']
+       #if sys.platform == "win32":
+  #        self.SCMD1=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_ModuleCatalog_Server' + ".exe",'-common']
+       #else:
+        self.SCMD1=['SALOME_ModuleCatalog_Server','-common']
         self.SCMD2=[]
         home_dir=os.getenv('HOME')
         if home_dir is not None:
@@ -320,7 +101,7 @@ class CatalogServer(Server):
                 #print "   ", module_cata
                 cata_path.extend(
                     glob.glob(os.path.join(module_root_dir,
-                                           "share",salome_subdir,
+                                           "share",setenv.salome_subdir,
                                            "resources",module_cata)))
                 pass
             pass
@@ -332,10 +113,10 @@ class SalomeDSServer(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"] + "/" + 'SALOMEDS_Server' + ".exe"]
-       else:
-          self.CMD=['SALOMEDS_Server']
+#      if sys.platform == "win32":
+#          self.CMD=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOMEDS_Server' + ".exe"]
+#      else:
+        self.CMD=['SALOMEDS_Server']
 
 # ---
 
@@ -343,10 +124,10 @@ class RegistryServer(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_Registry_Server'+ ".exe", '--salome_session','theSession']
-       else:
-          self.CMD=['SALOME_Registry_Server', '--salome_session','theSession']
+#      if sys.platform == "win32":
+#          self.CMD=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Registry_Server'+ ".exe", '--salome_session','theSession']
+#      else:
+        self.CMD=['SALOME_Registry_Server', '--salome_session','theSession']
 
 # ---
 
@@ -354,10 +135,10 @@ class ContainerCPPServer(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",'FactoryServer']
-       else:
-          self.CMD=['SALOME_Container','FactoryServer']
+#      if sys.platform == "win32":
+#          self.CMD=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Container' + ".exe",'FactoryServer']
+#      else:
+        self.CMD=['SALOME_Container','FactoryServer']
 
 # ---
 
@@ -376,10 +157,10 @@ 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']
+#      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']
 
 # ---
 
@@ -398,10 +179,10 @@ class SessionServer(Server):
         self.args['xterm']=0
         #
         self.initArgs()
-       if sys.platform == "win32":
-          self.SCMD1=[os.environ["GUI_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Session_Server' + ".exe"]
-       else:
-          self.SCMD1=['SALOME_Session_Server']
+#      if sys.platform == "win32":
+#          self.SCMD1=[os.environ["GUI_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_Session_Server' + ".exe"]
+#      else:
+        self.SCMD1=['SALOME_Session_Server']
        
         self.SCMD2=[]
         if 'registry' in self.args['embedded']:
@@ -452,7 +233,7 @@ class SessionServer(Server):
             #print "   ", module_cata
             cata_path.extend(
                 glob.glob(os.path.join(module_root_dir,"share",
-                                       salome_subdir,"resources",
+                                       setenv.salome_subdir,"resources",
                                        module_cata)))
         if (self.args["gui"]) & ('moduleCatalog' in self.args['embedded']):
             self.CMD=self.SCMD1 + [string.join(cata_path,':')] + self.SCMD2
@@ -465,10 +246,10 @@ class ContainerManagerServer(Server):
     def __init__(self,args):
         self.args=args
         self.initArgs()
-       if sys.platform == "win32":
-          self.SCMD1=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_ContainerManagerServer' + ".exe"]
-       else:
-          self.SCMD1=['SALOME_ContainerManagerServer']
+#      if sys.platform == "win32":
+#          self.SCMD1=[os.environ["KERNEL_ROOT_DIR"] + "/win32/" + os.environ["BIN_ENV"] + "/" + 'SALOME_ContainerManagerServer' + ".exe"]
+#      else:
+        self.SCMD1=['SALOME_ContainerManagerServer']
         self.SCMD2=[]
         if args["gui"] :
             if 'registry' in self.args['embedded']:
@@ -610,20 +391,20 @@ def startSalome(args, modules_list, modules_root_dir):
 
     os.environ["CSF_PluginDefaults"] \
     = os.path.join(modules_root_dir["KERNEL"],"share",
-                   salome_subdir,"resources")
+                   setenv.salome_subdir,"resources")
     os.environ["CSF_SALOMEDS_ResourcesDefaults"] \
     = os.path.join(modules_root_dir["KERNEL"],"share",
-                   salome_subdir,"resources")
+                   setenv.salome_subdir,"resources")
 
     if "GEOM" in modules_list:
         print "GEOM OCAF Resources"
         os.environ["CSF_GEOMDS_ResourcesDefaults"] \
         = os.path.join(modules_root_dir["GEOM"],"share",
-                       salome_subdir,"resources")
+                       setenv.salome_subdir,"resources")
        print "GEOM Shape Healing Resources"
         os.environ["CSF_ShHealingDefaults"] \
         = os.path.join(modules_root_dir["GEOM"],"share",
-                       salome_subdir,"resources")
+                       setenv.salome_subdir,"resources")
 
     print "ARGS = ",args
     if ('study' not in args['embedded']) | (args["gui"] == 0):
@@ -841,9 +622,11 @@ def no_main():
 
 def main():
     """Salome launch as a main application"""
-    args, modules_list, modules_root_dir = get_config()
+    args, modules_list, modules_root_dir = setenv.get_config()
     kill_salome(args)
-    set_env(args, modules_list, modules_root_dir)
+    #invokation of set_env moved to separate file setenv.py
+    #set_env(args, modules_list, modules_root_dir)
+    setenv.main()
     clt = useSalome(args, modules_list, modules_root_dir)
     return clt,args
 
diff --git a/bin/setenv.py b/bin/setenv.py
new file mode 100755 (executable)
index 0000000..2ddb9d8
--- /dev/null
@@ -0,0 +1,242 @@
+#!/usr/bin/env python
+
+import sys, os, string, glob, time, pickle
+
+# this file is extraction of set_env from runSalome.py
+# for reusage in automated tests
+
+# salome_subdir variable is used for composing paths like $KERNEL_ROOT_DIR/share/salome/resources, etc.
+# before moving to SUIT-based gui, instead of salome_subdir there was args['appname'] used.
+# but after - 'appname'  = "SalomeApp", so using it in making the subdirectory is an error.
+salome_subdir = "salome"
+
+
+# -----------------------------------------------------------------------------
+
+def add_path(directory, variable_name):
+    """Function helper to add environment variables"""
+    if sys.platform == "win32":
+       splitsym = ";"
+    else:
+       splitsym = ":"
+    if not os.environ.has_key(variable_name):
+        os.environ[variable_name] = ""
+        pass
+    if os.path.exists(directory):
+        newpath=[]
+        for _dir in os.environ[variable_name].split(splitsym):
+            if os.path.exists(_dir):
+               try:
+                  if not os.path.samefile(_dir, directory):
+                    newpath.append(_dir)
+               except:
+                  if _dir != directory:
+                    newpath.append(_dir)
+                 
+            else:
+                if os.path.abspath(_dir) != os.path.abspath(directory):
+                  newpath.append(_dir)
+            pass
+        import string
+        newpath[:0] = [ directory ]
+        newpath = string.join(newpath, splitsym)
+        os.environ[variable_name] = newpath
+        if variable_name == "PYTHONPATH":
+            sys.path[:0] = [directory]
+
+# -----------------------------------------------------------------------------
+
+def get_config():
+    """
+    Get list of modules, paths.
+    
+    Read args from launch configure xml file and command line options.
+    Check variables <module>_ROOT_DIR and set list of used modules.
+    Return args, modules_list, modules_root_dir    
+    """
+    
+    # read args from launch configure xml file and command line options
+    
+    import launchConfigureParser
+    args = launchConfigureParser.args
+    
+    # Check variables <module>_ROOT_DIR
+    # and set list of used modules (without KERNEL)
+
+    modules_list = []
+    if args.has_key("modules"):
+        modules_list += args["modules"]
+    # KERNEL must be last in the list to locate it at the first place in PATH
+    if args["gui"] :
+        modules_list[:0] = ["GUI"]
+    modules_list[:0] = ["KERNEL"]
+    modules_list.reverse()
+
+    modules_root_dir = {}
+
+    to_remove_list=[]
+    for module in modules_list :
+        module_variable=module.upper()+"_ROOT_DIR"
+        if not os.environ.has_key(module_variable):
+            print "*******************************************************"
+            print "*"
+            print "* Environment variable",module_variable,"must be set"
+            print "* Module", module, "will be not available"
+            print "*"
+            print "********************************************************"
+            to_remove_list.append(module)
+            continue
+            pass
+        module_root_dir = os.environ[module_variable]
+        modules_root_dir[module]=module_root_dir
+
+    for to_remove in to_remove_list:
+        modules_list.remove(to_remove)
+
+    while "KERNEL" in modules_list:
+        modules_list.remove("KERNEL")
+        pass
+
+    while "GUI" in modules_list:
+        modules_list.remove("GUI")
+        pass
+
+    if "SUPERV" in modules_list and not 'superv' in args['standalone']:
+        args['standalone'].append("superv")
+        pass
+   
+    return args, modules_list, modules_root_dir
+
+# -----------------------------------------------------------------------------
+
+def set_env(args, modules_list, modules_root_dir):
+    """Add to the PATH-variables modules specific paths"""
+    
+    python_version="python%d.%d" % sys.version_info[0:2]
+    modules_root_dir_list = []
+    if args["gui"] :
+        modules_list = modules_list[:] + ["GUI"] 
+    modules_list = modules_list[:] + ["KERNEL"] 
+    for module in modules_list :
+        if modules_root_dir.has_key(module):
+            module_root_dir = modules_root_dir[module]
+            modules_root_dir_list[:0] = [module_root_dir]
+            if sys.platform == "win32":
+              add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+                     "PATH")
+            else:
+              add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+                     "LD_LIBRARY_PATH")
+            add_path(os.path.join(module_root_dir,"bin",salome_subdir),
+                     "PATH")
+            if os.path.exists(module_root_dir + "/examples") :
+                add_path(os.path.join(module_root_dir,"examples"),
+                         "PYTHONPATH")
+                pass
+            add_path(os.path.join(module_root_dir,"bin",salome_subdir),
+                     "PYTHONPATH")
+            add_path(os.path.join(module_root_dir,"lib",
+                                  python_version,"site-packages",
+                                  salome_subdir),
+                     "PYTHONPATH")
+            add_path(os.path.join(module_root_dir,"lib",salome_subdir),
+                     "PYTHONPATH")
+            add_path(os.path.join(module_root_dir,"lib",
+                                  python_version,"site-packages",
+                                  salome_subdir,
+                                  "shared_modules"),
+                     "PYTHONPATH")
+            pass
+        pass
+
+
+    os.environ["SALOMEPATH"]=":".join(modules_root_dir_list)
+    
+    # set trace environment variable
+    
+    if not os.environ.has_key("SALOME_trace"):
+        os.environ["SALOME_trace"]="local"
+    if args['file']:
+        os.environ["SALOME_trace"]="file:"+args['file'][0]
+    if args['logger']:
+        os.environ["SALOME_trace"]="with_logger"
+
+    # set environment for SMESH plugins
+
+    if "SMESH" in modules_list:
+        os.environ["SMESH_MeshersList"]="StdMeshers"
+        if not os.environ.has_key("SALOME_StdMeshersResources"):
+            os.environ["SALOME_StdMeshersResources"] \
+            = modules_root_dir["SMESH"]+"/share/"+args["appname"]+"/resources"
+            pass
+        if args.has_key("SMESH_plugins"):
+            for plugin in args["SMESH_plugins"]:
+                plugin_root = ""
+                if os.environ.has_key(plugin+"_ROOT_DIR"):
+                    plugin_root = os.environ[plugin+"_ROOT_DIR"]
+                else:
+                    # workaround to avoid modifications of existing environment
+                    if os.environ.has_key(plugin.upper()+"_ROOT_DIR"):
+                        plugin_root = os.environ[plugin.upper()+"_ROOT_DIR"]
+                        pass
+                    pass
+                if plugin_root != "":
+                    os.environ["SMESH_MeshersList"] \
+                    = os.environ["SMESH_MeshersList"]+":"+plugin
+                    if not os.environ.has_key("SALOME_"+plugin+"Resources"):
+                        os.environ["SALOME_"+plugin+"Resources"] \
+                        = plugin_root+"/share/"+args["appname"]+"/resources"
+                    add_path(os.path.join(plugin_root,"lib",python_version,
+                                          "site-packages",salome_subdir),
+                             "PYTHONPATH")
+                    add_path(os.path.join(plugin_root,"lib",salome_subdir),
+                             "PYTHONPATH")
+                    add_path(os.path.join(plugin_root,"lib",salome_subdir),
+                             "LD_LIBRARY_PATH")
+                    add_path(os.path.join(plugin_root,"bin",salome_subdir),
+                             "PYTHONPATH")
+                    add_path(os.path.join(plugin_root,"bin",salome_subdir),
+                             "PATH")
+            pass
+        pass
+
+    # 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("SUITRoot"): os.environ["SUITRoot"] =  os.getenv("GUI_ROOT_DIR") + "/share/salome"
+        #if not os.getenv("SalomeAppConfig"): os.environ["SalomeAppConfig"] =  os.getenv("GUI_ROOT_DIR") + "/share/salome/resources"
+
+    # set CSF_PluginDefaults variable only if it is not customized
+    # by the user
+    if not os.getenv("CSF_PluginDefaults"):
+        os.environ["CSF_PluginDefaults"] \
+        = os.path.join(modules_root_dir["KERNEL"],"share",
+                       salome_subdir,"resources")
+    os.environ["CSF_SALOMEDS_ResourcesDefaults"] \
+    = os.path.join(modules_root_dir["KERNEL"],"share",
+                   salome_subdir,"resources")
+
+    if "GEOM" in modules_list:
+        print "GEOM OCAF Resources"
+        os.environ["CSF_GEOMDS_ResourcesDefaults"] \
+        = os.path.join(modules_root_dir["GEOM"],"share",
+                       salome_subdir,"resources")
+       print "GEOM Shape Healing Resources"
+        os.environ["CSF_ShHealingDefaults"] \
+        = os.path.join(modules_root_dir["GEOM"],"share",
+                       salome_subdir,"resources")
+
+# -----------------------------------------------------------------------------
+
+def main():
+    args, modules_list, modules_root_dir = get_config()
+    set_env(args, modules_list, modules_root_dir)
+    return args
+
+# -----------------------------------------------------------------------------
+
+if __name__ == "__main__":
+   import user
+   args = main()
index f2ce1fa890eaef15cb38aec178efe11a6114d5eb..cf77440960373aead122deecc50e7ea7319b87a5 100644 (file)
@@ -17,7 +17,7 @@
 //
 // See http://www.salome-platform.org/
 //
-#include "poa.h"
+#include "omniORB4/poa.h"
 #include "utilities.h"
 using namespace std;
 
index 632ce7a7375cd2d1474af94cbbf9b6c0b965e9d3..b87b15139c54565650b5ae25c120ab9e813cbec9 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef WNT
 #include <rpc/xdr.h>
 #endif
-#include "poa.h"
+#include "omniORB4/poa.h"
 #include "omnithread.h"
 #include "Utils_SINGLETON.hxx"
 #include "Utils_ORB_INIT.hxx"
index b40f721a451e9d2b2b7ac5dd039ec6166cc83b6c..8ddcc14e4b8eb2f572c75515286e005202f965b3 100644 (file)
@@ -19,7 +19,7 @@
 
 
 #include <stdexcept>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 #include "utilities.h"
 
 // CCRT porting
index ae49cdba2ebb6171b0d6fa67704f6101eaac1693..d247120ff475d74d1a123cab47122b332c1c4b98 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef __SALOMEDS_DRIVER_I_H__
 #define __SALOMEDS_DRIVER_I_H__
 
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 #include <TCollection_AsciiString.hxx>
 #include "SALOMEDSImpl_Driver.hxx"
 #include "SALOMEDSImpl_SComponent.hxx"
index 361595a66310fabdd86f4e76dfccf43815d23272..821a5ab8507095bf6b723fe5760c2b8a7ddc8416 100644 (file)
@@ -28,7 +28,7 @@
 #include <sstream>
 #include <fstream>
 #include <cstdlib>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 
 using namespace std;
 
index 35139f6b654adfd21d3e4f5a163d27b83c1d77be..e9a639c0dfedb3900825bdddc9215054292c499d 100644 (file)
@@ -28,7 +28,7 @@
 #define _SALOMETRACECOLLECTOR_HXX_
 
 #include <string>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 #include "BaseTraceCollector.hxx"
 #include "LocalTraceBufferPool.hxx"
 
index c31d116840988d4bc27e97596eeca47494d34ab5..8dd4210564879530415ad517105f447b76495a2d 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef _TRACECOLLECTOR_WAITFORSERVERREADINESS_HXX_
 #define _TRACECOLLECTOR_WAITFORSERVERREADINESS_HXX_
 
-#include <CORBA.h> 
+#include <omniORB4/CORBA.h> 
 #include <string>
 
 CORBA::Object_ptr  TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr theOrb,
index 2d1685bd4e231e0bd2025360a642b9652c7e2288..8be58c35451846d8e94be53eb1135ff0d16d4264 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <list>
 #include <cassert>
-#include <CORBA.h>
+#include <omniORB4/CORBA.h>
 //# include "utilities.h"
 
 /*!\class DESTRUCTEUR_GENERIQUE_