Salome HOME
Merge branch 'V7_5_BR'
authorvsr <vsr@opencascade.com>
Mon, 26 Jan 2015 10:38:53 +0000 (13:38 +0300)
committervsr <vsr@opencascade.com>
Mon, 26 Jan 2015 10:38:53 +0000 (13:38 +0300)
bin/appliskel/salome
bin/appliskel/salome_starter.py
bin/envSalome.py
bin/runSalome.py
bin/salomeContext.py
bin/setenv.py

index 31f0da6bb8e2e0fac78fd82c4523448f8318700d..1bcae77fa2d19aecd706a525e147ba81925521f1 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-# Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,7 @@ import sys
 
 def main(args):
   # Identify application path then locate configuration files
-  currentPath = os.path.dirname( os.path.abspath( __file__ ) )
+  currentPath = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
   launcherFile = os.path.basename(__file__)
   from salome_starter import initialize
   initialize(currentPath, launcherFile)
index 7eb0a7e5c8421334b1546706d5045b8878441635..41dde839e0eabd1049fd2b8c4a6c69115b29229e 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-# Copyright (C) 2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2014, 2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -61,7 +61,7 @@ def initialize(launcherPath, launcherFile):
   os.environ['APPLI'] = appliPath # needed to convert .sh environment files
   os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath
 
-  sys.path[:0] = [os.path.join(absoluteAppliPath, "bin", "salome")]
+  sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))]
 
   # define folder to store omniorb config (initially in virtual application folder)
   try:
index 3b7388f9f1b72dc6ebe7ffac0aa5ecd68d0c7839..14f7c9346e68d29303f8a2c0be677503fa78dca2 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -36,6 +36,7 @@ import sys
 import setenv
 
 kernel_root=os.getenv("KERNEL_ROOT_DIR")
+kernel_root = os.path.realpath(kernel_root)
 sys.path[:0]=[os.path.join(kernel_root,"bin","salome")]
 
 argv = sys.argv[1:]
index da1c5694681cc92206d4351673d76bec3c0732d1..73a8b0df2037ff8f122adaf16decccb4dac15a82 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -760,7 +760,7 @@ def useSalome(args, modules_list, modules_root_dir):
 
 def execScript(script_path):
     print 'executing', script_path
-    sys.path.insert(0, os.path.dirname(script_path))
+    sys.path.insert(0, os.path.realpath(os.path.dirname(script_path)))
     execfile(script_path,globals())
     del sys.path[0]
 
index 51e0c51a90340118b34bc7b86878071c1a245790..954f86fd89344adc396033cb9c4cfccebc004939 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -221,7 +221,7 @@ class SalomeContext:
       import os
       absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH')
       import sys
-      path = os.path.join(absoluteAppliPath, "bin", "salome")
+      path = os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))
       if not path in sys.path:
         sys.path[:0] = [path]
     except:
@@ -291,6 +291,7 @@ class SalomeContext:
     # set environment
     for reserved in reservedDict:
       a = filter(None, reservedDict[reserved]) # remove empty elements
+      a = [ os.path.realpath(x) for x in a ]
       reformattedVals = os.pathsep.join(a)
       self.addToVariable(reserved, reformattedVals)
       pass
@@ -299,7 +300,9 @@ class SalomeContext:
       self.setVariable(key, val, overwrite=True)
       pass
 
-    sys.path[:0] = os.getenv('PYTHONPATH','').split(os.pathsep)
+    pythonpath = os.getenv('PYTHONPATH','').split(os.pathsep)
+    pythonpath = [ os.path.realpath(x) for x in pythonpath ]
+    sys.path[:0] = pythonpath
   #
 
   def _runAppli(self, args=None):
index e302fd1dd9ea06ca84fccb8dbc063ae859209baf..15482951385c34bc2ecc5dcffb87bcce87594da7 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -64,7 +64,7 @@ def add_path(directory, variable_name):
         newpath = string.join(newpath, splitsym)
         os.environ[variable_name] = newpath
         if variable_name == "PYTHONPATH":
-            sys.path[:0] = [directory]
+            sys.path[:0] = [os.path.realpath(directory)]
 
 # -----------------------------------------------------------------------------