# HG changeset patch # User wenzelm # Date 1260372529 -3600 # Node ID 7129fab1fe4fe06f379d14dcdda4d76f487b27ce # Parent b174d384293e9b77855a815b8cf7c022fb512be2 more robust Cygwin.config: actually check Wow6432Node, prefer explicit CYGWIN_ROOT in any case; diff -r b174d384293e -r 7129fab1fe4f lib/scripts/getsettings --- a/lib/scripts/getsettings Wed Dec 09 12:26:42 2009 +0100 +++ b/lib/scripts/getsettings Wed Dec 09 16:28:49 2009 +0100 @@ -51,6 +51,7 @@ if [ "$OSTYPE" = cygwin ]; then CLASSPATH="$(cygpath -u -p "$CLASSPATH")" function jvmpath() { cygpath -w -p "$@"; } + CYGWIN_ROOT="$(jvmpath "/")" else function jvmpath() { echo "$@"; } fi diff -r b174d384293e -r 7129fab1fe4f src/Pure/System/cygwin.scala --- a/src/Pure/System/cygwin.scala Wed Dec 09 12:26:42 2009 +0100 +++ b/src/Pure/System/cygwin.scala Wed Dec 09 16:28:49 2009 +0100 @@ -81,11 +81,16 @@ // new-style setup (Cygwin 1.7) private val CYGWIN_SETUP1 = "Software\\Cygwin\\setup" - private val CYGWIN_SETUP2 = "Software\\Wow6432Node\\Cygwin\\setup" // !? + private val CYGWIN_SETUP2 = "Software\\Wow6432Node\\Cygwin\\setup" def config(): (String, String) = { - query_registry(CYGWIN_SETUP1, "rootdir") match { + val cygwin_root = java.lang.System.getenv("CYGWIN_ROOT") + + (if (cygwin_root != null && cygwin_root != "") Some(cygwin_root) else None) orElse + query_registry(CYGWIN_SETUP1, "rootdir") orElse + query_registry(CYGWIN_SETUP2, "rootdir") match + { case Some(root) => (root, "/cygdrive") case None => val root =