Salome HOME
Fixed problem with dump study and small optimization:
[modules/kernel.git] / bin / appliskel / salome_starter.py
index 215a49e8d4e6a27c1b01205b62004c67e4b7f20f..b381b89c9c990fa4fe017da129d6d431bfd81c3f 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 
-# Copyright (C) 2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2014-2016  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
@@ -33,7 +33,7 @@ def __detectAppliPath(fromPath, launcherFile):
   if os.path.isdir(users_folder):
     return fromPath
 
-  pattern = "/bin/salome/appliskel"
+  pattern = os.path.sep + os.path.join("bin", "salome", "appliskel")
   if fromPath.endswith(pattern):
     currentPath = __detectAppliPath(fromPath[:-len(pattern)], launcherFile)
     if not currentPath is None:
@@ -61,7 +61,8 @@ def initialize(launcherPath, launcherFile):
   os.environ['APPLI'] = appliPath # needed to convert .sh environment files
   os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath
 
-  sys.path[:0] = [absoluteAppliPath+'/bin/salome']
+  sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome", "test"))]
+  sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))]
 
   # define folder to store omniorb config (initially in virtual application folder)
   try: