[gcompris-devel] Some questions/suggests....

Olivier Samyn osamyn at ulb.ac.be
Fri Feb 14 08:18:01 UTC 2003


Hi all,

I began yesterday to code the python bingings for gcompris.

I decided to create a special plugin (board type) that will handle the
python's calls. I decided that the true board code will be placed in a
python file (*.py) having the same name as the board's name attribute.

For example, in the board xml file you put: 
...
<GCompris>
 <Board 
       name="myboard"
       type="pythonboard"
       ...
...


The python plugin will look for a file named "myboard.py" and execute
it. Simple isn't it ?

But here comes the first question: Is this approach valid ? Does anyone
have remarks ?

And following, the secod question: Where does I have to put the pythons
files ? I think I have two possible options: somewhere in the
$prefix/lib/gcompris directory or in the $prefix/share/gcompris.

For my part, I prefer the first solution since the python code can be
viewed as an executable code like the plugins(with a special type). So I
thinks I'll put the *.py files in $prefix/lib/gcompris/python 

What about this option ?

After those architectures questions, here are some gcompris questions.
I've seen there are four unused plugins functions. What about those
functions ?  what are their behaviour ? is there some examples
illustrating their use ? Does I have to create a python wrapper for them
or not ?

The functions I'm speaking about are (copying from plugin.h):
  typedef void (*GcomprisConfig)(); // and it's use in the plugin struct
  void (*about) (void);         /* Show the about box */
  void (*configure) (void);     /* Show the configuration dialog */


After all those questions, here are some suggests:
- Remove the .xml.in an makefiles from the installation process. I got
all those files in my $prefix/share/gcompris directory.
- Some gnome 1.x macros or constructs are use in the configure file.
Replacing those with pkg-config macros will be a good idea (since
gcompris uses gnome 2.x) Especially for the libxml checks.

That's all for today...

I'm waiting for your feedback...

-- 
Ir. Olivier Samyn <osamyn at ulb.ac.be>





More information about the Gcompris-devel mailing list