|
ValaGenProject
Vala project skeleton creator with templates IntroductionVala GenProject is an utility that helps creating project skeletons for Vala programs and libraries How to useVala GenProject includes a Gtk+ UI and a command line interface and its usage is pretty simple, just select the wanted template, complete the dialog with the required information like author email and license, and click on the generate button. ScreeshotYou can see Vala GenProject here
How to create a new project templateProject templates are defined by 3 file:
These files can be stored in
(you can change these path at compile time) Template.ini fileThis file defines the template and it's a simple keyfile with just one Template section. For example: [Template] version=1.0 name=Console Application description=A Vala console application project details=This template will create and empty vala project with an empty main method language=vala build-system=autotools tags=glib,console
All the language, build-system and tags fields can be used to present a filtered list of templates in the ui (this is not supported by the current frontend) and here there are some tables that can be used as reference when choosing these values:
An here a list of common tags
Template.tar.gzThis file contains the actual template files. For example the console.tar.gz contails: -rw-r--r-- andrea/andrea 33 2010-06-06 17:35 AUTHORS.template -rwxr-xr-x andrea/andrea 164 2010-06-06 17:48 autogen.sh.template -rw-r--r-- andrea/andrea 0 2010-06-06 17:35 ChangeLog -rw-r--r-- andrea/andrea 874 2010-06-06 17:44 configure.ac.template -rw-r--r-- andrea/andrea 39 2010-06-06 17:35 MAINTAINERS.template -rw-r--r-- andrea/andrea 483 2010-06-06 17:47 Makefile.am.template -rw-r--r-- andrea/andrea 0 2010-06-06 17:35 NEWS drwxr-xr-x andrea/andrea 0 2010-06-06 18:47 po/ -rw-r--r-- andrea/andrea 48 2010-06-06 17:35 po/LINGUAS -rw-r--r-- andrea/andrea 0 2010-06-06 17:35 po/ChangeLog -rw-r--r-- andrea/andrea 11 2010-06-06 17:35 po/POTFILES.skip -rw-r--r-- andrea/andrea 91 2010-06-06 17:35 po/POTFILES.in -rw-r--r-- andrea/andrea 0 2010-06-06 17:35 README drwxr-xr-x andrea/andrea 0 2010-06-06 23:28 src/ -rw-r--r-- andrea/andrea 354 2010-06-06 23:28 src/main.vala.template -rw-r--r-- andrea/andrea 338 2010-06-06 17:47 src/Makefile.am.template As you can see there are a lot of files with the template extension, these ones will be read by vala-gen-project and parsed for special tag substitution. After this process the .template extension will be removed from the resulting file. Here a list of known tags:
OtherVala GenProject use a convenience library to do all its parsing and project generation so you can use it in your project too. Unlucky the documentation is still not written but you can see how is it used from the vala GenProject sources at: http://code.google.com/p/vtg/source/browse/trunk/gen-project/main.vala#114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||