diff options
author | Jose <jose@zeroc.com> | 2014-11-04 22:58:12 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2014-11-04 22:58:12 +0100 |
commit | 1135f90ccfab6a9ca3bbf8c787685cc3995f28a4 (patch) | |
tree | fecd739a56942931843983f70c07599d298bbe6b /demoscript | |
parent | Fixed (ICE-5824) - Freeze test doesn't catch Errors (diff) | |
download | ice-1135f90ccfab6a9ca3bbf8c787685cc3995f28a4.tar.bz2 ice-1135f90ccfab6a9ca3bbf8c787685cc3995f28a4.tar.xz ice-1135f90ccfab6a9ca3bbf8c787685cc3995f28a4.zip |
Fixes for binary distributions
Diffstat (limited to 'demoscript')
-rw-r--r-- | demoscript/Util.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/demoscript/Util.py b/demoscript/Util.py index c7f4c003959..21e8edba739 100644 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -55,6 +55,27 @@ host = "127.0.0.1" # debug = False +# +# The NodeJS interpreter is called "nodejs" on some platforms +# (e.g., Ubuntu) +# +nodeCmd = "node" +if "NODE" in os.environ: + nodeCmd = os.environ["NODE"] +else: + for path in os.environ["PATH"].split(os.pathsep): + # + # Stop if we find "php" in the PATH first. + # + if os.path.exists(os.path.join(path, "node")): + break + elif os.path.exists(os.path.join(path, "nodejs")): + nodeCmd = "nodejs" + break + +def getNodeCommand(): + return nodeCmd + def getJavaVersion(): p = subprocess.Popen(javaCmd + " -version", shell = True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT) if(p.wait() != 0): @@ -232,6 +253,7 @@ def configurePaths(): addenv("CLASSPATH", os.path.join(javaDir, "IceStorm.jar")) addenv("CLASSPATH", os.path.join(javaDir, "IceGrid.jar")) addenv("CLASSPATH", os.path.join(javaDir, "IcePatch2.jar")) + addenv("CLASSPATH", os.path.join(javaDir, "IceDiscovery.jar")) addenv("CLASSPATH", "classes") return # That's it, we're done! @@ -317,7 +339,7 @@ def configurePaths(): addenv("RUBYLIB", os.path.join(getIceDir("rb"), "ruby")) if getMapping() == "js": - addenv("NODE_PATH", os.path.join(getIceDir("js"), "src")) + addenv("NODE_PATH", os.path.join(getIceDir("js"), "node_modules" if iceHome else "src")) addenv("NODE_PATH", ".") # Mapping to the associated subdirectory. |