From: vsr Date: Fri, 1 Sep 2006 08:35:14 +0000 (+0000) Subject: PAL13340 : fix launching problem on 64-bit platforms X-Git-Tag: V3_2_2pre~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b2ed30493408e5837c965f08a481b685fdfd95c;p=modules%2Fkernel.git PAL13340 : fix launching problem on 64-bit platforms --- diff --git a/bin/runSalome.py b/bin/runSalome.py index 33490ab1a..485140e0e 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -56,7 +56,8 @@ def add_path(directory, variable_name): # ----------------------------------------------------------------------------- def get_lib_dir(): - if os.path.exists("/usr/lib64/libc.so"): + import platform, re + if re.match(".*64.*", platform.machine()): return "lib64" return "lib" diff --git a/src/KERNEL_PY/salome_shared_modules.py b/src/KERNEL_PY/salome_shared_modules.py index ae42e195b..a86c155ab 100755 --- a/src/KERNEL_PY/salome_shared_modules.py +++ b/src/KERNEL_PY/salome_shared_modules.py @@ -76,8 +76,9 @@ list_modules=[] # Import all *_shared_modules in the path and store them in list_modules path=salome_path.split(":") for rep in path: + import platform, re libdir = "lib" - if os.path.exists("/usr/lib64/libc.so"): + if re.match(".*64.*", platform.machine()): libdir = "lib64" # Import all *_shared_modules in rep for f in glob.glob(os.path.join(rep,libdir,"python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")):