From: ptv Date: Fri, 12 May 2006 07:06:49 +0000 (+0000) Subject: correct after SWP12334 X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a97faa563e88b0876213779645197201cb86be1;p=modules%2Fkernel.git correct after SWP12334 --- diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 2c8fbb15c..758bbf286 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -429,4 +429,7 @@ else: for m in args[modules_nam]: if m not in ["KERNEL", "GUI", ""] and os.getenv("%s_ROOT_DIR"%m): dirs.append( os.getenv("%s_ROOT_DIR"%m) + "/share/salome/resources" ) -os.environ[config_var] = ":".join(dirs) +if os.sys.platform == 'win32': + os.environ[config_var] = ";".join(dirs) +else: + os.environ[config_var] = ":".join(dirs) diff --git a/bin/setenv.py b/bin/setenv.py index f4956b2cd..b1d9a37f8 100755 --- a/bin/setenv.py +++ b/bin/setenv.py @@ -16,9 +16,9 @@ salome_subdir = "salome" def add_path(directory, variable_name): """Function helper to add environment variables""" if sys.platform == "win32": - splitsym = ";" + splitsym = ";" else: - splitsym = ":" + splitsym = ":" if not os.environ.has_key(variable_name): os.environ[variable_name] = "" pass @@ -150,8 +150,10 @@ def set_env(args, modules_list, modules_root_dir): pass pass - - os.environ["SALOMEPATH"]=":".join(modules_root_dir_list) + if sys.platform == 'win32': + os.environ["SALOMEPATH"]=";".join(modules_root_dir_list) + else: + os.environ["SALOMEPATH"]=":".join(modules_root_dir_list) # set trace environment variable diff --git a/src/KERNEL_PY/salome_shared_modules.py b/src/KERNEL_PY/salome_shared_modules.py index 3e492613f..690edb747 100755 --- a/src/KERNEL_PY/salome_shared_modules.py +++ b/src/KERNEL_PY/salome_shared_modules.py @@ -71,7 +71,10 @@ salome_path=os.environ.get("SALOMEPATH",os.getenv("KERNEL_ROOT_DIR")) list_modules=[] # Import all *_shared_modules in the path and store them in list_modules -path=salome_path.split(":") +splitter = ":" +if sys.platform == "win32": + splitter = ";" +path=salome_path.split(splitter) #print "...SALOME_PATH = " #print salome_path #print "...PATH = " @@ -98,6 +101,6 @@ for rep in path: # for name,module in sys.modules.items(): if import_hook.is_shared(name) and shared_imported.get(name) is None: - print "Module shared added to shared_imported: ",name + #print "Module shared added to shared_imported: ",name shared_imported[name]=module