Recommend this page to a friend! |
GtkMozEmbed Screenshot | > | All threads | > | can't compile succesfully | > | (Un) Subscribe thread alerts |
|
![]() Hello
I need some explanation because I fail with the steps to compile php-gtk with mozembed.. In other cases I can compile the other extensions but not mozembed. After the patch, the configure step don't recognize libxul-dev package and skip this extension. Can you tell me how to correct this ? Thanks
![]() try to apply patch by hand (that's how i did) and see if it works
start from the beginning extract php-gtk source, apply patch by hand and then do the rest, ./buildconf , ./configure --with-mozembed , make && make install if that doesn't work, maybe you can post the ./configure log somewhere so i can take a look.
![]() Here is how I got this working in Ubuntu 9. Hope this helps someone, as it took me hours to get it right.
sudo apt-get install php5-cli php5-dev libglib2.0-dev libgtk2.0-dev xulrunner-1.9-dev re2c wget http://gtk.php.net/do_download.php?download_file=php-gtk-2.0.0.tar.gz tar -xzvf php-gtk-2.0.0.tar.gz cd php-gtk-2.0.0 ./buildconf ./configure --with-mozembed make sudo make install #edit php.ini for your php CLI to include: extension=php-gtk2.so export LD_LIBRARY_PATH=/usr/lib/xulrunner-1.9.0.13 export MOZILLA_FIVE_HOME=/usr/lib/xulrunner-1.9.0.13
![]() Thanks
I have now Ubuntu 9.04 with php 5 and php-gtk 2.0.0 working some months ago; the set up of this php extension needs: * download a copy of php-gtk-2.0.0 sources from gtk.php.net, * install with synaptic php5-dev package and others like above ******PATCH A SYSTEM FILE******* very important: --begin of bash script file---copy and paste on a file-------------------- #!/bin/bash FECHA=`date +%Y%m%d%H%M%S` cd /usr/share/aclocal cp libtool.m4 libtool.m4.$FECHA chmod 777 libtool.m4 cat lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 >>libtool.m4 chmod 644 libtool.m4 --end of file------------------------------------------------------------- run this script with root privileges in gnome-terminal: sudo bash name_of_file As you can see this change is reversible because the backup file made * uncompress the source files in a clean directory ******PATCH SOME SOURCE FILES****** very important: -patch file---- f60e601e7.txt--------------------------------------------- Index: ext/mozembed/README =================================================================== RCS file: /repository/php-gtk/ext/mozembed/README,v retrieving revision 1.2 diff -u -8 -p -r1.2 README --- ext/mozembed/README 22 Jun 2006 03:11:13 -0000 1.2 +++ ext/mozembed/README 4 May 2008 22:32:47 -0000 @@ -1,11 +1,11 @@ LICENSE: Mozilla Public License / (Optionally LGPL/GPL) AUTHOR: Mozilla.org URL: http://lxr.mozilla.org/mozilla/source/embedding/browser/gtk/src/ GtkMozembed is a widget that allows you to embed the Mozilla engine in your Gtk+ applications. Check the demos/ directory for sample script(s). -You need to add the --enable-mozembed switch to your ./configure statement when +You need to add the --with-mozembed switch to your ./configure statement when you build PHP-GTK 2 in order to enable this extension. NOTE: This extension is currently supported only on the *nix platform. Index: ext/mozembed/config.m4 =================================================================== RCS file: /repository/php-gtk/ext/mozembed/config.m4,v retrieving revision 1.3 diff -u -8 -p -r1.3 config.m4 --- ext/mozembed/config.m4 28 May 2007 23:53:33 -0000 1.3 +++ ext/mozembed/config.m4 4 May 2008 22:32:47 -0000 @@ -1,27 +1,32 @@ dnl $Id: config.m4,v 1.3 2007/05/28 23:53:33 anant Exp $ dnl config.m4 for mozembed module define(firefox_required_version, 1.5.0) define(mozilla_required_version, 1.7.0) +define(xulrunner_required_version, 1.7.0) #Just a wild guess PHP_GTK_ARG_WITH(mozembed,for GtkMozEmbed support, [ --with-mozembed Enable GtkMozEmbed support],no) dnl first check for firefox, then mozilla if test "$PHP_GTK_MOZEMBED" != "no"; then PKG_CHECK_MODULES(MOZEMBED, [firefox-gtkmozembed >= firefox_required_version], have_mozembed=yes, have_mozembed=no) if test "$have_mozembed" != "yes"; then PKG_CHECK_MODULES(MOZEMBED, [mozilla-gtkmozembed >= mozilla_required_version], have_mozembed=yes, have_mozembed=no) fi if test "$have_mozembed" != "yes"; then - AC_MSG_RESULT([Unable to locate firefox-gtkmozembed version firefox_required_version or mozilla-gtkmozembed version mozilla_required_version or higher: not building]) + PKG_CHECK_MODULES(MOZEMBED, [xulrunner-gtkmozembed >= xulrunner_required_version], + have_mozembed=yes, have_mozembed=no) + fi + if test "$have_mozembed" != "yes"; then + AC_MSG_RESULT([Unable to locate firefox-gtkmozembed version firefox_required_version, mozilla-gtkmozembed version mozilla_required_version, xulrunner-gtkmozembed xulrunner_required_version or higher: not building]) else AC_DEFINE(HAVE_MOZEMBED, 1, [mozembed support]) PHP_EVAL_INCLINE($MOZEMBED_CFLAGS) if test "$php_gtk_ext_shared" = "yes"; then PHP_EVAL_LIBLINE($MOZEMBED_LIBS, MOZEMBED_SHARED_LIBADD) PHP_SUBST(MOZEMBED_SHARED_LIBADD) else PHP_EVAL_LIBLINE($MOZEMBED_LIBS, PHP_GTK2_SHARED_LIBADD) -----------end of file-------------------------------------------------- Apply this patch by hand modifying the files with text editor replacing the needed blocks * in gnome-terminal: cd /php_gtk_source_directory ./buildconf ./configure --with-mozembed make sudo make install (only if make was successful) *modify php.ini (with root permissions) in /etc/php5/cli to include the line: extension=php-gtk2.so *in gnome-terminal, run the demo php script within ext/mozembed directory of source to confirm that all is working I choose for php-gtk2.0.0 because in 2.0.1 I don't have gtkstatusicon class in it I hope that this can help somebody |
info at phpclasses dot org
.