Re: [Gimp-developer] pygimp on windows? success!

2005-06-26 Thread Michael Schumacher
lode leroy wrote:

 Ah, now it starts up, and the Python-fu is there... yippee!

It should do so now out of the box, at least in current CVS... maybe
except for the interp file, but we should be able to fix this today.

 And now lets hope some autotools-wizard can deduce from this mail what
 needs to change...

This has been done yesterday by yosh and me. I have to say that I'm
surprised that it did work for you, as we had to change the
gimpinterpreterdb.c file in order to make it work...

Nevertheless, your mail provided some important hints that helped to
finally get pygimp part of the regular win32 build of GIMP. So starting
with GIMP 2.4, we will have Python as an additional scripting language -
one that can probably considered to be more standard than Scheme.

Thanks again for your input!

If you want to continue to work on scripting, and get even more
scripting languages to GIMP on the windows plattform, there is
gimp-perl, some java classes, a ruby binding and iirc even something for
Tcl... :)


Michael

-- 
The GIMP  http://www.gimp.org  | IRC: irc://irc.gimp.org/gimp
Wiki  http://wiki.gimp.org | .de: http://gimpforum.de
Plug-ins  http://registry.gimp.org |
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] pygimp on windows? success!

2005-06-26 Thread Joao S. O. Bueno Calligaris
On Sunday 26 June 2005 11:19, Michael Schumacher wrote:
 lode leroy wrote:
  Ah, now it starts up, and the Python-fu is there... yippee!

 It should do so now out of the box, at least in current CVS...
 maybe except for the interp file, but we should be able to fix this
 today.


Horraayy!!!  :-)

(...)
 Thanks again for your input!

 If you want to continue to work on scripting, and get even more
 scripting languages to GIMP on the windows plattform, there is
 gimp-perl, some java classes, a ruby binding and iirc even
 something for Tcl... :)

And there was the guy asking for a Lua interpreter, and I rememeber 
someone was working on GIMP-C# 




 Michael
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] pygimp on windows? success!

2005-06-26 Thread Michael Schumacher
Joao S. O. Bueno Calligaris wrote:
 On Sunday 26 June 2005 11:19, Michael Schumacher wrote:

If you want to continue to work on scripting, and get even more
scripting languages to GIMP on the windows plattform, there is
gimp-perl, some java classes, a ruby binding and iirc even
something for Tcl... :)
 
 And there was the guy asking for a Lua interpreter, and I rememeber 
 someone was working on GIMP-C# 

Gimp# is actively maintained: http://sourceforge.net/projects/gimp-sharp/

The Lua interpreter is handled in this bug report:
http://bugzilla.gnome.org/show_bug.cgi?id=171831
Apparently, there is already some code, see comment #12 - yes, I know
that's my comment, but I don't have the code.


HTH,
Michael

-- 
The GIMP  http://www.gimp.org  | IRC: irc://irc.gimp.org/gimp
Wiki  http://wiki.gimp.org | .de: http://gimpforum.de
Plug-ins  http://registry.gimp.org |
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] pygimp on windows? success!

2005-06-25 Thread Nathan Summers
On 6/24/05, Alan Horkan [EMAIL PROTECTED] wrote:
 
 On Fri, 24 Jun 2005, Michael Schumacher wrote:
 
  Great work! Seems like we will finally have pygimp 2.4 for GIMP 2.4 on each
  of the officially supported platforms. Hm, how about letting
  Script-Fu/Tiny-Fu die in favor of it? ;)
 
 The best thing about Script-Fu has been knowing it would be available and
 included in the 'default install'.  Many existing scripts are written in
 Script-Fu and as you know we still regularly get users asking how to get
 and old script to work with the current version.
 
 From a technical standpoint it is great that Python and Perl subsystems
 are well achitectured and entirely seperable but the failure of
 distributors to include them in the 'default install' or even bother to
 build them has dicouraged people from using them.  Making it possible to
 leave things out is different from it being a good idea to leave things
 out and I do not think users are given the best impression of the GIMP
 because to the ordinary user if it is not installed it may as well not
 exists.
 
 My point is Script-Fu remains useful despite it's flaws and I am concerned
 by the potential side-effects of killing it off.

Agreed!  There is great value in having a scripting interface that is
guaranteed to be present in any gimp installation.  Regardless of how
hard we implore, people are quite simply not going to universally
include script-fu in their gimp packages if we package it separately
ourselves.  That is human nature.  While I think it would be great to
replace script-fu with tiny-fu, it would be a big mistake to ship a
gimp tarball that doesn't include either.

Rockwalrus
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] pygimp on windows? success!

2005-06-24 Thread lode leroy



Python's module mechanism doesn't recognize the dll files as a python
module. Once you solve this (e.g. add or remove the compiler or linker flag
that makes it work or break resp.), it should work.


well, the first problem just now is that there is no .dll resulting from
the autotools compilation of the pygimp module.

I guess libtool should have produced a .dll file, as no-one mentions a 
problem with that...

So check the logs from 'make'

$ make clean; make
there we have it:

*** Warning: linker path does not have real file for library -lpython24.
*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module gimpmodule.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

Aha! So I edited the Makefile, to add the missing path. and now alt least I 
have a dll,
although its called 'gimpmodule.dll'... suppose I can just rename that to 
gimp.dll...


It is a python module (actually two of them), but even if you make sure 
that
python should find them (either by a .pth file in python's 
Lib/site-packages

directory or by copying it there, it doesn't work.


Didn't get a pth file from autotools...
So what am I supposed to do now?
Do I simply put the dll in site-packages?

Hmm... that seems to have worked!

make install should be convinced to do this for me :-)

[or is this what the pth is about? do I need it to tell that gimp is in 
gimpmodule.dll?]


Gimp now loads the .py files and now they complain about
gimpfu module and no longer about the gimp module !!!

Ah, I needed to modify environ/pygimp.env

Good.
Now it's the _gimpenums module... hmm... there is no dll for this one 
either...


The only difference I see is that Makefile.am seems to be missing 
$(no_undefined) for _gimpenumsmodule.


Ah. got the dll now!
Same for gimpcolormodule...

damn. Now I get undefined reference to `gimp_rgba_parse_css'
and it is missing from  'gimpcolor.def

$ for f in /target/lib/gimp/2.0/python/*module.dll; do cp $f ${f/module/}; 
done


Ah, now it starts up, and the Python-fu is there... yippee!


And now lets hope some autotools-wizard can deduce from this mail what needs 
to change...


The detection of python on msys is not too good:
$ python -c 'import sys; print sys.exec_prefix'
c:\Python24

which needs to be
c:/Python24

so I added a few [ | tr '' '/' ]'s  in configure, but I suppose it needs 
to go in some

other file... maybe I need an updated python.m4 (msys has aclocal-1.7)?


___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] pygimp on windows? success!

2005-06-24 Thread Michael Schumacher
 Von: lode leroy [EMAIL PROTECTED]

 Aha! So I edited the Makefile, to add the missing path. and now alt least
 I have a dll, although its called 'gimpmodule.dll'... suppose I can just 
 rename that to gimp.dll...

 Didn't get a pth file from autotools...
 So what am I supposed to do now?

Write one yourself. This is something that should be done by the gimp
installer.

 Do I simply put the dll in site-packages?
 
 Hmm... that seems to have worked!
 
 make install should be convinced to do this for me :-)
 
 [or is this what the pth is about? do I need it to tell that gimp is in 
 gimpmodule.dll?]

pth files include additional paths for python to look for modules. Copying
the DLLs to site-packages is another way to do this.

 Gimp now loads the .py files and now they complain about
 gimpfu module and no longer about the gimp module !!!
 
 Ah, I needed to modify environ/pygimp.env
 
 Good.
 Now it's the _gimpenums module... hmm... there is no dll for this one 
 either...
 
 The only difference I see is that Makefile.am seems to be missing 
 $(no_undefined) for _gimpenumsmodule.

Maybe this was the problem...

 Ah. got the dll now!
 Same for gimpcolormodule...
 
 damn. Now I get undefined reference to `gimp_rgba_parse_css'
 and it is missing from  'gimpcolor.def

This is a problem in GIMP itself then, the function has to be added to the
def file. 

 $ for f in /target/lib/gimp/2.0/python/*module.dll; do cp $f ${f/module/};
 done
 
 Ah, now it starts up, and the Python-fu is there... yippee!

Did I get this right - Python is picky about the name of the module files?

 And now lets hope some autotools-wizard can deduce from this mail what
 needs 
 to change...

Some -o adjustements, adding the no-undefined ... 

 The detection of python on msys is not too good:
 $ python -c 'import sys; print sys.exec_prefix'
 c:\Python24
 
 which needs to be
 c:/Python24

I have these in my CPPFLAGS and LDFLAGS, so the headers etc... get found


Great work! Seems like we will finally have pygimp 2.4 for GIMP 2.4 on each
of the officially supported platforms. Hm, how about letting
Script-Fu/Tiny-Fu die in favor of it? ;)



Michael


-- 
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] pygimp on windows? success!

2005-06-24 Thread Alan Horkan

On Fri, 24 Jun 2005, Michael Schumacher wrote:

 Great work! Seems like we will finally have pygimp 2.4 for GIMP 2.4 on each
 of the officially supported platforms. Hm, how about letting
 Script-Fu/Tiny-Fu die in favor of it? ;)

The best thing about Script-Fu has been knowing it would be available and
included in the 'default install'.  Many existing scripts are written in
Script-Fu and as you know we still regularly get users asking how to get
and old script to work with the current version.

From a technical standpoint it is great that Python and Perl subsystems
are well achitectured and entirely seperable but the failure of
distributors to include them in the 'default install' or even bother to
build them has dicouraged people from using them.  Making it possible to
leave things out is different from it being a good idea to leave things
out and I do not think users are given the best impression of the GIMP
because to the ordinary user if it is not installed it may as well not
exists.

My point is Script-Fu remains useful despite it's flaws and I am concerned
by the potential side-effects of killing it off.

Better go and improve my python skills...

- Alan H.
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer