Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Maze 5-0.8.1

Sun Nov 20, 2011 12:31 am

I am trying to compile this for Windows 32 bit.In order to install you need to install Scons first.A build utility.

So i downloaded the local version of Scons and by just copying those files into a package of src files i want to compile i can then open Msys terminal , cd to the directory, and type
python scons.py
This works excellent, but for some reason the utility can not find my cairo header files.
cairo-pdf.h and cairo-svg.h

My question is this
Is there a way to add a path to either my profile file, or to the Windows xp environment variable that will allow Scons to find those header files in my Cairo directory?
/opt/include/cairo or usr/gtk/include/cairo ?


Any help would be greatly appreciated.
Thanks.

Re: Maze 5-0.8.1

Sun Nov 20, 2011 12:40 am

I vaguely remembered compiling this cool plugin many years ago in Linux and you needed to separately have Cairo installed as I recall. Believe samj actually compiled the last version for Windows GIMP so you can ask her. Not sure if she ever compiled the new version or not but believe I sort have hinted that to her a few months back. :)

Some recent threads started at the registry too:

http://registry.gimp.org/node/25281

http://registry.gimp.org/node/25235#comment-11524 (samj's entry).

Re: Maze 5-0.8.1

Sun Nov 20, 2011 12:46 am

By the way, if you get 5-0.8.1 working for Window's GIMP, I would be much abliged to test it with GIMP 2.6.11 Rod. :)

Re: Maze 5-0.8.1

Sun Nov 20, 2011 1:46 am

Thanks for the info Lyle.Guess i will have to talk to SamJ then.
If i get it compiled i will indeed send you a link to download and test the plugin. :)

Re: Maze 5-0.8.1

Sun Nov 20, 2011 9:51 am

This one might be difficult in windows, it needs perl. Not too difficult in Mepis11 (Debian)

The compilation uses a perl script 'xmltoman' that I had to dig up + a perl-parser package.

Image

and a screenshot of the dialog

http://i.imgur.com/fSgKa.jpg

Re: Maze 5-0.8.1

Sun Nov 20, 2011 4:11 pm

rich2005 wrote:This one might be difficult in windows, it needs perl. Not too difficult in Mepis11 (Debian)

The compilation uses a perl script 'xmltoman' that I had to dig up + a perl-parser package.

Image

and a screenshot of the dialog

http://i.imgur.com/fSgKa.jpg


Actually Gimp uses Perl.
use XML::Parser; works for calling that to configure into the build, but cairo still isn't found.
Here is the error...
Code:
Compaq_Owner@Family-Room /c/src/plugins/maze5-0.8.1
$ python scons.py use XML::Parser;
scons: Reading SConscript files ...
Checking for cairo_pdf_surface_create() in C library cairo... (cached) no
Checking for cairo_svg_surface_create() in C library cairo... (cached) no
Checking for cairo_image_surface_create() in C library cairo... (cached) no

***
*** cairo not found. Standalone executable was not built! ***
***


scons: warning: Ignoring missing SConscript 'tests\SConscript'
File "C:\src\plugins\maze5-0.8.1\SConstruct", line 92, in <module>
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Do not know how to make File target `use' (C:\src\plugins\maze5-0.8.1\use).  Stop.
scons: building terminated because of errors.

Compaq_Owner@Family-Room /c/src/plugins/maze5-0.8.1
$

Re: Maze 5-0.8.1

Sun Nov 20, 2011 4:30 pm

What is really strange is i have tried placing those two needed header files into the maze src folder and adding
#include <src/cairo-pdf.h> and
#include <src/cairo-svg.h>
to the SConscript file...

Still doesn't work.Something is trying to call them from /usr/include/cairo.
I need to figure out a way for SConstruct script to find my build location directories and not the default /usr/

Re: Maze 5-0.8.1

Sun Nov 20, 2011 5:14 pm

Did you do a search within the files to see if and where that path is being called?

Re: Maze 5-0.8.1

Sun Nov 20, 2011 7:12 pm

What i believe SConstruct does it take all the CPPFLAGS in the env=Environment tag and uses those to build the plugin.(these files would be included in the plugin src files you download).So this is the environment it uses now (its own).
Code:
env=Environment(
    CC='gcc',CCFLAGS=['-g','-Wall','-D_GNU_SOURCE','-DVERSION=\\"'+VERSION+'\\"'],
    ENV = os.environ,
    TARFLAGS=['-cz']


I also tried -
Code:
python scons.py USE XML::Parser; "env.Append CPPFLAGS=-I/usr/gtk/include"

To try and add my gtk/include files within the build...
That didn't work either.

Re: Maze 5-0.8.1

Sun Nov 20, 2011 7:17 pm

mahvin wrote:Did you do a search within the files to see if and where that path is being called?

I believe within the src/cairo.c file
Code:
/**
* \file mazecairo.c
* \author Bernd Breitenbach
* \remarks
*      bb - Aug 13, 2006: Created.
*/

#define OMIT_DEBUG
#include <stdio.h>
#include <math.h>
#include <assert.h>

#include <cairo.h>
#ifdef WITH_CAIRO_PDF
#include <cairo-pdf.h>
#endif
#ifdef WITH_CAIRO_SVG
#include <cairo-svg.h>
#endif

#include "render.h"
#include "maze.h"
#include "cell.h"
#include "stroke.h"
#include "cairo.h"


Is it possible to add a direct path here?
#include <usr/gtk/include/cairo/cairo-svg.h>
#include <usr/gtk/include/cairo/cairo-pdf.h>

Re: Maze 5-0.8.1

Sun Nov 20, 2011 7:40 pm

I guess my advice would be for the developer of this plugin to utilize the local version of SCons and include it within the package.This would allow anyone to compile it.They wouldn't have to have SCons installed to build it.
Also to include all the necessary CPPFLAGS files within the src folder, so any system could find them.

Re: Maze 5-0.8.1

Sun Nov 20, 2011 7:47 pm

You're still speaking Geek (or is it Greek) to me Rod. lol

Still hope you get it to work; would like the current version of Maze5. :)

Re: Maze 5-0.8.1

Mon Nov 21, 2011 7:18 am

Someone on Filter Forge just requested this be built into a Filter Forge plugin. :)
Not sure if that is possible with the scripting though.

Re: Maze 5-0.8.1

Sun Nov 27, 2011 8:52 am

maze5.zip
this is maze5-0.8.1 for gimp windows 32bits

if you want to compile yourself
you can use this makefile
copy it to the src folder
then make
Code:
CC=gcc

GIMPTOOL=gimptool-2.0

GIMP_LDFLAGS=`$(GIMPTOOL) --libs`
GIMP_CFLAGS=`$(GIMPTOOL) --cflags`

DEFS=-DWITH_CAIRO_PDF=1 -DWITH_CAIRO_SVG=1 -DWITH_CAIRO_IMAGE=1
#DEFS=

ADDITIONAL_CFLAGS=
ADDITIONAL_LDFLAGS=-lfreetype -lexpat -lpthread -lgimp-2.0 -lglib-2.0 -lz -lm

CFLAGS=-g -Wall -O3 $(DEFS) $(GIMP_CFLAGS) $(ADDITIONAL_CFLAGS)
LDFLAGS=$(GIMP_LDFLAGS) $(ADDITIONAL_LDFLAGS)

all: maze5 maze5S

install: maze5
   $(GIMPTOOL) --install-bin maze5

maze5: gimp.o structure.o maze.o theta.o cell.o wall.o stroke.o render.o carve.o
   $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
   
maze5S: main.o cairo.o structure.o maze.o theta.o cell.o wall.o stroke.o render.o carve.o
   $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

clean:
   -rm -f *~ *.o maze5.exe maze5S.exe

Re: Maze 5-0.8.1

Sun Nov 27, 2011 9:37 am

Thanks James! :)

Re: Maze 5-0.8.1

Sun Nov 27, 2011 10:07 am

Thank :jumpclap :jumpclap :jumpclap ,cool have the new version :yes

Re: Maze 5-0.8.1

Sun Nov 27, 2011 4:26 pm

Thanks a heap James; been wanting to try Theta out. :)
Post a reply