Re: [Vala] Building a build tool



On Tue, Sep 29, 2009 at 11:30 PM, Phil Housley
<undeconstructed gmail com> wrote:
I've been messing around with a little build tool recently (well,
actually not that recently, but I've not had any time for a couple of
months,) aiming to build primarily Vala apps and libraries. Generally
it's a bit inspired by Maven, so you declare some units to build, and
let the tool decide what actually needs to be done.

Something that would be very sweet is if you've made it easy to embed
and access resources such as images and UI description files from
Vala.. any data really. So that the build system produces object files
from these, similar to that of winres on Wintendo, and QT's stuff
there. I've done this in my current SCons setup so that I can
distribute a single binary that contains my whole application. Here's
some examples:

Here using the BinaryBlob type:
http://git.xmms.se/?p=abraca.git;a=blob;f=data/ui/SConscript

And here using the GdkPixBuf C-Source program:
http://git.xmms.se/?p=abraca.git;a=blob;f=data/SConscript

Behind the scenes a .vapi file is generated to match these symbols so
that they can be used from within Vala:

http://git.xmms.se/?p=abraca.git;a=blob;f=src/medialib.vala#l65

See the Resources.XML.mediainfo there, which is a null terminated
string embedded into the binary.

The tools that perform these operations are kind of hacky, but works
well enough for my use cases:
http://git.xmms.se/?p=abraca.git;a=blob;f=site_scons/site_tools/binaryblob.py
http://git.xmms.se/?p=abraca.git;a=blob;f=site_scons/site_tools/gdkpixbufcsource.py

Also, I need to push the code somewhere, probably on launchpad, so I
need a name.  Currently I'm calling it Valapillar, but that's a pretty
obscure joke even to me, and I know why I chose it.

GitHub is pretty nice too.

-- 
Daniel Svensson



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]