Re[2]: [PHP-GTK-DEV] GtkScintilla for Windows
| From: | Tom Rogers | Date: | Sun, 10 Jun 2007 04:00:34 +0000 |
| Subject: | Re[2]: [PHP-GTK-DEV] GtkScintilla for Windows | ||
| References: | 1 2 3 4 5 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-3828@lists.php.net to get a copy of this message | ||
Hi,
Friday, June 8, 2007, 11:07:05 PM, you wrote:
ES> Thanks Tom, but Scintilla builds right "out of the box" as both a static
ES> lib and .dll on windows, not an issue really.
ES> The problem is there are two extensions here we're talking about based
ES> on two different "base" libraries that do basically the same thing.
ES> 1. Is gtkscintilla from
ES> http://sourceforge.net/project/showfiles.php?group_id=31426 .
ES> Really
ES> it's a wrapper around the scintilla library that makes it act more
ES> "gtk-ish" What makes this a good choice? A lot of linux distros use
ES> this already, it builds as an .so "out of the box". What makes it a bad
ES> choice? My biggest issue is it's completely unmaintained. The last
ES> release was in 2003, and it doesn't build without some code hacking on
ES> windows. We'd basically have to support gtkscintilla in some way ourselves.
ES> 2. Is straight scintilla from http://www.scintilla.org/ .
ES> This is the
ES> actual underlying library. What makes this a good choice? Well
ES> maintained, new releases, bugfixes on a regular basis, builds "out of
ES> the box" as both .dll and static lib on windows. What makes it a bad
ES> choice? The only makefile provided builds a static linux library (.a),
ES> so there's no .so that's routinely distributed on *nix like
ES> gtkscintilla. We could bundle the library with a makefile to generate
ES> an .so or figure out how to use the php-gtk build system to build the
ES> static library first and then link it with the php-gtk build system, but
ES> as I said before I'm not a *nix user and Anant can't figure out how to
ES> do it.
ES> Personally I'm not a fan of trying to upgrade and maintain gtkscintilla,
ES> so I'd prefer the straight scintilla solution, besides the fact that I
ES> really don't have time to be hacking up the source to get it cooperating
ES> on windows with MSVC. The PyGTK extension has moved to straight
ES> scintilla as well. Anant would prefer the gtkscintilla solution since
ES> it would require no work on the *nix end.
ES> Anyone else have some thoughts on which would be the "better" solution?
ES> Would someone with autotools experience willing to step up and figure
ES> out how to bundle the scintilla library and get it building easily on
ES> *nix to distribute with php-gtk? That is the main issue with option 2.
ES> Or would someone be willing to take over support and maintainence of the
ES> gtkscintilla wrapper (including getting it building with MSVC on
ES> windows, updating the bundled scintilla lib, and fixing bugs?) since
ES> distributing something based on an unmaintained library is not really
ES> the best idea.
ES> Anyway, just my views on this subject (we keep going around and around
ES> here...)
I took the plunge and tried to compile php-gtk on linux, it builds the
basic gtk stuff and a simple script works, When it came to the
extensions it took a lot of fiddling to get it to do scintilla as a
module but it insists on doing scintilla before gtk which results in a
lot of bad symbols. What is the state of modules in linux? My
knowledge of the config.m4 system is very limited. Even libglade will
not build. What am I missing? Here is a copy of the config.m$ I made:
dnl $Id: config.m4,v 1.9 2003/06/28 02:09:06 alan_k Exp $
dnl config.m4 for scintilla module
PHP_GTK_ARG_WITH(scintilla,for GtkScintilla support,
[ --with-scintilla Enable GtkScintilla support])
if test "$PHP_GTK_SCINTILLA" != "no"; then
for x in /usr/src/scintilla; do
if test -f $x/include/Scintilla.h; then
SCINTILLA_DIR=$x
SCINTILLA_INCDIR=$x/include
SCINTILLA_LIBDIR=$x/bin
fi
done
if test -z "$SCINTILLA_DIR"; then
AC_MSG_ERROR(Cannot locate SCINTILLA)
fi
AC_DEFINE(HAVE_SCINTILLA,1,[scintilla support])
PHP_ADD_INCLUDE($SCINTILLA_INCDIR)
if test "$php_gtk_ext_shared" = "yes"; then
PHP_ADD_LIBRARY_WITH_PATH(scintilla, $SCINTILLA_LIBDIR, SCINTILLA_SHARED_LIBADD)
PHP_SUBST(SCINTILLA_SHARED_LIBADD)
else
PHP_ADD_LIBRARY_WITH_PATH(scintilla, $SCINTILLA_LIBDIR, PHP_GTK_SHARED_LIBADD)
fi
PHP_GTK_EXTENSION(scintilla, yes, php_scintilla.c gen_scintilla.c,,-DCOMPILE_DL_SCINTILLA2=1)
fi
--
regards,
Tom