diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-09-13 16:07:31 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-09-13 16:07:31 +0200 |
commit | 079cf1b43ef776b0043fe7e531c38eb5a6f371bd (patch) | |
tree | 4bb484a0447c17f40d94ee350290d3ab2af52d77 /demoscript/Util.py | |
parent | Fixed ICE-5423 - NPE in Java map_filesystem demo (diff) | |
download | ice-079cf1b43ef776b0043fe7e531c38eb5a6f371bd.tar.bz2 ice-079cf1b43ef776b0043fe7e531c38eb5a6f371bd.tar.xz ice-079cf1b43ef776b0043fe7e531c38eb5a6f371bd.zip |
Fixed ICE-5425 and ICE-5425 - environment fixes to demo Util.py
Diffstat (limited to 'demoscript/Util.py')
-rw-r--r-- | demoscript/Util.py | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/demoscript/Util.py b/demoscript/Util.py index d45c51f7309..af74d024a35 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -131,30 +131,25 @@ def configurePaths(): addenv("CLASSPATH", "classes") return # That's it, we're done! - shlibVar = None - libDir = None - if not isWin32(): - libDir = os.path.join(getIceDir("cpp"), "lib") - - # 64-bits binaries are located in a subdirectory with binary - # distributions. + # Always add the bin directory to the PATH, it contains executable + # which might not be in the compiler/arch bin sub-directory. binDir = os.path.join(getIceDir("cpp"), "bin") addenv("PATH", binDir) + libDir = None if isWin32() else os.path.join(getIceDir("cpp"), "lib") if iceHome: + + # Add compiler sub-directory if isWin32(): subdir = None if getCppCompiler() == "VC110": subdir = "vc110" if subdir: - if x64: - addenv("PATH", os.path.join(binDir, subdir, "x64")) - else: - addenv("PATH", os.path.join(binDir, subdir)) - elif x64: - addenv("PATH", os.path.join(binDir, "x64")) - elif x64: + binDir = os.path.join(binDir, subdir) + + # Add x64 sub-directory + if x64: if isSolaris(): if isSparc(): libDir = os.path.join(libDir, "64") @@ -162,18 +157,20 @@ def configurePaths(): else: libDir = os.path.join(libDir, "amd64") binDir = os.path.join(binDir, "amd64") + elif isWin32(): + libDir = os.path.join(libDir, "x64") + binDir = os.path.join(binDir, "x64") elif not isDarwin(): libDir = libDir + "64" binDir = binDir + "64" - addenv("PATH", binDir) - elif isDarwin() and cpp11: + + if isDarwin() and cpp11: libDir = os.path.join(libDir, "c++11") binDir = os.path.join(binDir, "c++11") - addenv("PATH", binDir) - # Only add the lib directory to the shared library path if we're - # not using the embedded location. - if libDir and iceHome != "/opt/Ice-3.5": + if binDir != os.path.join(getIceDir("cpp"), "bin"): + addenv("PATH", binDir) + if libDir: addLdPath(libDir) if not iceHome: |