Author: mhutch
Date: 2007-09-19 19:42:33 -0400 (Wed, 19 Sep 2007)
New Revision: 86054
Modified:
trunk/monodevelop/ChangeLog
trunk/monodevelop/configure.in
trunk/monodevelop/monodevelop.in
Log:
* configure.in, monodevelop.in: Mozilla detection script now checks
paths for gtkembedmoz.so so that MD doesn't end up with an invalid
Mozilla path.
Modified: trunk/monodevelop/ChangeLog
===================================================================
--- trunk/monodevelop/ChangeLog 2007-09-19 23:36:07 UTC (rev 86053)
+++ trunk/monodevelop/ChangeLog 2007-09-19 23:42:33 UTC (rev 86054)
@@ -1,3 +1,9 @@
+2007-09-20 Michael Hutchinson <[EMAIL PROTECTED]>
+
+ * configure.in, monodevelop.in: Mozilla detection script now checks
paths
+ for gtkembedmoz.so so that MD doesn't end up with an invalid Mozilla
+ path.
+
2007-09-14 Michael Hutchinson <[EMAIL PROTECTED]>
* configure.in,
Modified: trunk/monodevelop/configure.in
===================================================================
--- trunk/monodevelop/configure.in 2007-09-19 23:36:07 UTC (rev 86053)
+++ trunk/monodevelop/configure.in 2007-09-19 23:42:33 UTC (rev 86054)
@@ -312,46 +312,48 @@
#We need to know where Mozilla is for launch scripts and possible for
AspNetEdit
#Check pkg-config first
MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
-if !(test -n "$MOZILLA_HOME"); then
+if test ! -e "$MOZILLA_HOME/libgtkembedmoz.so"; then
MOZILLA_HOME="`$PKG_CONFIG --variable=libdir firefox-gtkmozembed`"
fi
-if !(test -n "$MOZILLA_HOME"); then
+if test ! -e "$MOZILLA_HOME/libgtkembedmoz.so"; then
MOZILLA_HOME="`$PKG_CONFIG --variable=libdir xulrunner-gtkmozembed`"
fi
#if MOZILLA_HOME is still empty, try to detect without pkg_config
#(NOTE: any changes to this block should be kept in sync with the one in
monodevelop.in)
-if !(test -n "$MOZILLA_HOME"); then
+MOZFILE="libgtkembedmoz.so"
+find_libgtkembedmoz ()
+{
+ MOZDIR=$MOZILLA_FIVE_HOME
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+
+ MOZDIR=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"' -f 2 -d = |
head -n 1) #"
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+
mozilla_script=$(which mozilla 2> /dev/null)
firefox_script=$(which firefox 2> /dev/null)
- if test -n "$MOZILLA_FIVE_HOME"; then
- MOZILLA_HOME=$MOZILLA_FIVE_HOME
- elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null 2>&1 ; then
- MOZILLA_HOME=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"'
-f 2 -d = | head -n 1) #"
- elif test -n "$mozilla_script" ; then
- if grep "MOZ_DIST_LIB=" $mozilla_script > /dev/null; then
- MOZILLA_HOME=$(grep "MOZ_DIST_LIB=" $mozilla_script |
cut -d '"' -f 2 | cut -d '=' -f 2)
- elif grep "MOZILLA_FIVE_HOME=" $mozilla_script > /dev/null ;
then
- MOZILLA_HOME=$(grep "MOZILLA_FIVE_HOME="
$mozilla_script | cut -d '"' -f 2 | cut -d '=' -f 2)
- fi
- elif test -n "$firefox_script" ; then
- if grep "MOZ_DIST_LIB=" $firefox_script > /dev/null; then
- MOZILLA_HOME=$(grep "MOZ_DIST_LIB=" $firefox_script |
cut -d '"' -f 2 | cut -d '=' -f 2)
- elif grep "MOZILLA_FIVE_HOME=" $firefox_script > /dev/null ;
then
- MOZILLA_HOME=$(grep "MOZILLA_FIVE_HOME="
$firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2)
- elif grep "MOZILLA_LIBDIR=" $firefox_script > /dev/null ; then
- MOZILLA_HOME=$(grep "MOZILLA_LIBDIR=" $firefox_script |
cut -d '"' -f 2 | cut -d '=' -f 2)
- elif grep "moz_libdir=" $firefox_script > /dev/null ; then
- MOZILLA_HOME=$(grep "moz_libdir=" $firefox_script | cut
-d '"' -f 2 | cut -d '=' -f 2)
- fi
+
+ for runtime in "$mozilla_script $firefox_script"; do
+ if test ! -e "$runtime_script"; then continue; fi
+ MOZDIR=$(grep "MOZ_DIST_LIB=" $runtime_script | cut -d '"' -f 2
| cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "MOZILLA_FIVE_HOME=" $runtime_script | cut -d '"'
-f 2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "MOZILLA_LIBDIR=" $runtime_script | cut -d '"' -f
2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "moz_libdir=" $runtime_script | cut -d '"' -f 2 |
cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ done
+}
+
+MOZILLA_HOME=`find_libgtkembedmoz`
+
+if test -z "$MOZILLA_HOME"; then
+ if test "x$enable_aspnetedit" = "xyes"; then
+ AC_MSG_ERROR([Cannot detect Mozilla library directory.
AspNetEdit addin cannot be built.])
+ else
+ AC_MSG_WARN([Cannot detect Mozilla library directory.
WelcomePage addin may not be able to function.])
fi
- if test -z "$MOZILLA_HOME"; then
- if test "x$enable_aspnetedit" = "xyes"; then
- AC_MSG_ERROR([Cannot detect Mozilla library directory.
AspNetEdit addin cannot be built.])
- else
- AC_MSG_WARN([Cannot detect Mozilla library directory.
WelcomePage addin may not be able to function.])
- fi
- fi
fi
AC_SUBST(MOZILLA_HOME)
Modified: trunk/monodevelop/monodevelop.in
===================================================================
--- trunk/monodevelop/monodevelop.in 2007-09-19 23:36:07 UTC (rev 86053)
+++ trunk/monodevelop/monodevelop.in 2007-09-19 23:42:33 UTC (rev 86054)
@@ -16,30 +16,41 @@
echo "$ret"
}
+
#(NOTE: any changes to this block should be kept in sync with the one in
configure.in)
-mozilla_script=`which mozilla 2> /dev/null`
-firefox_script=`which firefox 2> /dev/null`
-if test -n "$MOZILLA_FIVE_HOME"; then
- MOZILLA_HOME=$MOZILLA_FIVE_HOME
-elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null 2>&1 ; then
- MOZILLA_HOME=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"' -f 2 -d
= | head -n 1)
-elif test -f @MOZILLA_HOME@/chrome/comm.jar ; then
+MOZFILE="libgtkembedmoz.so"
+find_libgtkembedmoz ()
+{
+ MOZDIR=$MOZILLA_FIVE_HOME
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+
+ MOZDIR=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"' -f 2 -d = |
head -n 1) #"
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+
+ mozilla_script=$(which mozilla 2> /dev/null)
+ firefox_script=$(which firefox 2> /dev/null)
+
+ for runtime in "$mozilla_script $firefox_script"; do
+ if test ! -e "$runtime_script"; then continue; fi
+ MOZDIR=$(grep "MOZ_DIST_LIB=" $runtime_script | cut -d '"' -f 2
| cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "MOZILLA_FIVE_HOME=" $runtime_script | cut -d '"'
-f 2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "MOZILLA_LIBDIR=" $runtime_script | cut -d '"' -f
2 | cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ MOZDIR=$(grep "moz_libdir=" $runtime_script | cut -d '"' -f 2 |
cut -d '=' -f 2)
+ if test -e "$MOZDIR/$MOZFILE"; then echo $MOZDIR; return; fi
+ done
+}
+
+if test -e "@MOZILLA_HOME@/$MOZFILE"; then
[EMAIL PROTECTED]@
-elif test -n "$mozilla_script" && grep "MOZILLA_FIVE_HOME=" $mozilla_script >
/dev/null ; then
- MOZILLA_HOME=`grep "MOZILLA_FIVE_HOME=" $mozilla_script | cut -d '"' -f
2 | cut -d '=' -f 2`
-elif test -n "$firefox_script" ; then
- if grep "MOZILLA_FIVE_HOME=" $firefox_script > /dev/null ; then
- MOZILLA_HOME=`grep "MOZILLA_FIVE_HOME=" $firefox_script | cut
-d '"' -f 2 | cut -d '=' -f 2`
- elif grep "MOZILLA_LIBDIR=" $firefox_script > /dev/null ; then
- MOZILLA_HOME=`grep "MOZILLA_LIBDIR=" $firefox_script | cut -d
'"' -f 2 | cut -d '=' -f 2`
- elif grep "moz_libdir=" $firefox_script > /dev/null ; then
- MOZILLA_HOME=`grep "moz_libdir=" $firefox_script | cut -d '"'
-f 2 | cut -d '=' -f 2`
+else
+ MOZILLA_HOME=`find_libgtkembedmoz`
+ if test ! -e "$MOZILLA_HOME/$MOZFILE"; then
+ echo "WARNING: Cannot find Mozilla directory containing
$MOZFILE. Some Addins may not be able to function. Please set MOZILLA_FIVE_HOME
to your Mozilla directory."
fi
fi
-if test -z "$MOZILLA_HOME"; then
- echo "Cannot find mozilla installation directory. Please set
MOZILLA_FIVE_HOME to your mozilla directory"
- exit 1
-fi
[EMAIL PROTECTED]@/lib/monodevelop/bin
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches