I just made an (untested) patch for 1.0 to use xulrunner. I'm
attaching it to this email. Note that you will have to re-run automake
and autoconf in order for the configure script and makefiles be
updated.

-Nathan

On Thu, May 04, 2006 at 08:17:35PM -0400, Nathan Conrad wrote:
> I have found the cause of Liferea crashing with xulrunner. I have
> patched the Liferea 1.1 development tree to support it. I expect that
> we will have a patch for 1.0 in the next few days.
> 
> The problem was that we were not setting the mozilla component path
> (using the gtk_moz_embed_set_comp_path(...) function).
> 
> -Nathan
> 
> On Wed, Feb 22, 2006 at 11:12:38AM +0200, Martin-Éric Racine wrote:
> > Package: liferea
> > Version: 1.0.4-1
> > Severity: wishlist
> > 
> > I'm not sure if this is already possible or not, but could liferea-mozilla 
> > be 
> > built against xulrunner components rather than the deprecated 
> > mozilla-broswer?
> > Thanks!
> 
> 
Index: configure.ac
===================================================================
RCS file: /cvsroot/liferea/liferea/configure.ac,v
retrieving revision 1.40
diff -u -r1.40 configure.ac
--- configure.ac        20 Feb 2006 23:04:08 -0000      1.40
+++ configure.ac        5 May 2006 06:49:39 -0000
@@ -31,7 +31,7 @@
 AC_ARG_ENABLE(dbus,    AS_HELP_STRING([--disable-dbus],[compile without DBUS 
support]),,enable_dbus=yes)
 AC_ARG_ENABLE(gtkhtml2,AS_HELP_STRING([--disable-gtkhtml2],[don't compile the 
gtkhtml2 backend]),,enable_gtkhtml2=yes)
 AC_ARG_ENABLE(gecko,   AS_HELP_STRING([--disable-gecko],[don't compile the 
Gecko backend]),,enable_gecko=yes)
-AC_ARG_ENABLE(gecko,   AS_HELP_STRING([--enable-gecko=ARG],[specify which 
Gecko provider to use ("mozilla" or "firefox")]),,enable_gecko=yes)
+AC_ARG_ENABLE(gecko,   AS_HELP_STRING([--enable-gecko=ARG],[specify which 
Gecko provider to use ("mozilla", "firefox", or 
"xulrunner")]),,enable_gecko=yes)
 AC_ARG_ENABLE(gnutls,  AS_HELP_STRING([--enable-gnutls],[Attempt to use GNUTLS 
for SSL support @<:@default=yes@:>@]),,enable_gnutls=yes)
 
 AC_CHECK_FUNCS([strsep getaddrinfo])
@@ -99,6 +99,11 @@
 dnl Mozilla
 dnl *******
 
+if test "x$enable_gecko" = "xyes" -o "x$enable_gecko" = "xxulrunner" ; then
+   gecko_provider=xulrunner
+   PKG_CHECK_MODULES(MOZILLA, $gecko_provider-gtkmozembed, enable_mozilla=yes, 
enable_mozilla=no)
+   AC_MSG_RESULT($gecko_provider: $enable_mozilla)
+fi
 if test "x$enable_gecko" = "xyes" -o "x$enable_gecko" = "xmozilla" ; then
    gecko_provider=mozilla
    PKG_CHECK_MODULES(MOZILLA, $gecko_provider-gtkmozembed, enable_mozilla=yes, 
enable_mozilla=no)
@@ -132,7 +137,7 @@
    MOZILLA_INCLUDE_ROOT=`dirname $MOZILLA_INCLUDE_ROOT`
    MOZILLA_LIB_ROOT=`$PKG_CONFIG --libs-only-L $gecko_provider-gtkmozembed | 
awk '{print $1}' |  cut -c 3-`
    MOZILLA_LIB_DIR_SEARCH="look_for_mozilla \"$MOZILLA_LIB_ROOT\""
-   
+   MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $gecko_provider-gtkmozembed`"  
 
    dnl Maybe we don't need all of this...
    MOZILLA_CFLAGS="$MOZILLA_CFLAGS \
 -I$MOZILLA_INCLUDE_ROOT \
@@ -175,6 +180,7 @@
 -I$MOZILLA_INCLUDE_ROOT/xpcom \
 -I$MOZILLA_INCLUDE_ROOT/xpconnect"
 
+   AC_SUBST([MOZILLA_HOME])
    AC_SUBST(MOZILLA_CFLAGS)
    AC_SUBST(MOZILLA_LIBS)   
    AC_SUBST(MOZILLA_LIB_DIR_SEARCH)
Index: src/mozilla/Makefile.am
===================================================================
RCS file: /cvsroot/liferea/liferea/src/mozilla/Makefile.am,v
retrieving revision 1.11
diff -u -r1.11 Makefile.am
--- src/mozilla/Makefile.am     30 Sep 2005 23:03:20 -0000      1.11
+++ src/mozilla/Makefile.am     5 May 2006 06:49:40 -0000
@@ -9,7 +9,7 @@
        mozilla.cpp mozilla.h
 
 liblihtmlm_la_LIBADD = $(PACKAGE_LIBS) $(MOZILLA_LIBS) $(INTLLIBS)
-liblihtmlm_la_CFLAGS = $(MOZILLA_CFLAGS) $(PACKAGE_CFLAGS)
+liblihtmlm_la_CFLAGS = $(MOZILLA_CFLAGS) $(PACKAGE_CFLAGS) 
-DMOZILLA_HOME=\""$(MOZILLA_HOME)\""
 liblihtmlm_la_CXXFLAGS = $(MOZILLA_CFLAGS) $(PACKAGE_CFLAGS)
 
 if PLATFORM_WIN32
Index: src/mozilla/mozembed.c
===================================================================
RCS file: /cvsroot/liferea/liferea/src/mozilla/mozembed.c,v
retrieving revision 1.48
diff -u -r1.48 mozembed.c
--- src/mozilla/mozembed.c      5 Feb 2006 02:27:32 -0000       1.48
+++ src/mozilla/mozembed.c      5 May 2006 06:49:40 -0000
@@ -263,7 +263,7 @@
        
        /* init mozilla home */
        g_unsetenv("MOZILLA_FIVE_HOME");
-       gtk_moz_embed_set_comp_path(NULL);
+       gtk_moz_embed_set_comp_path(MOZILLA_HOME);
 
        /* set a path for the profile */
        profile = g_build_filename(g_get_home_dir(), ".liferea/mozilla", NULL);

Reply via email to