[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-devel] New code base released!
From: |
Alexandre Courbot |
Subject: |
[Adonthell-devel] New code base released! |
Date: |
Sun, 8 Jun 2003 22:20:38 +0200 |
User-agent: |
KMail/1.5 |
Yaaaaaay! It's done! It works! (at least, you'll tell me! ;))
You can get the new code base for testing at
http://www.gnurou.org/adonthell-stuff/adonthell-0.4dev1.tar.gz
It's all new, functionnal and tuned for convenience, although there is still
some work to be done (code moving, python callback completions for cases
others than the examples, and documentation). But I wanted to get your
opinion on it.
The first noticeable thing is that there is a much better usage of libtool's
facilities. Thanks to it, the code should be easy to compile everywhere. The
libltdl helper library is included with the code. It is part of libtool and
is made to be included into projects like we did. It handles dynamic loading
of shared libraries (our gfx and input backends) a portable way.
Also for portability convenience, it is now possible to build adonthell in a
directory different from the sources. I'd even recommand it to keep your
sources clean. Consider doing the following thing:
$ tar xvzf adonthell-0.4dev1.tar.gz
.....
$ mkdir build-x86
$ cd build-x86
$ ../adonthell-0.4dev1/configure && make
The builddir will be build-x86 and this is there that you'll find all the
binaries and libs. Of course, you can make install from there too, and if you
change a file in the source tree, it will be recompiled, etc. The interest of
this is that instead of having two sources copies when you want to
cross-build for windows or for another platform (mac, qtopia, ...) you just
need to create another build directory and re-run configure from there.
Now a bit more on the sources (I'll have to write a doc on this):
-The src/ directory is made of the several modules (base, gfx, input and
python for now). Nothing special from there. Modules that use backends have
them in subdirectories (for instance, the sdl gfx backend sources is located
in gfx/sdl).
I've moved all the wrappers in the py-wrappers directory. You'll notice there
is an 'adonthell' directory there. You'll soon understand why.
The current source builds two binary programs: callbacktest (which is of no
real interest, excepted for my own tests) and inputtest (which is far more
interesting). You'll also notice that there is a inputtest.py file (in the
source dir, not the build dir, contrary to the binaries.
Notice the .sh scripts that have been built in src/. These are wrappers to
allow you to run C++ or Python programs without having to install everything.
Actually, libtool already makes wrappers programs. If you look at inputtest
for instance, you'll notice that it is a shell script that sets the
environment so the 'real' inputtest located in src/.libs finds all the
libraries it needs. Of course, they are removed when you 'make install'. But
libtool's scripts doesn't take the Adonthell backends mechanism into account,
so I had to add another layer, which sets up the ADONTHELL_MODULES_PATH
correctly before calling the command you give it.
For instance, if you want to run inputtest without having everything
installed, run (from $(builddir)/src):
$ sh run.sh inputtest
and it should work.
There is also a wrapper for python scripts, so the interpreter can find the
Adonthell Python modules:
$ sh python.sh $(srcdir)/src/inputtest.py
You've probably noticed that inputtest and inputtest.py are the C++ and Python
versions of the same program! You can look at both sources, they are heavily
commented. Take attention to the callback setting part. It has been a pain to
get everything working correctly. But setting a callback in C++ is very
little work, while it is completely transparent in Python! :)
That's about it - I haven't explained every details, especially concerning the
backends, but I'll write some real doc soon. I'm interested in hearing
whether you had luck running inputtest and inputtest.py. If it is the case,
then this source will make it into savannah!
Thanks,
Alex.
--
http://www.gnurou.org
- [Adonthell-devel] New code base released!,
Alexandre Courbot <=
- Re: [Adonthell-devel] New code base released!, Kai Sterker, 2003/06/08
- Re: [Adonthell-devel] New code base released!, Sasha Kushnirenko, 2003/06/16
- Re: [Adonthell-devel] New code base released!, Alexandre Courbot, 2003/06/16
- Re: [Adonthell-devel] New code base released!, Kai Sterker, 2003/06/19
- Re: [Adonthell-devel] New code base released!, Alexandre Courbot, 2003/06/19
- Re: [Adonthell-devel] New code base released!, Kai Sterker, 2003/06/19
- Re: [Adonthell-devel] New code base released!, Kai Sterker, 2003/06/19
- Re: [Adonthell-devel] New code base released!, Alexandre Courbot, 2003/06/22
- Re: [Adonthell-devel] New code base released!, Kai Sterker, 2003/06/22