31 July 2009

Obese debug information (sqlite and qtcreator)

SQLite.c is the 'amalgemon' version of the Database: a huge .c file containing all the dependencies to compile SQLite into our projects.

Using GCC, and standard mingw compilation option, we probably all notice the ton of compilation warning telling us that debug infos are too huge to be handled correctly (if you tried that, it's impossible to trace sqlite sources with gdb).
The problem is concerning the embedded debugging information in STABS format: GCC is handling more modern types of debugging info. We just have to tell it to use them (http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html)


in your .pro file (assuming you're using QtCreator), force these flags to be used:

#remove standard debug generation for c files
QMAKE_CFLAGS_DEBUG -= -g
#(*= 'if not present'), force uber debug infos, perfect for gdb
QMAKE_CFLAGS_DEBUG *= -ggdb


No more compilation warning=quickest compilation, and we're now able to trace sqlite.c in gdb... Another win ;-)

Mame 132 and automated avi creation

This is an How-To build a special mame.exe, wich allows some automation from AutoIt.

I needed to find a way to send keys inputs which would trigger AVI recording of my games: but as Mame is using 'raw inputs', it cant be fooled with standard windows messages injection

Fortunately the Mame project is really really (really) easy to modify and build, so i patched some sources to allow that.

First, go there and follow every steps: http://mamedev.org/tools/

Once you get your first build, modify some sources:

Add More Windows Message to allow events from the outside:

Augment raw inputs with incoming windows messages:

Build it and voila. You should have a brand new mame.exe, listening for your external messages.
I have such a binary build available for willing people.
Next post should be an explanation for the whole Mame Avi Move Maker build with AutoIt...
Regards (and eventually leave comments)

30 July 2009

Clutter 1.0.0: Win32/MinGW (updated)

Personal Hack for a win32 build of clutter-1.0.0 libraries.
  • static libraries,
  • interactive.exe and the whole dll package (glib, pango, etc),
  • and a configuration package (prebuild.zip)
In there.
Basically all you need is:

Get Code::Blocks/QtCreator whatever (but a Mingw flavor): http://www.codeblocks.org/downloads/5

Get Clutter-1.0.0, and unzip-it somewhere on your hdd: http://www.clutter-project.org/sources/clutter/1.0/
Get GTK dependencies from http://www.gtk.org/download-windows.html (binaries+dev packages): pango, cairo, glib, gtk+
Get some other Mingw port from http://sourceforge.net/project/showfiles.php?group_id=7382 :
gettext, libiconv

I put all those libraries side by side with clutter-1.0.0.

Concerning mingw, it's likely that the package delivered with cb/qtcreator is outdated:
Get latest mingw API For MS Windows (http://sourceforge.net/projects/mingw/files/ , dev version) and unzip it into your mingw directory
Get latest glext.h (http://www.opengl.org/registry/api/glext.h), to update your probably old \mingw\include\GL\GLext.h.

Now some autoconf stuff:

Get And Unzip prebuild.zip (http://alimbourg.free.fr/clutter-1.0.0) into clutter-1.0.0/build/
It will create some qtcreator\ dir as it's my primary develoment platform, but rename it at will.
The configuration package uses perl (i'm using tinyperl, included in archive) to autoconfigure clutter build, generate marshaling info and glib-enum-typing header files. It makes it ready to compile.
Edit configure.pl to match your installation directories as it needs GLIB for some prebuild steps.
Then, execute configure.bat.

(Finally, it tweaks some qtcreator .pro project files to list every needed source files all the content from clutter\, clutter\COGL, clutter\Pango, clutter\json, clutter\win32: this, of course, has to be done 'by hand' for the other tools)

It's now ready to compile...